Resource icon

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

I wonder how often the AI joins its excess workers compared to disbanding them.
I suspect the fate of the Worker is pure coincidence and luck of the draw. Whether it happens to be in a city or not, in that exact moment the AI decides it doesn't need it anymore.
But I've also seen the AI get overwhelmed with pollution so whatever logic it's running there is not sufficient.
I've seen that too. I've seen once strong civilizations self-destruct because it has almost no Workers to clean up the mess, and most of its tiles end up unusable. It is rare, but it happens. Don't know what went wrong in those cases.
 
Last edited:
I've played enough on debug to see the AI join its workers after completing all terrain improvements. They however, have no such sense when it comes to consuming workers for radar towers. If you have radar towers in game, first thing the AI does is make them next to every city. This is crippling, esp. with stock game levels of pollution.

The AI will also start training new workers if its terrain improvements have been bombarded. In the modded epic game I'm playing right now, the AI is so good at repairing disconnected resources that I might need to use amphibious Adventurers (modded explorer type unit with the ability to pillage and attack+capture but no more ATR) to suicide raid their workers. And why would I need to do such a thing one might ask? This is a late game brawl, the kind that stock game would not deliver because it's either over by ind age or the AI would just stomp you with overpowered tanks. But thanks to the config patch, late game AI performance has been greatly enhanced.

Screenshot (1965).png
 
I would see worker suicide during an invasion and thought it was some act of spite if the AI felt it couldn't get them to safety fast enough; I never knew it was a general behaviour. :eek:
They do that as well, it's a separate thing as far as I can tell
 
Currently I tried to run C3X on Win XP (SP3) and the exe did not start the game and no error message popped up. Any solution without upgrading to a newer operating system? (because of course on another device where I have Win7 everything runs without problems)
 
I have a question about the perfume specs. The AI in my game keeps building Insurgents in lieu of stronger units that are available to it. When I checked the production ranking it showed Insurgent (offense) at 1424 and Insurgent (defense) at 1326. I edited the perfume specs to reduce ranking on the insurgent by 1500 (they're supposed to be a unit of last resort). When I restarted the game, the Insurgent (defense) is still ranked at 1326, but the Insurgent (offense) did drop to -76. How do I lower the Insurgent (defense) ranking?

Here's the code from my default.c3x_config:
perfume_specs = ["Shipyard": 250, "Aviation Plant":250, "Insurgent":-1500]

1712541729178.png
 
R17 Preview 3 is done, finally. Changes include:
  • Civ and leader names can vary by era -- This replaces the names of civs and leaders as they progress through the eras. Each replacement is specified in the config file with a base name and list of substitutes, one for each era, for example:
    Rome: Rome "Byzantine Empire" Italy Italy
    Replaces the civ name "Rome" with "Rome" in the first era (so no change), "Byzantine Empire" in the second, and "Italy" in the third and fourth. There is a list of replacements that applies to the civ noun, adjective, and "formal name" of all civs.
    There is also a similar list of replacements that's applied to leader names. This one is more complicated since leader names also come with genders and titles. Here's what that looks like:
    "Joan d'Arc": Vercingetorix (M, King) "Joan d'Arc" (F) Napoleon (M, Emperor) "De Gaulle" (M, President)
    Saint Joan d'Arc (female) becomes King Vercingetorix (male) in the ancient era, and so forth. You can leave out the stuff in parenthesis and then it won't replaced, for example you can leave out "(M, President)" at the end there but then De Gaulle will be titled "Saint" and considered female since that's the base setting for the French leader.
    This feature ended up being more difficult than I anticipated which is part of why Preview 3 took so long. Inside Civ 3, player objects have methods get_civ_noun, get_civ_adjective, get_leader_name, etc., and at first I thought I could modify those to swap out the names based on era. What I found out later was that those methods got inlined at many different points throughout the code so modifying the original methods wouldn't be effective everywhere. Inlining means there's no call to the method instead its contents got copied into the calling code. Anywhere those methods were inlined would require separate patching otherwise the name replacement wouldn't work in that case.
    The alternative approach I took is to set the special era names as custom names on the player object. That's where the game normally stores custom text input from the "Customize Your Tribe" window during game creation. That solves the problem of the name replacement not applying everywhere. The downside is it's more difficult to implement. The mod must track which names have been replaced, must update the replacements when leaders change eras, must take care not to overwrite custom names set by the player, and must avoid writing the replacement names into the save file. Anyway, it should all work now.
  • Option to stop AI from escorting units without the "requires escort" flag -- This gives modders better control over which types of units the AI will escort. For example if you add an artillery unit with defense > 0 and want the AI to use it unescorted, you can turn this option on and mark all other normally escorted units as "requires escort".
  • Exclude units from lethal ZoC when they're entering a tile after capturing an enemy unit -- This is to prevent the odd situation where a unit that gets killed by lethal zone of control still gets to capture any units on the tile it was moving into even though it dies before it really enters that tile. Ideally I would have been able to postpone unit capturing until after it had been determined whether the unit survived ZoC but that not's practical given how the code is structured. Basically the unit doesn't experience ZoC until it moves and it doesn't move until it has dealt with any enemy units on the destination tile. So the next best thing is to detect when a unit has captured some enemy units on a certain tile then give it temporary immunity from lethal ZoC to ensure it makes it onto that tile.
  • Fix incorrect icons appearing for generated resources
  • Fix a rare edge case where stack bombard would continue attacking an empty tile
  • Option to hide icons for generation of non-bonus resources -- The "show-bonus" setting now has a counterpart "hide-non-bonus" which is sort of the opposite. It hides the icon showing resource generation if the resource is of strategic or luxury type.
  • Fix possible freeze when a trade deal is broken for a resource that's an input to a resource generating building
  • Allow list items to be placed on separate lines for perfume_specs and buildings_generating_resources -- Before these all had to be on the same line since the config file loader didn't know to skip over new line characters after commas. For example, for buildings_generating_resources, instead of this:
    ["Steel Mill": Steel, Terrace: yields show-bonus Rice, "Coal Liquefaction": local Oil, Supercollider: local no-tech-req Antimatter, "Hydro Plant": local "Electric Power"]
    You can now do this:
    ["Steel Mill": Steel,
    Terrace: yields show-bonus Rice,
    "Coal Liquefaction": local Oil,
    Supercollider: local no-tech-req Antimatter,
    "Hydro Plant": local "Electric Power"]
    Which is a lot more readable. The same applies to perfume_specs and the new civ & leader era name lists.

Like the other preview versions, it's up on GitHub (https://github.com/maxpetul/C3X/releases/tag/Release_17_Preview_3). I'll post this version to CFC in a few weeks possibly with some bug fixes or small changes. I'm not going to do a Preview 4, starting now any real changes go in R18.

They however, have no such sense when it comes to consuming workers for radar towers. If you have radar towers in game, first thing the AI does is make them next to every city. This is crippling, esp. with stock game levels of pollution.
I've found the logic that drives AI workers to build radar towers but I'd have to study it to determine if it's possible to discourage them from doing that. Based on a brief look, it appears that it is. AI workers consider every tile on their continent that could have a radar tower then check surrounding tiles while accumulating some kind of point value. Lastly they build a radar tower on the highest value tile. Hopefully discouraging the AI from building so many radar towers is as simple as increasing the point threshold. However the logic looks pretty primitive so I'm not confident that will work well.

Currently I tried to run C3X on Win XP (SP3) and the exe did not start the game and no error message popped up. Any solution without upgrading to a newer operating system? (because of course on another device where I have Win7 everything runs without problems)
It's hard to say. I'm not familiar with Windows XP and what sets it apart from later versions. As far as I know C3X doesn't rely on any fancy features only present in newer Windows. Are you sure the problem is C3X? Does the normal executable work? I ask because I've had trouble like this before and it turned out to be something in conquests.ini that the game didn't like. I never even figured out exactly what the problem was since I just copied over a different INI file that worked for some reason. I think it was related to the Video Mode and KeepRes settings. It's very frustrating how the game will just refuse to start without even giving an error message. Good luck, wish I could help more.

I have a question about the perfume specs. The AI in my game keeps building Insurgents in lieu of stronger units that are available to it. When I checked the production ranking it showed Insurgent (offense) at 1424 and Insurgent (defense) at 1326. I edited the perfume specs to reduce ranking on the insurgent by 1500 (they're supposed to be a unit of last resort). When I restarted the game, the Insurgent (defense) is still ranked at 1326, but the Insurgent (offense) did drop to -76. How do I lower the Insurgent (defense) ranking?
The problem here is that, when reading in the perfume spec, the mod looks through the lists of city improvements and units searching for one named "Insurgent" and takes the first one it finds. "Insurgent (defense)" is a duplicate created by the editor with the defense strategy but still named "Insurgent". That one must be at the end of the list of units and so it's not being reached. In the next version, I'll change it so that the perfume spec applies to all units with the given name. That's how it works for the building unit prereqs list, I just forgot to apply the same thing to the perfume specs back when I discovered the issue with unit type duplication. In the mean time you could split the Insurgent unit into two, one with the offense strategy only and another with defense only, and given them different names.
 
Maybe it would be good to externalize despawn option for most worker actions, for example make possible building irrigation at the cost of worker to make it more rare and valuable. I think I was searching for something like this in the editor.
 
Maybe it would be good to externalize despawn option for most worker actions, for example make possible building irrigation at the cost of worker to make it more rare and valuable. I think I was searching for something like this in the editor.
I find the AI generally Worker-handicapped, especially as Workers make suboptimal decisions regarding which tiles to improve.
 
I find the AI generally Worker-handicapped, especially as Workers make suboptimal decisions regarding which tiles to improve.

They also won't rework tiles. I fully believe programming them to rework tiles would have been more difficult. So, irrigating some grassland tiles in despotism perhaps works out better for them than if they mined and then couldn't grow cities once they get aqueducts or hospitals. Also, I'm guessing at Regent they end up building cavalry in say 6 turns at say 15 shields per turn (alright I've seen this more on Sid), but have at least one surplus food due to the irrigation and rework a tile to mine or forest. This might not be so bad when they change builds between infrastructure projects. But, when they don't hit multiplers or won't rework tiles, I'm guessing that's one advantage the original developers anticipated that the human player would or could have. Hence, their ability to have reduced growth and shield cost on higher levels makes sense, since not hitting multipliers doesn't have as much an effect overall.
 
Last edited:
Is there a way to get precision strikes to work together with the cruise missile unit ability? Right now a cruise missile can perform precision strikes, but it just won't die afterwards.

Is there a way to have multiple config patches for different scenarios? I've been using only 1 patch for everything. I tried copy pasting that patch into the WWII Pacific scenario folder to see if the game will read from that but it doesn't seem to work. When I erased the original patch in my "C3X" folder, the game refuses to read the patch in the WWII Pacific folder.
 
Last edited:
It's hard to say. I'm not familiar with Windows XP and what sets it apart from later versions. As far as I know C3X doesn't rely on any fancy features only present in newer Windows. Are you sure the problem is C3X? Does the normal executable work? I ask because I've had trouble like this before and it turned out to be something in conquests.ini that the game didn't like
Our old XP laptop wasn't able to install C3X itself, so what I did was to install the latest version (well, up to v13, at least!) of C3X on my Win8.1 machine, and then transfer the patched .exe and associated folder+files across to the laptop using a flash-drive.

After the patched .exe was installed, the laptop didn't have any difficulty running it using the settings I activated in the config.ini file.
 
Last edited:
Flintlock, I tested the option with the era-specific leadernames in the R17 Preview 3 version and it was not working. May be I have a problem with writing the entries correctly one under the other in the different lines. I always receive a message, that the value in the last line of the entries is invalid and the different era-specific leadernames are not used in the game.

Error message.jpg


These are the entries. The screenshot was done by using Notepad++, as here the numbering of the lines is shown, too:

Line 478.jpg


When I delete the entries in line 478, I receive the same message with line 477.

Line477.jpg


What am I doing wrong ?
 
Last edited:
Flintlock, I tested the option with the era-specific leadernames in the R17 Preview 3 version and it was not working. May be I have a problem with writing the entries correctly one under the other in the different lines. I always receive a message, that the value in the last line of the entries is invalid and the different era-specific leadernames are not used in the game.

.....
What am I doing wrong ?
I think you should try separating your rulers with commas "," like shown in the example for the "civ_aliases_by_era":

leader_aliases_by_era = ["Leader1": Name1 (...) "Name2" (...) Name3 (...) "Name4" (...),
"Leader2": Name5 (...) "Name5" (...) Name7 (...) "Name8" (...), ...............]

and so on.
 
El_Constructor, yes this is it! :bounce: Thank you very much! :)

As this option is working even in your current games, everybody who has installed CCM 2.5, can test this easily, too.
Here is the advisor screen with the eraspecific leader names of the test civs (Rome is still in era 1, the other test civs are all in era 2):

Foreign Advisor.jpg


These leaders still have no titles assigned, as the box for titles in CCM 2.5 was empty, and the eraspecific names for the civs must be changed, too.

Here is a screenshot of the working entries for the eraspecific leaders you can see above:

Working test leader aliases.jpg
 
Last edited:
El_Constructor, yes this is it! :bounce: Thank you very much! :)

As this option is working even in your current games, everybody who has installed CCM 2.5, can test this easily, too.
Here is the advisor screen with the eraspecific leader names of the test civs (Rome is still in era 1, the other test civs are all in era 2):

View attachment 688715

These leaders still have no titles assigned, as the box for titles in CCM 2.5 was empty, and the eraspecific names for the civs must be changed, too.

Here is a screenshot of the working entries for the eraspecific leaders you can see above:

View attachment 688716
@Civinator do you have leaderhead artwork for all the different leaders in different eras? That is a lot of leaderheads! :)
 
@Civinator do you have leaderhead artwork for all the different leaders in different eras? That is a lot of leaderheads! :)
Yes, as you have CCM 2.5 you can see this easily. The graphics in the end screens of a game are focused to one of the leaders of a civ. The flcs and the advisor graphics in CCM contain the eraspecific different leader graphics.
 
Top Bottom