login

Author Topic: Upper limit to objects in 0.894 & quick-fix.  (Read 3323 times)

Khalid ibn Walid

  • Guest
Upper limit to objects in 0.894 & quick-fix.
« on: October 27, 2007, 01:00:16 PM »
A rather essential piece of news for those handling big mods.

Came up into a big error while porting the Lombard Leagues from 808 to 894 that I couldn't solve.   Specifically I was coming up against this error repeatedly:

Code: [Select]
exporting scene data...
Traceback (most recent call last):
File "process_scenes.py", line 77 in ?
save scenes (variables, variable_uses, tag_uses)
File "process_scenes.py", line 63, in save scenes
tag_uses [tag_troop][troop_no] = tag_uses[tag_troop] [troop_no] + 1
IndexError: list index out of range
Exporting troops data

Armagan kindly took a look at it himself and noticed it was because I had violated an upper limit on objects (troops in my case).  So take note: there is an upper limit of 1024 for number of objects in the 0.894 module system.  He has assured me it will be upped in the next version.  The following is the temporary fix:

Open the file process_operations.py

Find line 176. It should read:
    for j in xrange(1024):

Change it to something like:
    for j in xrange(4000):

And it should work (as long as you have less than 4000 troops). 

(it worked for me :)).
« Last Edit: October 27, 2007, 01:03:10 PM by Khalid ibn Walid »

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Upper limit to objects in 0.894 & quick-fix.
« Reply #1 on: October 27, 2007, 06:23:15 PM »
Does that also get the strange crashes from disbanding troop stacks?  The bizarre bug everybody has been talking about?

http://mbx.streetofeyes.com/index.php/topic,1026.msg19374.html#new

Khalid ibn Walid

  • Guest
Re: Upper limit to objects in 0.894 & quick-fix.
« Reply #2 on: October 27, 2007, 06:48:46 PM »
Does that also get the strange crashes from disbanding troop stacks?  The bizarre bug everybody has been talking about?

http://mbx.streetofeyes.com/index.php/topic,1026.msg19374.html#new


No idea.  I haven't even managed to reach that stage yet.  But by the sounds of it, not likely.

Offline Fisheye

  • Blues Brother
  • Moderator
  • *****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Re: Upper limit to objects in 0.894 & quick-fix.
« Reply #3 on: October 27, 2007, 09:36:39 PM »
Nope. Armagan told me the disband troops bug is because when you remove a stack completely the game tries to display the name of the dead stack even when there is nothing to display. Nothing to do with this.