[FREQ] Static Token ID's.

If you have an idea for a new feature, please discuss it in the main MapTool forum first, then post a summary of the discussion here. Use the first Sticky as a template.

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

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

[FREQ] Static Token ID's.

Post by Full Bleed »

The fact that token ID's change under various circumstances (new sessions? map changes?) can be pretty annoying.

Anyway we could get rid of that?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: [FREQ] Static Token ID's.

Post by Merudo »

As of 1.5.2, token IDs change at server start.

And yes it would be great to have them be static. Among other things, it would help with:
  • Cached character sheets (the links would not become invalid once the server is started).
  • Keep initiative list if there a server restart during combat.
  • Pairing tokens once by storing ids (instead of using FindToken() or getTokens() every time).
Last edited by Merudo on Mon Aug 26, 2019 10:07 am, edited 1 time in total.

Glendwyr
Kobold
Posts: 16
Joined: Mon Apr 11, 2016 4:11 am

Re: [FREQ] Static Token ID's.

Post by Glendwyr »

In case no one's mentioned this, Merudo, good practice seems to be first starting the server, then loading the campaign.

Thus, suppose I have a campaign and the token "Bob" has ID "B0B":
  • If I first load the campaign, then start a server with the campaign loaded, Bob's ID changes.
  • If I first start the server, then load the campaign, Bob's ID is of course "B0B".
It's been this way at least as far back as 1.3b86. So if, for example, you need to restart the server during combat, you should (a) save the campaign, (b) restart the server, and then (c) load the campaign.

Having to do this is kind of annoying, and it would be really nice if starting the server didn't change the token IDs, but I haven't had any problems on any of my ID-based macros so long as I remember to start the server, then load the campaign. YMMV.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [FREQ] Static Token ID's.

Post by Full Bleed »

Good info on starting the server before loading the campaign to preserve ID's. But these kind of finicky workarounds never get out to enough users. :/

To add to the list, cutting and pasting a token also changes the IDs (which is how I, and others I'm sure, often move tokens to new maps.)
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: [FREQ] Static Token ID's.

Post by Phergus »

Full Bleed wrote:
Tue Jul 16, 2019 6:41 am
To add to the list, cutting and pasting a token also changes the IDs (which is how I, and others I'm sure, often move tokens to new maps.)
I never use cut/paste to move PC or named NPC tokens to new maps. I always use a teleport macro which does preserve the token IDs but that isn't why. I don't use cut/paste because it is too easy to screw up and lose the tokens.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [FREQ] Static Token ID's.

Post by Full Bleed »

Phergus wrote:
Tue Jul 16, 2019 9:20 am
I don't use cut/paste because it is too easy to screw up and lose the tokens.
I'm not sure if I've ever lost a token... though I'd be lying if I wasn't a little apprehensive about the possibility each time. But if I'm really concerned (i.e. I don't have a recent save or something big has recently happened) I'll use copy/paste.

However, I almost always use cut'n'paste to fix broken IDs. It's the quickest/esiest way to generate a new ID that I know of (that said, I'm not sure that the server start will generate a new ID if it's bad... so there might be a different process there.)
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: [FREQ] Static Token ID's.

Post by Merudo »

Starting with 1.5.5, token ids will no longer change after starting the server, and will remain constant after cutting and pasting.
Full Bleed wrote:
Tue Jul 16, 2019 10:45 am
However, I almost always use cut'n'paste to fix broken IDs.
What are "broken" ids, and how do you end up with one?
Last edited by Merudo on Wed Aug 28, 2019 2:32 pm, edited 1 time in total.

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

Re: [FREQ] Static Token ID's.

Post by aliasmask »

A broken id is an id that gets mistaken for a number. Either all digits or digits with an E near the end followed by more digits. I would find tokens with padded 0s in the front and end and when the middle had only digits it really messed up the use of saving token ids in the code.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [FREQ] Static Token ID's.

Post by Full Bleed »

Merudo wrote:
Tue Aug 27, 2019 5:37 pm
Starting with 1.5.4, token ids will no longer change after starting the server, and will remain constant after cutting and pasting.
Any chance you could include some way to 1) See the current token ID more easily and 2) Create a new ID on demand? Right now, when a corrupt/broken ID happens one of the easy fixes is to cut'n'paste. I'm not even sure if a server start fixes a broken ID... I once started a game and 4 out of 6 players had bad IDs. All I can think is that something I was doing in testing kept generating new IDs until they broke... and once broken it wasn't generating new ones... So I'd hate to be "stuck" with a bad ID and have no way to fix it.
Full Bleed wrote:
Tue Jul 16, 2019 10:45 am
However, I almost always use cut'n'paste to fix broken IDs.
What are "broken" ids, and how do you end up with one?
There have been better posts on the subject illustrating the issue but here is one such: viewtopic.php?f=20&t=26825&p=264178

Here is another case: viewtopic.php?f=3&t=26555&p=263357#p263357

BoT fix: viewtopic.php?f=21&t=25320&p=254216#p254216
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: [FREQ] Static Token ID's.

Post by Phergus »

Token ID could perhaps be added to the Edit Token dialog. Not as an editable field but at least as a selectable field for copying.

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: [FREQ] Static Token ID's.

Post by Merudo »

aliasmask wrote:
Tue Aug 27, 2019 9:13 pm
A broken id is an id that gets mistaken for a number. Either all digits or digits with an E near the end followed by more digits. I would find tokens with padded 0s in the front and end and when the middle had only digits it really messed up the use of saving token ids in the code.
Is this still a problem in 1.5.3? I spent a few minutes generating hundreds of tokens but I don't detect any problem.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [FREQ] Static Token ID's.

Post by Full Bleed »

Merudo wrote:
Tue Aug 27, 2019 11:59 pm
Is this still a problem in 1.5.3? I spent a few minutes generating hundreds of tokens but I don't detect any problem.
I just ran a test with 3333 tokens changing their IDs with both cut'n'paste and starting a server and I could not create a bad ID. So this appears to have been fixed in 1.5+. :)

While this is great news, I think there still needs to be an easy way to create a new ID for a token if cut'n'paste no longer does it. And I think it would be a nice idea to be able to see a token's ID without using a function if possible. Maybe I'm just haunted by old issues... ;)

At any rate, thanks for tackling the static ID issue. Will be nice to not have to worry about that so much any more!
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

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

Re: [FREQ] Static Token ID's.

Post by aliasmask »

Well, if broken ids are finally fixed then we wouldn't need to do a cut/paste to fix it.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [FREQ] Static Token ID's.

Post by Full Bleed »

aliasmask wrote:
Wed Aug 28, 2019 3:37 am
Well, if broken ids are finally fixed then we wouldn't need to do a cut/paste to fix it.
I'm not advocating that cut'n'paste do it (in fact, I'm glad it now won't.) But I'm also not ready to assume that an ID could never have an issue ever again... so I still maintain there should be a way to change the ID outside saving the token and having to manually unzip it and edit it.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: [FREQ] Static Token ID's.

Post by Phergus »

The method for producing IDs was changed in the Nerps fork and so is now part of 1.5+.

Post Reply

Return to “Feature Requests”