Getting Smart Map Warlord script working with BTS (Solution)

Matte979

Jedi Master
Joined
Oct 29, 2001
Messages
291
Location
Chicago
I had some issues with Smart Map in BTS so I did a quick check on what has changed in the default map scripts in BTS.

I always used Smart Map before so could not really use the defaults so I tinkered around and got Smart Map to work.

There is one change thats needed to be made to the SmartMap.py file.

At the end of function def getGridSize(argsList): add

if (argsList[0] == -1): # (-1,) is passed to function on loads
return []
[eWorldSize] = argsList
return grid_sizes[eWorldSize]

There is some other changes in BTS concerning text descriptions on options but those do not seem to be important for it to work at least not in the english version. I havent tested it with other scripts than Smart Map but it might work with other scripts.

Here is the how the end of the process should look.

--OLD (START)
#return the computed width and height
print " final width",calcwidth,"height",calcheight
OutputMessage("Python: SmartMap: Step 1 Setting Map Size: complete")
collectGarbage()
return (calcwidth,calcheight)
--OLD (FINISH)

--NEW (START)
if (argsList[0] == -1): # (-1,) is passed to function on loads
return []
[eWorldSize] = argsList
return grid_sizes[eWorldSize]
--NEW (FINISH)
 
It crashed to desktop seemingly randomly. Some times it worked and sometime it just crashed.
 
At what point precisely?

I never generated an error with SmartMap in BtS but LandMasses, which uses the same structure as SmartMap, has crashed many times for may people. I'm wondering if it's the same bug.
 
Top Bottom