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

Vampire the Requiem Token API

1380839136
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
I have my player’s tokens set up with three attributes tied to the circles in their tokens. Bar 1 is health, bar2 is willpower and bar 3 is vitae. I wrote the following API to automatically mark the tokens when the character’s vitae is low enough to be hungry/starving, when they are willed out, or have taken enough health to be suffering wound penalties and if so what the penalty is. Hungry/Starving on("change:graphic", function(obj) { if(obj.get("bar3_max") === "") return; if(obj.get("bar3_value") <= 4) { obj.set({ status_redmarker: true }); } else{ obj.set({ status_redmarker: false }) } if(obj.get("bar3_value") <= 0) { obj.set({ status_screaming: true }); } else { obj.set({ status_screaming: false }); } }); Exhausted on("change:graphic", function(obj) { if(obj.get("bar2_max") === "") return; if(obj.get("bar2_value") <= 0) { obj.set({ "status_back-pain": true }); } else { obj.set({ "status_back-pain": false }); } }); Wounded on("change:graphic", function(obj) { if(obj.get("bar1_max") === "") return; if(obj.get("bar1_value") == 2) { obj.set( "status_skull", "1" ); } else if(obj.get("bar1_value") == 1) { obj.set( "status_skull", "2" ); } else if(obj.get("bar1_value") <= 0) { obj.set( "status_skull", "3" ); } else { obj.set({ "status_skull": false }); } });
1380839230
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
I don't suppose anyone has written an API that generate a nWoD character sheet?