Advanced City Tiles Limit

Antal1987

Warlord
Joined
Sep 4, 2013
Messages
160
Location
Karelia, Russia
Hi, again!

I've already modified city tiles limit from 21 (0x15) to 45 (0x2D) (see)
It looks like this:


It also produces some bugs if user applies patch after game started.

I've finally completely rebuilt that system. Now City Tiles Limit is an optionional value. It depends now on 2 options I've included into INI file:
1) extended_limit. If it is "false" Limit = 0x15 (by default). If it is "true" Limit depends on 2-nd option;
2) improvement_required. If it is "false" and extended_limit is "true" Limit = 0x2D (extended limi). If it is "true" and extended_limit is "true" the Game checks the City wheter it has an improvement with new special flag = true.
That's because standard field for city improvements flags contains 32 flags (of 32 possible), I've used different field for storing new improvement flag.
CITY_TILES_LIMIT_FLAG = 0x1000. It's stored in Improvement.Small_Wonders_Flags.

Therefore, If you set these options both to "true" and change the Scenario making Hospital Improvement have CITY_TILES_LIMIT_FLAG in its Small_Wonder_Flags, every city with Hospital would have extended tiles limit.

I've placed these options into separate INI section: [city_tiles]. By default, both options are "false"

Also I've found a way to avoid resource bugs after changing limit options. I've made a stub which makes the Game completely recalculate resources after the user click center tile on City Screen Form.

Have a nice try!

New patch attached. Unpack it as usual.

P.S. I've not made patches for Civ3ConquestsEdit, so there are few ways to edit new flag:
1) Modify custom editor to provide the option
2) Modify Improvement data dirung runtime. The game contains Improvements at the following address:
0x009C406C struct_Improvement * Improvements
struct_Improvement has size of 0x110.
Small_Wonders_Flags has offset: 0xF4.

The address of Small_Wonder_Flags of Improvement with ID={ID} is the following:
*(int *)0x009C406C + 0x110 * {ID} + 0xF4
 
Thank You!

I will try a test game as soon as possible, but I want to do it on a clean and fresh Civ installation so I can also provide my savegames for analyse if nessecary. ;)

It also produces some bugs if user applies patch after game started.
The bug of version 7 also happens when playing from start on with it. The bug appears as soon as the city radius grows for the second time.
 
Hi Antal!

What was the bug? I've noticed that some cities produced less food that they should have been, but I was not certain if it was due to the patch.
 
Hi Antal!

What was the bug? I've noticed that some cities produced less food that they should have been, but I was not certain if it was due to the patch.

It was due to the game which doesn't recalculate tile resources completely. But this problem showed up after 1-st patch was applied.
I think I've fixed it now.
 
Hi Antal,

I received this error message (fresh and otherwise unmodified Civ3Complete).



I checked on my modded civ, but I have not found any bridges.pcx in there either.

Did I miss something? :confused:
 
Sorry... My fault :D
I forgot attach new graphic files I've already included into the patch framework (see)

By default advanced rendering is not available because there are no appropriate editors, but the patch still requires new PCX files. Those files must be places into \Art\Terrain directory.

Extended Patch v8 package is attached.
 
Hi Antal,

ok, next file missing is "canal_bottleneck.pcx".

I really hope that we will not doing this all week long. ;)

Make a copy of one of the other pcx-files provided and rename it "canal_bottleneck.pcx". It worked for me, and according to Antal these files are not yet used in the patch anyway.

@Antal1987:
Great news! Thanks. Some minor issues so far:
When using patch 8 on scenarios/mods with modified terrain graphics, the game ignores the water-terrain and use the default water-files and coastline-files. The modded forest and mountain-files are not ignored - strangely enough. Also the rivers and rivermouths are messed up when using patch 8 regardless of the settings in the ini-file. The river-trouble affects both modded and standard vanilla Conquest-games.

On an ongoing game I opened with patch 8, the railways some places becomes invisible (the game engine think they're there, though). Also some hills are shown (but not considered) as grassland.

I will start a new game to verify that the tile yield-bug is fixed.

Hope what I wrote made some sense. I can provide screenshots if you want to.

Regards Sigurd.
 
When using patch 8 on scenarios/mods with modified terrain graphics, the game ignores the water-terrain and use the default water-files and coastline-files. The modded forest and mountain-files are not ignored - strangely enough. Also the rivers and rivermouths are messed up when using patch 8 regardless of the settings in the ini-file. The river-trouble affects both modded and standard vanilla Conquest-games.

On an ongoing game I opened with patch 8, the railways some places becomes invisible (the game engine think they're there, though). Also some hills are shown (but not considered) as grassland.

Thanks for the information! I've found some errors and mistakes in my version of class_Map_Renderer::m72_Load_Tile_Images function (I've had to rewrite it).

As it turned out:
- LM terrains haven't been loaded at all
- 4-th row in each hills-related PCX image hasn't been loaded, because I've set wrong tile height (74 px instead of 72)
- some marsh images also haven't been loaded
- rivers images have been loaded incorrectly. I used to load all deltaRivers images first, and then all mntRivers images. But with my image tool I've found out the game loads images shuffled: 1 image from deltaRivers and then 1 from mntRivers and so on...

I've fixed these problems now. Try new attachment.
 

Attachments

  • Civ3Conquests_p8_3.zip
    1.2 MB · Views: 2,283
Ok, this seems to work.

Fresh and unmodded Civ3 Complete (oddly it takes however its graphic data from the main installation path of Civ3 and even more oddly it takes a graphic set I no longer use... :confused:).







Changing the work places of Thebes citizens gives the correct amount of resources.

Next I will try it on my running game in my (modified) main installation of Civ3. But first I would like to make a back up of that installation.
 

Attachments

  • Cleopatra of the Egyptians, 2310 BC.SAV
    23.1 KB · Views: 185
  • Cleopatra of the Egyptians, 4000 BC.SAV
    19.3 KB · Views: 217
Fresh and unmodded Civ3 Complete (oddly it takes however its graphic data from the main installation path of Civ3 and even more oddly it takes a graphic set I no longer use... :confused:).

Can you describe in details which graphic files are loaded or rendered incorrectly?
 
In my actual game with the Iroquois I have got the cities packed to close to each other for the patch to have any effect. :blush:

But this is Constantinople of a former round:

with original work area


with expanded work area


And the next round with expanded work area

In the former version of the patch, the city usually lost a huge part of it resourses in the following round. This seems no longer a problem.

Good work! :goodjob:

PS: Antal, is the NoRaze-Patch included in Your Patch? If not it would be lovely if You could add it to one of the next versions. ;)
 
Sorry, I missed your replay. :blush:

Can you describe in details which graphic files are loaded or rendered incorrectly?
The main installation is located in "I:\Firaxis Games\Civilization III Complete" and this is also the path the setup programme placed into the windows registry.

The unmodded game (with the Cleopatra save game) is located in "I:\Firaxis Games\Civilization III Original" and has no entry in the windows registry (it is only a copy of a backup).

It seems that the game takes it terrain and city graphics not from its own civ3 folder, but from the folder stated by the windows registry. So the unmodded game shows me instead of the Firaxis terrain the Womok terrain ( http://forums.civfanatics.com/showthread.php?s=&threadid=47260#post839345 ) which I no longer use, but is still left hidden in the main installation.

So I quess it is only a problem of my installation mess. :blush:;)
 
PS: Antal, is the NoRaze-Patch included in Your Patch? If not it would be lovely if You could add it to one of the next versions. ;)

I've located NoRaze patches in asm code. In order to include it in my Patch and make it optionable I have to rewrite huge class_Leader::Capture_City function first... Sooner or later I will do it.
 
It seems that the game takes it terrain and city graphics not from its own civ3 folder, but from the folder stated by the windows registry. So the unmodded game shows me instead of the Firaxis terrain the Womok terrain ( http://forums.civfanatics.com/showthread.php?s=&threadid=47260#post839345 ) which I no longer use, but is still left hidden in the main installation.

So I quess it is only a problem of my installation mess. :blush:;)

I see...
If it would help. I have Win7 x64. So once I had to replace installation files into another hard disk... So I've changed the following register key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Infogrames\Conquests -> Install_Path
 
Antal1987: Graphics now works. I also see that Kirejara confirms that the yield-bug in extended city-limits is fixed. Well done - and thank you very much.:goodjob:
I encountered what I believe is a possible side-effect of the yield-bug-fix: The City Governor acts as if he is constantly activated in every city - even though he isn't. This means that cities ignore my citizen-allocation in the available tiles and reassign them every turn. This makes it much more difficult to deliberately run a city into starvation - a technique I use when I want to remove a captured city (starve it to one citizen and then let it grow to 2-3 so I can abandon it without damaging my reputation among the other civs). I cannot any longer make prioritizations regarding production vs. gold and food (growth), since the game apparantly overrule my decisions. The city specialists (entertainers, tax collectors etc.) are left unchanged it seems. When I open a saved game with an earlier patch-version these things doesn't happen. Could it have something to do with how patch 8 "forces" the game to recalculate the cities' tile-yield?

I usually micro-manage my cities, but for those who let the governor deal with managing them, this probably isn't a game-breaker. I would however be (even more) grateful if you could find time (and inspiration) to look into it. I'm already quite eager to try out new startegies on a maximum map-size with 31 civs and extended city-limits activated (new city-placement patterns and perhaps temporary citys that can be abandoned when neighbouring cities grow? I have already increased culture points needed for city-borders to grow, and I'm also curious to see how AI deals with larger cities.)

Greetings from Sigurd
 
I usually micro-manage my cities, but for those who let the governor deal with managing them, this probably isn't a game-breaker. I would however be (even more) grateful if you could find time (and inspiration) to look into it.

Do you mean you manually change tile workers in order to get specific resources values instead of letting city governor manage it?

Complete recalculation of City Resources is nessesary only when the City is get to the different city limit. In other cases it doesn't need to.
I can make that function optional (run only if some option in INI file is set) or even conditional (run only if the City has entire 3-rd level empty with extended limit or has 3-rd level tile workers otherwise)
 
Do you mean you manually change tile workers in order to get specific resources values instead of letting city governor manage it?

Exactly. The game behaves almost as if the cultural borders expands from size 1 to size 2 every turn. If I for example move a city worker from a grassland tile to a mountain tile in order to complete a building project quicker (more shields and less food), the game move the worker back to grassland before the city production/food/gold output is calculated. As if the city governor had been activated (which he isn't). So it seems that the game not only recalculate the city yield, but also actively reassigns city workers (except specialists as mentioned earlier).

The yield-bug is fixed, however. I have only seen it once in patch 8 in a city where a wonder was finished and the food production in the extended city-limits were lost. When I (in the city screen) clicked on the city center to automatically reassign city workers, the food were once again calculated correctly. I suspect it would have been corrected by the game when I clicked "Next Turn" anyway.

Hope this clarified a bit what I was trying to say.:)

Regards Sigurd.
 
Top Bottom