Resource icon

C3X: EXE Mod including Bug Fixes, Stack Bombard, and Much More Release 23

R22 is small in terms of feature count but not in terms of effort. Expanding city work areas ended up being a lot more difficult than I thought when I started working on it.
The scale of your plans to expand the working area of cities is very much beyond my initial expectations. Well done!:clap:
However, I can't help but wonder about the problems that may arise as a result.
1. Already in the basic setup, adding a few improvements that increase production, science or taxes resulted in a graphical overflow of their quantity indicators. Now that cities can use well over 100 tiles, taxes, science, entertainment, pollution, production, or food consumption can reach many hundreds to thousands of units, making graphical overflow much easier to occur. The bars will be very full very soon.
2. A big increase in micromanaging. Longer search for a city using a tile I want another city to use. Because I suppose there is nothing to prevent even very distant cities from competing for the best tiles, which can lead to extreme cases well demonstrated by your example of Egyptian desert cities, where desert cities can gobble up all the desert tiles near rivers, and then there may be nothing left for cities near rivers and vice versa. A human player can handle this with some effort, but how does the AI handle situations where, for example, 3 desert cities are competing for the only common 10 fertile tiles? How to achieve at least some sort of even handed redistribution? Or more complex cases where two cities are competing for tiles, but one city has access to a much larger number of fertile tiles, so would it be appropriate not to block the few tiles that are the only fertile ones for the second city? This problem becomes a bit bigger in scenarios with cities with a preset size, because the cities did not reach their incremental growth in a natural way but in an instantaneous way. Whoever comes first in the list of cities gets the best. Maybe modify the tile assignment process a bit, where distance from the city and to other cities plus the number of tiles of the type used by the city would play a role. But I guess achieving manageable rules for multi-city redistribution would already be quite difficult.

Sidenote: Now that you've gained experience with zoom, how hard would it be to add more zoom levels?
 
Already in the basic setup, adding a few improvements that increase production, science or taxes resulted in a graphical overflow of their quantity indicators. Now that cities can use well over 100 tiles, taxes, science, entertainment, pollution, production, or food consumption can reach many hundreds to thousands of units, making graphical overflow much easier to occur. The bars will be very full very soon.
The base game's city screen definitely wasn't designed for such large cities. There's nothing I can do about that easily. A while back, I thought about replacing the entire city screen with an HD version and looked into what that would entail. It's possible, a lot of work but still easier than expanding the work area. That's far down on the priority list though.

A human player can handle this with some effort, but how does the AI handle situations where, for example, 3 desert cities are competing for the only common 10 fertile tiles? How to achieve at least some sort of even handed redistribution? Or more complex cases where two cities are competing for tiles, but one city has access to a much larger number of fertile tiles, so would it be appropriate not to block the few tiles that are the only fertile ones for the second city?
The AI never, as far as I know, considers how to distribute tiles among multiple cities. It's every city for itself, choosing the strongest among all the ones it can work. So it's possible for one city to occupy a bunch of high food tiles that it doesn't need and deny them to another city that does need them. In general, though, I think the larger city radius helps the AI since cities have more tiles to choose from. With the normal radius, the AI usually founds one city in the middle of a super fertile area, then that city can never use all that food, meanwhile all the surrounding cities are too far away to share. Whereas with a huge work radius, the cities can share the fertile area unless one grows so much larger than the others that it can use all that food for itself.

Sidenote: Now that you've gained experience with zoom, how hard would it be to add more zoom levels?
Very hard, unfortunately. The game was only designed with two zoom levels in mind. In fact, the zoom level is stored in a boolean value, is_zoomed_out, that can only ever be true or false. To add more zoom levels, I'd have to do something like draw the map to an invisible image then scale it down and put it in place of the usual map. That might not be so hard but then there are many other things that would have to be modified like the math for clicking on tiles.
 
So, on the trade advisor screen, when you get past mid-game, the resources available are pretty much overlapping and it is hard to discern what resources are where. It would be nice if somehow you could breakup the monoblock of resources and allow the tool tip (which identifies the city the resource is near) to be accurately read.
 
Flintlock, it is always fantastic to read the config.Ini about all the wonderful options that you have added to Civ 3. :hatsoff:

I have a question: What means "remove_city_improvement_limit = true" ? Does this really mean that the 256 building limit for C3C now has fallen ?
In that case: Is there a new limit for the number of buildings in a mod/scenario or can buildings now be added unlimited?

And I have a suggestion for the config.Ini:

With more than 20 versions of your wonderful C3X mod it is important to see with one look, what version has the config.Ini. So it could be a good idea to show in the notes at the head of the config.Ini the version of the C3X mod, that fits to that config.Ini.

[==================================== NOTE C3X R22===============================================================]
[Instead of editing this file, changes to the settings should be placed in either the scenario or custom config files. The scenario config file must ]
[be named scenario.c3x_config.ini and must be located in your scenario search folder. Of course it only applies if you are using a scenario. The ]
[custom config file must be named custom.c3x_config.ini and located in the C3X folder, which is the folder where this file is. When creating scenario]
[or custom configs, it is only necessary to include the settings you wish to change. ]
[================================================================================================================]
 
So, on the trade advisor screen, when you get past mid-game, the resources available are pretty much overlapping and it is hard to discern what resources are where. It would be nice if somehow you could breakup the monoblock of resources and allow the tool tip (which identifies the city the resource is near) to be accurately read.
Not sure what I could do about this, add a scrollbar maybe? That might be difficult. I've never played around with the game's scrollbars before, but adding a button to the preferences screen was relatively easy, so that's promising.

I have a question: What means "remove_city_improvement_limit = true" ? Does this really mean that the 256 building limit for C3C now has fallen ?
In that case: Is there a new limit for the number of buildings in a mod/scenario or can buildings now be added unlimited?
That's right, there is now no limit on how many buildings you can add to the game. The limit was not even that difficult to remove, I wrote a bit about it here: https://forums.civfanatics.com/thre...d-and-much-more.666881/page-117#post-16687929. Other than the limit I removed, which was 256 bits recording improvs built in each city, there are no other limits on building count that I know of. I found a couple of places where the game maintains lists with one entry per building type, however all of those are already dynamically sized and made as large as necessary. The original developers already went most of the way to allowing for unlimited buildings, it's a bit of a shame they didn't finish the job.

With more than 20 versions of your wonderful C3X mod it is important to see with one look, what version has the config.Ini. So it could be a good idea to show in the notes at the head of the config.Ini the version of the C3X mod, that fits to that config.Ini.
This is a good idea, I'll keep it in mind.
 
That's right, there is now no limit on how many buildings you can add to the game. The limit was not even that difficult to remove, I wrote a bit about it here: https://forums.civfanatics.com/thre...d-and-much-more.666881/page-117#post-16687929. Other than the limit I removed, which was 256 bits recording improvs built in each city, there are no other limits on building count that I know of. I found a couple of places where the game maintains lists with one entry per building type, however all of those are already dynamically sized and made as large as necessary. The original developers already went most of the way to allowing for unlimited buildings, it's a bit of a shame they didn't finish the job.
Flintlock I gave a like to your linked post - and than I forgot about it. It seems I am getting old. :old:

On the other side, as the 256 building limit has fallen, may be the 256 resources limit can be overcome, too. One argument why more than 256 different resources can be very useful, is my old project of an earth map where not only the locations of the cities that can be founded are fixed on the map, but also the correct names of those cities, shown by resources placed nearby those "city-spots". The old function in Civ 3 to show the names of the cities is replaced by a kind of a "postal code" for an easy navigation to those cities (Roman city No. 1, etc.). During that project the limitation to 256 resources in C3C was discovered, as 256 resources are much too less for the names of 512 cities (plus the normal resources plus pictures of the different cities on the tile where they are founded).

resource-cities-jpg.276649
 
Last edited:
On the other side, as the 256 building limit has fallen, may be the 256 resources limit can be overcome, too.
It probably can, though I don't know when I'll get around to looking into it. Do you know where exactly the resource limit comes into play? If you create a scenario with >256 resources, does the game refuse to load it, or does something break?
 
If you create a scenario with >256 resources, does the game refuse to load it, or does something break?

The game refused to load. Unfortunately my old posts about this problem are all gone with the closing of the SOC site. But Wolfshade fortunately described it very exactly at CFC in this post: https://forums.civfanatics.com/threads/limits-in-civ-buildings-res-tech.447741/#post-12766083:

256 resources registered in the editor is the limit. Having 257 resources, the mod/scenario just won't be loaded - it'll stuck in ~80% of loading ("Configuring scenario..." progress bar) and won't do anything else (fully loaded, my mod allocates 172 MB and when loading is stuck it's 154, that's why I'm saying "cannot be loaded'). I tried with the clean (the case was to check whether the map can't support 256+ resources) map and 257 resources - no success, mod cannot be loaded.
 
Last edited:
One minor addition to my post on rivers, but this time hopefully much smaller and easier to implement. Would it be possible to modify the bonuses for rivers so that instead of +1 trade it gives, say, +1 food and +1 trade, or freely customizable values? And the same for railroad bonuses?
 
The game refused to load. Unfortunately my old posts about this problem are all gone with the closing of the SOC site. But Wolfshade fortunately decribed it very exactly at CFC in this post: https://forums.civfanatics.com/threads/limits-in-civ-buildings-res-tech.447741/#post-12766083:
Thanks for the link. That seems promising, if it refuses to load that's more likely to be an artificial limit instead of something baked into the logic. Based on what I've seen so far digging around inside the EXE, I don't recall coming across a 256 resource limit anywhere, which again makes it more likely that it's just a check during scenario loading. Of course, I'd have to investigate to say anything for sure.

One minor addition to my post on rivers, but this time hopefully much smaller and easier to implement. Would it be possible to modify the bonuses for rivers so that instead of +1 trade it gives, say, +1 food and +1 trade, or freely customizable values? And the same for railroad bonuses?
Modifying tile yields would be easy. The game has separate functions to determine the yields so I could patch those to add or remove some amounts, or even replace the logic entirely. I can imagine many different custom rules for tile yields so again this is the sort of thing I'd like to do make moddable through Lua.
 
...and I can't remember if this has been done before, but is it possible to limit the number of loads/unloads of a unit? Otherwise, if you place your ships wisely, you can cross half the map in 1 turn!
 
Hi @Flintlock! Thank you for your work!

1) I noticed that when using "disallow trespassing" function, helicopter can still drop any visible units into enemy territory, and they can even continue to walk there until the AI require to move them away. The same situation is with paratroopers, they can jump into the territory of another player (with whom there is neither a war nor a right of passage treaty) across the border. Is this a bug or a feature?

2) Also, auto-recon function is very much needed for air units. If it was possible to implement the stack bombing function, then I thought that it would also be possible to implement auto-recon. It is necessary in the late stages of the game, when you have a long border that needs to be patrolled. Now the player must either surround his border with a chain of submarines, or make 100-150 extra mouse clicks every turn.

3) Re-base distance now is defined as x6 the plane's operational range. This is a little bit unrealistic because in reality it is x2 or x3 max. Of course everyone may have their own opinion on this matter, but would it be possible to make this value changeable?

4) Is there a way to make precision bombing truly precise, so that if you know what buildings are in the city, a window opens with a choice of a specific target (just like with a stealth attack against units)?
 
Last edited:
4) Is there a way to make precision bombing truly precise, so that if you know what buildings are in the city, a window opens with a choice of a specific target (just like with a stealth attack against units)?
...or at the very least, prioritising buildings with the "Mil" and/or "Ind" flags (ideally, "Both flags" > Mil-flag > Ind-flag) as Precision Bombing targets, and only targeting other buildings if none of the primary targets are available?
 
@Flintlock, my apologies for being annoying, I have 4 more questions/suggestions in addition to the ones above :)

5) Flag "Replaces all Impr. with this Flag Checked" - is it possible to somehow reanimate it, so that it would be possible to separate the types of buildings that must replace each other? For example, it would be possible to make wooden walls and stone ones that replace them, which would not be replaced by power plants with the same flag?

6) Is it possible to make water tiles give access to any start/lux resource located on them like roads? In this way it would be possible to make very elegantly, for example, an empty and useless strat.res. offshore oil, to which the city would have access via the sea automatically, and which would be required for the offshore platform construction, which in turn could generate regular oil (thanks to your mod) and be built only in a city which has the offshore oil in it's radius (using the corresponding flag in the editor).

7) a) A loaded air transport should not be able to rebase, otherwise it breaks the significance of its operational range.
b) Loading into any transport from city, the unit does not spend a turn, so theoretically a unit can fly and sail around the world several times in one turn.

8) I haven't noticed this before, but it turns out (thanks @tjs282) that the capital never shows as a size1 city, making it impossible to recognize if another civilization's capital has walls until you can investigate city. This is weird to say the least, is there a way to fix this?

P.S. Your work is really incredible, so many important changes!

:worship:
 
Last edited:
Great work as always!

Two questions:

- Is it possible to limit bombardments to sea or land tiles only? That would make torpedo or napalm bombers possible (the attack animations already exist).

- just bringing up an older question (maybe for later) ;)

- Making units dependent on buildings is a dream come true. But having a mod with 3000+ different units, it would be very tedious to put them all in manually. Is it possible to fetch just a part of the name? For example, I'd like to only allow cities to build major warships if they have a major port. All my ships are named with their hull designation, for example XXX Class BB oder YYY Class CA. Would it be possible to make a code like this:

building_prereqs_for_units = Major Port: "[all] Class CA" "[all] Class CB" "[all] Class B" "[all] Class BB" "[all] Class CV"

?

That would be awesome. And it could even help with other units, for example:

building_prereqs_for_units = Mercenary Camp: "[all] Mercenary"

instead of typing "Viking Mercenary", "Nubian Mercenary" etc.

Another nice feature would be to attach all units that are dependent on a certain resource to a building, for example all Horses needing a stable or all vehicles with a certain resource combination (for example, iron + oil) needing a workshop.
 
...and I can't remember if this has been done before, but is it possible to limit the number of loads/unloads of a unit? Otherwise, if you place your ships wisely, you can cross half the map in 1 turn!
It hasn't been done but it is possible. I already limited units to one airdrop per turn so that, if you have airdrops configured not to end units' turns, they can't keep airdropping across half the map. I could do something similar to limit units to loading once per turn.

1) I noticed that when using "disallow trespassing" function, helicopter can still drop any visible units into enemy territory, and they can even continue to walk there until the AI require to move them away. The same situation is with paratroopers, they can jump into the territory of another player (with whom there is neither a war nor a right of passage treaty) across the border. Is this a bug or a feature?
I never thought of helicopters or airdrops when working on the trespassing restriction but it doesn't make sense for them to bypass it, so I'd consider that a bug. The fact that units can walk around within foreign territory as long as they manage to cross the border is deliberate, though. The alternative would be preventing them from moving but then they wouldn't be able to leave. Technically I could bounce them out of foreign territory at the beginning of the turn like Civ 4 does, but that's a lot more effort. Something to think about for the future.

2) Also, auto-recon function is very much needed for air units. If it was possible to implement the stack bombing function, then I thought that it would also be possible to implement auto-recon.
Auto-recon would be possible, yes, though not easy. One thing I'm not sure about is when during the turn the auto-recon should activate. You'd probably want it early in the turn so that you could move other units based on the info revealed by the recon but if it goes off too early then the units spend their moves and you lose the option to give them a different order until the next turn. Maybe the simplest thing would be to make auto-recon activate at the same time as auto-bombard, since that way they're consistent, but I'm not sure if that's useful as I never use auto-bombard myself.

3) Re-base distance now is defined as x6 the plane's operational range. This is a little bit unrealistic because in reality it is x2 or x3 max. Of course everyone may have their own opinion on this matter, but would it be possible to make this value changeable?
This is possible, yes. It wouldn't be as easy as overwriting a number because the factor of six is baked into the logic and then the logic is duplicated, once for human players and once for the AI. Still, it wouldn't be especially hard.

4) Is there a way to make precision bombing truly precise, so that if you know what buildings are in the city, a window opens with a choice of a specific target (just like with a stealth attack against units)?
With enough effort anything is possible. This might require a lot. Popping up a window with buildings to target would be easy but then modifying the precision strike logic to target the selected building might not be. I don't know what that would entail.

5) Flag "Replaces all Impr. with this Flag Checked" - is it possible to somehow reanimate it, so that it would be possible to separate the types of buildings that must replace each other?
I looked into this a while back and am left with the impression that it's unfortunately pretty awkward to change. One of the problems I remember is that the AI's logic for choosing production assumes that buildings with the replaces-others flag are powerplants. It considers replacing those buildings based only on production bonus, pollution, and maintenance cost. I didn't see any easy way to modify that, and if the AI doesn't handle building replacements properly it can get stuck in loops of replacing buildings back and forth.

6) Is it possible to make water tiles give access to any start/lux resource located on them like roads? In this way it would be possible to make very elegantly, for example, an empty and useless strat.res. offshore oil, to which the city would have access via the sea automatically, and which would be required for the offshore platform construction, which in turn could generate regular oil (thanks to your mod) and be built only in a city which has the offshore oil in it's radius (using the corresponding flag in the editor).
Maybe. I could try assigning them to the same road network as the nearest city each time the game recomputes the road networks. But if all you want to do is set up a building to create oil from an offshore source, you can do that already. You'd make the sea oil resource a bonus resource then have a building required by the oil platform, like a harbor, generate sea oil locally. Then make the oil platform would require sea oil in range and generate regular oil. The only catch is that you need to use Quintillus' editor to assign the bonus sea oil resource as a requirement of the oil platform because the Firaxis editor doesn't let you assign bonus resources as building reqs. Another advantage to making sea oil a bonus resource is that it doesn't show up on the interface or become available for trade.

7) a) A loaded air transport should not be able to rebase, otherwise it breaks the significance of its operational range.
b) Loading into any transport from city, the unit does not spend a turn, so theoretically a unit can fly and sail around the world several times in one turn.
This is another reason to restrict units to loading once per turn.

8) I haven't noticed this before, but it turns out (thanks @tjs282) that the capital never shows as a size1 city, making it impossible to recognize if another civilization's capital has walls until you can investigate city. This is weird to say the least, is there a way to fix this?
Yes, it would be simple to modify the city drawing logic so that there's nothing special about capital cities.

P.S. Your work is really incredible, so many important changes!
Glad to hear it. :) There's more on the way!

- Is it possible to limit bombardments to sea or land tiles only? That would make torpedo or napalm bombers possible (the attack animations already exist).
Yes, I believe this wouldn't be too difficult. There should only be two functions I need to modify, one that judges which tiles the human player may bombard and another for the AI. (It's annoying how often there are two separate functions in these cases when only one is needed.) The hardest part would be reading the rule in from the config file.

- just bringing up an older question (maybe for later) ;)
I'll try to get around to this at some point. I'm a bit reluctant because, for example, "[all] Class CA" is a valid unit name on its own, so what would you do if you wanted to specify that name without invoking the wildcard? A more typical wildcard would be "*" however that's allowed in unit names too, along with all the symbols I can easily type. Not sure what the best solution is. I'm thinking I could either create a special kind of text, for example *"..." would match wildcards inside the quotation marks but plain "..." wouldn't, or I could have the wildcard be specified by another config option. That would push the problem onto other modders and make them choose a wildcard that doesn't conflict with any of their unit names. Anyway, not sure when I'd get around to this.

Any luck getting us an option to allow us to use era specific irrigation and mine textures?
It would be easy to swap out the sprite sheets when drawing irrigation and mines, unless there's some kind of special way they have to be loaded, which I doubt. Again, not sure when I'd get around to this but I'll keep it in mind.
 
Back
Top Bottom