Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[script request or if done] GM Checks (possibly for whole party)

Hi all, While planning my first play session I came upon I wish I had for a script. Let me explain: We are playing Midgard, a german RPG. In it we have basic d20 checks with modifiers. For example, there is an attribute called "perception". It's used if people notice something. Now every character has a value for perception (e.g. +2) and there can be a basic modifier (e.g. +5 or -4). If the roll reaches 20 or above, there is a success. Now what I can do is a macro to the selected token/char and check against his attribute (which is stored on his sheet). But when I have 5 players I have to select every token and run the macro. In addition, there are several attributes I want to check without the player noticing or at least not visible to him. So my dream would be to have a "GM-Check". I imagine starting the script which first asks me if I want to do the check for one person only or the whole party. After that I can select what attribute I want to check (e.g. perception, spot, pickpocket), then asks for the modifier and rolls the checks. I would then get a summary for all rolls (only visible to the GM). That way when they walk through a corridor and there is a secret door to be found, I can run a mass check and get an instant result without having to do 5 separate checks. I wouldn't mind editing the script with the player names myself if they can't be automatically looked up by the script. It would also be great if I could expand the script myself once it's done if we add other checks (e.g. poison). Is there something like that done or could someone point me into the right direction? Maybe there exists a script that does something similar which I could alter (permission granted)?
1458055424

Edited 1458055805
What I have done in the past is simply make a macro for this seeing as though you have a finite number of players and hopefully they aren't changing their names often. So for perception you would have something like: /w GM &{template:default} {{name=GM Perception}} {{Character1=[[1d20+@{Character1|perception}]]}} {{Character2=[[1d20+@{Character2|perception}]]}} Just use your roll template, customize the name and attribute modifiers, then replace all instances of Character1, Character2, etc.. with the actual player names. It takes a bit of prep to get the checks you want, but should allow you to have multiple buttons that do what you want. Now with that said, this could be done with the API, but you would need to pass the skill names in with the command.
1458055658
The Aaron
Pro
API Scripter
I started writing something like this for GenKitty once, but haven't finished it (Apologies GenKitty!!).  It's certainly something I would use and I'd like to write one once I get caught up on other things (migrating all my scripts to a new configuration system, finishing up some outstanding partial scripts, etc).  You could setup a macro with a roll query fairly easily.  Silvyre and Ziechael are the real masters of that but it could look something like this: /w gm &{template:default}{{name=Blind check: ?{skill|perception|spot|pickpocket}}}{{@{bob|charactername}=[[1d20+@{bob|?{skill}}]]}}{{@{francis|charactername}=[[1d20+@{francis|?{skill}}]]}} You'd just need to adjust the first ?{skill} with each of the attribute names.  (I didn't test this so be prepared to debug my syntax... =D )
Ah, that's a great start, thanks a lot. There is only a finite amount of checks and the player names rarely change (it's the same biweekly group) so I could live with that. I also looked more into the API's and might give it a try in the future. There are some amazing scripts I've seen which I can use as a foundation I think.
Aaron replied while I was replying :) So thanks to you as well. It looks more complicated, but also more powerful ;) I wonder if I could find an easy way to configure scripts easily.. e.g. I imagine I could use a rollable table to store all the player names. Then another table with the possible attributes for checks. In the script I would then loop through the player table to do a roll for the whole group and could use the attribute table to fill a dropdown box with the attributes. That way it could be easily setup by the GM without having to change the script. I could even use the weigh value to sort the attribute table.... But I haven't really looked into the API to see what's possible or not... will have to do that at home :)
1458057249
The Aaron
Pro
API Scripter
Many Character sheets feature an attribute like 'is_NPC' which could be used as a filter on which characters are player characters.  Additionally, you could add such an attribute yourself. For configuring scripts, it's nice to be able to store the information in the state object, which is persisted across restarts of the API Sandbox.  Personally, I'd probably do something along the lines of selecting all the tokens that are PCs and running a command like '!group-check --add-players' to harvest the player ids from all the selected tokens and store those ids in the state object.  Then you can just use that list as part of your filtering processes at other points.   There's a lot of ways to skin that cat, but definitely post questions if you start writing some scripts and want to find a way to do things.  There's a bunch of clever people with clever ideas (you should see some of the things Stephen Shomo comes up with!) hanging out just waiting to provide you with lots of help!  =D
1458071134

Edited 1458071461
In case you were still interested in using Roll Queries to handle this, I wrote a framework for your macro using Advanced Usage for Roll Queries . I'll post two versions of this framework: The first version does not use HTML entities (meaning it's incomplete), but it might be easier to see what's going on, or deconstruct this way. The second version has the proper HTML entities; I recommend first copying/pasting/entering it into the text chat in-game to see what it does, and seeing if that helps you make sense of it. First Version (No HTML entities) /w gm ?{Check for| Individual, ?{Player|         Player1, Player1: ?{Check|             SkillA, (SkillA) [[ 1d20 + ?{Mod|0} [+ Attribute1A] ]] |             SkillB, (SkillB) [[ 1d20 + ?{Mod|0} [+ Attribute1B] ]] |             SkillC, (SkillC) [[ 1d20 + ?{Mod|0} [+ Attribute1C] ]] |             SkillD, (SkillD) [[ 1d20 + ?{Mod|0} [+ Attribute1D] ]]             } |                  Player2, Player2: ?{Check|             SkillA, (SkillA) [[ 1d20 + ?{Mod|0} [+ Attribute2A] ]] |             SkillB, (SkillB) [[ 1d20 + ?{Mod|0} [+ Attribute2B] ]] |             SkillC, (SkillC) [[ 1d20 + ?{Mod|0} [+ Attribute2C] ]] |             SkillD, (SkillD) [[ 1d20 + ?{Mod|0} [+ Attribute2D] ]]             } |                  Player3, Player3: ?{Check|             SkillA, (SkillA) [[ 1d20 + ?{Mod|0} [+ Attribute3A] ]] |             SkillB, (SkillB) [[ 1d20 + ?{Mod|0} [+ Attribute3B] ]] |             SkillC, (SkillC) [[ 1d20 + ?{Mod|0} [+ Attribute3C] ]] |             SkillD, (SkillD) [[ 1d20 + ?{Mod|0} [+ Attribute3D] ]]             } |                  Player4, Player4: ?{Check|             SkillA, (SkillA) [[ 1d20 + ?{Mod|0} [+ Attribute4A] ]] |             SkillB, (SkillB) [[ 1d20 + ?{Mod|0} [+ Attribute4B] ]] |             SkillC, (SkillC) [[ 1d20 + ?{Mod|0} [+ Attribute4C] ]] |             SkillD, (SkillD) [[ 1d20 + ?{Mod|0} [+ Attribute4D] ]]             }                  } | Party, ?{Check|         SkillA, (SkillA) Player1: [[ 1d20 + ?{Mod|0} [+ Attribute1A] ]] Player2: [[ 1d20 + ?{Mod} [+ Attribute2A] ]] Player3: [[ 1d20 + ?{Mod} [+ Attribute3A] ]] Player4: [[ 1d20 + ?{Mod} [+ Attribute4A] ]] |         SkillB, (SkillB) Player1: [[ 1d20 + ?{Mod|0} [+ Attribute1B] ]] Player2: [[ 1d20 + ?{Mod} [+ Attribute2B] ]] Player3: [[ 1d20 + ?{Mod} [+ Attribute3B] ]] Player4: [[ 1d20 + ?{Mod} [+ Attribute4B] ]] |         SkillC, (SkillC) Player1: [[ 1d20 + ?{Mod|0} [+ Attribute1C] ]] Player2: [[ 1d20 + ?{Mod} [+ Attribute2C] ]] Player3: [[ 1d20 + ?{Mod} [+ Attribute3C] ]] Player4: [[ 1d20 + ?{Mod} [+ Attribute4C] ]] |         SkillD, (SkillD) Player1: [[ 1d20 + ?{Mod|0} [+ Attribute1D] ]] Player2: [[ 1d20 + ?{Mod} [+ Attribute2D] ]] Player3: [[ 1d20 + ?{Mod} [+ Attribute3D] ]] Player4: [[ 1d20 + ?{Mod} [+ Attribute4D] ]]         } } Second Version (HTML entities) /w gm ?{Check for| Individual, ?{Player|         Player1, Player1: ?{Check|             SkillA, (SkillA) [[ 1d20 + ?{Mod|0} [+ Attribute1A] ]] |             SkillB, (SkillB) [[ 1d20 + ?{Mod|0} [+ Attribute1B] ]] |             SkillC, (SkillC) [[ 1d20 + ?{Mod|0} [+ Attribute1C] ]] |             SkillD, (SkillD) [[ 1d20 + ?{Mod|0} [+ Attribute1D] ]]             } |                  Player2, Player2: ?{Check|             SkillA, (SkillA) [[ 1d20 + ?{Mod|0} [+ Attribute2A] ]] |             SkillB, (SkillB) [[ 1d20 + ?{Mod|0} [+ Attribute2B] ]] |             SkillC, (SkillC) [[ 1d20 + ?{Mod|0} [+ Attribute2C] ]] |             SkillD, (SkillD) [[ 1d20 + ?{Mod|0} [+ Attribute2D] ]]             } |                  Player3, Player3: ?{Check|             SkillA, (SkillA) [[ 1d20 + ?{Mod|0} [+ Attribute3A] ]] |             SkillB, (SkillB) [[ 1d20 + ?{Mod|0} [+ Attribute3B] ]] |             SkillC, (SkillC) [[ 1d20 + ?{Mod|0} [+ Attribute3C] ]] |             SkillD, (SkillD) [[ 1d20 + ?{Mod|0} [+ Attribute3D] ]]             } |                  Player4, Player4: ?{Check|             SkillA, (SkillA) [[ 1d20 + ?{Mod|0} [+ Attribute4A] ]] |             SkillB, (SkillB) [[ 1d20 + ?{Mod|0} [+ Attribute4B] ]] |             SkillC, (SkillC) [[ 1d20 + ?{Mod|0} [+ Attribute4C] ]] |             SkillD, (SkillD) [[ 1d20 + ?{Mod|0} [+ Attribute4D] ]]             }                  } | Party, ?{Check|         SkillA, (SkillA) Player1: [[ 1d20 + ?{Mod|0} [+ Attribute1A] ]] Player2: [[ 1d20 + ?{Mod} [+ Attribute2A] ]] Player3: [[ 1d20 + ?{Mod} [+ Attribute3A] ]] Player4: [[ 1d20 + ?{Mod} [+ Attribute4A] ]] |         SkillB, (SkillB) Player1: [[ 1d20 + ?{Mod|0} [+ Attribute1B] ]] Player2: [[ 1d20 + ?{Mod} [+ Attribute2B] ]] Player3: [[ 1d20 + ?{Mod} [+ Attribute3B] ]] Player4: [[ 1d20 + ?{Mod} [+ Attribute4B] ]] |         SkillC, (SkillC) Player1: [[ 1d20 + ?{Mod|0} [+ Attribute1C] ]] Player2: [[ 1d20 + ?{Mod} [+ Attribute2C] ]] Player3: [[ 1d20 + ?{Mod} [+ Attribute3C] ]] Player4: [[ 1d20 + ?{Mod} [+ Attribute4C] ]] |         SkillD, (SkillD) Player1: [[ 1d20 + ?{Mod|0} [+ Attribute1D] ]] Player2: [[ 1d20 + ?{Mod} [+ Attribute2D] ]] Player3: [[ 1d20 + ?{Mod} [+ Attribute3D] ]] Player4: [[ 1d20 + ?{Mod} [+ Attribute4D] ]]         } } Please let me know if you have any questions; if you're still interested, I'll be happy to help with building on this framework for your specific use. :)
Awesome tips there! Thanks a lot! You can't imagine how much I appreciate the friendly and helpful tone in this community. It's almost shocking :)))) Silvyre: It works like a charm.... however (and I hope I'm not coming over as ungrateful) but it will be a lot of manual work to expand it. Meaning if there is a new player, I have to edit the whole macro. Now basically it's not that much to do (copy/paste ftw), but I would love to have a cleaner/easier solution. I think if there could be a way to do it as easy as possible, a lot of GM's would be thankful for it. Nevertheless, it's a great solution and I will most likely use it untill I found the (for me) perfect way :) Thanks a lot. Aaron: Thank you for your hints on what is possible. I still thin (belive) a (rollable) table would be easier to handle than to have to select the whole party and run the script every time. Once the table is set (which is only adding the names of the partymembers) I never would have to worry about it and could just use my script. But maybe once I work with it I will change my noob opinion :) I would love to start working on a script like that to get into the whole API thing. I have a little background as a developer (although not in javascript) and I think with the great help here I could get something out that would at least work for me. I'm still in the process of gathering ideas and looking in other scripts how others achieve their goals. And I'm really impressed. I will defintely let you all know how it's going....
1458127268
The Aaron
Pro
API Scripter
No worries, I'm happy to help however I can. Regarding selecting the tokens, storing the character ids world only need to happen once. You'd put them in the state object, then they would be there until you removed them. I'll see if I can whip up a small example once I'm on my computer.