• Civilization 7 has been announced. For more info please check the forum here .
Resource icon

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

There's no perfect solution. The downside to reassigning all citizens in all cities is that the governor might mess up some assignments that you did manually. The downside to keeping the citizen on a polluted tile is as you mentioned. But it's so bad since you lose out on the specialist yield only if you fail to clean the pollution on the same turn it appears. This is because the game calculates gold and research first then does per-city things including pollution, so if pollution turns a citizen into a researcher or tax collector you don't get that yield until the turn after the pollution appears.

:yup: Yes it is better to eliminate pollution as much as possible to solve this problem and to reduce not needed micromanagement. Per example in the mod CMM production and population pollution is reduced to zero and replaced by additional unhappiness caused by buildings. Only radioactive and fallout by volcanoes is remaining.

I consider to use these settings even for the next version of RARR.
 
Flintlock - you script is just great, it's make me so happy when I can see after so many years AI building armies and using them :), not even mentioning the other stuff which is the same good.
I found something strange in AI behavior when I as playing and thought it might be interesting for you.

I have three types of artillery units with slightly different settings. With your script two of them are used by AI and one is not. Chariot and catapults are used by AI and that's another thing which make very happy about but archers are not used and not produced or produced in really small number and kept in cities, so the same as AI does without your mod. Settings are below, some unit abilities are not visible on screenshots therefore listed below:

archer - ranged attack animation
catapult - wheeled
chariot - transports only foot units - ranged attack animation


chariot.jpg

catapult.jpg
archer.jpg
 
Last edited:
I have three types of artillery units with slightly different settings. With your script two of them are used by AI and one is not. Chariot and catapults are used by AI and that's another thing which make very happy about but archers are not used and not produced or produced in really small number and kept in cities, so the same as AI does without your mod. Settings are below, some unit abilities are not visible on screenshots therefore listed below:
Strange. Looking at your screenshots and checking over the code, I don't see any reason why the chariot unit would work but the archer wouldn't. As for why the AI isn't building many archers, that might be because it has a better option. The code I wrote to force the AI to build more artillery switches production to what it estimates to be the best available artillery unit. It would consider that catapult unit to be much preferable to the archer b/c of its higher bombard strength, range, and rate of fire.
 
May be a key for understanding could be the doubled AI strategy for the archer and the chariot.
At least before the flintlock patch the AI prefers to build offensive units to artillery units. The chariot has a MV of 2 what means it can retreat from combat as an offensive unit and the archer can not (additionally to A3 vs. A2).
 
Last edited:
As for why the AI isn't building many archers, that might be because it has a better option. It would consider that catapult unit to be much preferable to the archer b/c of its higher bombard strength, range, and rate of fire.
Probably this is not the case. The AI can build archers right at the begging of the first era and is not doing it at all, and to build catapult it has to research the last tech in the same era, unfortunately I have not seen any archers built until catapult research and after. I played in debug mode with 30civs, so had a chance to observe it properly.
I like what Civinator mentioned about chariot ability to retreat from combat and I might test it soon if that's the problem.

//edit// ok, I made one archer with the same abilities as chariot has and one archer with removed offence strategy, tested that and nothing has changed.
 
Last edited:
Actually ai is building archers. What I did not realized that I played on map with plenty of resources for any unit to build, so ai is picking artillery units over another. When there is enough resources to build chariots, the ai is building it because are better than archers but when there are no resources then is building archers, many of them. My bad, sorry.
 
For those who are curious, I did some experiments to see if C3X works for multiplayer, and the short answer is that it does!

My experiments were certainly not exhaustive, but here are the results:

I tried hosting a game with a C3X machine and joining with a regular machine. The game worked until the host tried to do something that only C3X allowed, like founding a city one space away from another. Then an async error was generated. Some benefits may work fine if the right config settings are enabled/disabled, such as better AI, since (I assume) the host manages the AI.

When all the machines joining the game had C3X (and the same config file), everything worked much better. Again, my testing was certainly not exhaustive, but here's what I found:

1. The improved city production view worked.
2. The railroad limit worked.
3. The city distance limit worked.
4. Stack worker commands did not work (the buttons did not appear).
5. Diplomacy gold auto-fill worked. When talking with another human, the gold auto-fill might sometimes recommend a value, but of course the user was free to change it. Recall that in multiplayer, you cannot see what the other (human) player has to offer. Thus gold autofill was only relevant when offering gold.
6. Diplomacy scroll buttons did not work (the buttons did not appear).

So, overall, the current state of the mod looks very promising for use in multiplayer games! Thank you Flintlock!
 
For those who are curious, I did some experiments to see if C3X works for multiplayer, and the short answer is that it does!
Interesting, thanks for doing this. It's good to hear the C3X rule changes can work in MP, I wouldn't have bet on that. In general I haven't given any thought to MP while working on the mod, but in a few cases I preemptively disabled things for online games that I expected wouldn't work based on what I saw in the decompiled code. Those are (1) stack bombard because the base code uses a separate function for bombarding in online games which the mod doesn't use, though it probably could, (2) trade screen scroll because there's some additional work the mod would have to do to open or close the diplo screen with a human player, and it doesn't look easy, and (3) stack worker commands. Honestly I don't remember why I disabled stack worker commands in online games, it might just be b/c that code is based on a copy+paste of stack bombard, but if people care about MP I could have another look. Also I'm surprised that the gold auto-fill worked. Internally that feature works by systematically offering different amounts and calling a base game function to see if the current deal is acceptable. I would have guessed that function wouldn't work without an AI player on the other side of the table but presumably it's returning what a hypothetical AI would think of the deal. Neat.
 
Interesting, thanks for doing this. It's good to hear the C3X rule changes can work in MP, I wouldn't have bet on that. In general I haven't given any thought to MP while working on the mod, but in a few cases I preemptively disabled things for online games that I expected wouldn't work based on what I saw in the decompiled code. Those are (1) stack bombard because the base code uses a separate function for bombarding in online games which the mod doesn't use, though it probably could, (2) trade screen scroll because there's some additional work the mod would have to do to open or close the diplo screen with a human player, and it doesn't look easy, and (3) stack worker commands. Honestly I don't remember why I disabled stack worker commands in online games, it might just be b/c that code is based on a copy+paste of stack bombard, but if people care about MP I could have another look. Also I'm surprised that the gold auto-fill worked. Internally that feature works by systematically offering different amounts and calling a base game function to see if the current deal is acceptable. I would have guessed that function wouldn't work without an AI player on the other side of the table but presumably it's returning what a hypothetical AI would think of the deal. Neat.

Honestly, I dont play much SP anymore, but I'd load up MP with another person in a heartbeat just because I dont really enjoy playing most games by myself anymore. But I'd encourage you to keep doing what you are doing and just disable stuff you think might cause issues. The user also has the config to disable and enable stuff if there are problems.
 
Just wanted to chime in and say well done to @Flintlock for their work on this patch. I never thought I'd ever see Civ 3 get the kind of fully featured fan enhancement/bug fix patch that the later games got due to so much of the functionality being buried in the EXE, so to get one that even pulls off AI behaviour changes is outstanding. Not to mention being fully configurable via a nice clear INI file. No issues so far testing with the gog version but I've only really been mucking about with the UI enhancements so far (love the 'about to get a civil disorder' warning by the way, so many times there's that one city that escapes attention!). It's great to see Civ 3 still being improved almost 20 years after release.

Out of curiosity, are we now at a point where all functionality that existed in the various 'single feature' EXE hacks floating around are now available in this patch? It'd be great to reach a point where we can say to new players 'just get the unofficial patch'.
 
Out of curiosity, are we now at a point where all functionality that existed in the various 'single feature' EXE hacks floating around are now available in this patch? It'd be great to reach a point where we can say to new players 'just get the unofficial patch'.
I've included what I consider to be the most common & important hacks, those being the bug fixes, no raze, and no unit limit. No city limit is also commonly used but the version floating around is only a basic implementation that's seriously buggy. If I were to include that I would do a proper job of it which is unfortunately not easy. Antal's EXEs also had features like expanded city radius and altered naval movement rules, and maybe some other things I'm forgetting, I haven't bothered including that stuff because it would require significant effort and no one's mentioned that they want it.
 
Thanks for your great efforts, Flintlock, and congratulations on what you've already achieved.

I have a major issue that hasn't been mentioned yet: It is the way human players are treated differently and unfairly compared to AI players when it comes to trespassing. If you trespass on an AI's territory, he/she gets more hostile towards you, and you are always asked to leave or declare war on the second turn. On the other hand, if the AI trespasses into your territory, you could ask them to leave, but then they get annoyed, and may declare war, even in cases they most likely weren't planning to do so. When escorting a Settler across your territory because there's that tiny spot of unsettled Tundra on the other side, they may answer yeah, yeah I'll leave, but simply carry on like nothing happened. Of course you could put them to the spot and demand they'll either declare war or leave, but in either case it's risky if you don't want war at that time. So it might be the better option to accept their transgressions for now, rather than confronting them. I know a lot of players find this unfair, annoying and frustrating.

It would be much better if it was implemented the way it is in Civ4. Noone, neither the AI or human players, are allowed to pass into foreign territory without either:
A) negotiating a Right Of Passage deal first, or
B) declaring war first, then move into the enemy territory. At least in that case, you know war was unavoidable, and you can deal with it accordingly.
 
Antal's EXEs also had features like ... altered naval movement rules.

Flintlock, I am not aware about the altered naval movement rules in the Antal1987 exes. Can you please tell me what he did change here in his exes ?
 
It would be much better if it was implemented the way it is in Civ4. Noone, neither the AI or human players, are allowed to pass into foreign territory without either:
A) negotiating a Right Of Passage deal first, or
B) declaring war first, then move into the enemy territory. At least in that case, you know war was unavoidable, and you can deal with it accordingly.

Erlend Philip Wood, I don´t agree with this and it is not needed. Use a concept as it is included in CCM with enslavers and lawyers and this problem in reality is not a problem but a source of fun.
 
@Civinator, while I am fairly new to his forum and haven't tried it yet, I can appreciate the massive effort and knowledge that must have gone into creating CCM and I respect that. But not everyone is playing CCM, or even mods. C3X is a good tool for all kinds of players too, not just modders, as it fixes several major issues in a simple way.

If you disagree I have no problem with that, but I'm sure I'm not the only one who thinks AI trespassing is quite annoying in vanilla, and in most mods too. Since Flintlock already has solved railroad limits and offensive AI artillery, which were my two top concerns that are hardcoded and can't be fixed with a regular mod, I was hoping he could fix this too. :)

(of course, if it is implemented, it should be optional)
 
Last edited:
But not everyone is playing CCM, or even mods

Erlend Philip Wood, welcome at CFC! :band:[party] Sorry, that I haven´t watched that these are your first posts at CFC.

The problem with the argument, that not everyone is playing mods is, that the Flintlock patch is a mod, too. So civers who don´t play any mod don´t play the Flintlock mod, too. On the other side I have no problems if this setting can be optionally enabled/disabled, but I disagree when posted, that it is much better, if it was implemented the way it is in Civ4 - in my eyes this is not the case and in Civ 4 you have special units that can ignore a missing Right Of Passage deal without a declaration of war.
 
It would be much better if it was implemented the way it is in Civ4. Noone, neither the AI or human players, are allowed to pass into foreign territory without either:
A) negotiating a Right Of Passage deal first, or
B) declaring war first, then move into the enemy territory. At least in that case, you know war was unavoidable, and you can deal with it accordingly.
A basic mod of the movement rules to prevent trespassing would be easy. I've already modified the move cost function to make limited railroad movement possible and that same function can also be used to prevent travel to certain tiles based on arbitrary criteria. There might be problems with the side effects of this change, though. Two come to mind immediately: (1) The AI usually declares war by running its units into its target's cities so preventing it from entering foreign territory might prevent it from declaring war, especially for overseas wars. (2) The human player could still get units into foreign territory by leaving a unit next to the AI's borders before they expand culturally. This would be a major advantage if done with naval scouts. Anyway, it would be easy to stop trespassing so it's worth doing if only as an experiment. I'll (probably) try it soon(-ish).
Flintlock, I am not aware about the altered naval movement rules in the Antal1987 exes. Can you please tell me what he did change here in his exes ?
This is what I was thinking of: https://forums.civfanatics.com/threads/c3c-new-movement-possibilities.529671/. This stuck out in my mind as an interesting mod but after quickly looking over his threads again I see he never included it in his main EXE mod.
 
A basic mod of the movement rules to prevent trespassing would be easy. I've already modified the move cost function to make limited railroad movement possible and that same function can also be used to prevent travel to certain tiles based on arbitrary criteria. There might be problems with the side effects of this change, though. Two come to mind immediately: (1) The AI usually declares war by running its units into its target's cities so preventing it from entering foreign territory might prevent it from declaring war, especially for overseas wars.
I can see how setting up a basic rule set might be easier than making the AI declare war and carry out invations in an effective manner. It would also have to understand when and how to negotiate Right Of Passage agreements.

You've stated earlier that you would like to improve the AI for sea invasions (which would be warmly welcomed if you can pull it off). Since there are a lot of parallells between the two, maybe it would be easier to look into both in conjunction. By the way, you have already done much to improve sea invasions just by adding the ability to limit railroad movement. :thumbsup:
 
Thank you very much, Flintlock, for your awesome contributions to the Civ 3 engine!

Would it be possible to increase the number of workers the AI builds, say, striving to maintain 2-3 times the workers compared to the number of cities or some similar metric? The AI lands always appear to be underdeveloped, because the AI never builds enough workers to begin with, and, when it loses workers, does not seem to replace them in a timely manner.
 
Top Bottom