project-navigation
Personal tools

Author Topic: MAX_OBJDEFS  (Read 6634 times)

Offline Neonin

  • Rookie
  • ***
  • Posts: 63
    • View Profile
MAX_OBJDEFS
« 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?

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: MAX_OBJDEFS
« Reply #1 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

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: MAX_OBJDEFS
« Reply #2 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.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: MAX_OBJDEFS
« Reply #3 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.

Offline Neonin

  • Rookie
  • ***
  • Posts: 63
    • View Profile
Re: MAX_OBJDEFS
« Reply #4 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

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: MAX_OBJDEFS
« Reply #5 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

Offline Neonin

  • Rookie
  • ***
  • Posts: 63
    • View Profile
Re: MAX_OBJDEFS
« Reply #6 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 ;)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: MAX_OBJDEFS
« Reply #7 on: July 08, 2012, 10:41:42 am »
i will look into this asap (but only for 2.5-dev)

Offline AntJam

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: MAX_OBJDEFS
« Reply #8 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 ?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: MAX_OBJDEFS
« Reply #9 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

Offline AntJam

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: MAX_OBJDEFS
« Reply #10 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