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

GroupCheck API and Passive Perception in 5rd OGL Sheet

1522415932

Edited 1522416234
Hi; Have anyone ever made a command to add passive perception to the commands for Groupcheck? (I am using the 5ed OGL sheet) I tried to play with the information on the API page but I am not a computer wizard :( I came to this script but it breaks the api and all stops working. !group-check-config --add { “PassivePerception” : { "name" : “Passive Perception Test", "formula" : “[[10+%npc_perception]]"}} And the second syntax give me the error "Error reading input." do not include the check but not crashes: !group-check-config --add { “PassivePerception” : { "name" : “Passive Perception Test", "formula" : “%npc_passiveperceptionbase%”}} Any help is welcome! Thx
1522416680

Edited 1522416704
Jakob
Sheet Author
API Scripter
I came to this script but it breaks the api and all stops working. Sorry, the crash is a bug in the current version 1.7 and commands containing inline rolls. Will be fixed next week. Try this: !group-check-config --add { "PassivePerception" : { "name" : "Passive Perception Test", "formula" : "\[%npc_passiveperceptionbase%\]"} } The main problem with your second attempt was that it had some weird calligraphic quotes ( “ ” ) instead of straight quotes ("), so the input could not be parsed. You can also leave out the "\[" and "\]" if you don't want the output to be an inline roll, and want the straight number instead (it will look nicer with an inline roll though, especially if you're using --process). I don't know if  npc_passiveperceptionbase is the right attribute name though, since I don't know anything about the sheet ... anyway, include whatever is the right attribute in its place if it's not the right name.
Jakob said: I came to this script but it breaks the api and all stops working. Sorry, the crash is a bug in the current version 1.7 and commands containing inline rolls. Will be fixed next week. Try this: !group-check-config --add { "PassivePerception" : { "name" : "Passive Perception Test", "formula" : "\[%npc_passiveperceptionbase%\]"} } The main problem with your second attempt was that it had some weird calligraphic quotes ( “ ” ) instead of straight quotes ("), so the input could not be parsed. You can also leave out the "\[" and "\]" if you don't want the output to be an inline roll, and want the straight number instead (it will look nicer with an inline roll though, especially if you're using --process). I don't know if  npc_passiveperceptionbase is the right attribute name though, since I don't know anything about the sheet ... anyway, include whatever is the right attribute in its place if it's not the right name. Thank you very much! The  npc_passiveperceptionbase i s a attribute set for the Hoard of the Dragon Queen NPCS. It will do for NPC check but for players I will need to wait for the next week update. Thank vey much!
1522417941

Edited 1522418128
As a side note I was able to find a attribute for pc: !group-check-config --add { "PassivePerception" : { "name" : "Passive Perception Check", "formula" : "\[%passive_wisdom%\]"} } Thank you very much! I think I will need the roll correction to have a global formula that works for both :(
1522418059

Edited 1522418398
Jakob
Sheet Author
API Scripter
It will do for NPC check but for players I will need to wait for the next week update. You can try this formula, which should work for both PCs and NPCs (I think): \[10 + (%perception_bonus%%pbd_safe%*(1-%npc%)) [PC] + (%npc_perception%*%npc%) [NPC]\] This will probably work, although there's some bugs in the API with constant rolls, perhaps you need to try this instead: \[10 + 0d0 + (%perception_bonus%%pbd_safe%*(1-%npc%)) [PC] + (%npc_perception%*%npc%) [NPC]\] Edit: Oh, passive_wisdom is much easier than my calculation here, then. Disregard it :). Edit2: Nevermind, I misread. You can still try what I wrote here, maybe. I think I will need the roll correction to have a global formula that works for both :( You can still enter inline rolls in the config just fine with \[ \], so for this specific use case you should be able to do everything.
Jakob you Rocks! The passive_wisdom doesn't work for NPCs. SO your calculations saved me. Just for reference the final version is: !group-check-config --add { "PassivePerception" : { "name" : "Passive Perception Test", "formula" : "\[10 + 0d0 + (%perception_bonus%%pbd_safe%*(1-%npc%)) [PC] + (%npc_perception%*%npc%) [NPC]\]]"} } Thx again!
1522418428
Jakob
Sheet Author
API Scripter
Cool, glad it worked.
Jakob said: Cool, glad it worked. Hi Jakob; Sorry for troubling you again but could you help me again. For Hoard of the dragon queen module the AC attribute is npcd_AC, so if I want to create a new group-check I come up with the sentence below, but this is not working. Could you check this for me plesae? !group-check-config --add { "AC_New" : { "name" : "AC New", "formula" : "\[0d0 + (%AC%%pbd_safe%*(1-%npc%)) [PC] + (%npcd_ac%*%npc%) [NPC]\]]"} }
1522946287
Jakob
Sheet Author
API Scripter
Alvaro T. said: Jakob said: Cool, glad it worked. Hi Jakob; Sorry for troubling you again but could you help me again. For Hoard of the dragon queen module the AC attribute is npcd_AC, so if I want to create a new group-check I come up with the sentence below, but this is not working. Could you check this for me plesae? !group-check-config --add { "AC_New" : { "name" : "AC New", "formula" : "\[0d0 + (%AC%%pbd_safe%*(1-%npc%)) [PC] + (%npcd_ac%*%npc%) [NPC]\]]"} } The way to define new checks has changed with version 1.8. I also just realized that while I changed the documentation to accomodate that, I messed up when writing the documentation, so it's nonsense currently. The correct way to define this thing right now would be !group-check-config --add { "AC" : { "name" : "AC", "formula" : "\[0d0 + (\at{AC}\at{pbd_safe}*(1-\at{npc})) [PC] + (\at{npcd_ac}*\at{npc}) [NPC]\]"} } (No need for AC_New, it will automatically overwrite the old AC if you do it like this)
1522947258

Edited 1522947393
Jakob said: Alvaro T. said: Jakob said: Cool, glad it worked. Hi Jakob; Sorry for troubling you again but could you help me again. For Hoard of the dragon queen module the AC attribute is npcd_AC, so if I want to create a new group-check I come up with the sentence below, but this is not working. Could you check this for me plesae? !group-check-config --add { "AC_New" : { "name" : "AC New", "formula" : "\[0d0 + (%AC%%pbd_safe%*(1-%npc%)) [PC] + (%npcd_ac%*%npc%) [NPC]\]]"} } The way to define new checks has changed with version 1.8. I also just realized that while I changed the documentation to accomodate that, I messed up when writing the documentation, so it's nonsense currently. The correct way to define this thing right now would be !group-check-config --add { "AC" : { "name" : "AC", "formula" : "\[0d0 + (\at{AC}\at{pbd_safe}*(1-\at{npc})) [PC] + (\at{npcd_ac}*\at{npc}) [NPC]\]"} } (No need for AC_New, it will automatically overwrite the old AC if you do it like this) Thank you very much! Worked like magic ;) have a great day!
Alvaro T. said: Jakob you Rocks! The passive_wisdom doesn't work for NPCs. SO your calculations saved me. Just for reference the final version is: !group-check-config --add { "PassivePerception" : { "name" : "Passive Perception Test", "formula" : "\[10 + 0d0 + (%perception_bonus%%pbd_safe%*(1-%npc%)) [PC] + (%npc_perception%*%npc%) [NPC]\]]"} } Thx again! This isnt working for me any recommendation saying "SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "r" found."
1522991378

Edited 1522991422
Jakob
Sheet Author
API Scripter
As I said with the AC example, the syntax has changed, you should now use \at{attribute} instead of %attribute%.
Thank you this seemed to work !group-check-config --add { "PassivePerception" : { "name" : "Passive Perception Test", "formula" : "\[10 + 0d0 + (\at{perception_bonus}\at{pbd_safe}*(1-\at{npc})) [PC] + (\at{npc_perception}*\at{npc}) [NPC]\]"} }