Max Objects in I7 (Or is it I6?) Compiler


I’ve run into this error quite a few times, now. It deals with applying variables to objects, and a ceiling in the compiler. I’ve been creating a procedurally based system that uses a lot of variables attached to objects, and am trimming them up to fall beneath this ceiling. I’ve actually gotten to the point where I don’t want to remove ANY of them for certain objects, though. :smiley:

Here’s the error:
Error: Limit of property entries exceeded for this object; MAX_OBJ_PROP_COUNT is 128.

I did find a thread that had some stats with this:

Anyway, my solution for this error has been to create new classes. For example, I have an “NPC” class, that is hitting this 128 variable count. The “player” class has another set of variables. Rooms have variables attached to them, etc.

I guess the only question I have about this is – does this apply to each major object (as sort of a super class, like room), or could I attach 128 variables to a sub class, like: an NPC is a kind of person, a monster is a kind of person, and give 128 to each, creating 256 – that would still be applying 256 to the “person” super-class, so I’m assuming this would error out.

If I were to do this, instead: (and this is where I’m getting errors, now) an NPC is a kind of person, a monster is a kind of NPC, and the NPC parent class has 128 variables, then I attach another variable specifically to the monster sub-class, I get the error – because it’s going back to the NPC class, which is already at the ceiling.

Anyway – more of a report, than a question. :smiley: 128 variables for each super-class seems to be enough, with the proper conservation, but having the sub-classes allow for 128 more variables, each, would be better.

I may have answered my own question. I’m using an “Avatar is a kind of person” class for the player, so it is a separate sub-class of person, so each sub-class can have 128 unique variables, which is completely awesome.

Can you not just use


or something along those lines? (I’d be surprised if you hadn’t run into one of the ceilings already, if you’re making a game like this, but you never know.)

The version of I6 that ships with I7 can’t do that. (Or rather, it accepts the option, but crashes.)

As noted in that thread, if you’re comfortable compiling the latest I6 compiler source, you can stick it into I7 and then set MAX_OBJ_PROP_COUNT as high as you like.

Hm, now that’s a good option – I didn’t know you could set that! I’ll probably just trim the fat for this game and try to stay below the 128 ceiling, even though I’m bumping up against it, due to time constraints. For later versions of the system I’ll use a stronger compiler.

Maga: I’ve run into this ceiling over and over, but have come up with workarounds using sub-classes, which has given me a somewhat infinite scalability (at least, as far as I can tell.)

Thanks for the input!