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

Keeping the value of a variable (D&D 3.5)

1628358683

Edited 1628358814
Good day/evening Easy but hard to solve question: i have a weapon (called weapon1) that do some damages; part of these damages are due by another weapon (called weapon2). i just want to keep the damage done by weapon2 the same in every part of the weapon1 calculator 1d8 + @{weapon1damagestat}[Weapon Dmg Ability] + ?{Use @{weapon2name}? (1=yes)|0}*@{weapon2damage}[Weapon Enh] + ?{Use @{weapon2name}? (1=yes)|0}*@{weapon2damage}[Weapon Spec]   weapon2 macro for damage is quite simple: 1d6 My problem is that i want the result of 1d6 to be the same both the times i call it in weapon1damage macro, but actually, written like this, the result of 1d6 changes everytime. Is there a way to keep it the same both times without API? Thanks in advance
1628512305
timmaugh
Roll20 Production Team
API Scripter
Short of the API, you're a bit limited. If you use the /roll command, inline rolls become reusable, but that limits you to the kind of roll output that command produces: /roll 1d8 + @{weapon1damagestat}[Weapon Dmg Ability] + ?{Use @{weapon2name}?|Yes,[[@{weapon2damage}]][Weapon Enh] + $[[0]][Weapon Spec]|No,0}