[FREQ] Static Token ID's.
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
[FREQ] Static Token ID's.
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?
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."
Re: [FREQ] Static Token ID's.
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:
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.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: [FREQ] Static Token ID's.
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":
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.
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".
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.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: [FREQ] Static Token ID's.
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.)
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."
Re: [FREQ] Static Token ID's.
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.Full Bleed wrote: ↑Tue Jul 16, 2019 6:41 amTo 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.)
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: [FREQ] Static Token ID's.
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."
Re: [FREQ] Static Token ID's.
Starting with 1.5.5, token ids will no longer change after starting the server, and will remain constant after cutting and pasting.
What are "broken" ids, and how do you end up with one?Full Bleed wrote: ↑Tue Jul 16, 2019 10:45 amHowever, I almost always use cut'n'paste to fix broken IDs.
Last edited by Merudo on Wed Aug 28, 2019 2:32 pm, edited 1 time in total.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: [FREQ] Static Token ID's.
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.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: [FREQ] Static Token ID's.
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.
There have been better posts on the subject illustrating the issue but here is one such: viewtopic.php?f=20&t=26825&p=264178What are "broken" ids, and how do you end up with one?Full Bleed wrote: ↑Tue Jul 16, 2019 10:45 amHowever, I almost always use cut'n'paste to fix broken IDs.
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."
Re: [FREQ] Static Token ID's.
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.
Re: [FREQ] Static Token ID's.
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.aliasmask wrote: ↑Tue Aug 27, 2019 9:13 pmA 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.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: [FREQ] Static Token ID's.
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."
Re: [FREQ] Static Token ID's.
Well, if broken ids are finally fixed then we wouldn't need to do a cut/paste to fix it.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: [FREQ] Static Token ID's.
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."
Re: [FREQ] Static Token ID's.
The method for producing IDs was changed in the Nerps fork and so is now part of 1.5+.