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

Call a named attribute to determine a called character sheet.

Good day. I am having some trouble figuring out if a particular type of operation is possible, and if so how to do it. Basically, I want to have a stat, say Equipped_Weapon, that I can use to determine what character sheet is referenced by an ability. So, I would have a macro such as %{@{selected|Equipped_Weapon}|Attack}. The goal of such a macro is to allow a player to type the name of their weapon into the stat Equipped_Weapon and have it automatically direct their roll to the correct sheet. I would have a different character sheet created for each weapon, and all the players need to do is type in the name of their weapon. This would link the above macro the correct attack roll which has already been premade on the character sheet of the named weapon. So far, I see to be running into order of operation problems, and have not been able to figure out if it is possible to make a workaround. Even if I didn't have order of operations problems, I'm not sure if the system can read the text the way I am wanting it to or not. The only thing I have thought of so far is just having them write the name of the weapon in the macro like normal. That would technically work. However, if I can get this to work, I may use it for more than just weapons, and having a stat which can itself be referenced may be convenient and useful. Any suggestions on this dilemma?
This will work if you use %{@{equipped_weapon}|attack} within an Ability macro.
Hmmm. So, it was previously telling me "No ability was found for %{@{selected|Equipped_Weapon}" I've been using it in an ability macro (assuming you mean the macros that are available directly on the character sheet). After you mentioned it, I gave it another shot (I only changed the name of the attribute being tested) and it started working just fine. Then, it stopped working, and started giving me that error again. The only thing I changed was the details of the attack roll that it was looking for. Instead of [[1d20+1]], which  I was using as a test, I changed it to [[1d20+@{Stat_1}]] to make sure that would work. I then discovered that it doesn't work when I have the macro open in preview mode (before you click the check mark to save it ) but it does work once I have clicked that. I find that odd. Perhaps a bug? Or just something strange about the way the system works? Either way, it seems to work for now, mostly. Thank you very much for the assistance, foolish though it made me feel.
You're very welcome! I don't know why it works within an Ability macro but not outside of it, but I suppose it's nice that it does. Happy rolling!