View Full Version : Adjust starting city radius.


dark_sheep
Jun 11, 2009, 11:28 PM
Hello mod wizards!!

I'm a long time player, first time modder just getting my feet wet with all of this, so please excuse my silly request.

I'm looking for the code to adjust the starting city radius of all newly-founded cities.

I've have not done a completely thorough check of the xml code; I was just wondering if anybody knew the answer from past experience. Any help pointing me in the right direction would be greatly appreciated.

Thanks kindly in advance!

:thanx:

General Tso
Jun 12, 2009, 02:03 PM
The city radius is determined by culture. I'm not all that familiar with culture (in real life and in the game :)), but I think the field FREE_CITY_CULTURE might solve your problem. It's located in Assets\XML\GlobalDefines.xml. If you increase it's value to 10 (maybe more) it should do what you want. One word of caution, you should never change the original game files when modding the game.

dark_sheep
Jun 12, 2009, 02:49 PM
Thanks for the tips General. :)

One word of caution, you should never change the original game files when modding the game.

I've been rummaging through the modding forums pretty much continually for the past few days and have seen that warning many times - so I'll definitely take it to heart.

What I'm actually looking to do is start a city with only its original tile (I know it sounds strange but hopefully for what I have in mind it'll work out! :mischief:)

I'm starting to get the feeling this is something coded into the game so I may not get to it until I delve deeper into the pile.

Lord Olleus
Jun 12, 2009, 04:58 PM
Somewhere in the XML is a file that defines each of the culture levels, its probably in GameInfo and called something allong the lines of CIV4CultureInfos.xml. If you are familiar with xml you will see that there are about 5 main entries for each of the different culture levels, each with many attributes. I believe that one of those attributes is called something like <iRadius> and determines the size of the city radius (probably wrong about the name). If you reduce it for the first culture level, you might just get what you want.

General Tso
Jun 13, 2009, 01:46 AM
I inadvertely caused the cities in my mod to start with no radius, but I forget how I did it. I total removed culture from my mod a long time ago, so I have to try to look back at some of my older code. If I find it I'll let you know. I think it had something to do with setting the culture level of the plot to 0.

dark_sheep
Jun 14, 2009, 10:23 AM
Thanks for the tips! I'll let you know how it works out.

BTSformac
Jun 15, 2009, 02:10 AM
I would expect you will need python to do this. You could try adding something to onCityBuilt in CvEventManager.py (im not familiar with civ python enough to really help though)