[1.3b59] Turning Off/On lights Sometimes Fails

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

Post Reply
dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

[1.3b59] Turning Off/On lights Sometimes Fails

Post by dorpond »

Turning on/off light in this selection macro (attached campaign) sometimes results in moments where they don't turn off. I cannot create steps to show you but if you just randomly click on and off a whole bunch of lights in each tab, eventually after a few tries, some lights won't turn off anymore. They can be turned off through the token menu though, so that is good.

Rumble and I were testing it here too:
http://forums.rptools.net/viewtopic.php ... 9&start=15
Attachments
Light Issue.cmpgn
(96.1 KiB) Downloaded 129 times
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

gramathy
Kobold
Posts: 9
Joined: Mon May 25, 2009 6:03 am

Re: [1.3b59] Turning Off/On lights Sometimes Fails

Post by gramathy »

I'm not seeing any macros or light sources defined in your campaign. You might have put the macros in the wrong place, though I'm not sure why the light source info is missing.

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Re: [1.3b59] Turning Off/On lights Sometimes Fails

Post by dorpond »

Oops! My bad. I made the campaign in 1.3PDev60 which isn't released yet. :P

I'll make the test campaign in B59 and upload it again.
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Re: [1.3b59] Turning Off/On lights Sometimes Fails

Post by dorpond »

OK, new campaign file uploaded for your testing pleasure.
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

gramathy
Kobold
Posts: 9
Joined: Mon May 25, 2009 6:03 am

Re: [1.3b59] Turning Off/On lights Sometimes Fails

Post by gramathy »

Woo, found it!

This was caused because tokens don't uniquely identify sources - you had multiple torches on the token without the program displaying it any differently (making it so you couldn't tell), so every time you ran the macro and something was checked, it would add another one of it. Eventually, you try to remove that light source, and it would remove one but there were still 1+ copies of it and nothing would visually change.

The removal aspect would only remove ONE of the type, so getting rid of that limitation (checks the entire list of sources instead of just getting the first one) makes them all go away immediately. Additionally, I added a uniqueness check, so existing tokens with doubles can still get them removed, but new ones get checked for sanity reasons before they go crazy.

Status: Should be in next major patch, or thereabouts.

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Re: [1.3b59] Turning Off/On lights Sometimes Fails

Post by dorpond »

Brilliant Observation, gramathy!

Once it is in place, I will test the DEV version. I am assuming you sent it to Trevor already?

Thanks!
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

gramathy
Kobold
Posts: 9
Joined: Mon May 25, 2009 6:03 am

Re: [1.3b59] Turning Off/On lights Sometimes Fails

Post by gramathy »

Yeah, last night, he should have it. It was a really simple fix once I noticed the behavior.

I'd like to thank Eclipse's Debug mode and breakpoints for letting me see the crazy-long list of token light sources that I was generating. Too bad it took me 20 minutes after that to realize that that WAS the problem.

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

Re: [1.3b59] Turning Off/On lights Sometimes Fails

Post by trevor »

applied to 1.3b60
Dreaming of a 1.3 release

Post Reply

Return to “Resolved”