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

Trying to subtract attributes from each other in macro

So i'm in a Cyberpunk game with a base stat of 8 in attractiveness. However, I got into a car accident, and that takes away 5. I put the minus 5 in the temp mod section. I made a macro that would show my stats to me whenever I wanted, for each access /w Fix (Martin) &{template:default} {{name=Basic Info}} {{Eurobucks= € @{Dexter 'Fix' Ficks|Eurobucks} }} {{Intelligence=  @{Dexter 'Fix' Ficks|Int_Base} }} {{Reflex= @{Dexter 'Fix' Ficks|Ref_Base} }} {{Tech= @{Dexter 'Fix' Ficks|Tech_Base} }} {{Cool= @{Dexter 'Fix' Ficks|Cool_Base} }} {{Attractiveness= @{Dexter 'Fix' Ficks|Attr_Base} }} {{Luck= @{Dexter 'Fix' Ficks|Luck_Base} }} {{MA= @{Dexter 'Fix' Ficks|Ma_Base} }} {{Body Type= @{Dexter 'Fix' Ficks|Body_Base} }} {{Empathy= @{Dexter 'Fix' Ficks|Emp_Base} }}  However, When I try to subtract the temp mod from the base number (Attr_Base - Attr_Temp), it looks for an attribute named Attr_Base - Attr_Temp, and no longer shows me any number, because that attribute doesnt exist Any way to subtract the temp number from the base in attributes?
1553228952

Edited 1553228989
GiGs
Pro
Sheet Author
API Scripter
Can you show the code you use to subtract the temp mod from the base mod? Seeing the code written out like that, I noticed a possible issue - having an attribute named attr_base (or any attribute name starting with attr_) might cause problems since character sheets use attr_ in a special way. Does the attractiveness attribute show up normally?  Let's sidestep the attractiveness attribute for now and see if we can get it working with one of the other attributes. Create a Body_Temp attribute, give it a value of 5 and change the Body type part of the template above to {{Body Type= [[@{Dexter 'Fix' Ficks|Body_Base} - @{Dexter 'Fix' Ficks|Body_Temp}]] }} and see if that works.
I actually copied your code and replaced it for the attractiveness, and that actually worked, so thanks
1553230370
GiGs
Pro
Sheet Author
API Scripter
That's great :)
Actually, i had to change the code, because it showed up as [[8--5=0]] If I got rid of the minus from yours, it changed to 3, which is good, so yeah.
1553231189
GiGs
Pro
Sheet Author
API Scripter
I misread that you had a -5, I took it as a plain 5. A tip for the future 9which I forgot above): If you do need to do a minus like that instead of a plus, you can do this: [[@{Dexter 'Fix' Ficks|Body_Base} - ( @{Dexter 'Fix' Ficks|Body_Temp})]] Putting the number following the minus sign inside its own brackets makes the arithmetic work properly. roll20 will fill with something like 8 - -5, but will work properly with 8 - (-5).
Ok, thats fine, for now i just got rid of the minus. It shows the stat right, so i'll fix it tomorrow, so that way if I get a positive temp, it will work. thanks for the help
Actually, I realized that it was better to just use the first thing you said with a + instead of a -. Since the temp mods can be positive, putting nothing wouldnt have added them, so putting a plus would add positives and since adding a negative just subtracts, it works