[1.3b57] Dupe Token Number prefs ignored if 89 other tokens

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice, MapTool BugReport Manager

Post Reply
RicoTheBold
Kobold
Posts: 21
Joined: Sun Sep 13, 2009 12:52 am

[1.3b57] Dupe Token Number prefs ignored if 89 other tokens

Post by RicoTheBold »

I believe I found a bug, and searching through the forums I can only find mention of a similar issue with somewhat different symptoms:

Similar discussion here:
http://forums.rptools.net/viewtopic.php ... 86&start=0

In the linked discussion, they mention the random double-digit duplicate token numbering preference not working under two conditions:
1) On layers other than the token layer (by design, so not a bug).
2) Randomly when copying a token (not when placing down new); no specific other triggers discovered/listed.

Caveat: I'm totally new to Maptool, but I've been playing around with 1.3b57 for the last few days. It's the first build I've tested so I can't say anything about any others.

What I originally experienced was that on the maps I spent a lot of time and put a lot of work in, when I finally went to populate them with monsters, they weren't random 2-digit numbers and instead were getting sequential numbers, despite my preferences. After some more experimenting, I found the trigger. When you read the following, I am aware that all objects in Maptools are considered tokens, but for clarity I will call them objects unless they are specifically placed in the token layer.

Any map with at least 89 objects makes object 90 (and up), if it's placed in the token layer, use sequential numbering. It doesn't appear to matter what layer the first 89 objects are placed in, or whether you're placing a new object you've never used before, or what. Number 90 means random numbers are gone. I'm wondering if some token layer-specific checks for quantities of duplicates has gone outside its intended bounds and Maptool is instead just checking whether or not there are 89 other things, period? I'm not a coder, really, and while I may not write the worst Windows automation scripts ever (comparing them to the monstrosities my predecessors at my job somehow created), I also have no experience in Java...so I hope someone else can see what's going on here.

As a related note, I find it kind of interesting that the sequential numbering increases even if you never place the token (drag/drop from the resource library, then hit cancel when it asks to confirm info, then drag/drop again). Someone might possibly care, so I'd file it as [probably] unintended behavior, though not a bug, per se.

So, to clarify...Steps to duplicate reported issue:
1. Create new map in 1.3b57. Not sure if it happens in previous builds; this is my first.
2. Place new token down to verify MapTool assigns it a random 2-digit number.
3. Put 88 or more other things somewhere. (89 total, including first token.) Any image (same or different), any layer.
4. Put another new token down (the 90th) in MapTool (most obvious if you use a wholly new image) and verify it no longer assigns a random 2-digit number, and instead assigns it number 1.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [1.3b57] Dupe Token Number prefs ignored if 89 other tokens

Post by Azhrei »

Hey, that's very cool! Good find!

It appears that because the random number sequencing is two-digits, it allocates all two-digit numbers first (10..99) which is a total of 90 tokens. When the next one is copied down, all two-digit sequences are used up so it starts counting up from 1. It should use values from 01..99 instead, and once all two-digit sequences are used up it should go to three digits and allocate randomly instead of sequentially looking for available slots.

I don't think I'd ever have found that bug, either!

Although it should apply into to images dropped down that have the same prefix. MapTool pretends like the number isn't there on the end and compares to see if any other tokens with the same prefix exist. So images with a different prefix should get their own sequence of 10..99 before they start allocating from 1 too.

RicoTheBold
Kobold
Posts: 21
Joined: Sun Sep 13, 2009 12:52 am

Re: [1.3b57] Dupe Token Number prefs ignored if 89 other tokens

Post by RicoTheBold »

Glad I could be of some help. I thought it was funny the message board made my post require a moderator to approve its appearance on the board. Sadly, it's not the first time it's happened to me. Apparently long, well-thought out posts from new accounts trigger spam detection routines on most message board code.

User avatar
palmer
Great Wyrm
Posts: 1367
Joined: Sat Sep 06, 2008 7:54 pm

Re: [1.3b57] Dupe Token Number prefs ignored if 89 other tokens

Post by palmer »

Actually, we have all new accounts set to manual approval. Too much spam, had to do it.

Good news is that after a couple approved posts, your training wheels are off.

User avatar
Venatius
Dragon
Posts: 256
Joined: Mon Feb 16, 2009 7:12 pm

Re: [1.3b57] Dupe Token Number prefs ignored if 89 other tokens

Post by Venatius »

I can confirm (unless I've screwed something up) that this bug is still present in b58. Not that it was listed on the fixed bugs list, but you never know when bumping one thing will also knock another into place. Sadly, it doesn't seem to have done that here.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Re: [1.3b57] Dupe Token Number prefs ignored if 89 other tokens

Post by trevor »

This is fixed for 1.3b59
Dreaming of a 1.3 release

Post Reply

Return to “Resolved”