Final Frontier Building Cap: Possible to Remove?

deanej

Deity
Joined
Apr 8, 2006
Messages
4,859
Location
New York State
The Final Frontier mod has a building cap in CvSolarSystem.py towards the end:
Code:
# Hardcoded (This is Bad)
for iBuildingLoop in range(100):
	g_aiBuildingYieldIncrease.append([0,0,0])
	g_aiBuildingPopCapIncrease.append(0)
	g_aszBuildingDummyTags.append("")

That 100 is the cap (it's 32 by default). If more buildings exist, as soon as one of those extra buildings is constructed a CTD occures. I want to make it so this cap is indexed to the actual amount (I don't have the skills necessary to remove the hardcoding completely). I thought this would work:

Code:
iBuildingNum = gc.getNumBuildingInfos()

# Hardcoded (This is Bad)
for iBuildingLoop in range(iBuildingNum):
	g_aiBuildingYieldIncrease.append([0,0,0])
	g_aiBuildingPopCapIncrease.append(0)
	g_aszBuildingDummyTags.append("")

This gives me python exceptions on startup so I reverted back. Is there any way to do what I want to do?
 
Top Bottom