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

[5e Shaped][ChatSetAttr] Manipulating Offense Fields and Skills with Advantage.

1548209583

Edited 1548209614
Grrrrrr ... I'm having issues again.  I know, I know ... when DON'T I have issues!  LOL The first issue I'm having is toggling the offense field on and off in the 5e-Shaped character sheet using CSA.  I have a character stricken with Lycanthropy.  So when they change to Hybrid or Wolf Form, they have a bite attack ( repeating_offense_$0 ) which should be checked.  When they are in Hybrid form, they also have a Claw attack ( repeating_offense_$1 ) and should also be checked.  When they are in human form, they have neither, both should be unchecked. What functions to toggle the check box in these fields on and off?  It doesn't seem to be the same as modifiers:  repeating_offense_$0_active|1 doesn't get me anywhere. The second issue is 5e Shaped has a nice thing where you have advantage rolls on certain skill checks.  Werewolves get advantage on perception involving hearing or smell.  So perception for this character is repeating_skill_$11 - but how do I turn off and on it's advantage?  For this particular instance, I don't want the advantage to function unless they are in hybrid and wolf forms.  In human form they should be set to normal. Any suggestions?
1548214635

Edited 1548215791
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I think you need _carried instead of _active in that section. EDIT : Yes, I tested it on a sample character using !setattr --sel --repeating_offense_-Kkg9rVzjMHlW5PYyv3-_carried|0 I'd suggest using IDs rather than $0, since the order might change and break the utility of the macro. To find the ID, just trigger the ability, go into chat and press the up arrow. You can pull it from the macro template that was sent. I don't think advantage is assignable to a particular skill or attack. I believe it's a sheet-wide setting?
keithcurtis said: I think you need _carried instead of _active in that section. EDIT : Yes, I tested it on a sample character using !setattr --sel --repeating_offense_-Kkg9rVzjMHlW5PYyv3-_carried|0 I'd suggest using IDs rather than $0, since the order might change and break the utility of the macro. To find the ID, just trigger the ability, go into chat and press the up arrow. You can pull it from the macro template that was sent. I don't think advantage is assignable to a particular skill or attack. I believe it's a sheet-wide setting? Advantage is something you can change per skill in the Shaped sheet, it is set globally from settings for attacks .  In front of the dot that gives proficiency or expertise in a skill is a drop down menu.  When set to Normal, it shows nothing.  When clicked on, you can set Advantage or Disadvantage to be rolled.  But this should be something that CSA can change, I think.  I just don't know how to accomplish changing it.
1548223173
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try these, but replace with the appropriate Skill ID, of course (as describer above). And on a test character, for goodness sake. And if you are trying the last two, they might need some character escaping if you are planning on putting them in a larger macro. Normal !setattr --sel --repeating_skill_-l2c8lkllzgfythcuqnu_skill_d20|1d20 Advantage !setattr --sel --repeating_skill_-l2c8lkllzgfythcuqnu_skill_d20|2d20kh1 Disadvantage !setattr --sel --repeating_skill_-l2c8lkllzgfythcuqnu_skill_d20|2d20kl1 Query !setattr --sel --repeating_skill_-l2c8lkllzgfythcuqnu_skill_d20|?{Roll|Normal,d20|Advantage,2d20kh1|Disadvantage,2d20kl1} Sheet Setting !setattr --sel --repeating_skill_-l2c8lkllzgfythcuqnu_skill_d20|@{shaped_d20}
1548223231
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I had completely forgotten about the ability to set those values. I have a character with Boots of Elvenkind who needs some macro-ing!
keithcurtis said: I think you need _carried instead of _active in that section. EDIT : Yes, I tested it on a sample character using !setattr --sel --repeating_offense_-Kkg9rVzjMHlW5PYyv3-_carried|0 I'd suggest using IDs rather than $0, since the order might change and break the utility of the macro. To find the ID, just trigger the ability, go into chat and press the up arrow. You can pull it from the macro template that was sent. I don't think advantage is assignable to a particular skill or attack. I believe it's a sheet-wide setting? Ok - so I definitely have the UNCHECK working through this.  But what about the check?  "1" doesn't seem to turn the box 'on'.  I looked and thought "checked" was the operator, turns out it isn't.  hrrrrmmmmmm ..... puzzled and cafuzzled on this .... On the other hand, I'm glad I could set your thinking about that little trinket in the Shaped Sheet, as far as individual rolls on the skills.  Bring on the Boots of Elvenkind Macro!
1548225179
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Got it! On !setattr --sel --repeating_offense_-Kkg9rVzjMHlW5PYyv3-_carried| Off !setattr --sel --repeating_offense_-Kkg9rVzjMHlW5PYyv3-_carried|0
Guess what - the answer was right there ... "ON" ... lmao Yes ... to turn the box to checked it uses on as its operator ... ridiculously simple - and I had the answer all along. Final codes: Human ***Aria reverts to her human form.*** !setattr --silent --name Aria --repeating_modifier_$2_active|1 --repeating_modifier_$3_active|0 --repeating_modifier_$4_active|0 --speed|30 --languages|Common, Sylvan, Deep Speech --height|5'6" --weight|135 lbs. --temp_hp|0 --race|Human --alignment|Chaotic Neutral --repeating_offense_$0_carried|0 --repeating_offense_$1_carried|0 Werewolf ***Aria transforms to her werewolf (hybrid) form.*** !setattr --silent --name Aria --repeating_modifier_$2_active|0 --repeating_modifier_$3_active|1 --repeating_modifier_$4_active|0 --speed|30 --height|7'2" --weight|361 lbs. --languages|Common, Sylvan, Deep Speech.  Understands wolf but cannot speak it in this form.  --temp_hp|18 --race|Werewolf --alignment|Chaotic Evil --repeating_offense_$0_carried|on --repeating_offense_$1_carried|on Wolf ***Aria transforms into her wolf form.*** !setattr --mute --name Aria --repeating_modifier_$2_active|0 --repeating_modifier_$3_active|0 --repeating_modifier_$4_active|1 --speed|40 --height|4'2" --weight|176 lbs. --languages|Speaks only Wolf, Understands Common, Sylvan, Deep Speech, Wolf.  --temp_hp|18 --race|Wolf --alignment|Chaotic Neutral  --repeating_offense_$0_carried|on --repeating_offense_$1_carried|0 --repeating_offense_$2_carried|0 --repeating_offense_$3_carried|0 --repeating_offense_$4_carried|0 --repeating_offense_$5_carried|0 --repeating_offense_$6_carried|0 --repeating_offense_$7_carried|0 --repeating_offense_$8_carried|0 --repeating_offense_$9_carried|0 --repeating_offense_$10_carried|0  --repeating_offense_$11_carried|0 --repeating_offense_$12_carried|0 --repeating_offense_$13_carried|0 --repeating_offense_$14_carried|0 --repeating_offense_$15_carried|0 --repeating_offense_$16_carried|0 --repeating_offense_$17_carried|0 --repeating_offense_$18_carried|0 --repeating_offense_$19_carried|0 --repeating_offense_$20_carried|0 I decided to just leave the perception always set to query - as there will be times when the perception is based on sight - not hearing and smell.  So that was not left to CSA, but as a permanent skill setting on the sheet.  In her wolf form, she drops all carried items, so even though she doesn't have all those array objects filled, I still made sure of it, and just muted the errors I planned on it producing. I was wondering what the armor manipulations were.  I imagine they follow the same guideline, as an array, of being something such as "repeating_armor_$1_carried|on"?  Assuming the same for equipment, as "repeating_equipment_$1_carried|on"?
1548225973

Edited 1548226009
keithcurtis said: Got it! On !setattr --sel --repeating_offense_-Kkg9rVzjMHlW5PYyv3-_carried| Off !setattr --sel --repeating_offense_-Kkg9rVzjMHlW5PYyv3-_carried|0 ha!  got it too - at the same time, but found it differently
Thanks for all the help Keith!  Let me know how your Boots Macro works out!
1548227111

Edited 1548227126
To answer my own curiosity, in case others wondered, I tested and found these to be true: Armors: ON: --repeating_armor_$1_ worn |on OFF: --repeating_armor_$1_ worn |0 And equipment was right ON: --repeating_equipment_$1_carried|on OFF: --repeating_equipment_$1_carried|0
1548227211
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You're welcome. I like puzzling this stuff out; I'm sure it will have dividends such as a "boots macro". Sure is odd that both solutions work.
1548228408
Jakob
Sheet Author
API Scripter
keithcurtis said: You're welcome. I like puzzling this stuff out; I'm sure it will have dividends such as a "boots macro". Sure is odd that both solutions work. The reason that both work is that Roll20 treats an empty attribute like that attribute is at its default value, even if the default value is not an empty string, confusingly.
1548230656
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Confusing maybe, but it's handy to know. Thanks!
1548316032
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Here's a handy variation that can be saved as a generic script. It toggles whatever is in the first armor slot of the selected character, so long as they are using a PC sheet. I wanted to have it go further, but once you run out of filled slots it errors out, of course. /w gm &{template:5e-shaped} {{title=Armor Control}} {{text_big=**Armor of @{selected|character_name}** @{selected|repeating_armor_$0_name} [On](!setattr --silent --sel  --repeating_armor_$0_worn|) | [Off](!setattr --silent --sel  --repeating_armor_$0_worn|0)}}
1548317405
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Well, after further testing, it flips the toggle, but the AC doesn't update. I have "Use Sheet Workers" toggled on, which I hoped would be enough to have it trigger all the necessary fiddly bits, but no dice.