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

[Macro Help REQUEST] Recall previoues roll/selection

I have been wracking my brain, and googling and reading the wikis for this, and i have gotten no closer to an answer. First the (sudo-code macro) Assignment: ?{Assignment Path| One,Selected First Assignment Path | Two,Selected First Assignment Path | Three,Selected First Assignment Path } Skill, ?{Skill Choice| Personal Development,Personal Development [[1d6]] | Advanced Education,Advanced Education [[1d6]] | Commission (if possible),Commission [[1d6]] | Assignment Path, @{Assignment Path} [[1d6]] } This causes an " TypeError: Lt is undefined " Error - and I kind of know why. Because the code is wrong. What am I trying to do: Trying to "echo" what was selected for the " Assignment Path " choice option, but i can't seem to figure out how. Any Macro Gurus know how to set it up so I can finish my Macro? When the "Skill" is called, you get the option to select "Assignment Path" and it SHOULD reflect/echo what was previously selected for Assignment Path. But it does not, and i beg you smart people, how the hoot do i do that???
1646682429

Edited 1646682697
GiGs
Pro
Sheet Author
API Scripter
You can use the result of a query by typing the title of a query again, which is everything up to the first | ?{Assignment Path} Unfortunately, you cant easily nest queries inside other queries. You have to replace certain characters with a HTML Entity that represents the replaced character. Luckily you only need to replace one character here, the }, like so Assignment: ?{Assignment Path| One,Selected First Assignment Path | Two,Selected Second Assignment Path | Three,Selected Third Assignment Path } Skill, ?{Skill Choice| Personal Development,Personal Development [[1d6]] | Advanced Education,Advanced Education [[1d6]] | Commission (if possible),Commission [[1d6]] | Assignment Path, ?{Assignment Path} [[1d6]] } You might want to pretty it up with a rolltemplate: &{template:default} {{name=CAREER}} {{Assignment=?{Assignment Path| One,Selected First Assignment Path | Two,Selected Second Assignment Path | Three,Selected Third Assignment Path } }} {{Skill=?{Skill Choice| Personal Development,Personal Development [[1d6]] | Advanced Education,Advanced Education [[1d6]] | Commission (if possible),Commission [[1d6]] | Assignment Path, ?{Assignment Path} [[1d6]] } }} Change the name CAREER to whatever you want, and you can add extra rows by enclosing them in {{TITLE HERE=whatever you want to show here}}
I JUST finished the Template thing ;) (It was my plans already to do... ) I'll try the Nesting stuff and see how it goes :D EDIT: OMG it worked flawlessly! If ya like to have the Macro i made, here ya go: &{template:default} {{name=Career / Term Roll: ?{Career / Term Roll|1} }} {{Qualification= ?{Qualification Attribute| Strength,[[2d6 + @{selected|mod-Strength}]] STR | Dexterity,[[2d6 + @{selected|mod-Dexterity}]] DEX | Endurance,[[2d6 + @{selected|mod-Endurance}]] END | Intelligence,[[2d6 + @{selected|mod-Intellect}]] INT | Education,[[2d6 + @{selected|mod-Education}]] EDU | Social,[[2d6 + @{selected|mod-Social}]] SOC } }} {{Assignment= ?{Assignment Path| One,First Assignment Path | Two,Second Assignment Path | Three,Third Assignment Path } }} {{Skill= ?{Skill Choice| Personal Development,[[1d6]] Personal Development | Advanced Education,[[1d6]] Advanced Education | Commission (if possible),[[1d6]] Commission | Assignment Path,[[1d6]] ?{Assignment Path} } }} {{Survival= ?{Survival Attribute| Strength,[[2d6 + @{selected|mod-Strength}]] STR | Dexterity,[[2d6 + @{selected|mod-Dexterity}]] DEX | Endurance,[[2d6 + @{selected|mod-Endurance}]] END | Intelligence,[[2d6 + @{selected|mod-Intellect}]] INT | Education,[[2d6 + @{selected|mod-Education}]] EDU | Social,[[2d6 + @{selected|mod-Social}]] SOC } }} {{Event= [[2d6]] (If Life event:[[2d6]]) }} {{Advancement= ?{Advancement Attribute| Strength,[[2d6 + @{selected|mod-Strength}]] STR | Dexterity,[[2d6 + @{selected|mod-Dexterity}]] DEX | Endurance,[[2d6 + @{selected|mod-Endurance}]] END | Intelligence,[[2d6 + @{selected|mod-Intellect}]] INT | Education,[[2d6 + @{selected|mod-Education}]] EDU | Social,[[2d6 + @{selected|mod-Social}]] SOC } }} Works perfectly as intended! Thanks a lot!!!