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 here.
×
×
Cookie Preferences
We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
I am trying to create an On/Off macro using the concentration API. I have it working but am having figuring out the code to pull name of selected character token. Is it possible to pull a character name from the new character sheet in a macro?
Hi Steve! Assuming by "the new sheet" you mean the D&D 5e (2024) Sheet, these will work for the character name: @{selected|character_name} @{selected|name} Other sheets may have different attribute names. This will retrieve the token name, regardless of sheet: @{selected|token_name}
No worries. I usually assume that sheet by context, and the fact that folks usually identify the sheet for a less commonly-played game in the question. I just put that in to verify. I hope the answer worked for your needs.
GiGs said: This should work for all sheets @{selected|character_name} Ah, is that a property of the character journal, rather than an attribute on the character sheet? In any case, I wasn't sure if it would work on a non-DnD Beacon sheet, such as Marvel.
keithcurtis said: GiGs said: This should work for all sheets @{selected|character_name} Ah, is that a property of the character journal, rather than an attribute on the character sheet? In any case, I wasn't sure if it would work on a non-DnD Beacon sheet, such as Marvel. Yes, it's a property of the Journal. I am not 100% it will work for all Beacon sheets, since they are created very differently, but it works for all non-Beacon sheets.