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

Template messing up my rolls

Greetings, all you beautiful Rollers! I am new to this wonderful place, but I am already trying to build some macros to make Burning Wheel combat easier for my players. At the moment, I am working on a macro that pulls some Attributes from the character sheet and makes an attack roll and puts damage information in one template. I am encountering two problems. 1. I cannot seem to be use the simple attribute declaration of @{power}d6. When I do this, I get the error  TypeError: Cannot read property 'substring' of undefined. However, when do almost the same, but with "selected": @{selected|power}d6 everything works fine. Is that because I am the GM and not a player, or am I doing something wrong? 2. The second problem is more mysterious to me. I am building a template, each element of which draws from the same selection of weapon. When run separately, each macro seems to work: [[?{Broń:|@{selected|weapon2_name}, @{selected|weapon2_add}|@{selected|weapon3_name}, @{selected|weapon3_add}}  ]] [[?{Broń:|@{selected|weapon2_name}, @{selected|weapon2_skill}|@{selected|weapon3_name}, @{selected|weapon3_skill}}d6>4]]/[[?{Trudność:|1}]] However, when I place them in a single template, suddenly the second roll reads wrong Attribute values from the sheet (usually, twice the proper number, but not always). I would appreciate any hint I could get! :-)
1587213277
GiGs
Pro
Sheet Author
API Scripter
For your first problem, you can use this syntax @{power}d6 from the abilities section of your character sheet. But you cannot run it like that in chat, or from your macros collection. The reason is: its saying get the power attribute score. But every character, noc, monster, etc in your campaign has a power score, How can roll20 know which character's power score to use? You solve that problem by putting something at the start to tell roll20 which character sheet to use: @{selected|power} will use the power attribute of a character whose token you have selected. @{target|power} will prompt you to select a token, and will then use the attribute of the character attached to that token. Both of the above options require your token to be linked to a character. You can also name a specific character. Say you have a character called Frodo, syou would use @{Frodo|power}  and it will grab the attribute score from Frodo's sheet. The reason @{power} on its own works when run from a character's ability, is because that ability is already linked to a character. Roll20 automatically uses the attributes on that character sheet. I'm not seeing the issue with the second question, I'll come back when I've properly woken up.
1587213540

Edited 1587213561
Thank you, that actually makes sense :-) And even when I am building a universal macro, remembering to have a token clicked is not that big of a deal :-)
Hello, The second problem may come from the fact that Broń is associated with @{selected|weapon2_name} which can take two values: @{selected|weapon2_add} and @{selected|weapon2_skill}. In individual macros, it works but when merged, how can the engine tell which value must take @{selected|weapon2_name}? If that make sense, you should make each query unique: [[?{Broń, select weapon:|@{selected|weapon2_name}, @{selected|weapon2_add}|@{selected|weapon3_name}, @{selected|weapon3_add}}  ]] and [[?{Broń, select skill:|@{selected|weapon2_name}, @{selected|weapon2_skill}|@{selected|weapon3_name}, @{selected|weapon3_skill}}d6>4]]/[[?{Trudność:|1}]]
1587224108
GiGs
Pro
Sheet Author
API Scripter
Well spotted, Erik.