Midnight Mansion Forums
General Custom Mansions Area (Mac and Windows) >> Custom Mansions / Designing >> Reset your ObjectIDs!

Message started by VernJensen on 07.01.2010 at 04:07:15

Title: Reset your ObjectIDs!
Post by VernJensen on 07.01.2010 at 04:07:15
Apparently there is a bug in Midnight Mansion where, if the currently in-use ObjectID is higher than 32,767, problems start to happen when levers attempt to control an object with an ID higher than this number.

But it's very rare to have this many objects in a mansion. So I recommend, while designing, resetting your ObjectIDs whenever the number seems to be getting higher. (You can reset them as often as you'd like.)

I'd double-check to make sure your levers still affect the same sprite, after you do the "Reset", but I believe the editor handles this properly.

A little background on what this is:

Every time you add a sprite to the game, the editor assigns it an objectID, starting with 1, and increasing with each object you add. If you get up to 100 objects, and then delete some old objects or entire rooms, the next ID used will still be 101, even though there are "available" objectIDs that can be reused, due to deleting other sprites.

"Reset Object IDs" re-numbers all objects in the entire mansion, starting from 1, so there are no unused IDs. This helps avoid problems where, if you exceed 32,767, apparently problems can happen. It's not supposed to happen, and I'll be looking into this to see if I can get this fixed, but in general, the "solution" is simple and easy.

If you let your objectIDs exceed 32,767, and *then* use Reset ObjectIDs, you may have problems with levers no longer controlling their target object properly, for any target objects that had a value higher than 32,767. So you may have to go back and re-enter the correct objectID into the lever for these objects. But the easy way to avoid this is to reset your object IDs before the number gets higher than 32,767.

I'm not sure if this is confusing, but if you have any questions, please ask.

Midnight Mansion Forums » Powered by YaBB 2.4!
YaBB © 2000-2009. All Rights Reserved.