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 .
×

Need help building degradation API with hidden modifiers

Before I start I first wanna say that I have no experience with javascript and my free time doesn't give me a lot of opportunities to learn it on my own. But nevertheless I think a lot of DMs would find this an awesome mechanic to incorporate into their games (especial post-apocalyptic survival campaigns) so I've just gotta ask for some help. So I've got this idea for a tabletop session that involves having my players go through a zone filled with a hazardous gas. The gas when inhaled weakens your character and causes their rolls to take negative modifiers. The only way to avoid this de-buff is to wear special masks that filter out the toxins, but these masks will randomly degrade overtime. After a certain amount of in-game time I roll a d20 for a "degradation check". If it's a 14 or lower the mask does not degrade but a +1 to the next check, increasing the chance it will degrade. If the check comes up 15 or higher, the mask gains one level of degradation and the character takes a -1 to all their attack and physical skill checks. The degradation check process restarts and if another roll adds up to 15 or more the mask gains another level of degradation making the character take another -1 modifier. At level 3 the character passes out.  HOWEVER, the player MUST NOT SEE THIS modifier when they roll. I want to make it so that the only way a player can tell if their mask needs to be replaced is if another character checks it for them. Not only that but due to the nature of the gas and the mask's design, characters cannot replace their own masks. This mechanic will force the players to cooperate and keep a close eye on each other in order to survive. So, my question is, is there a way to incorporate this into Roll20? Can an API be built for me to keep track of my player's masks and hide whatever negative modifiers they accumulate? ex if a player does an athletics check and rolls a 5 it instead shows up as 4 on their screen? (minimum roll will always be a one, regardless of degradation level.) 
1564010088
The Aaron
Roll20 Production Team
API Scripter
Yes... ish.  An API could certainly be written that handles all these mechanics.  However, integrating it into a character sheet and hiding what the negative modifier a character has would be a pretty big effort, and you'd basically need to hide every roll from them.  You could do that by modifying the character sheet to double wrap all inline rolls ( [[ [[ some roll ]] ]] ), but to integrate with a character sheet, the attributes would still be there to figure it out.  You'd have to convert the sheet to pass all rolls through the API, which would be something of a monumental task, particularly if you want to retain all the sheet worker type functionality, etc.   Probably not worth the effort, but if you wanted to learn Javascript and give it a shot, I'ld be happy to consult on how to solve any problems you run into.