UFO:Alien Invasion

General => User modifications => Topic started by: Neonin on July 07, 2012, 01:36:12 am

Title: MAX_OBJDEFS
Post by: Neonin on July 07, 2012, 01:36:12 am
While adding new things to the game I appear to have hit a hard-coded item number limit, as the last item I added causes my loading screen to go black and the log to throw up this error:

Quote
Com_ParseItem: MAX_OBJDEFS exceeded

Is this constant something that could simply be upped in the official code to give us modders more room to play with, or is it a more complex issue than just bumping up the number?
Title: Re: MAX_OBJDEFS
Post by: geever on July 07, 2012, 08:06:50 am
While adding new things to the game I appear to have hit a hard-coded item number limit, as the last item I added causes my loading screen to go black and the log to throw up this error:

Is this constant something that could simply be upped in the official code to give us modders more room to play with, or is it a more complex issue than just bumping up the number?

It needs recompiling the game from source, so no. :(

-geever
Title: Re: MAX_OBJDEFS
Post by: H-Hour on July 07, 2012, 09:27:57 am
I think he's asking if the number could be increased in the official game so that a modder has more room to work with, not whether it's scriptable.

Mattn will have to weigh in on whether the number can be increased.
Title: Re: MAX_OBJDEFS
Post by: Mattn on July 07, 2012, 09:35:43 am
it can be increased - but to be honest i would like to see a more dynamic approach. otherwise for non-modders we might just waste a lot of memory.
Title: Re: MAX_OBJDEFS
Post by: Neonin on July 07, 2012, 11:46:51 am
Well that's probably beyond me, I haven't tried delving into the code and I have no idea how much extra memory is used per item.

I shall remove the two extra items I added last night so I can play the game then, I got everything in I wanted to (for now) except for a few extra base defence weapons so it'll tide me over until a solution is forthcoming, even if it's "We don't want you putting that much extra stuff in the game, get stuffed modder!" :D
Title: Re: MAX_OBJDEFS
Post by: geever on July 07, 2012, 06:58:26 pm
Making it a linkedlist or a hashlist is the solution however it's much work, much testing...

-geever
Title: Re: MAX_OBJDEFS
Post by: Neonin on July 07, 2012, 07:11:33 pm
Well since I have absolutely no idea what you just said, I'd definitely conclude it's beyond me ;)
Title: Re: MAX_OBJDEFS
Post by: Mattn on July 08, 2012, 10:41:42 am
i will look into this asap (but only for 2.5-dev)
Title: Re: MAX_OBJDEFS
Post by: AntJam on October 03, 2013, 05:06:32 pm
Sorry to dig up an old thread but I just hit this limit seems to be only 7 items was there any progress in allowing this limit to be altered ?
Title: Re: MAX_OBJDEFS
Post by: Mattn on October 03, 2013, 06:41:29 pm
please open a ticket on the feature tracker. otherwise we will most likely forget it (again). sorry
Title: Re: MAX_OBJDEFS
Post by: AntJam on October 03, 2013, 07:05:47 pm
Thats ok there hasnt exactly been an avalanche of mods all butting heads on the 7 item limit . made the report