3-square radius cities mod

Hello All

I've been plaing 3 Squars city radius mod for a long time, usually merged with SEVO MOD, VISA MOD and AMRA'S MOD, since Warlords Amra is not supporting it, Visa based on Amra's got it's CTD problems, is it a way to get this mod to work with Amra's mod? Amra's mod has a lot of everything but the 3 squars city radius.

Thanks
 
It doesn't work for BTS, only vanilla Civ.

However, I'd love to see this idea used in the standard game in limited form. Perhaps you could only use beyond the 21 squares after either maxing out on the city's culture or reaching level 4 borders (NOT level 3); alternatively by implementing a new civic (after a prereq tech is discovered) which might be balanced by a -50% culture growth and/or 100% cost to settlers.
 
I am working on changing this such that the city's radius is tied to culture. Note that since cities will generally be spaced further apart, I will be adding a couple more culture levels to expand the culture radius accordingly.

Oh, and the radius will even grow to 4 squares when maxed out. :)
 
Argh, I can't find in the SDK where the actual "can the city work this tile?" check is made. Kael's mod has a bunch of code snippets put together that supposedly show how the sprawling trait is executed, but I think it was overdesigned.

It seems that there's a function in CvPlot.ccp called "isPotentialCityWorkForArea(CvArea* pArea)" and this function _probably_ determines if a city can work it or not. It runs the function through all of the possible plots based on NUM_CITY_TILES. Well, I want to change that constant to a variable but to calculate that variable I need to get the city's culture level that this check is being made for. So I have to find a way to pass the city into the function so I can call my function to tell how many city tiles can be worked.

Any code gurus willing to help on this?
 
Got it working! I was hitting all of the right places, but my initial "How many plots can this city work?" function was flawed. Now I have to spruce up the cosmetics and hopefully I can get some people here to test for bugs, making sure the AI is working properly and such.

It seems the function for the camera city zoom distance is hard-coded. I can't find the reference anywhere in the Python or DLL. In Fall From Heaven, the zoom distance is set to a constant for the sprawling player. I have to figure out how to set the variable just before the camera moves when a city is zoomed to so it's an appropriate distance for each city's radius.
 
Got it working! I was hitting all of the right places, but my initial "How many plots can this city work?" function was flawed. Now I have to spruce up the cosmetics and hopefully I can get some people here to test for bugs, making sure the AI is working properly and such.

It seems the function for the camera city zoom distance is hard-coded. I can't find the reference anywhere in the Python or DLL. In Fall From Heaven, the zoom distance is set to a constant for the sprawling player. I have to figure out how to set the variable just before the camera moves when a city is zoomed to so it's an appropriate distance for each city's radius.

please post it :please:
 
Haha, I'm still working on it. I've found how to do a variable zoom distance based on the city's culture level, but for some weird reason placing if statements in the interface python messes everything up! When exiting the city screen, all of the city side windows remain. It makes no sense!

If I do this:
Code:
		gc.setDefineFLOAT("CAMERA_CITY_ZOOM_IN_DISTANCE", gc.getDefineFLOAT("CAMERA_CITY_ZOOM_IN_DISTANCE_TWO"))
or any other arbitrary value, it works fine.

If I do this:
Code:
		gc.setDefineFLOAT("CAMERA_CITY_ZOOM_IN_DISTANCE", gc.getDefineFLOAT("CAMERA_CITY_ZOOM_IN_DISTANCE_TWO"))
                
		if (pHeadSelectedCity.getCultureLevel() >= 5):
        		gc.setDefineFLOAT("CAMERA_CITY_ZOOM_IN_DISTANCE", gc.getDefineFLOAT("CAMERA_CITY_ZOOM_IN_DISTANCE_THREE"))
the zoom works just fine, but the screens don't go away as they should when the city zoom screen is exited.
 
Okay, I put the file here: http://forums.civfanatics.com/uploads/67698/Enhanced_Size_Cities_0.90.zip

You should be able to unzip and play, enjoying a nice (mostly) vanilla Civ with larger workable areas, based on culture. I still didn't solve a few things to my satisfaction, so I'll work towards that magical 1.0 release.

Edit: I made a new version that uses the XML to get what culture level has what radius so modding the mod is less dependent on compiling the DLL. I still have to find a way to fix the interface for the 1.0 rc1 release.
 
I'm going to break down and ask for some help here. All that's left to do at this point is to edit the interface so that the player can manually assign working tiles if they want. The basic code is in the main interface python file, but commented out. For some reason, doing a pCity.getCultureLevel() call borks up the interface, but, one can use a GC.setGameDefine(CITY_CAMERA_ZOOM_DISTANCE) call to change how far away it is. So it seems like an easy task, but making it conditional is difficult.

Additionally, the clouds need to be edited so they don't appear until the camera zooms out even further. Oh, and the actual zoom distances in GameDefinesAlt.xml could use some tweaking.

But yeah, just interface stuff that needs to be done at the moment and it's boggling the heck out of me. Mostly how just one function call breaks the interface.

0.91 is here: http://forums.civfanatics.com/uploads/67698/Enhanced_Size_Cities_0.91.zip. This version makes the radius definable in the culture XML files. So set them all to 3 and cities start with a radius of 3, if that's your cup of tea. Or make city Radius 3 happen sooner. Or any other number of ideas.
 
Mylon, you should join WoC if you haven't already. If you don't get any help really soon, I'm sure someone there can help you with that small bit of interface stuff, plus I'm sure this component will be in the WoC anyhow, so less work for all. :)
 
I made a BtS version of this mod. Again, no luck on the interface. I doubt I'll be updating it beyond this point as I'll focus work on my mod from here on out.

V0.91 BtS compatable here: http://forums.civfanatics.com/uploads/67698/Enhanced_Size_Cities_0.91_BtS.zip

Edit: Whoops, I accidentally used my test culture level file. So if you plan on playing with this on quick gamespeed, I suggest you edit the culture levels to be something a little less blazing! Else you'll hit the next to last culture level at 14 culture. :)
 
Hi there,
first of all: fantastic mod, i love it. This has always been one of the things that bothered me about civ.

But unfortunately there seems to be a graphic error when running the 0.91_BtS version. The game does'nt display th buttons/menus/minimap etc. when i run the mod. I downloaded the 3.03 patch for BtS (this made a problem i had under "Options" "Other" and "Sound" disappear)

I guess the 3.03 patch has some update to fix the bug some users are having when running very new nvidia drivers.
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    146.1 KB · Views: 195
Hy again,

I just encountered a new problem, but i can't seem to narrow it down to what it really is, so i'll just give you the description.

I'm running Civ4+BtS+Enhanced Size Cities 0.91_BtS and i created a scenario.

Unfortunately the game seems to crash when someone builds a lighthouse on a coastal city which also includes a fresh water lake. I don't know what exactly the problem is, but i guess it has to do something with the placement of the lighthouse. (comp. fgets confused as to where to place the lighthouse?)

I've tried to reproduce the problem, but sometimes it worked...sometimes not.

Can anyone of try to reproduce it as well?

My method involved starting a random game, bulding a coastal city and adding a fresh-water-lake next to it...the rushbuild a lighthouse (with mod and without it) I have not encountered the problem with vanilla BtS, so my guess was that it has to do something with the mod.

btw: i use patch 3.02 for BtS

can anyone help with this ?
 
unfortunately there seems to be a graphic error when running the 0.91_BtS version. The game does'nt display th buttons/menus/minimap etc. when i run the mod. I downloaded the 3.03 patch for BtS (this made a problem i had under "Options" "Other" and "Sound" disappear).

I already installed had 3.03 fix but I have the same problem. I don't see any lower interface either. How to fix this :confused:
 
Top Bottom