3-square radius cities mod

The Great Apple said:
You should really use GlobalDefinesAlt.xml for mods - any entries in there overwrite the entries in GlobadDefines.xml making the whole thing alot neater.
Not to mention the ability to withstand new Firaxis patches and maintain compatibility ;)
 
Shqype said:
Not to mention the ability to withstand new Firaxis patches and maintain compatibility ;)

While it is true that we should use the alt file, I really don't see what makes that one particular XML file is so different. Any changes you make to any XML file requres careful merging when a new patch comes out.

Roger Bacon
 
The biggest "mod-breaker" for the v1.61 patch was the top 3 tags in the GlobalDefines.xml file; as far as I can tell no one really has any reason to alter those. If the GlobalDefinesAlt.xml file is used instead with only tags that are actually changed, then you run less a risk of getting an incompatible mod. In the case of many mods out there, you may have had a wierd text string for Mao Zedong, but you would at least still be able to see text and play the mod in a non-English language.
 
Rabbit said:
Now, if I understand correctly the extra "circle" of squares becomes available to the city as soon as they're withing the culture borders, right? Would it be possible to modify it so that instead the city is required to be of certain size before it can work those tiles? Just seems to me that getting access to so many city tiles early on could be unbalancing, but if it can be set to, for example, only be accessible to cities of size 16 or more then it would make it easier to grow large cities without potentially unbalancing the early game.

The way I see it, health and happiness limit early city size anyway, so it's not like all those squares will be worked. What you're proposing would mean that you'd have to put cities closer together in the beginning of the game in order to use the land available to you, and overlap would limit the usefulness of the extra ring in the later game. But with early cities having access to the extra ring, they can still work the good resources without worrying about crowding at the magic population size.

Either way, the cities won't grow any faster than they have before, unless of course there's a ton of good food resources that are only all reachable by one city with the bigger radius. But in vanilla, this would have just been 2 or 3 cities with the same combined population.

What this mod does strategically is let you concentrate on fewer, more powerful cities, rather than having to manage several smaller ones. The big early game benefit is that every city is more easily tailored to what you want it to do, because it has access to more terrain, but so do the other civs, so it's not unbalanced (unless the AI still places cities at the same distance as before).

The only game unbalancing thing I can see is, theoretically the OCN needs to be tweaked down a bit. Otherwise, this mod is also a "Lower City Maintenance" mod in disguise. That and making sure the AI's city placing function knows it has access to a third ring are the only balance problems I foresee.
 
@Bacon:
I have been looking to making this mod optional with a GAME_OPTIONS enum but found it to be very tricky (changes I made froze the game and I had to abandon that first attempt). Idealy I would like to see this as a data member on the City so work-radius could increese with buildings or tecnology. But right now I would just settle for a boolean option that people could set before they start playing. As your more familiar with the code I sujest you have a look at it and we can perhaps do some brainstorming. If an optional implemention can be developed then we could include the mod in the CCP.
 
Impaler[WrG] said:
@Bacon:
I have been looking to making this mod optional with a GAME_OPTIONS enum but found it to be very tricky (changes I made froze the game and I had to abandon that first attempt). Idealy I would like to see this as a data member on the City so work-radius could increese with buildings or tecnology. But right now I would just settle for a boolean option that people could set before they start playing. As your more familiar with the code I sujest you have a look at it and we can perhaps do some brainstorming. If an optional implemention can be developed then we could include the mod in the CCP.

Impaler, actually, I already have a working version of RogerBacon's code with a boolean flag to prevent the 3rd ring. I have also been playing around with his mod to allow variable sized cultural areas for cities. Is this what you were talking about?
 
I think so, basicaly I am looking for the ability to turn off the Mod and retain the original unmodified game behavior. The current Firaxis original implementation was hardcoded and Bacon simply changed it to a new hardcoding. I'm looking for a flexible aproatch. If you have managed to get it under Boolean control please do upload your changes, I would be eager to use them.

Cultural Area is a seperate issue that I am not currently trying to mod beyond including Chalids slow border expantion which I put under a boolean as well (was just 1 line so it was easy).
 
I don't have the code in front of me but if I remember correctly the city tiles worked expand in a cicular fashion from the city outwards. These squares are stored in a simple array. It would probably be easy to resize the array (smaller) during game start based on a variable in the GlobalDefinesAlt.XML. That would probably be the easiest way. TheLopez, how did you do it?

Roger Bacon
 
TheLopez said:
Impaler, actually, I already have a working version of RogerBacon's code with a boolean flag to prevent the 3rd ring. I have also been playing around with his mod to allow variable sized cultural areas for cities. Is this what you were talking about?
This great. I'd like to see this behaviour controlled by something like city size, or maybe, like Impaler says, a building.
 
I think some kind of strategy in which the City holds an Array equal to the largest possible Radius that can be worked but with a limiter function that prevents working of a square greater then the cities current work radius.

Then you could go to theoreticaly unlimited size and number of varriations.
So for example we just define the work tile cut offs
RADIUS_ONE = 8
RADIUS_TWO = 21
RADIUS_THREE = 37
RADIUS_FOUR....
(Note we could have an arbitrary number of levels, I think linking with Chalids Slow Borders would be nice)

The plots spiraloutward so plots 1-8 are the first ring, 9-21 the second ect ect so their is a direct corrilation between cut off and radius.
Pack that data in an array and use it to update the Cities tile cut off point and then when performing all of the cities plot working checks the array iteration will be limited by a function all CvCity.getMaxWorkTile()
 
Cool, this was the first thing I added with the SDK to my upcomming mod. But I got a radius of 4. (Dont worry, I got my reasons ;))

Dont have any internet access at home so I cant share my mod yet, but when I will it will be pretty complete so maybe thats for the better.
 
Rabbit said:
This great. I'd like to see this behaviour controlled by something like city size, or maybe, like Impaler says, a building.

I've coded this yesterday for a specific mod to de dependend of a variable in CvCity (that is set via a building in my version).

Just have to validate (by massive betatesting) that it is working correctly and seperate it from the other stuff. Its a bit messy as one basically has to change every part of code where the NUM_CITY_PLOT is used (all at all about 60-100 changes).
Oh and it starts to become really tricky with those assign working city functions...

On a side note, setting the CityZoom distance ingame works, but does anyone know if the game will blow up if i change the zoom distance in the beginning of the Python CityScreen (especially in multiplayer).
 
Impaler[WrG] said:
RADIUS_ONE = 8
RADIUS_TWO = 21
RADIUS_THREE = 37
RADIUS_FOUR....

Better with smaller steps like this:
RADIUS_ONE = 4
RADIUS_TWO = 8
RADIUS_THREE = 12
RADIUS_FOUR = 20
RADIUS_FIVE = 28
RADIUS_SIX = 36
 
Zuul: thouse counts correspond to Chalids Slow Cultural expantion mod yes? I agree thats a good idea we as it will alow the 2 mods to be combined at the source level, though I belive you would likley need different XML.

Chalid: Is the building Radius modifier additive or maxitive?, for example

Building1 radius value = 1
Building2 radius value = 2

Under Additive logic the City radius/plotcout level is 3 when both are built, under maxitive its just 2 (the highest value of any single building). I would recomend you go with a Maxitive logic as it would be silly if your in the Industrial age and your Radius shrank because your "hourse drawn carrages" building was destroyed, only if you loss the "Super Highway" are you going to loss radius. I would also recomend you match up the City work radius with your slow Borders, if people want to expand by the traditional cultural borders rate they just double all the values of what would be the city radius to get that equivilent base radius.

RADIUS_ONE = 4 (0) (the little X)
RADIUS_TWO = 8 (1) (the square)
RADIUS_THREE = 12 (2) (the pointy square)
RADIUS_FOUR = 20 (3) (the fat cross)
RADIUS_FIVE = 28 (4) (the pointy cross)
RADIUS_SIX = 36 (5) (the octagon)

BuildingXradiusBonus = 2
BuildingYradiusBonus = 1

if (SlowBorders)
City initialized with RADIUS_ONE (0)
else
City initialized with RADIUS_TWO (1)

Building building X, CityWorkRadius += 2
RADIUS = 3 (fat cross) without slowborders
RADIUS = 2 (pointy square) with slowborders
 
this is good because it models the way a civ is both the sum of its control area and the control area itself. so, a city, not as an urban entity, "the palace", only, but more as a "county", a region become a civ. the concept would be, i guess, that the city has been slowly built from the energies at hand, local and immigrant, and through peace and conquest.

nice.
 
Looks excellent. Now if we only had the DLL plugin system so I could make this work with Civ4Modder...
 
Yo Chalid,

Any chance you guys can incorporate this into FFH2? I've started learning how to mod just to incorporate this component with FFH, so hopefully I can do it myself if you guys are not interested. :p
 
@Nefelia: Just play the Kuriotates. We have already included it, but only for one Civ and tree cities. Its part of the balance...

btw. Someone remind me next weekend that i make this ready for the CCP. I hope to finally find time then.
 
Top Bottom