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 .
×

Token Action Problem

1770719800

Edited 1770754976
I’ve got a series of skills set up as token actions with the individual skill looking like this:   /em uses 3-D Printing [[@{Knowledge}d6 + @{3-D Printing}d6]]   Since I had a bunch of skills, I wanted to de-clutter the token action bar so I went with this:   ?{Which ability?|3-D Printing,%{Von Far|3-D Printing} |Alertness,%{Von Far|Alertness} |Bluff,%{Von Far|Bluff} |Bribery,%{Von Far|Bribery} |Dodge,%{Von Far|Dodge} |Electronics,%{Von Far|Electronics} |Field Medicine,%{Von Far|Field Medicine} |Geology,%{Von Far|Geology} |Hacking,%{Von Far|Hacking} |Info Gathering,%{Von Far|Info Gathering} |Investigation,%{Von Far|Investigation} |Large Guns,%{Von Far|Large Guns} |Melee,%{Von Far|Melee} |Navigation,%{Von Far|Navigation} |Parkour,%{Von Far|Parkour} |Repair,%{Von Far|Repair} |Search,%{Von Far|Search} |Small Guns,%{Von Far|Small Guns} |Stealth,%{Von Far|Stealth} |Traps,%{Von Far|Traps} |Vehicles,%{Von Far|Vehicles} |Zero-G Combat,%{Von Far|Zero-G Combat} }   This was working fine until I decided I wanted players to have the ability to add in modifiers and changed the individuals skills to:   /em uses 3-D Printing [[@{Knowledge}d6 + @{3-D Printing}d6 + ?{Modifier|0} ]]   Now when the input value prompt comes up instead of the list of all the skills it only shows the first skill and the modifier option:     I don’t know anything about programming and I’m totally stuck at this point. No idea why it’s doing this or how to fix it. Can anyone help me out? Much appreciated :)
1770748140
Gauss
Forum Champion
Hi Andreas L.,  First, your image did not process, please edit your post and repost the image.  Second, what are the contents of every "%" command? Is it the /em uses 3-D printing" followed by the [[ ]] line? Remember, everything (attributes, commands, etc) gets filled out before the query is processed. So you are putting two queries in.  The contents of each command from:  "/em uses 3-D Printing [[@{Knowledge}d6 + @{3-D Printing}d6 + ?{Modifier|0}]]" to:  "3-D Printing [[@{Knowledge}d6 + @{3-D Printing}d6" Then change the initial macro to:  /em uses  ?{Which ability?} + ?{Modifier|0}]] That moves the offending query outside of the command.  Additionally it moves the other common element out.  Always try to pull common elements out.  The only drawback here is that you won't be able to use those commands without the top level macro. 
1770756487

Edited 1770756649
Hi Gauss, Tried to edit the post but it won't show the screenshot. Second, not sure what you mean with the content of every % command. What initial macro are you talking about? What is the top level macro you are referring to? I apologize in advance if I sound dumb, but you might have to explain it like you're talking to a 2 year old :)
1770766496

Edited 1770766798
Gauss
Forum Champion
This is your top level macro:  ?{Which ability?|3-D Printing,%{Von Far|3-D Printing} |Alertness,%{Von Far|Alertness} |Bluff,%{Von Far|Bluff} |Bribery,%{Von Far|Bribery} |Dodge,%{Von Far|Dodge} |Electronics,%{Von Far|Electronics} |Field Medicine,%{Von Far|Field Medicine} |Geology,%{Von Far|Geology} |Hacking,%{Von Far|Hacking} |Info Gathering,%{Von Far|Info Gathering} |Investigation,%{Von Far|Investigation} |Large Guns,%{Von Far|Large Guns} |Melee,%{Von Far|Melee} |Navigation,%{Von Far|Navigation} |Parkour,%{Von Far|Parkour} |Repair,%{Von Far|Repair} |Search,%{Von Far|Search} |Small Guns,%{Von Far|Small Guns} |Stealth,%{Von Far|Stealth} |Traps,%{Von Far|Traps} |Vehicles,%{Von Far|Vehicles} |Zero-G Combat,%{Von Far|Zero-G Combat} } This is a command:  %{Von Far|3-D Printing} If I understand your structure correctly, this is the contents of that command:  /em uses 3-D Printing [[@{Knowledge}d6 + @{3-D Printing}d6 + ?{Modifier|0}]] But you have stuck a query inside a query and that breaks it.  You see:  ?{Which ability?|3-D Printing,%{Von Far|3-D Printing} |Alertness,............... Roll20 sees:  ?{Which ability?|3-D Printing, /em uses 3-D Printing  [[@{Knowledge}d6 + @{3-D Printing}d6 + ?{Modifier|0} ]] |Alertness,............... You have put a query inside a query...that is a no-no unless you use HTML substitution.  That looks like:  /em uses 3-D Printing [[@{Knowledge}d6 + @{3-D Printing}d6 +  ?{Modifier|0} ]] I replaced the vertical pipe "|" and the ending bracket "}" with their HTML entities.  My suggestion, take everything that is common to each command (I assume they are in Ability macros?) and move them to the top level macro.  Like this:  /em uses  ?{Which ability?|3-D Printing,%{Von Far|3-D Printing} |Alertness,%{Von Far|Alertness} |Bluff,%{Von Far|Bluff} |Bribery,%{Von Far|Bribery} |Dodge,%{Von Far|Dodge} |Electronics,%{Von Far|Electronics} |Field Medicine,%{Von Far|Field Medicine} |Geology,%{Von Far|Geology} |Hacking,%{Von Far|Hacking} |Info Gathering,%{Von Far|Info Gathering} |Investigation,%{Von Far|Investigation} |Large Guns,%{Von Far|Large Guns} |Melee,%{Von Far|Melee} |Navigation,%{Von Far|Navigation} |Parkour,%{Von Far|Parkour} |Repair,%{Von Far|Repair} |Search,%{Von Far|Search} |Small Guns,%{Von Far|Small Guns} |Stealth,%{Von Far|Stealth} |Traps,%{Von Far|Traps} |Vehicles,%{Von Far|Vehicles} |Zero-G Combat,%{Von Far|Zero-G Combat} }  +?{Modifier|0}]] And the %{Von Far|3-D Printing} command's output is changed to:  3-D Printing [[@{Knowledge}d6 + @{3-D Printing}d6 Because the second query is not inside the first query it won't break the first query. Note: this makes some an assumption based on your original statements.   I assume you are using a Character's Abilities on the Attributes and Abilities tab and that is where "3-D Printing" is calling to.  If it is calling to a button on a sheet then modifying that button may not be possible. 
Hi Gauss, All of your assumptions about my setup were correct. I would like to express my very great thanks to you for taking the time and effort to write this all out for me. You are a god among men! My thanks will follow you for all eternity!!!