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

D&D 3.5 - Macro works for all but one player.

So I threw together a macro to quickly list a characters AC and defensive abilities. It seems to work for everyone but Valerie. The image shows it rolled for other players and working as it should. The sheet that is showing is Valerie's, and has 18 as the AC, but the macro is pulling her AC as 0. Below is the macro in question. /w @{selected|character_name} &{template:DnD35StdRoll} {{spellflag=true}} {{name=@{selected|character_name}'s Defenses!}} {{subtags=AC [[@{selected|armorclass}]], Touch [[@{selected|touchac}]], Flat [[@{selected|flatac}]]}} {{**Immunity:**=@{selected|immunity}}} {{**Energy Resistance:**=@{selected|resistance}}} {{**Damage Reduction:**= @{selected|damagereduction}}} {{**Spell Resistance:**= @{selected|spellresistance}}} Any help would be great, thanks!
1598931903

Edited 1598932013
Oosh
Sheet Author
API Scripter
I'm not familiar with the sheet, but the first thing I would try it, in the Misc tab, click the Recalc button at the top and see if that does anything to fix it. If it's still broken, try running this in chat, and post back with the contents: @{armorclassbonus} @{totalabilityacbonus} @{armorclasssizemod} @{acdodgemod} @{acnaturalarmor} @{acdeflectionmod} @{acmiscmod} One of those might have an invalid character in it or something. Also, what gets posted to chat if you just call the Attribute without the inline roll, @{valerie|armorclass} ?
I find that if any of the entries are blank; it can stop the entire macro from displaying. Need to put a 0 or something in sometimes. For example, after Roll20 broke the link between the Armor Class attribute and the token, I started using this macro to check AC and a few things. /w gm &{template:default} {{@{selected|token_name}}} {{Armor Class: [[@{selected|armorclass}]]}}{{ Touch: [[@{selected|touchac}]]}}{{ Flatfooted: [[@{selected|flatac}]] }}{{ HitPoints: [[@{selected|hitpoints}]]}}{{ Nonlethal Damage: [[@{selected|nonlethaldamage}]]}}{{ Speed: [[@{selected|Speed}]] }} I learned I had to put a 0 in the Nonlethal Damage field, or the macro would not display. You might have a similar problem.
1598990646

Edited 1598991234
Thanks guys, I am using the D&D 3.5 sheet by Diana P. I tried the Recalc on the Misc tab, that had no effect on the results Entering this into chat: @{armorclassbonus} @{totalabilityacbonus} @{armorclasssizemod} @{acdodgemod} @{acnaturalarmor} @{acdeflectionmod} @{acmiscmod} gave this result           TypeError: Cannot read property 'substring' of undefined Do I need to add selected| into those so they pull from her sheet? Entering @{valerie|armorclass} into the chat, gives a result of 0, even though it is 18 in her sheet. When I tried this one, and hit test, it doesn't even pop anything up in the chat? /w gm &{template:default} {{@{selected|token_name}}} {{Armor Class: [[@{selected|armorclass}]]}}{{ Touch: [[@{selected|touchac}]]}}{{ Flatfooted: [[@{selected|flatac}]] }}{{ HitPoints: [[@{selected|hitpoints}]]}}{{ Nonlethal Damage: [[@{selected|nonlethaldamage}]]}}{{ Speed: [[@{selected|Speed}]] }} I tried entering a 0 in all the fields that had nothing, but that did not fix it either. -Nick
Entering is like this, spits out that mess.. @{selected|armorclassbonus} @{selected|totalabilityacbonus} @{selected|armorclasssizemod} @{selected|acdodgemod} @{selected|acnaturalarmor} @{selected|acdeflectionmod} @{selected|acmiscmod} Nick (GM): ((1 (5) +1 (2) +0 0 +0 0 +0 0 +0 0)) (1 (ceil(((ceil((1 -23 (100-99 1))/10000000000) 23 - floor((1 -23 (100-99 1)-1)/10000000000) 1 )-floor(abs(9/(0.1))))/10000000000) floor(abs(9/(0.1))) - floor(((ceil((1 -23 (100-99 1))/10000000000) 23 - floor((1 -23 (100-99 1)-1)/10000000000) 1 )-floor(abs(9/(0.1)))-1)/10000000000) (ceil((1 -23 (100-99 1))/10000000000) 23 - floor((1 -23 (100-99 1)-1)/10000000000) 1 )) +0 (0 (ceil(((ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )-floor(abs(9/(0.1))))/10000000000) floor(abs(9/(0.1))) - floor(((ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )-floor(abs(9/(0.1)))-1)/10000000000) (ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )) + (1-0) 0) +0 (0 (ceil(((ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )-floor(abs(9/(0.1))))/10000000000) floor(abs(9/(0.1))) - floor(((ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )-floor(abs(9/(0.1)))-1)/10000000000) (ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )) + (1-0) 0) +0 (0 (ceil(((ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )-floor(abs(9/(0.1))))/10000000000) floor(abs(9/(0.1))) - floor(((ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )-floor(abs(9/(0.1)))-1)/10000000000) (ceil((0 -23 (100-99 1))/10000000000) 23 - floor((0 -23 (100-99 1)-1)/10000000000) 0 )) + (1-0) 0)) 0 (1 0 +0 0 +0 0 +0 0) (1 0 +0 0 +0 0 +0 0) (1 0 +0 0 +0 0 +0 0) 1:05PM Nick (GM): (1 1 0 1 +0 1 0 +0 1 0 +0 1 0 +0 1 0 +0 1*0)
Done inline, it gives this, don't know if any of that helps? [[@{selected|armorclassbonus}]] [[@{selected|totalabilityacbonus}]] [[@{selected|armorclasssizemod}]] [[@{selected|acdodgemod}]] [[@{selected|acnaturalarmor}]] [[@{selected|acdeflectionmod}]] [[@{selected|acmiscmod}]] Nick (GM): (1 1 0 1 +0 1 0 +0 1 0 +0 1 0 +0 1 0 +0 1*0) 7 1 0 0 0 1:08PM Nick (GM): 0 0
1599011493
Oosh
Sheet Author
API Scripter
Nothing is jumping out at me. Try changing the name of the character on the sheet? Sometimes that fixes stuff. Try creating a custom Attribute, {customAC} or anything you want, give it the value [[armorclass]], then try calling @{selected|customAC} in chat? I'm a bit stumped, sorry. It's baffling that it's showing up fine on the sheet, but not in a macro. Maybe try duplicating the character as well?
Have you tried changing the character's base Dex to something dramatically different (like 5 or 25), checking the AC on the sheet, then changing the base Dex back to the correct value?
1599030955

Edited 1599031135
I have tried changing the name of the sheet creating a custom attribute changing dex  duplicating the sheet deleting the entire macro entry and rebuilding it all of these still show the correct number in the sheet, but a 0 when put into the chat :/ it works with every other sheet, except for Valerie when i hover over the 0 in the chat, it says "rolling 0 = 0" if that helps?
1599069902

Edited 1599070003
Ziechael
Forum Champion
Sheet Author
API Scripter
Check the attributes section of the sheet, is there a duplicate attribute with a value of 0? As an autocalc value it shouldn't  have an attribute but it is possible (certainly historically) for attributes to show up there with incorrect values that then mess with the heads of long suffering DMs ;) You can use the browsers 'find' to quickly search for an attribute called 'armorclass', if you find one and the value isn't as expected then deleting that sucker should see you right.
That was it! Thank you. I tried to search for that earlier, but I forgot about the handy Find option. Everything is now in working order. Thanks for the help everyone.
1599128186
Ziechael
Forum Champion
Sheet Author
API Scripter
Ah great, happy to help :) Used to be a somewhat common issue back in the day.
1599136805
Oosh
Sheet Author
API Scripter
Brain the size of a planet, that man.