Raoden's Quick'n'Dirty Token Manager

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Quick'n'Dirty Token Property Editing Dialog

Post by Raoden »

Full Bleed wrote:Raoden, any chance that you're going to update this tool with some of the code I posted above and using resetProperty?
Yes ... It's taking a while because I'm working on a "mega-Library" that includes much more than just the Property Editor. But I'm making good progress, and pretty soon I'll be able to post a version of it up here. Then I can also strip away everything except the Token Manager and post a new version here.

It should have several good new (minor) features, like easy macro deletion.
I tried to run this in b69 and got the error:

Code: Select all

Function getPropertyNames requires no more than 1 parameters; 2 were provided.
I'm not sure why, the macro appears to be "trusted".
Yeah, I'm not sure why either. But if you're using b69 and you want to fix it without waiting for me, just throw in a [h: switchToken( id )] and drop the second parameter to getPropertyNames. Might as well also change getPropertyNames to getPropertyNamesRaw, to preserve capitalization.
Also, I'm not sure moving to a json was the best thing when listing the props because now they show out of alphabetical order. Was there some reason why the switch to json was made?
I made the switch in case some unlucky soul enters property names with commas in them. That will probably still cause all kinds of problems, but at least the Token Manager won't be one of them.

I actually dropped the alphabetical thing on purpose, because I didn't like it. I preferred to keep Strength/Dexterity/etc. in a block together, for example. But if other people did like alphabetization, I can put it back in (even with the json style).
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Quick'n'Dirty Token Property Editing Dialog

Post by Raoden »

So, I've been semi-absent for a few weeks due to moving to a different state (which will happen again in a couple months). But I should be able to contribute some things again in the near future.

First thing on the menu is the bug you've been reporting, FullBleed. In b70, I can't duplicate any problems with getPropertyNames(). Azhrei seems to have fixed that in b70. What I do get is a parameter error involving Wiki: setPropertyType(). I'll be looking into that more, to either report a bug or find a workaround ...

Regardless, for versions b68 and higher, I should now be able to eliminate the complex "remove properties by copying a token" process anyway.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Quick'n'Dirty Token Property Editing Dialog

Post by Raoden »

Aaand v1.4 is up. This should run just fine in any build b63 or newer, now. In appropriate MapTool builds, it should also display token properties with proper capitalization, which is an aesthetic relief to me.

It does not yet include the deluxe user interface I've been working on. That should still be coming soon, hopefully.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Quick'n'Dirty Token Property Editing Dialog

Post by Raoden »

v1.4 gets errors if you try to build up a JSON from scratch using it. I can't figure out why, since I don't think I changed any of the JSON Editor code recently ...

The token that will soon become v2.0 doesn't have this problem, though, so I may just ignore the problem until I can get that out. Now if only my apartment complex would stop having Internet connection issues ...
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Raoden's Quick'n'Dirty Token Manager

Post by Raoden »

Version 2.0 is up.

A lot of the time and effort that it's taken me to get this set up will not be evident if you don't (or won't) use some other tools I've been developing. There are a few macros whose purpose might not be evident. But hey. It still works, and at a reasonable speed.

What's more, I think the new interface is a little more pleasant and a little more intuitive.

And hopefully I've fixed any issues with the JSON Editor -- although I won't be surprised if I missed something. Let me know, so I can fix it!

And I finally figured out that feature I mentioned many versions ago: allowing you to change the order of a JSON Array.

Further suggestions welcome.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

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

Re: Raoden's Quick'n'Dirty Token Manager

Post by wolph42 »

Awesome! I just discovered this and it works great. This is actually one of the few drop ins that
1. I can actually drop in and it works (immediately)
2. I actually have a use for in my obscure Framework.

In all thanks!!

so.... suggestion wise :D. I was wondering whether its possible to show the properties unsorted? That is: in the same order as in the settings?

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Raoden's Quick'n'Dirty Token Manager

Post by Raoden »

Great! I'm glad to hear it's being put to good use.
wolph42 wrote:so.... suggestion wise :D. I was wondering whether its possible to show the properties unsorted? That is: in the same order as in the settings?
Unfortunately, if I leave out the json.sort(), it still doesn't put them in the order they're defined in Campaign Properties. I would prefer that too. But when I list the default Basic properties, for example, they come out as:

[ "defense", "hp", "strength", "elevation", "wisdom", "dexterity", "charisma", "description", "movement", "ac", "constitution", "intelligence" ]
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

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

Re: Raoden's Quick'n'Dirty Token Manager

Post by wolph42 »

I suspected so much. What you maybe can do is split up the hidden and unhidden properties. That would already make a lot of diference.

User avatar
Sir Flak
Dragon
Posts: 344
Joined: Thu Sep 28, 2006 4:20 pm
Location: Oklahoma, US

Re: Raoden's Quick'n'Dirty Token Manager

Post by Sir Flak »

Useful Tool. Bump. This could probably be in the dropin forum

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Raoden's Quick'n'Dirty Token Manager

Post by Raoden »

Thanks Flak. Back when I was an active participant, I guess this was easy to access via my sig ... alas, I'm on indefinite hiatus from regular participation in MapTool. Hopefully I can get back into it this fall.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

Zandel
Giant
Posts: 133
Joined: Thu May 13, 2010 1:52 pm

Re: Raoden's Quick'n'Dirty Token Manager

Post by Zandel »

This is a nice tool, is it possible to have the properties display in the order they exist in the tokens instead of alphabetically?

Thanks

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

Re: Raoden's Quick'n'Dirty Token Manager

Post by wolph42 »

Zandel wrote:This is a nice tool, is it possible to have the properties display in the order they exist in the tokens instead of alphabetically?

Thanks
Raoden wrote:Great! I'm glad to hear it's being put to good use.
wolph42 wrote:so.... suggestion wise :D. I was wondering whether its possible to show the properties unsorted? That is: in the same order as in the settings?
Unfortunately, if I leave out the json.sort(), it still doesn't put them in the order they're defined in Campaign Properties. I would prefer that too. But when I list the default Basic properties, for example, they come out as:

[ "defense", "hp", "strength", "elevation", "wisdom", "dexterity", "charisma", "description", "movement", "ac", "constitution", "intelligence" ]
:wink:

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Raoden's Quick'n'Dirty Token Manager

Post by Raoden »

To paraphrase Wolph's answer, no, it doesn't seem possible to preserve tokens' property ordering.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

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

Re: Raoden's Quick'n'Dirty Token Manager

Post by aliasmask »

I like it. I was just checking it out to see if I'm about to duplicate something that is already out there. Interesting note though, if a prop value has html, it will show the result of the html rather than the text. To output the text, I would just do a replace(var,"<","<"). For example, I have this text:

Code: Select all

<span title="Ranged touch attack"><a href="macro://page@lib:asm/none/Impersonated?spell.acidarrow">Acid Arrow</a></span>
And when I click your link, it just executes the macro instead of editing it. Funny thing is I found an error in my code using this too. The title should be longer, but a ; broke the text.

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: Raoden's Quick'n'Dirty Token Manager

Post by Raoden »

Wow, this thing's been up for a year, and suddenly it needs more work? Curse you, aliasmask! :P
aliasmask wrote:I like it. I was just checking it out to see if I'm about to duplicate something that is already out there. Interesting note though, if a prop value has html, it will show the result of the html rather than the text. To output the text, I would just do a replace(var,"<","<"). For example, I have this text:

Code: Select all

<span title="Ranged touch attack"><a href="macro://page@lib:asm/none/Impersonated?spell.acidarrow">Acid Arrow</a></span>
I will look into that next time I'm messing around with MapTool code ... which I don't get around to very often anymore.
And when I click your link, it just executes the macro instead of editing it. Funny thing is I found an error in my code using this too. The title should be longer, but a ; broke the text.
Which link would that be? And what error in your code did you find?
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

Post Reply

Return to “Drop-In Macro Resources”