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

Cross sheet attribute calls

Hi everyone,  one week into the roll an macro documentation and i can say I did a pretty good job in getting the basics. I'm playing a bard in a 3.5 campaign and I'm trying to incorporate the Inspire Courage bonus in my party's attack macros. Everything works more than fine with the following macro (I picked the Damage as it's the shortest one, and clean it up a bit): 1d10 + @{weapon1damagestat}[Str] @{target|inspCourageBonus}[Inspire Courage] + ?{Additional DAMAGE bonus?|0}[Other] As you can imagine I added a new attribute to my sheet called inspireCourageBonus and I'm calling it through targeting my Token. All my party can launch the macro and target my token when prompted. Everything works. From the documentation, and honestly from a lot of answers here in the forum, I got convinced that @{target|attribute} , @{selected|attribute}  and @{MyName|attribute} should all work, at the proper conditions, but that it's not the case. Am I missing something? Also, the behavior seems not to be consistent when using the same code in a sheet field (i.e. @{weapon1damagemacro} ), in a Macro created through the collection tab or in an Ability created in the character sheet. What am I doing wrong? Thank you very much for any support
1587785705

Edited 1587785760
GiGs
Pro
Sheet Author
API Scripter
is  inspireCourageBonus an  Attribute, or an Ability? If its an ability you use % instead of @. You said everything works, but you are also having problems - I cant tell what the issue is.
Sorry if I was not clear enough. I set inspireCourageBonus as a new attribute, as it is just a number ranging from 4 to 9. My problem is that everything works with target , but that needs the player to select my token. Since they have a lot of other bonuses to input in various prompts (pwr attack, combat expertise, rage, favored enemies, flank.....) I would like to skip the token selection. If I replace @{target | inspCourageBonus}    with  @{Kantabah | inspCourageBonus} , should it work? And the second question is: should this work in the same way from a sheet button, from an ability and from a macro, or the same code will have different behaviours?
1587823364
GiGs
Pro
Sheet Author
API Scripter
Yes, you should be able to use your character name there (without the spaces of course). If you have tried it and it isnt working, post the excat macro that isnt working, so we'll be able to see why. This should work from anywhere. Use your character name, not the token name, btw.
Yes, i had the spaces just for readability :) So the full macro...It's actually divicded in five different weapon fields in the 3.5 character sheet, but i'll post the damage one. So Dagobaldo, one of my allies, click on the "Damage" roll button on his character sheet. The macro looks like this: &{template:DnD35Attack}{{pcflag=true}}{{name=@{character_name}}}{{subtags=attacks with a @{weapon1name}}}{{damage1= for[[@{weapon1damage}]]dmg +[[2d6]]axiomatic}}{{fullattackflag=[[0d1]]}} This macro calls @{weapon1damage} which is: 1d10 + @{weapon1damagestat}[Str] + @{weapon1enh}[Enhancement] + @{target|inspCourageBonus}[Inspire Courage] + ?{C'è una sfida attiva?|No,0|Si,2}[Challenge] + ?{Attacco Poderoso?|0}[Pwr Atk] + ?{Altri bonus al DANNO?|0}[Other] Dagobaldo can use my inspire courage bonus with no problem with target , but if I use Kantabah the bonus is not calculated and "No attribute was found for @{Kantabah|inspCourageBonus} error message shows up. Maybe the problem lies in the name I'm using. How I can understand what my character name  and token name are? Thank you very much for the effort and sorry if I'm no being clear.... :(
1587826130
GiGs
Pro
Sheet Author
API Scripter
You can find your character name by selecting their token and typing in chat @{selected|character_name} Thats what should replace target.
I checked and the name is exactly Kantabah. This is getting me mad. I guess I will stick with target....Thank you very much for trying... By the way, can I set my inspire courage value from the token bars, typing it in one of the bubbles?
1587830006
GiGs
Pro
Sheet Author
API Scripter
Yes, you can do that - that's one of the main purposes of the token bubbles. I dont understand why your name isnt working - can you post your macro, with your name inserted?
Can you give a bit of support on how to do it? I tried linking the bar2 to the attribute, but if I change the value in the bubble does not seem to change it in the sheet. I don't get it either, this is the macro with the name, it's just the same exact macro with target  replaced by Kantabah (with the capital K). Does it help you that if I, as a co-GM, launch the macro from Dagobaldo sheet everything works, but if Dagobaldo, as a normal palyer, launches the macro from his sheet it gives him the error? 1d10 + @{weapon1damagestat}[Str] + @{weapon1enh}[Enhancement] + @{Kantabah|inspCourageBonus}[Inspire Courage] + ?{C'è una sfida attiva?|No,0|Si,2}[Challenge] + ?{Attacco Poderoso?|0}[Pwr Atk] + ?{Altri bonus al DANNO?|0}[Other]
1587840770

Edited 1587840794
GiGs
Pro
Sheet Author
API Scripter
Russell S. said: Does it help you that if I, as a co-GM, launch the macro from Dagobaldo sheet everything works, but if Dagobaldo, as a normal palyer, launches the macro from his sheet it gives him the error? Aha, that explains it. Only someone who has edit authority over the character can use character-name and selected, you have to use target to get the attribute value from a character sheet you do not control.
oh for God's sake, now it's clear. Thank you very much. I'll stick to target then.
1587841719
GiGs
Pro
Sheet Author
API Scripter
Russell S. said: Can you give a bit of support on how to do it? I tried linking the bar2 to the attribute, but if I change the value in the bubble does not seem to change it in the sheet. I missed this earlier. This should work. Have you linked the correct attribute, and is it still linked?
Actually, I started from scratch with a new attribute (inspCourBonus) and is now perfectly working.  Unfortunately I cannot remember the exact sequence of actions I did, but I tried these: First I linked the attribute to bar2 and nothing showed up, but the attribute was not set in the first place on my sheet, so I guessed that was still good.  I messed around with the bubble value and nothing happened on my sheet. I opened the token dialog and messed up both with the bar2 value and with bar2 max, nothing happened on my sheet. I set the attribute on my sheet, and nothing changed on the token. I linked back bar to to "None", everything disappeared. I changed the attribute on the sheet, re-linked the attribute to bar2, the old parameter stored in the bar appeared. Again it's puzzling and I cannot get the logic. Still, I made it work starting from scratch so give it a limited amount of effort ;). Thank you very much for the help!