Page 1 of 1

derived properties failing

Posted: Mon Jun 26, 2017 10:52 am
by Silken_akira
hi,

just started with maptools and trying out the properties tutotial on tokens...but..
it starts looping asking for a value and crashes.
Can someone point out what I am doing wrong?
I used the following to start

#*Hitdice :2
#*classlevel :10
#*AL :TN
#*Strength :10
#*StrMod:[Strength/2]
#*Dexterity :10
#*DexMod:[dex*2]
#*Constitution :10
#*ConMod:[FLOOR((Constitution-10)/2)]
#*Intelligence :10
#*IntMod:[FLOOR((Intelligence-10)/2)]
#*Wisdom :10
#*WisMod:[FLOOR((Wisdom-10)/2)]
#*Charisma :10
#*ChaMod:[FLOOR((Charisma-10)/2)]
#*MaxHP :100

Re: derived properties failing

Posted: Mon Jun 26, 2017 1:27 pm
by wolph42
couple of things:
1. typos (didnt check them but if you made one that can cause it)
2. default values: it could be that mt properties doesn't work with default values so try to change the values in the token you test (you need to turn off the stat first though or you can't select the token)
3. it might help to do [r:code] instead of

Re: derived properties failing

Posted: Mon Jun 26, 2017 1:49 pm
by Elyre_Elan
Hello;

Just perusing your code, I come across this:

#*Dexterity :10
#*DexMod:[dex*2]

Did you mean [Dexterity*2] ?

Re: derived properties failing

Posted: Mon Jun 26, 2017 2:38 pm
by wolph42
indeed... a typo it was thus.

Re: derived properties failing

Posted: Mon Jun 26, 2017 4:00 pm
by aliasmask
Also, if you're going to use [] instead of {} I would put [r: ] instead to avoid the tool tip data.

Also, you can put in the global variables, but if you want a nicer smaller pop up I would not show each property separately but as a group in a property just for display. I put all (most) of my display data with a prefix to avoid any coding confusion. For example:

Code: Select all

*@sheet.physical (Body):[R: strformat("Str:%s(%+d) Dex:%s(%+d) Con:%s(%+d)",Strength+StrMod,StrB,Dexterity+DexMod,DexB,Constitution+ConMod,ConB)]
*@sheet.mental (Mind):[R: strformat("Int:%s(%+d) Wis:%s(%+d) Chr:%s(%+d)",Intelligence+IntMod,IntB,Wisdom+WisMod,WisB,Charisma+ChaMod,ChaB)]

Re: derived properties failing

Posted: Tue Jun 27, 2017 9:26 am
by Silken_akira
thanks for the quick help. Read this, did some more testing and tried also a few first macros.
I still have an issue when I want to create token properties that I wanted the derived bonusses to be filled up in the sheet of the token itself... But learned that it actual better to see it when I hover over them....I guess doing a mcro inthe properties to fill in a property when you fill something in there is what is causing it to crash. (I started from a tutorial on token properties that showed the following:
HitPoints:{floor(Constitution / 2)} and changed it a bit for statbonusses.
I could create a macro that calculates all the derived bonusses afterwards if I really want in there I guess but next to the image is much cleaner anyway.
Once I finished that up more cleanly. I will start on a damage macro that will the damage on all selected tokens for things like a fireblast or so (in my mind now that shouldn't be be too dificult).
Always open to new tips :)

Re: derived properties failing

Posted: Tue Jun 27, 2017 11:32 am
by aliasmask
You want to make sure all your values have numeric values and aren't blank. There are examples in the forums of how to do auto damage and it's a bit more complicated then you would probably hope. I found if you have a macro that simply does damage to a token and sharing a link in chat is the best way to do it. There are many aspects to fireball damage like the save for 1/2, evasion feats, resistance, ablative damage reduction, immunity and vulnerability.