Development Postbot with Dice Rolling Features

Discussion in 'Support' started by Bloodcinder, Jun 12, 2015.

  1. chefTENGU

    chefTENGU Does not approve Administrator

    Likes Received:
    375
    Local Time:
    7:31 PM
    I'm fine with textual indicators, of course (I'm not going to ask you to design little red skull graphics, even though it would be awesome if you did). I'm just looking to facilitate ease of play so that someone would have one less thing to bitch about.

    Blood Bowl is a game where you spend a lot of time bitching about how Nuffle has cursed your dice. I experience it from time to time myself (I had to stop playing it before because I was using too many bad words around impressionable young ears).
     
  2. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    I've made sure that the postbot can only activate on making a new post, not an edit or a move.

    Also I added in permissions so that each user, group, or node can allow/disallow macros, for the sake of releasing the add-on. However, I've got our forum set to allow macros everywhere by anybody who is registered.
     
  3. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    I took about 5 minutes to make a magic eight ball macro.

    The question is... will anybody ever use it not in irony?
    !8ball
     
  4. Keenspark

    Keenspark Robot

    Likes Received:
    4
    Local Time:
    8:31 PM
    Better not tell you now.

    For: Bloodcinder Re: #28
     
    Last edited by a moderator: Jun 15, 2015
    Bloodcinder likes this.
  5. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    By the way, not that I'm going to bother demonstrating, but the macros don't have to be at the end of your post. That's the most natural place for them, but they'll work anywhere as long as they are on their own line starting with the exclamation point. I also made it so the prefix symbol can be selected from a list of options, but for historical (IRC-related) reasons I prefer the exclamation point.

    And this evening I made it so that the postbot's user info on the left of its messages is shrunk down unless you hover over it (at least in modern browsers).
     
    Last edited: Jun 13, 2015
  6. chefTENGU

    chefTENGU Does not approve Administrator

    Likes Received:
    375
    Local Time:
    7:31 PM
    Is there a way to reference which roll was summoned at which point in the post, or would that be too complicated?

    I'm wondering for the sake of a hypothetical situation where a DM wanted to be totally transparent and needed to roll several different times over the course of a single post in order to determine a number of disparate outcomes (perhaps the PCs run into and confront a bunch of rival NPCs, or a series of contested rolls need to be made.
     
  7. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    They list in the same order as they were requested. I could extend them to support #comments like Rolz.org does when you access it directly. Then you would say something like !rolz 1d20 #critical threat and it would include that comment in the output for the roll.
     
  8. chefTENGU

    chefTENGU Does not approve Administrator

    Likes Received:
    375
    Local Time:
    7:31 PM
    Those would be intensely useful for anything that involves a chain of rolls; that way the entire chain can be rolled at once, but you can label each individual part if it's important to know where it went wrong.

    Is it also possible to access the individual die results when you use a macro that rolls multiple dice? This is something that's crucial for a system like Shadowrun when you need to figure out if a glitch was rolled, regardless of whether the roll was a success or failure.
     
  9. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    The Rolz syntax only allows one comment at the end, and it just gets stuck on the end of the output. I can, however, make it work per-part on my end with some effort.

    Only if you roll each die separately, such as 1d6;1d6;1d6 instead of 3d6. If you want to see each die, I can modify it so you can specify a special flag to put it into verbose mode and show you all the individual dice in a multiple roll such as 3d6.

    I'm in the middle of major work getting the postbot configurable from the admin CP. Once that's all done, then I can work on the macros. Which, by the way, are being renamed triggers, as in you trigger the postbot to respond to you. This is partially because "macro" is an inaccurate term to use and because there is another major XenForo add-on which deals in macros, and I don't want there to be a branding confusion.
     
  10. chefTENGU

    chefTENGU Does not approve Administrator

    Likes Received:
    375
    Local Time:
    7:31 PM
    Aye-aye. Triggers it is.
     
  11. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    Triggers are disabled except for my secret testing area until I'm finished with today's coding. Otherwise the forum would be breaking for you every other post, and I don't think you want that.
     
  12. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    Can one of @chefTENGU or @Seegtease please log in to the admin panel, go to Applications, and confirm that you don't see the Postbot menu about half way down the left side?
     
  13. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    Also, you're free to use !rolz for now. The rest of what I have to do shouldn't break that. Note that I haven't implemented your suggestions yet (comments and verbose mode).
     
  14. chefTENGU

    chefTENGU Does not approve Administrator

    Likes Received:
    375
    Local Time:
    7:31 PM
    I see no such postbot application on the panel.
     
    Bloodcinder likes this.
  15. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    Good. That was the only way I could test the permissions, because the system automatically gives me permission to see everything even if I try to prevent it.
     
  16. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    Added the ability to label your rolls, which is always optional. (Also fixed it so a list of rolls on one line outputs on one line.)

    !rolz 1d20 #Attack; 3d6 #Damage; 1d6 #Fire
    !rolz d20; d20 #Second; d20
    !rolz 3d6
     
  17. Keenspark

    Keenspark Robot

    Likes Received:
    4
    Local Time:
    8:31 PM
    Attack: 18; Damage: 8; Fire: 6

    d20: 18; Second: 7; d20: 9

    3d6: 11

    For: Bloodcinder Re: #40
     
  18. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    Also, because the default roll (when omitted) is 1d20...

    !rolz

    You can even use a label without specifying the roll...

    !rolz #Label

    Which means that when you're rolling a bunch of d20's you can even simplify further (you only have to list the ones that aren't 1d20)...

    !rolz #Attack; #Damage; 1d6 #Fire
     
  19. Keenspark

    Keenspark Robot

    Likes Received:
    4
    Local Time:
    8:31 PM
    1d20: 20

    Label: 18

    Attack: 6; Damage: 2; Fire: 5

    For: Bloodcinder Re: #41
     
  20. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    I also added in the verbose mode you needed. Put a ? after any roll to see the entirety of the results.

    !rolz 3d6?

    Note that Rolz.org already has a "successes against a DC' feature.

    !rolz 5D20E18

    Put it all together...

    !rolz 5D20E18? #Criticals
     
  21. Keenspark

    Keenspark Robot

    Likes Received:
    4
    Local Time:
    8:31 PM
    3d6: 11 (6 +2 +3)

    5D20E18: 3

    Criticals: 1 (12, 5, 18, 13, 8 → 1 success against 18)

    For: Bloodcinder Re: #42
     
  22. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    Lastly, if you can tell me exactly what syntax of Rolz.org you need (obviously NdX rolls, +N adding, and *N multiplying... maybe higher than and lower than) I can reimplement it locally instead of even using Rolz.org. It might be simpler to have our own in-house syntax, especially since a lot of things they have are kind of obscure.

    Now... I'm going to bed. Goodnight.
     
    Last edited: Jun 16, 2015
  23. chefTENGU

    chefTENGU Does not approve Administrator

    Likes Received:
    375
    Local Time:
    7:31 PM
    Night! This is way cool.

    !rolz d6 #GFI
     
  24. Keenspark

    Keenspark Robot

    Likes Received:
    4
    Local Time:
    8:31 PM
    GFI: 6

    For: chefTENGU Re: #44
     
  25. Bloodcinder

    Bloodcinder Bird Bird Bird Developer

    Likes Received:
    324
    Local Time:
    8:31 PM
    Added a trigger to shuffle a list or shuffle and draw only some of the list.

    !shuffle Adam, Bob, Carol, Daniel, Erica
    !shuffle 2 Adam, Bob, Carol, Daniel, Erica