Multiple Token Properties on One Token?

Talk about whatever topic you'd like, RPG related or not. (But please discuss things related to our software in the Tools section, below.)

Moderators: dorpond, trevor, Azhrei

Post Reply
Relefein
Kobold
Posts: 7
Joined: Tue Jun 13, 2017 6:16 pm

Multiple Token Properties on One Token?

Post by Relefein »

Hey I was wondering if there is a way for one token to have multiple token property types.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Multiple Token Properties on One Token?

Post 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()

Relefein
Kobold
Posts: 7
Joined: Tue Jun 13, 2017 6:16 pm

Re: Multiple Token Properties on One Token?

Post 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.

Relefein
Kobold
Posts: 7
Joined: Tue Jun 13, 2017 6:16 pm

Re: Multiple Token Properties on One Token?

Post 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.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Multiple Token Properties on One Token?

Post 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!

Relefein
Kobold
Posts: 7
Joined: Tue Jun 13, 2017 6:16 pm

Re: Multiple Token Properties on One Token?

Post 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.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Multiple Token Properties on One Token?

Post 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.

Relefein
Kobold
Posts: 7
Joined: Tue Jun 13, 2017 6:16 pm

Re: Multiple Token Properties on One Token?

Post by Relefein »

So that will let two sets be active at once?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Multiple Token Properties on One Token?

Post 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.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Multiple Token Properties on One Token?

Post 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 ;)

Relefein
Kobold
Posts: 7
Joined: Tue Jun 13, 2017 6:16 pm

Re: Multiple Token Properties on One Token?

Post 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.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Multiple Token Properties on One Token?

Post by Jagged »

You have to use getProperty(). If you just use the field name you nothing.

Relefein
Kobold
Posts: 7
Joined: Tue Jun 13, 2017 6:16 pm

Re: Multiple Token Properties on One Token?

Post 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.

Post Reply

Return to “General Discussion”