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

Drop-Down and abilities

Hello, I have an abilitie like this with the name Schlafen8 &{template:default} {{name=Testi Tester schläft 8 Stunden}} {{Anzahl AP=[[ @{TESTAP} ]] AP}} {{Malus=[[ @{Testi Tester|TESTAP|max} - @{TESTAP} ]] AP}} {{Zugewinn = [[@{Testi Tester|TESTAP|max}-@{TESTAP}]] AP}} !modattr --silent --charid @{character_id} --TESTAP|$[[2]] !!! !setattr --silent --charid @{character_id} --TESTAP||%TESTAP% I want to create a drop down like this: ?{Schlafzeit| 8,%{Testi Tester|Schlafen8}| 4,tststs} This doesn't work. I understand that I have to replace some special charakters in the abilitie. But I come to no result. Hopefully some one can help me and give me some hints. THX for your support Wulfric
1611382066
GiGs
Pro
Sheet Author
API Scripter
You;ll need to copy the entire ability %{Testi Tester|Schlafen8} into the line: 8,%{Testi Tester|Schlafen8}| then you can work on changing the characters. You need ti change every } | and , character that is not part of an attribute call (you dont change any part of this @{Testi Tester|TESTAP|max} for example). For safety, you should probably also change this @{TESTAP} to @{Testi Tester|TESTAP}, at least while testing. Having some attributes refer to the character name, and others don't is weird.
@GiGs: Thank you for your feedback. That is excactly that what I also tried.  Here his the changed version ?{Schlafenszeit| 8,&{template:default } {{name=Testi Tester schläft 8 Stunden }} {{Anzahl AP=[[ @{Testi Tester|TESTAP} ]] AP }} {{Malus=[[ @{Testi Tester|TESTAP|max} - @{Testi Tester|TESTAP} ]] AP }} {{Zugewinn = [[ @{Testi Tester|TESTAP|max} - @{Testi Tester|TESTAP} ]] AP }} !modattr --silent --charid @{character_id} --TESTAP | $[[2]] !!! !setattr --silent --charid @{character_id} --TESTAP | | %TESTAP% 4,Tzzzz} I think I changed all critical characters outside an call. But the macro doesn't run. Maybe I have a "space" some where to much or I missunderstand something else. Sorry for asking again :-( Best regards Wulfric
1611395166
GiGs
Pro
Sheet Author
API Scripter
Have you tried it without the API calls, to see if it works on its own? Also, do the contents of any of the attributes include any of the special characters. I almost never use nested queries any more, preferring the chat menu approach=. Instead of this: ?{Schlafzeit| 8,%{Testi Tester|Schlafen8}| 4,tststs} you'd use something like /w "Testi Tester" &{template:default} {{name= Schlafzeit }} {{[Schlafen8](~Testi Tester|Schlafen8) }} This will create a menu of buttons (just one in this case) whispered to the player, and they click a button to choose which ability to run. It requires no change to the original abilities, which is why its so superior to nested queries. To add extra buttons you just need to add this structure: [name displayed on button](~character-name|ability-name)
1611416316
Andreas J.
Forum Champion
Sheet Author
Translator
Here is some info on HTML replacement use in macros: <a href="https://wiki.roll20.net/Complete_Guide_to_Macros_%26_Rolls#HTML_replacement" rel="nofollow">https://wiki.roll20.net/Complete_Guide_to_Macros_%26_Rolls#HTML_replacement</a> The guide might provide some other help with the details.
@Gigs: THX for your support. I use the buttons and it works great. @Andreas J: THX for the link. Helpfull information