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

New repeating rows and macros

Hi. While building a repeating field, I tried to create a macro button at the side of the row. However, the rowID don't "advance" when I create another row.  Macro: (...) {{Arma=Ataque com @{repeating_weaponselection_$0_weaponname}}} {{coluna=[[5]]}} {{d20=[[1d20]]}} {{falha=Falha}} {{rotineiro=0% | 0}} {{facil=25% | @{repeating_weaponselection_$0_weapon25d}}} {{medio=50% | @{repeating_weaponselection_$0_weapon50d}}} {{dificil=75% | @{repeating_weaponselection_$0_weapon75d}}} {{muitodificil=100% | @{repeating_weaponselection_$0_weapon100d}}} {{critico=Crítico}} <fieldset class="repeating_weaponselection">                     <input type="text" class="sheet-weapontablerow1 sheet-inputweaponproperty" name="attr_weaponname">                     <input type="text" class="sheet-weapontablerow2 sheet-inputweaponproperty dropdown" name="attr_weapontype" value="CD">                     <input type="number" class="sheet-weapontablerow3 sheet-inputweaponproperty" name="attr_weaponbonus" value="0">                     <input type="number" class="sheet-weapontablerow4 sheet-inputweaponproperty" name="attr_weapontotal" value="0">                     <input type="text" class="sheet-weapontablerow5 sheet-inputweaponproperty" name="attr_weaponreach" value="0 m">                     <input type="number" class="sheet-weapontablerow6 sheet-inputweaponproperty" name="attr_weaponL" value="0">                     <input type="number" class="sheet-weapontablerow7 sheet-inputweaponproperty" name="attr_weaponM" value="0">                     <input type="number" class="sheet-weapontablerow8 sheet-inputweaponproperty" name="attr_weaponP" value="0">                     <input type="number" class="sheet-weapontablerow9 sheet-inputweaponproperty" name="attr_weapon25d" value="0">                     <input type="number" class="sheet-weapontablerow10 sheet-inputweaponproperty" name="attr_weapon50d" value="0">                     <input type="number" class="sheet-weapontablerow11 sheet-inputweaponproperty" name="attr_weapon75d" value="0">                     <input type="number" class="sheet-weapontablerow12 sheet-inputweaponproperty" name="attr_weapon100d" value="0">                     <button type="roll" class="sheet-weapontablerow13" value="&{template:tagmar_rolagem_completa} {{title=Tabela de Resolução}} (...)">                 </fieldset> Is there a way to make the button use their own rowID every time it is created (without script worker)?
1510605124

Edited 1510605145
Natha
KS Backer
Sheet Author
API Scripter
Not sure if it's what you need, but if you "nest" the button inside the repeating section, the roll formula doesn't need "repeating_weaponselection_ID_" for each attribute you use. For example {{Arma=Ataque com @{repeating_weaponselection_$0_weaponname}}} becomes  {{Arma=Ataque com @{weaponname}}}
Sometimes we really complicate simple things ☺. Thanks.