Problem with the city builder

cool3a2

Deity
Joined
Mar 30, 2007
Messages
2,177
Recently, I finished a cityset for my Hungary mod after months of work. Unfortunately, it contains a lot of 2x2 houses (houses that should be added to the 2x2 leaf due to their size) and the game now adds the fewer smaller houses much more often then the larger ones. That doesn't look well. There is something that allows adjustment of priorities in the CityLSystem, but it affects whole leaf instead of certain houses only and doesn't work as expected. Next, I tried a trick which almost allowed me to reach what I wanted. I added new leafs that have the same names as the existing ones, but have different sizes (width and height) then their counterparts. For example, I added a 2x1 leaf that has a height and a width of 2 both. This ways, the game thinks it picks a 2x1 leaf while respecting the real size of that leaf. As a result, my 2x2 buildings get picked more oftenly and the city looks good actually. Considering the other citysets of different eras and civilizations, this didn't cause any trouble it seems. There is also no cropping IMO. The problem is, that ordinary buildings (like baracks for instance) thats definition has been made in one of the original leafs that have a hacked counterpart, don't show up anymore. Even if I move it to a hacked leaf that has a proper size, the problem doesn't get solved. Then, the game reserves enough space, but the building doesn't show up, leaving an empty gap. Seems like this affects all eras (and probably civs) the definition is valid for. Now that's inacceptable... I can't see how to fix this with XML although I would prefer this sort of solution. On the other side, I could imagine that the SDK or python may help. I believe I could code this, but I have no idea where to start at all. Not even which file I would need to edit. So I'm requesting help this ways.

In general, I could imagine two ways of solving this:
- let the game count the valid entries of a cityset for the current era and civ for each leaf, then make selections according to how often a leaf is used for the definitions; this ways, 2x2 houses would get used more often then smaller ones for my cityset, while leaving other citysets unaltered; my trick would then become unnecessary
- let the game process all versions of any leaf correctly, thus let it still use the baracks definition for instance (as it seems that those entries got overwritten); in short: making my trick work properly

Anyways, I'm using WoC and a solution for my problem would need to be compatible with it.

My cityset and the nif can be loaded through these links (hope these links work):
- http://forums.civfanatics.com/attachment.php?attachmentid=251218&d=1272713243
- http://forums.civfanatics.com/attachment.php?attachmentid=251129&d=1272644800

As I invested a lot of time already, I'd really really appreciate it if anyone could find a solution.
 
I'll add something to get a discussion here started:
Like i've said in a PM, there's in python no real way to force the engine to make a refresh.
Addiontally, i also don't see a way to access an object from both LSystem.xmls, but the objects from the normal art defines can be accessed.
So from this i guess, that it's just not open to python, but the stuff has to be loaded somewhere, so it's in the SDK, isn't it?

Sadly, i think there's also in the SDK no function for an engine refresh. Can anyone remember the discussion, when hrochland wanted the art of a building to change after a city conquest? I guess, we've talked about this there, am i right?
 
Thanks, The_J, for helping me.

Actually, I'm not sure whether a refresh is actually needed. To me it seems, that we'd just have to influence the progress when the game decides which building to use. Force a refresh would be needed only, if the timing of when the game puts buildings in the city wouldn't fit, but that works right. The game would actually do the same mistake again IMO. In simply words: the problem is what it does exactly, not when. But well, my opinion on this is based on guesses only as I don't know what exactly happens in the python and SDK codes. So I might be wrong.
 
Back
Top Bottom