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

[Request] Need 2 types of script (Weapon and Armor Durability)

Script #1 I run a weapon durability system that slowly degrades the weapons and I use a green circle to represent the amount of durability. Example:  Durability Effect 10 None 9 None 8 None 7 None 6 None 5 None 4 -1 atk rolls 3 -2 atk rolls 2 -3 atk rolls 1 -4 atk rolls 0 Destroyed So when I have a green status icon circle that reads 4,3,2,1 it will automatically adjust their weapon attack roll. =================================================== Script #2 Armor Durability  so this one may be tricky as I would like to attach a status icon, with a BAR 2 & BAR 3 and the character sheet field of AC so example everyone AC is 10 naturally, a full plate armor is +8, totaling for 18 AC. I would put a red status icon circle with the #8 and on BAR 3 (Durability) the #16. Every time BAR 3 loses 2 points of durability, it automatically updates the blue circle and reduces it 1. In turn, it automatically updates the character sheet AC to 14 AC which will reflect on BAR 2.  Every 2 points of durability = 1 AC, exception to the rule is Padded & Leather Armor as they have 3 durability points per AC.  Are these even possible to do?
1525833437
The Aaron
Pro
API Scripter
Certainly possible. Might be a bit complicated. Do you already have a way of applying the adjustment to attacks?  Like an attribute for misc adjustments or some such?
1525840683
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Script 1 can actually be done purely as a macro, assuming that your players will always have their token selected or you can link the bar to an attrbute on the character: [[1d20cf<[[19*({@{selected|bar1},10}=0)+1]] - [[{@{selected|bar1},10}<4 +{@{selected|bar1},10}<3+{@{selected|bar1},10}<2+{@{selected|bar1},10}<1]] ]]
oh man, I forgot about this.  Aaron, I am not following you. But it would need to modify the weapon in the "attacks & spellcasting" section. In between the Stats ability and the proficiency box. This is tied to a status marker icon that is applied to the token. 
1526317300

Edited 1526317334
Scott C. said: Script 1 can actually be done purely as a macro, assuming that your players will always have their token selected or you can link the bar to an attrbute on the character: [[1d20cf<[[19*({@{selected|bar1},10}=0)+1]] - [[{@{selected|bar1},10}<4 +{@{selected|bar1},10}<3+{@{selected|bar1},10}<2+{@{selected|bar1},10}<1]] ]] I am not understanding your macro.  Bar 1 = hp bar 2 = ac bar 3 = empty when I click on this macro - it's spitting random #s
1526317869
The Aaron
Pro
API Scripter
Nover C. said: oh man, I forgot about this.  Aaron, I am not following you. But it would need to modify the weapon in the "attacks & spellcasting" section. In between the Stats ability and the proficiency box. This is tied to a status marker icon that is applied to the token.  I was wondering if you already had a way to include the adjustments and were just looking for a way to automate adjusting them (say, if you already had an attribute named AC Adjustment that you're manually deducting from), or if part of the ask was a way to make those adjustments to the formulas and such.
1526317953
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Nover C. said: Scott C. said: Script 1 can actually be done purely as a macro, assuming that your players will always have their token selected or you can link the bar to an attrbute on the character: [[1d20cf<[[19*({@{selected|bar1},10}=0)+1]] - [[{@{selected|bar1},10}<4 +{@{selected|bar1},10}<3+{@{selected|bar1},10}<2+{@{selected|bar1},10}<1]] ]] I am not understanding your macro.  Bar 1 = hp bar 2 = ac bar 3 = empty when I click on this macro - it's spitting random #s Ah, when you said you use a green circle to represent durability, I thought you meant the token bars (bar 1 is green by default). If you're using the numbers on the token status icons, then that will need an API script (or you could use bar 3, and change all the bar 1 references in the macro to bar 3).
1526318696

Edited 1526318709
i dont know anything about scripts. I could something, when seeing a script, I could somewhat understand it and make adjustment, toying around - but script building - no clue at all.
Scott C. said: Nover C. said: Scott C. said: Script 1 can actually be done purely as a macro, assuming that your players will always have their token selected or you can link the bar to an attrbute on the character: [[1d20cf<[[19*({@{selected|bar1},10}=0)+1]] - [[{@{selected|bar1},10}<4 +{@{selected|bar1},10}<3+{@{selected|bar1},10}<2+{@{selected|bar1},10}<1]] ]] I am not understanding your macro.  Bar 1 = hp bar 2 = ac bar 3 = empty when I click on this macro - it's spitting random #s Ah, when you said you use a green circle to represent durability, I thought you meant the token bars (bar 1 is green by default). If you're using the numbers on the token status icons, then that will need an API script (or you could use bar 3, and change all the bar 1 references in the macro to bar 3). Bar 3 is reserved for the second part of the post (the Armor system ideally.)
1526319680
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Nover C. said: Scott C. said: Nover C. said: Scott C. said: Script 1 can actually be done purely as a macro, assuming that your players will always have their token selected or you can link the bar to an attrbute on the character: [[1d20cf<[[19*({@{selected|bar1},10}=0)+1]] - [[{@{selected|bar1},10}<4 +{@{selected|bar1},10}<3+{@{selected|bar1},10}<2+{@{selected|bar1},10}<1]] ]] I am not understanding your macro.  Bar 1 = hp bar 2 = ac bar 3 = empty when I click on this macro - it's spitting random #s Ah, when you said you use a green circle to represent durability, I thought you meant the token bars (bar 1 is green by default). If you're using the numbers on the token status icons, then that will need an API script (or you could use bar 3, and change all the bar 1 references in the macro to bar 3). Bar 3 is reserved for the second part of the post (the Armor system ideally.) Ah, then yeah, you'll need a script.