
So, I am taking my first step into the Roll20 API. I was a programmer in a past life (mostly XML, SQL, and a bit of Python) so I am working on learning Java and so far so good. I have a script in mind for an upcoming campaign and wanted to run if by some of you with more expertise to see I am thinking about the API in the right way. All I’m really looking for “Yes, that will work” or “No the API can’t do that (but it can do this)”. I am happy (and looking forward to) doing the leg work to get this to work, I just don't want to spend huge amounts of time on something that has no chance of success or has an obvious and fatal design flaw within the constraints of the Roll20 API.
So, the script is designed for the Pathfinder Serpent’s Skull AP. There are a number of camps in the jungle with their own stats and have to make a number of rolls each day.
Design Specifics:
-Each Camp will be represented by a token linked to a character sheet with a number of attributes for Defense, Exploration, and Supply.
-With a camp token selected you will run an API command that does the following:
Defense:
-Make four rolls (in Roll20) for wandering monsters (morning, midday, afternoon, night)
-For each roll that is successful, make a roll on a rollable table (in Roll20) to determine what the baddie is
-Calculate the DC based on the rollable table result and make a roll (d20 + campstat [from character sheet])
-Based on the success or failure of a roll add points to a Destruction pool via one of the bars on the camp token.
-All of this will be output into a roll template or some other chat log text that highlights what happened.
The Exploration and Supply rolls are variations of the one above so I won't spell them out.
So, the script is designed for the Pathfinder Serpent’s Skull AP. There are a number of camps in the jungle with their own stats and have to make a number of rolls each day.
Design Specifics:
-Each Camp will be represented by a token linked to a character sheet with a number of attributes for Defense, Exploration, and Supply.
-With a camp token selected you will run an API command that does the following:
Defense:
-Make four rolls (in Roll20) for wandering monsters (morning, midday, afternoon, night)
-For each roll that is successful, make a roll on a rollable table (in Roll20) to determine what the baddie is
-Calculate the DC based on the rollable table result and make a roll (d20 + campstat [from character sheet])
-Based on the success or failure of a roll add points to a Destruction pool via one of the bars on the camp token.
-All of this will be output into a roll template or some other chat log text that highlights what happened.
The Exploration and Supply rolls are variations of the one above so I won't spell them out.