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 .
Advertisement Create a free account Compendium in Game, Join Today

D&D BECMI attributes

Hello I'm using BECMI character sheet for a D&D game and I have a problem with a macro and the attributes it calls. I need to create a weapon attack macro, I looked at the code of the button that sends the macro to the chat box, which is: {template:5eDefault} {{weapon=1}} {{title=@{meleeweaponname}}} {{subheader=@{character_name}}} {{subheaderright=vs @{meleetarget}}} {{attack=[[@{thac0}-({1d20+[[@{strength_mod}]]+@{meleemagic}+@{meleemastery},{1}}kh1)]]}} {{damage=[[{@{meleedmg}+[[@{strength_mod}]]+@{meleemagic},{1}}kh1]]}} {{attackshowinfoblock=1}} {{attackrange=Melee}} {{attackacmod=@{meleeacbonus}}} {{attackeffects=@{meleeeffects}}} {{attacksave=@{meleesaves}}} so I created a macro with the same code but where there is @{strength_mod} I put @{selected|strength_mod} and so on. Problem is, everything inside the weapon instance (i.e. @meleemastery, @meleedmg and so on) is not parsed out correctly; only what comes from outside the weapon instance is (i.e. @character_name, @thac0 and @strength_mod). Obviously it works if I put fixed values on the attributes in the Attributes and Abilities section of the character sheet, but what's the purpose of a macro if I have to manually change values at each level and mastery advancement? What am I missing? Is there a way to make it work?
Sheet Author
I am guessing here, since I've never used or looked at that sheet, that these are inside a repeating section.&nbsp; Attributes in a repeating section are a bit more complicated, because they get a unique row ID when each row is created.&nbsp; A roll button in a repeating section automatically takes things from the row it inhabits without needing the repeating section name or row ID, but if you are trying to create a macro outside that row, it will need the complete attribute name that includes those things. Your attribute calls would be @{repeatingsectionname_rowid_attributename} <a href="" rel="nofollow"></a>
Yes, it's exactly this the problem, I will try your suggestion then. Thank you ☺️