Help understanding some concepts

rxformula91

Chieftain
Joined
May 5, 2010
Messages
8
Hey, I'm just wondering on somethings and would be great if anyone can shed some light... I've been looking at seeing if I could add some buildings and wonders for the game... I got through wonders no problems, as well as buildings that civlopedia shows the building/wonder as well as the stats it enables.

For example, for the main mod I did a Risian Resort that makes happiness for the civ who owns it but it -1000% military production for that system that its built on.

Another example is building a subspace amplifier for decreasing maintenance early in the game for example.

but I notice that what became wacky for me is say I build all the buildings for that solar system, including the ones where only one is allowed per solar system. I checked the xml code that the <bOnlyOne>1</bOnlyOne> is on, but when I change to build stuff on another planet in the same solar system, All the previously built (one per system) buildings are buildable on that planet despite the fact that this code is on.

I'm just wondering if there needs python code changes for new buildings added or does the python read that <bOnlyone> line in XML to determine that. Just trying to see if there's a procedure in terms of adding buildings (non-wonders) that I have to follow to avoid these duplicates popping out in the game.

Also, is there a maximum amount of buildings you can have in the build list?

Any word on this topic is appreciated... This is an excellent mod btw, I've just want to test the limits to what it can do...

Thanks in advance
 
How are you building all the buildings for the solar system? If worldbuilder is involved, you should check to see that you have the latest patch. 3.0 shipped with a serious worldbuilder bug that made the edit city menu useless.

I specifically got rid of the lists in python to make it easier to add/remove buildings. Before 3.0, simply touching the building list was playing with fire, but now they're as easy to change as anything else.

There is indeed a hardcoded maximum but you won't run into it unless you spam in a zillion buildings, and if you do, it can be easily changed in python. There is also some hardcoding near the top of the file that you need to be careful of - don't add/remove anything at around the habitation system or earlier in the file.
 
The hardcoded number of building infos is not necessary at all. Because it can be changed to this:

Code:
for iBuildingLoop in range(gc.getNumBuildingInfos()):
	g_aiBuildingYieldIncrease.append([0,0,0])
	g_aiBuildingPopCapIncrease.append(0)
	g_aszBuildingDummyTags.append("")

I considered doing this for Final Frontier Plus, but then I ended up making tags for everything that this loop was doing, so it wasn't necessary.

That removes the limit entirely.
 
Back
Top Bottom