Page 1 of 1

Multiple Token Properties on One Token?

Posted: Tue Jun 13, 2017 6:21 pm
by Relefein
Hey I was wondering if there is a way for one token to have multiple token property types.

Re: Multiple Token Properties on One Token?

Posted: Tue Jun 13, 2017 6:36 pm
by wolph42
what is it what you wish to achieve? You can switch property type on a token anytime, but there's always one active. This does not mean that the properties of the other type are none existent (if you initialized them) they're simple 'hidden' meaning you can only access those using Wiki: getProperty()

Re: Multiple Token Properties on One Token?

Posted: Tue Jun 13, 2017 6:40 pm
by Relefein
So basically the problem I am running into is having to edit so many token types when I decide to change some fundamental properties within the types. I was hoping to have tokens able to have multiple property sets in order to have a base token type and a special token type for whatever class they are.

Re: Multiple Token Properties on One Token?

Posted: Tue Jun 13, 2017 6:48 pm
by Relefein
Perhaps my verbiage is wrong after looking at your link. I wish to have multiple token types (sets of properties) active on one token at a time. Is there a way to do that? Calling the properties of an inactive token type doesn't allow for that specific property to also be calling other properties so unfortunately doing that wouldn't work.

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 4:00 am
by wolph42
I'm having a hard time following you. Can your provide a specific example of what it is you wish to achieve? Often the solution lies not in the question asked, but in the problem given!

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 4:05 pm
by Relefein
Let's see...so normally a token can only have one set of properties in it, the original one being named Basic. In my campaign I have created over 20 of these types of property sets. There are times where properties need to be changed within the sets. It can be incredibly tedious to change over 20 different sets which each have over 300 properties in them. What would make it easier is if a token could have multiple property sets within that token instead of the default one. This would allow me to have a set of properties (AKA Token Type) that I could have for every character and then another set of properties for the unique aspects of their class. Example would be Armor, Health, Saves, Skills, Buffs, Debuffs, etc. on one token type (set of properties) and then have their unique class abilities on another token type. I do understand what you are saying about how the properties don't disappear if you changes types, but the get command doesn't properly get properties which call other properties. It also doesn't allow for them to be modified dynamically. Multiple macros would also use both sets.

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 4:09 pm
by wolph42
ok I think I understand... in that case, assuming you're using macros you can change in the acro the tokentype using Wiki: setPropertyType() function. That way you can set a certain type, change it dynamically and change the type if you want to access another set.

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 4:17 pm
by Relefein
So that will let two sets be active at once?

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 5:10 pm
by aliasmask
Sounds like you're making it more complicated than it needs to be. One solution is to just have one type with all the properties. MT doesn't care if there is 300 props. You can probably consolidate some properties in to groups as well like creating a string prop list. (a=1;b=2;c=3...) With large property sets I use varsFromStrProp to locally define those sets and strPropFromVars to save them again. This is much faster than retrieving and updating them individually. As for accessing "hidden" variables, you can use getProperty in your property definition rather than using the name directly. ie getProperty("varName") vs just using varName without quotes.

As a rule of thumb, the only things in my property type are variables that appear on the stat sheet or are required to calculate a value on the stat sheet. The rest are just hidden properties.

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 5:13 pm
by Jagged
I believe you will find that the property type only sets the fields that are displayed through the UI, it has no actual effect on the fields themselves.

So if you set loads of fields, change the type, set more fields, then change them back you will find the original values all still there.

You can set set and access all the values via macros. The property type doesn't really do anything at all ;)

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 5:21 pm
by Relefein
Unfortunately my experiences with the macros have shown otherwise, if I try to call say...WillSave:{FLOOR(Level/3) + WisMod + MiscWill + SaveResist - SavePenalty - Wounds} this property, it will not give anything back because the property also calls other properties in the non-active set. This becomes even more of a problem if a macro attempts to call multiple properties which call multiple other properties from multiple other sets.

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 5:49 pm
by Jagged
You have to use getProperty(). If you just use the field name you nothing.

Re: Multiple Token Properties on One Token?

Posted: Wed Jun 14, 2017 6:18 pm
by Relefein
Thanks for the assistance guys. I will probably just use aliasmask's suggestion of having only one token type for characters. I've used getProperty and it doesn't return anything if the property it is getting also has other properties within it. So to answer my original question, no, there is not a way to have two active token types at once.