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

[The One Ring] List of all attributes

Hello, I'm creating macros to use with The One Ring Character Sheet but there are some values of the sheet for which i don't find the corresponding attribute. For example, for an adversary character sheet i want to use in a macro the current value of Endurance and also the max value of Endurance. For current value of Endurance, the attribute name to use in macros is "endurance", but what is the name of the Max Endurance value ? And i need that for some other attributes. So is there a way to get the full list of attributes for a character sheet (general question for roll20 macros) or a full list of the attributes for The One Ring character sheet ? Thanks in advance Ghorin
I have done some testing of below macro : &{template:default} {{name=@{selected|character_name}}} {{Endurance: =@{selected|endurance} / @{selected| endurance_max }}} ==> Endurance: 23 / 0 &{template:default} {{name=@{selected|character_name}}} {{Endurance: =@{selected|endurance} / @{selected| endurancemax }}} ==> No attribute was found for @{selected|endurancemax} ==> Endurance23 / selected|endurancemax So it seems that the attrribute i need is endurance_max but the value is 0 while in the character sheet it is set to 28. I don't understand :-(
Have you tried @{selected|endurance |max }?
Yes it's working with endurance | max !!! Thank you Silvyre :-)
1460825706

Edited 1460825883
Great. :) I wasn't able to find a list of Attributes for The One Ring , so I'll recommend first looking through a Character's  Attributes & Abilities Tab to check for the names of Attributes associated with fields that you have manually filled out (might take some guesswork). On top of that, you can use your browser's inspect element feature on a field of a Character Sheet; the name of the corresponding Attribute lies within an input name attribute and is prefixed with attr_ e.g. <input name="attr_ Endurance " type="text"> That's probably a bit easier than manually searching through the sheet's full HTML on GitHub , but that's an option as well.
In fact, i have found the attributes in the GitHub character sheet's html but i'm not able to use them in my own macros. For example, i want to use the weapon attributes. For that, i find below code in the HTML : <fieldset> <button type="roll" value="/me attacks with @{npc_weapon_skill_name}.\n/roll 1t[lm-feat] + @{npc_weapon_rating}t[@{weary}] + [[@{npc_weapon_skill_favoured} * @{attribute_level}}]] > ?{Target Number|14}" name="npc_weapon_check"></button> <input type="checkbox" name="attr_npc_weapon_skill_favoured" value="1"> <input type="text" name="attr_npc_weapon_skill_name"> <input type="number" name="attr_npc_weapon_rating" value="0"> <input type="number" name="attr_npc_weapon_damage" value="0"> <input type="text" name="attr_npc_weapon_edge" value="0"> <input type="number" name="attr_npc_weapon_injury" value="0"> <input type="text" name="attr_npc_weapon_called_shot"> </fieldset> This code shows that there is a button near the weapon line in the character sheet. We can click on that button in order to get a Roll of Dices. And in fact, that button gives the following Roll20 commands :  /me attacks with @{selected|npc_weapon_skill_name} /roll 1t[lm-feat] + @{npc_weapon_rating}t[@{weary}] + [[@{npc_weapon_skill_favoured} * @{attribute_level}}]] > ?{Target Number|14} And when i click on the button in the charecter sheet, it works fine => the roll runs fine in the chat. But when i select the token of the same character and i launch manually the same commands, then i get errors : - No attribute was found for @{selected|npc_weapon_skill_name} - TypeError: Cannot read property 'substring' of undefined I don't understand why and how to resolve. If anybody may help :-)
1460843527

Edited 1460846214
Diana P
Pro
Sheet Author
It is because the fields are in a fieldset or repeating section. Some of the class stuff got stripped out in what you posted, but you should find in the &lt;fieldset&gt; a class="repeating_somename" tag. The name of that field is then repeating_somename_$#_npc_weapon_skill_name where the # is the number (starting at 0) of the row the field is found in.&nbsp; The $# can be replaced by the row id (something which is of the format -ABC123 ) but to find that you may have to examine the field in the browser itself.&nbsp; More on repeating sections in the Wiki: <a href="https://wiki.roll20.net/Building_Character_Sheets#" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#</a>...
You are right, it's inside a repeating section (list of weapons). Now, when i try "&{template:default} {{name=@{selected|character_name}}} {{Weapon=@{selected|repeating_npc-weapon-skills_0_npc_weapon_skill_name}}}"&nbsp;i don't get error (like attribute does not exist) but i don't get any value for the attribute. I tried with several attributes of the repeating section and with several index id (0, 1, 2 ...40) and each time no value and no error message. Concerning the format&nbsp;-ABC123, i don't find any row id in the html. If you have any idea .. Thanks in advance
1460937023
Diana P
Pro
Sheet Author
Try @{selected|repeating_npc-weapon-skills_ $ 0_npc_weapon_skill_name} instead of @{selected|repeating_npc-weapon-skills_0_npc_weapon_skill_name}&nbsp; (the $ tells it to look on row zero) the -ABC123 format is not directly in the html; it's in the results when the element is called.&nbsp; I don't know how to find it without using the $# format to get the info into the chat log and then inspecting it (and I don't bother using it at all so I don't remember which set of numbers it is right now, sorry).
That's it, it's working with the $. Thank you Diana.
1460955887
Diana P
Pro
Sheet Author
You are welcome. :) Happy Gaming.
1460956869
vÍnce
Pro
Sheet Author
Show me the $ lol