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

Macros and abilities detection is not working

So,  I am playing "Vieja Escuela : Cyberpunk" template for a couple days ago, and I wrote like the type of shooting that each weapon a player have, and I did that , so when I done it, I was wanting to build a Query for those abilities , and them I saw a couple errors more , and then I tought something is wrong with the character detection (and I think that's the problem) and I replace some character to their html entities, but I got a different error ,and now I dont know what to do.  I will try to send the images in their corresponding order 1. On the right side you can see the abilities I created 2.A proof this ability (and all of them are working properly) 3.The error without the html entities 4.The error with the html entities
1591222587
GiGs
Pro
Sheet Author
API Scripter
It's not possible to help you fix this without seeing the actual macros (in text form - dont post screenshots of code).
1591222724

Edited 1591222840
GiGs
Pro
Sheet Author
API Scripter
Actually the last screenshot shows the error: when using html entities, you must only replace the characters you need to . You never ever replace the characters in attributes. When you have an attribute, like @{name|attribute}, you must leave it alone - dont replace the | and } in that. See the Never Replace Attributes heading here:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a>
GiGs said: Actually the last screenshot shows the error: when using html entities, you must only replace the characters you need to . You never ever replace the characters in attributes. When you have an attribute, like @{name|attribute}, you must leave it alone - dont replace the | and } in that. See the Never Replace Attributes heading here:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> Ok I am going to&nbsp; check it
GiGs said: It's not possible to help you fix this without seeing the actual macros (in text form - dont post screenshots of code). Ok , so this one is the ability ARMA0_tt_N &amp;{template:default} {{name=@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weaponname}}} {{TT-N}} {{@{Kumiko "Valhalla" Izumi|character_name}}} {{Tirada1=[[1d20+[[({0,floor(1-abs(@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weapontype}-1))}dl1)*(@{Kumiko "Valhalla" Izumi|strength_mod}-@{Kumiko "Valhalla" Izumi|dexterity_mod})+@{Kumiko "Valhalla" Izumi|dexterity_mod}]]+@{Kumiko "Valhalla" Izumi|ab}+@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_attackbonus}+?{Modificador|0}]]}} {{Daño=[[@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_tt}+[[({0,floor(1-abs(@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weapontype}-1))}dl1)*(@{Kumiko "Valhalla" Izumi|strength_mod}-@{Kumiko "Valhalla" Izumi|dexterity_mod})+@{Kumiko "Valhalla" Izumi|dexterity_mod}]]]]}} And here is the code of my Testing Query ?{Select|@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weaponname}, %{Kumiko "Valhalla" Izumi|ARMA0_tt_N} |Segunda, 0}} &nbsp; &nbsp; Note: At first&nbsp; instance, the code hadn't the character names in their respective attributes , but I added because I tought that it could made my query works, but it didn't . Anyway , the ability is working by itself , letting me with the conclusion that the error is in the query coding.
Driventub said: GiGs said: Actually the last screenshot shows the error: when using html entities, you must only replace the characters you need to . You never ever replace the characters in attributes. When you have an attribute, like @{name|attribute}, you must leave it alone - dont replace the | and } in that. See the Never Replace Attributes heading here:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> Ok I am going to&nbsp; check it So I check it , but is the same result I showed you before , the one that says without the html entities
1591329828
GiGs
Pro
Sheet Author
API Scripter
Driventub said: GiGs said: It's not possible to help you fix this without seeing the actual macros (in text form - dont post screenshots of code). Ok , so this one is the ability ARMA0_tt_N &amp;{template:default} {{name=@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weaponname}}} {{TT-N}} {{@{Kumiko "Valhalla" Izumi|character_name}}} {{Tirada1=[[1d20+[[({0,floor(1-abs(@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weapontype}-1))}dl1)*(@{Kumiko "Valhalla" Izumi|strength_mod}-@{Kumiko "Valhalla" Izumi|dexterity_mod})+@{Kumiko "Valhalla" Izumi|dexterity_mod}]]+@{Kumiko "Valhalla" Izumi|ab}+@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_attackbonus}+?{Modificador|0}]]}} {{Daño=[[@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_tt}+[[({0,floor(1-abs(@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weapontype}-1))}dl1)*(@{Kumiko "Valhalla" Izumi|strength_mod}-@{Kumiko "Valhalla" Izumi|dexterity_mod})+@{Kumiko "Valhalla" Izumi|dexterity_mod}]]]]}} And here is the code of my Testing Query ?{Select|@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weaponname}, %{Kumiko "Valhalla" Izumi|ARMA0_tt_N} |Segunda, 0}} Note: At first&nbsp; instance, the code hadn't the character names in their respective attributes , but I added because I tought that it could made my query works, but it didn't . Anyway , the ability is working by itself , letting me with the conclusion that the error is in the query coding. The error is definitely in the query coding. There arent any html entities in the code above, so its hard to say if you tried a correct version. But to illustrate: take this part: &nbsp;{{name=@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weaponname}}} You need to replace the last two }} with html entities, but NOT the first }, because it is part of the attribute call. Let me also suggest swicthing away from nested queries completely, because they are a pain, and use chat menus instead:&nbsp; <a href="https://app.roll20.net/forum/permalink/5927072/" rel="nofollow">https://app.roll20.net/forum/permalink/5927072/</a> You dont have to make any changes to the individual macros. You create a macro that prints a list of buttons to chat, one for each macro, then just click the button for the macro you want to use. It's MUCH easier than nested queries, and you can whisper the menu of buttons so it doesnt clutter up chat for anyone else.
1591334439
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I would also suggest not using quotes in a character name. I have seen errors spring from this practice.
Ok I am going to try it out
keithcurtis said: I would also suggest not using quotes in a character name. I have seen errors spring from this practice. Thanks! , I tried a week ago to use the Chat buttons , but it didn't work at that time . So these buttons are working , but I want to know how to create subsequent chat buttons . For example I would like to shoot to an enemy with a certain gun , then when I select that button in the chat would appear other buttons asking for what kind of fire you want to shoot(5 bullets, 3 bullets , 1 bullet) , and then for that selection I want in the chat appear another buttons that ask what conditions&nbsp; of the fire the player is having (Normal , Advantage, Disadvantage) and just there execute the correponding ability. For doing that I tought that queries were more convinient , but they weren't
1591461760
GiGs
Pro
Sheet Author
API Scripter
For the kind of thing youre asking there, you are better off using queries than buttons. macros cannot remember the results of previous macros, so to do it with buttons, you'd need to create a macro for every possible combination, and a few extra for the button macros to launch them. Probably he best combination would be to make a macro for everything to do with one shot: include a query for normal/advantage/disadvantage, and anything else that affects one shot. Then have that macro include a button to reuse the same macro, maybe label it "Another Shot", then you just need to click the button once for each attck you make. If the multiple shots are autofire, thats a different situation of course.
Thanks for the help !, I made it trought the chat menu&nbsp; . But I have kind of bug when I display too macros in the chat.&nbsp;
1591470379
GiGs
Pro
Sheet Author
API Scripter
That looks like an improperly formed rolltemplate. can you post the text roll here?
Well , it's the same that worked before &amp;{template:default} {{name=@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weaponname}}} {{TT-N}} {{@{Kumiko "Valhalla" Izumi|character_name}}} {{Tirada1=[[1d20+[[({0,floor(1-abs(@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weapontype}-1))}dl1)*(@{Kumiko "Valhalla" Izumi|strength_mod}-@{Kumiko "Valhalla" Izumi|dexterity_mod})+@{Kumiko "Valhalla" Izumi|dexterity_mod}]]+@{Kumiko "Valhalla" Izumi|ab}+@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_attackbonus}+?{Modificador|0}]]}} {{Daño=[[@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_tt}+[[({0,floor(1-abs(@{Kumiko "Valhalla" Izumi|repeating_attacks_$0_weapontype}-1))}dl1)*(@{Kumiko "Valhalla" Izumi|strength_mod}-@{Kumiko "Valhalla" Izumi|dexterity_mod})+@{Kumiko "Valhalla" Izumi|dexterity_mod}]]]]}} But I figured out how to solve it , I had to clear the history chat . Anyways I was trying to put a template to the menu , but it didn't work properly , this is the code &amp;{template:default}{{name=*Menu de armas - Valhalla*}} {{[@{Valhalla|repeating_attacks_$0_weaponname}](~Valhalla|P_0)}} {{[@{Valhalla|repeating_attacks_$2_weaponname}](~Valhalla|P_2)}} {{[@{Valhalla|repeating_attacks_$3_weaponname}](~Valhalla|P_3)}} and appear&nbsp; this , the macros appear in separte with the brackets instead of being in the same text box as the title:
1591483017

Edited 1591483078
Oosh
Sheet Author
API Scripter
Looks like you just need to remove your line breaks. You can have them inside the template field: &amp;{template:default}{{List of things 1. First Thing 2. Second Thing}} But not in between fields: &amp;{template:default}{{1.=First Thing}}&nbsp; &lt;==== line break marks the end of the template {{2.=Second Thing}}&nbsp; &lt;=== now outside the template, parsed as chat