Token IDs being lost on Imported maps.

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Velocinox
Kobold
Posts: 21
Joined: Sun Jan 09, 2011 1:34 am

Token IDs being lost on Imported maps.

Post by Velocinox »

Whenever I drop a token (which works fine on a quick map made while the server is running) is dropped on an imported map I get the following errors from macros that otherwise work fine...

Error executing switchToken: the token name or id {1} is unknown.
Error executing getProperty: the token name or id {1} is unknown.

Is there a known issue where token IDs are lost on Exported/Imported Maps? My macros works fine everywhere else.

This is on b81 and b86

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Token IDs being lost on Imported maps.

Post by CoveredInFish »

That tokens get new Id's on Import or export is to be expected. I assume you use hard coded token Id's in your macros? Use Wiki: findToken() instead.

Velocinox
Kobold
Posts: 21
Joined: Sun Jan 09, 2011 1:34 am

Re: Token IDs being lost on Imported maps.

Post by Velocinox »

No, I am sorry. I was unclear.

The map is exported and then imported.

The tokens are just copy and pasted from a main area where the PCs and NPCs are made.
It also happens when I import a map, and then drag an empty token over to the imported map and let the campaign fill in the properties. Then I drag a a working macro to it and suddenly I get the ID unknown error.

Thanks for the fast reply.

Code: Select all

[h: toKID = getSelected()]
[h: switchToken(tokID)]

[h: name = getName(tokID)]
This is the actual code...

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Token IDs being lost on Imported maps.

Post by CoveredInFish »

Hmmm... Copy pasting also does generate new Ids but if you don't hardcode Id's this is probably something we have to invest. Can't do it myself right now since i'm mobile.

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Token IDs being lost on Imported maps.

Post by Rumble »

I can't reproduce this based on the steps you outlined - I dragged an empty token into a map that had been exported, and then imported, and was able to run the macro you provided without any errors. Does this framework automatically populate macros (for instance, on a mouseover?) If so, with import/export/copy/paste there it may be storing a hardcoded version of the ID somewhere unexpected.

Can you provide an exact step-by-step sequence that produces this behavior? Can you attach the campaign file?

Velocinox
Kobold
Posts: 21
Joined: Sun Jan 09, 2011 1:34 am

Re: Token IDs being lost on Imported maps.

Post by Velocinox »

Thanks for the fast reply guys. I posted this right before a session, and had to go GM the game.

I eventually found the problem and it was not due to the exported and imported maps.

I was using a borrowed macro and it needed to write to a Lib token. It worked fine on the map where the Lib token was, but gave me those errors when I tried to move the macro without the Lib token as well.

Sorry about raising the red flag but it only cropped up right before my inaugural session, and I was a bit frustrated.

I actually did the work of the macro manually for the game and everything worked out ok.

Thanks again for the help, sorry it was a false alarm.

Post Reply

Return to “MapTool”