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] Macro not taking @{selected|weapon_skill_name_1} correctly

Hi I've been trying to set up Roll20 for ToR, following this page:&nbsp; <a href="https://wiki.roll20.net/The_One_Ring#Scripts_and_M" rel="nofollow">https://wiki.roll20.net/The_One_Ring#Scripts_and_M</a>... I've hit the issue called out on that page:&nbsp;" Note : I experienced issues with weapon attributes not being created when I entered the weapons in the Adversary section of the character sheet. However, when I entered the weapons (and only the weapons) in the Player Character section of the same sheet it worked perfectly." So I run the macro and I get something like "Great Orc attacks Great Orc with the vs..." notice it doesn't get the weapon it should say something like&nbsp;"Great Orc attacks Great Orc with the Orc-axe vs..." Any thoughts on why this might be / how to fix it? lm_attack_1 /em @{selected|character_name} strikes at @{target|character_name} with the @{selected|weapon_skill_name_1} vs. /desc TN [[?{Target Number from Stance|0} + @{target|parry} + @{target|shield}]] &{template:default} {{name=@{selected|weapon_skill_name_1}}} {{Damage=@{selected|weapon_damage_1}}} {{Edge = @{selected|weapon_edge_1}}} {{Injury=@{selected|weapon_injury_1}}} {{Called Shot = @{selected|weapon_called_shot_1}}} {{Damage Bonus = @{selected|attribute_level}}} {{Favoured = @{selected|weapon_favoured_1}}} /r 1t [#lm-feat] + @{selected|weapon_rating_1}t[@{selected|bar1}] +[[@{selected|weapon_favoured_1} * @{selected|attribute_level}]]
1469947750

Edited 1469947958
vÍnce
Pro
Sheet Author
I'm not familiar with the TOR sheet, but I did a quick test game. &nbsp;Your macro above is written looking for&nbsp;@{selected|weapon_skill_name_1}, which is only created from the PC section of the sheet. &nbsp;Advisories use @{npc_weapon_skill_name} from a repeating section. &nbsp;So, to call the attribute directly try substituting&nbsp;@{selected|weapon_skill_name_1} with&nbsp; @{selected|repeating_npc-weapon-skills_$0_npc_weapon_skill_name} (note the number after the $ is the row number, or you can get the weapon's unique ID using inspect element in the browser). &nbsp;This will break the macro for PC's however. &nbsp;You may want to create two attack macros. &nbsp;One for PC's as your example, and one for Advisaries that uses the npc weapon name. &nbsp;An Adversaries second weapon name would be @{selected|repeating_npc-weapon-skills_$1_npc_weapon_skill_name} Hope that helps. &nbsp;Cheers
1470507692

Edited 1470509405
AL
KS Backer
Thanks for the help... I'm getting there but haven't cracked it yet. The issue I'm having now is the macro isn't correctly getting the favoured weapon status The macro is now looking like this (bold on the part I have issues with) - if you see other problems please let me know. I feel like I'm so close! /em @{selected|character_name} strikes at @{target|character_name} with the @{selected|repeating_npc-weapon-skills_$0_npc_weapon_skill_name} vs. /desc TN [[?{Target Number from Stance|0} + @{target|parry} + @{target|shield}]] &{template:default} {{name=@{selected|repeating_npc-weapon-skills_$0_npc_weapon_skill_name}}} {{Damage=@{selected|repeating_npc-weapon-skills_$0_npc_weapon_damage}}} {{Edge = @{selected|repeating_npc-weapon-skills_$0_npc_weapon_edge}}} {{Injury=@{selected|repeating_npc-weapon-skills_$0_npc_weapon_injury}}} {{Called Shot = @{selected|repeating_npc-weapon-skills_$0_npc_weapon_called_shot}}} {{Damage Bonus = @{selected|attribute_level}}} {{ Favoured = @{selected|weapon_favoured_1 }}} /roll [[1t[lm-feat]]]] + [[@{selected|repeating_npc-weapon-skills_$0_npc_weapon_rating}t[@{selected|bar3}]]]] +[[@{s elected|weapon_favoured_1 } * @{selected|attribute_level}]]
Got it!!! The final macro looks like this: /em @{selected|character_name} strikes at @{target|character_name} with the @{selected|repeating_npc-weapon-skills_$0_npc_weapon_skill_name} vs. /desc TN [[?{Target Number from Stance|0} + @{target|parry} + @{target|shield}]] &{template:default} {{name=@{selected|repeating_npc-weapon-skills_$0_npc_weapon_skill_name}}} {{Damage=@{selected|repeating_npc-weapon-skills_$0_npc_weapon_damage}}} {{Edge = @{selected|repeating_npc-weapon-skills_$0_npc_weapon_edge}}} {{Injury=@{selected|repeating_npc-weapon-skills_$0_npc_weapon_injury}}} {{Called Shot = @{selected|repeating_npc-weapon-skills_$0_npc_weapon_called_shot}}} {{Damage Bonus = @{selected|attribute_level}}} {{Favoured = @{selected|repeating_npc-weapon-skills_$0_npc_weapon_skill_favoured}}} /r [[1t[lm-feat]]] + [[@{selected|repeating_npc-weapon-skills_$0_npc_weapon_rating}t[@{selected|bar3}]]] +[[@{selected|repeating_npc-weapon-skills_$0_npc_weapon_skill_favoured} * @{selected|attribute_level}]]