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

is it possible to reference a repeating dropdown field attribute?

So in a macro I'm trying to construct I want to reference the value referred to by a drop down field. However it just seems to pull the text and not the attribute value it relates too Is it even possible to do this?.
1473687028
Pat S.
Forum Champion
Sheet Author
What is your macro?
Would you be able to provide the specifics of which sheet you're using, which field you're trying to reference, and what your macro looks like so far?
Soz im out and about so I can't detail this properly.  Ill give what I remember roughly from memory For example Repeatingaction_$3_damage + repeatingaction_$3_dropdownbox To give whatever the damage value is + the attribute referred to in the dropdown box where the dropdown box can be referring to strength_mod or dexterity_mod which is another calculated attribute. (Specifically the 5e shaped sheet.)  If its not clear currently I can wait till later to give the actual macro and actual pictures of what im trying to acheive.
1473687931

Edited 1473688511
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I think you're trying to make a macro that will dynamically apply str, dex, finesse, con, etc based on what is the relevant stat for an attack. Based on how the sheet behaves, it looks like the sheet uses sheetworkers to construct the attack's macro with the appropriate stat mod based on the dropdown selection. I don't think you're going to be able to reference what mod is used. What are you trying to do that you don't just want to use the premade sheet macros, we might be able to come up with another workaround. EDIT: Took a look at the sheet's html, it looks like that is the case. the actual values for the dropdown menu are the words strength, dexterity, constitution, etc. My guess would be that the sheet generated macro is created so that the macro call looks like @{dropdownvalue_mod} where dropdownvalue is replaced by the sheetworkers with the appropriate stat word.
Here's a 'hack' that can make this work: @{prefix}@{character_name}|@{repeating_attack_$0_damage_ability}_mod} Where the Current value of @{prefix} is just @{
1473702085
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Huh, I didn't know you could cause calls to call dynamically that way. That's really cool, and now I have so many ideas banging around in my head to use that.
Scott C. said: I think you're trying to make a macro that will dynamically apply str, dex, finesse, con, etc based on what is the relevant stat for an attack. Based on how the sheet behaves, it looks like the sheet uses sheetworkers to construct the attack's macro with the appropriate stat mod based on the dropdown selection. I don't think you're going to be able to reference what mod is used. What are you trying to do that you don't just want to use the premade sheet macros, we might be able to come up with another workaround. EDIT: Took a look at the sheet's html, it looks like that is the case. the actual values for the dropdown menu are the words strength, dexterity, constitution, etc. My guess would be that the sheet generated macro is created so that the macro call looks like @{dropdownvalue_mod} where dropdownvalue is replaced by the sheetworkers with the appropriate stat word. Yeah this is pretty much what I saw happening. Boo.  Silvyre said: Here's a 'hack' that can make this work: @{prefix}@{character_name}|@{repeating_attack_$0_damage_ability}_mod} Where the Current value of @{prefix} is just @{ I'll give this a go!
1473707653
vÍnce
Pro
Sheet Author
Silvyre said: Here's a 'hack' that can make this work: @{prefix}@{character_name}|@{repeating_attack_$0_damage_ability}_mod} Where the Current value of @{prefix} is just @{ Very nice.  ;-)
Holy balls that works! thanks alot!
Great! :)
1473710055
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
All bow to Silvyre, lord of macros and maths. ;)
Silvyre said: Great! :) <a href="https://www.youtube.com/watch?v=c3sOuEv0E2I" rel="nofollow">https://www.youtube.com/watch?v=c3sOuEv0E2I</a> WE ARE NOT WORTHY! :(