Is there any way to edit the number of free buildings in a city? (Lua)

Tomatekh

Emperor
Joined
Aug 6, 2012
Messages
1,434
I know I can check if there's a normal building (GetNumBuilding) or a free building in a city (GetNumFreeBuilding). However, SetNumRealBuilding doesn't seem to affect free buildings. So, for example, if the city has a free monument and I SetNumRealBuilding Monument to 0, it doesn't do anything. There also doesn't appear to be a SetNumRealFreeBuilding equivalent.

So, is there any way to add or remove free buildings with lua?
 
No. For reasons only known to the Firaxis devs (ie they didn't need that particular function for the UI or a scenario) they didn't add SetNumFreeBuilding to the Lua interface to the CvCity object/class
 
No. For reasons only known to the Firaxis devs (ie they didn't need that particular function for the UI or a scenario) they didn't add SetNumFreeBuilding to the Lua interface to the CvCity object/class

Bleh, thanks. Well that creates a major hole in a mod that I was like 90% done with. :/
 
Is it a major conversion mod, or a component mod?

It wouldn't be that big a deal to recompile the DLL to add the Lua API
 
It was a civ whose UA involved other civ's UBs but the game doesn't want to play nice when you have a unique version of a building class not your own in a city that suddenly gets a free building from a wonder or policy.

I wouldn't compile a new DLL just for an individual civ, but I might for when I pack them all together (or the eventually big modpack I'm planning). I had another civ that had a UB Aqueduct but the Tradition finisher grants a free building type instead of class which I'd also like to fix.
 
I had another civ that had a UB Aqueduct but the Tradition finisher grants a free building type instead of class which I'd also like to fix.

That one I've already fixed in my modded DLL
 
Back
Top Bottom