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

Need Help Finding a Resource Management API/Script

Hello all. I'm trying to create a grand-strategy game for my friend group and I'd really like to set up some sort of automated resource calculator. For example, each player will make a certain amount of gold per turn that is added to their treasury. Is there some script or code API wizardry I could add to my game that automates and keeps track of this for me and assigns each player an inventory? I need a flexible and easy to understand system in which i can change a player's income of resources on the fly e.g. if a town of their's is destroyed, the rate of gold the make is decreased. I'd also like it to be easily adjustable in case more resources are added than just gold. Are there any pre-existing addons/scripts like this?
1587824462
The Aaron
Roll20 Production Team
API Scripter
I can't think of anything that's ideally suited to it.  You could set up characters for their income, and give them attributes like "gold_income" and "gold" and use ChatSetAttr to add the one to the other every so often. That's easily expanded simply by editing the attributes and adding more commands to your calculate macro/ability. 
1587824907
GiGs
Pro
Sheet Author
API Scripter
There's nothing that does exactly what you want, though the chatSetAttr script can easily change current values. You could easily write a macro that displays current values, and includes buttons to launch chatSetAttrs to change those values. If you state your specific needs someone might write a script that does exactly what you want. You'd need to be a Pro subscriber to use either method though.
Thanks for the replies, though it's not possible for me to get a Pro membership at the moment. Cheers!