Resource icon

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

For the record - and, once again, in no way to minimize Flintlock's extraordinary work - such has been the concern of both my and @Vuldacon for some time, regarding any efforts affecting the game's base code (and, Vuldacon my friend, kindly forgive me for speaking on your behalf.) I specifically mention this as another possible reason for utilizing a GUI. Frankly, I expect that Flintlock's work will become the de facto engine for mod development - and general game play - going forward. And that EFZ might not be the only existing mod "at risk."

Per TJS's post above, this is thankfully already something Flintlock has provided for us. :) You can have mod-specific settings, and even allow any specific mod to be entirely unaffected by C3X changes if you so desire.
 
Since several release versions ago, it's been possible to set up a config file specific to each scenario, and stored in the ..Conquests/Scenario/[ScenarioName] sub-folder. When that Scenario is selected via Civ-Content, that scenario.config file will then over-ride the settings for the primary C3X config file in the main ../Conquests folder.

IIRC, @Flintlock provided a template scenario.config file along with the rest of the patchfiles. So you should be able to copy that template across to the EFZI folder, and then edit it there to turn off the majority/all of the patch-functions, for the next time you want to fight the Zombies.
I have no idea which changes are affecting EFZI. So my only option is to go through the config and change everything from "true" to "false"?
That just seems like a lot of work, i was hoping there might be a faster way.
 
I have no idea which changes are affecting EFZI. So my only option is to go through the config and change everything from "true" to "false"?
That just seems like a lot of work, i was hoping there might be a faster way.
... As I was saying ...

:D
 
Ok, I copied default.c3x_config to the EFZI folder then did a find and replace to change everything from "true" to "false".

Still not working right.

I'm going to try to figure out how to uninstall everything. It just sucks that I like 2 mods that don't work together. I either have to download this everytime I want to play Tides of Crimson and then uninstall it every time I want to play EFZI....ugh.
 
It just sucks that I like 2 mods that don't work together. I either have to download this everytime I want to play Tides of Crimson and then uninstall it every time I want to play EFZI....ugh.
Nwoll, why are you not simply laying shortcuts to the different exes in your C3C main folder and start C3C with the needed exe for the mod you want to play ? One shortcut to the needed exe without the Flintlock mod to start EFZI and one exe to start mods like Tides of Crimson or CCM with the Flintlock mod.

Per example here is my current taskbar where I can start the GOG original C3C exe, an exe for C3C with the Flintlock mod, an exe for a German version of C3C, an exe for the Antal version of the old CCM 2.50 and an exe for starting the C3C Chronicles version of C3C and a shortcut to C3C editor 1.00. Of course even more shortcuts to other C3C exes (per example different versions of the Flintlock mod) are possible and are working.

All you have to do is starting the needed exe with one click.

Task Leiste.jpg
 
Last edited:
From the sound of it, Flintlock is pretty much rewriting the game code rather than just tweaking it here and there. Plus, it cannot be run on older computer. If it becomes the primary mod platform, those of us with older computer are going to be out of luck for any new mods. If that happens, it might be best to start an entirely new forum covering what is being called Civ3X.
 
Ok, I copied default.c3x_config to the EFZI folder then did a find and replace to change everything from "true" to "false".
Still not working right.
I'm going to try to figure out how to uninstall everything. It just sucks that I like 2 mods that don't work together. I either have to download this everytime I want to play Tides of Crimson and then uninstall it every time I want to play EFZI....ugh.
The scenario config file needs to be named scenario.c3x_config instead of default.c3x_config. Once you've loaded into a game, you can check which config files the mod has loaded by clicking the "C3X Info" button on the top right of the preferences screen. If it's set up correctly, the scenario config INI should be third on the list. Also, you don't have to completely uninstall C3X to run the game without it, you can instead just launch Civ3Conquests-Unmodded.exe, which is the game's original EXE renamed & kept as a backup.

Could you give some more details about how C3X is breaking EFZI, like what happens versus what is supposed to happen? I intend to fix this issue. I'd like to keep C3X compatible with as many other mods as possible.
Isn't there a possibility in some editor to just export unit names with other info to a txt or csv file, so any modder could just pick them and add to your config?
Or you could use that file for your config utility if that's easy to do.
It would probably easier for me to read the names in from a text file, but that makes more work for modders to export them in the first place. Reading in the names from a BIQ shouldn't be *too* difficult anyway, and I can use Quintillus' open source editor as a reference.
Judging from the AI production ratings, I think the game creates one unit per AI strategy, which is then rated differently. If you would give archers the bombard ability and artillery strategy, they would have one production rating for offense (higher than warriors) and one for artillery (lower than catapults). Units with only one strategy only appear once.
Interesting. That makes sense and explains another thing I've been wondering about, which is that (based on what I've read on the forums) AI units are permanently assigned one of their type's strategies when they're built, but that does not match what I was seeing in the code. The unit AI has different methods for each AI strategy, and when picking a method to run for a particular unit it simply goes down the list offense, defense, artillery, etc. and runs the method for the first strategy that's ticked for the unit's type. I was wondering how different units of the same type could run different strategies, them having different types under the hood explains it.
Can I turn off the function that uses 'L' to show preferred AI-town locations -- which I don't need or use?
Because right now, it's over-riding the default Firaxis hotkey for "Load/Unload" units in/out of boats and Armies, which I do use.
I thought I already addressed this, looking at it again I fixed it only for the load command and forgot about unload. Oops. It will be fully fixed in the next version.
 
I thought I already addressed this, looking at it again I fixed it only for the load command and forgot about unload. Oops. It will be fully fixed in the next version.
Setting the function to False solved the problem I was having, but maybe the C3X hotkey could simply(?) be changed to e.g. "Ctrl-L" instead?
 
The scenario config file needs to be named scenario.c3x_config instead of default.c3x_config. Once you've loaded into a game, you can check which config files the mod has loaded by clicking the "C3X Info" button on the top right of the preferences screen. If it's set up correctly, the scenario config INI should be third on the list. Also, you don't have to completely uninstall C3X to run the game without it, you can instead just launch Civ3Conquests-Unmodded.exe, which is the game's original EXE renamed & kept as a backup.

Could you give some more details about how C3X is breaking EFZI, like what happens versus what is supposed to happen? I intend to fix this issue. I'd like to keep C3X compatible with as many other mods as possible.
Thank you for that reply, I'm not as smart as programming so I apologize if my questions sound stupid.

For EFZI on turn 2 you can capture an invisible enemy unit with 0/0/2 stats (A/D/M).
(Then you escort it to one of your cities and upgrade it later)

With this mod running, I can't "capture" that unit - the unit simply dies (disappears) when I attack it.

Once I've seen that on turn 2 I stop playing so I don't know what other errors might exist.
 
Last edited:
@Flintlock Would it be possible to look at the code responsible for "Plague Disasters" to have more options or control over it? Imagine if you could change the percentage chance for plague to spread, the chance for it to harm a unit, and having a "unit" that has an action of spreading the plague to a city like a corpse catapult....
 
Could you give some more details about how C3X is breaking EFZI, like what happens versus what is supposed to happen? I intend to fix this issue. I'd like to keep C3X compatible with as many other mods as possible.
For EFZI on turn 2 you can capture an invisible enemy unit with 0/0/2 stats (A/D/M).
(Then you escort it to one of your cities and upgrade it later)

With this mod running, I can't "capture" that unit - the unit simply dies (disappears) when I attack it.
While the best person to tell you about the myriad quirks of EFZI would of course be the modding genius @Vuldacon *summons* I do know that the basic "Sam Hammer" unit has some other exotic settings — which (I believe) were applied using @Quintillus' rather than Firaxis' Editor — allowing him to do (Air) recon missions, despite being a mobile land-unit.

So could it be that C3X is treating him as an air-unit (which in the base-game, get destroyed on capture)?
 
Fyi:
- giving a ground unit air recon can be done with the vanilla editor
- air units with hidden nationality actually don't get destroyed and can coexist with ground units of a different nationality on the same tile. (At least that is vanilla behaviour)
 
Interesting. That makes sense and explains another thing I've been wondering about, which is that (based on what I've read on the forums) AI units are permanently assigned one of their type's strategies when they're built, but that does not match what I was seeing in the code. The unit AI has different methods for each AI strategy, and when picking a method to run for a particular unit it simply goes down the list offense, defense, artillery, etc. and runs the method for the first strategy that's ticked for the unit's type. I was wondering how different units of the same type could run different strategies, them having different types under the hood explains it.

I would be very interested in learning more about the AI and unit strategies. I can't recall which units if any have multiple strategies in the unmodified game, but surely the game was not optimized for multiple strategies. I always had the impression based on debug games that the ai makes two decisions pertaining to unit strategy. First is what to build, and each strategy is essentially treated as a separate unit for calculation purposes. Secondly, how the ai uses units that it has based on their strategy. If this proves not to be the case, it would be good to know how it works.

Also, it would be good if we could know from a saved game file what strategy is assigned when a player builds a unit with multiple strategies. Is it just the first in the list? This would be important, for example, if a unit had both the offense and defense strategy. The ai considers the total number of the player's offense-tagged units in its diplomatic calculations, so it matters which strategy is assigned.
 
Regarding EFZI2 Elite (and all previous versions) The Original Game Biq was used other than years ago I used Steph's Editor to simply enlarge the Game Map to a Standard Size(180 X 180) a little faster.

In the Screen Shot of Sam Hammer's Biq Settings... you can see that Recon is set... that is so he and the other Detectives can reveal areas of the Map as if researching it.
That may be what is causing some problem as neither Sam Hammer nor the Detectives are Air Units :)
 

Attachments

  • Sam Hammer Biq Settings.png
    Sam Hammer Biq Settings.png
    59.1 KB · Views: 32
Setting the function to False solved the problem I was having, but maybe the C3X hotkey could simply(?) be changed to e.g. "Ctrl-L" instead?
Unfortunately it's not simple. The game has a separate code path for key presses with modifiers like control and I haven't mapped it out yet so I wouldn't know where to intercept that input event. In general the game's input handling is a tangled mess of methods. There are a lot of them, they all call each other, and many of them do little or no work, instead delegating it to another method. For example, there are three different methods to handle a left mouse click on the game map and I don't know what the difference is between them. I haven't bothered figuring this out and really don't think it's worth the trouble.
For EFZI on turn 2 you can capture an invisible enemy unit with 0/0/2 stats (A/D/M).
(Then you escort it to one of your cities and upgrade it later)
With this mod running, I can't "capture" that unit - the unit simply dies (disappears) when I attack it.
In the Screen Shot of Sam Hammer's Biq Settings... you can see that Recon is set... that is so he and the other Detectives can reveal areas of the Map as if researching it.
That may be what is causing some problem as neither Sam Hammer nor the Detectives are Air Units :)
Thanks for the info. I'll look into this and report back. Right off hand, I can't imagine how C3X could interfere with units being captured or how it could interact with recon missions at all.
@Flintlock Would it be possible to look at the code responsible for "Plague Disasters" to have more options or control over it? Imagine if you could change the percentage chance for plague to spread, the chance for it to harm a unit, and having a "unit" that has an action of spreading the plague to a city like a corpse catapult....
All of that sounds possible. I'll add it to the list.
I would be very interested in learning more about the AI and unit strategies. I can't recall which units if any have multiple strategies in the unmodified game, but surely the game was not optimized for multiple strategies. I always had the impression based on debug games that the ai makes two decisions pertaining to unit strategy. First is what to build, and each strategy is essentially treated as a separate unit for calculation purposes. Secondly, how the ai uses units that it has based on their strategy. If this proves not to be the case, it would be good to know how it works.

Also, it would be good if we could know from a saved game file what strategy is assigned when a player builds a unit with multiple strategies. Is it just the first in the list? This would be important, for example, if a unit had both the offense and defense strategy. The ai considers the total number of the player's offense-tagged units in its diplomatic calculations, so it matters which strategy is assigned.
Infantry have multiple strategies, some other types do too, I remember seeing them when investigating the bugged building prereqs but can't remember which ones specifically. So far I haven't seen anything that indicates the AI can change a unit's strategy after it's been built. If that's possible somehow, it would have to work by changing the unit's type to one of its duplicates. The unit AI definitely cannot choose a different strategy for a particular unit, it can only execute whichever strategy is set on its type, and assumes that each type has only one strategy. That's a good question about what strategies the human player's units have set. All I know is the human player builds the unit types first in the list, so not the duplicates. I'll have to run a little experiment.



Edit: Here's the result of the little experiment I had in mind. I modified the AI production ranking popup to include the type ID and AI strategy for each unit.

ai_strat_ranking.png

As expected, there are two versions of the Rifleman since it has two strategies. The first one has ID 16, matching its index in the unit type list in the BIQ, and it has an AI strategy of 1, which means offense only. The second one with ID 124 was tacked onto the end of the list and has strategy 2, meaning defense only. If either had both strategies available, it would show a strategy of 3 since it's a bit field.

Next I inserted a bit of code to show the type IDs for the human player's riflemen and ran it on an old save I had. Interestingly, all my rifles had ID 124, not 16 like I thought they would. That means they'd be considered defensive not offensive units. I don't know how the game decided to give them that ID but it means it's not as simple as the human player gets the first strategy in the list.
 
Last edited:
Maybe it is the last in the list? What happens if you add more additional strategies?

Thanks for investigating, this is really interesting!
 
Infantry have multiple strategies, some other types do too, I remember seeing them when investigating the bugged building prereqs but can't remember which ones specifically. So far I haven't seen anything that indicates the AI can change a unit's strategy after it's been built. If that's possible somehow, it would have to work by changing the unit's type to one of its duplicates. The unit AI definitely cannot choose a different strategy for a particular unit, it can only execute whichever strategy is set on its type, and assumes that each type has only one strategy. That's a good question about what strategies the human player's units have set. All I know is the human player builds the unit types first in the list, so not the duplicates. I'll have to run a little experiment.

Edit: Here's the result of the little experiment I had in mind. I modified the AI production ranking popup to include the type ID and AI strategy for each unit.

As expected, there are two versions of the Rifleman since it has two strategies. The first one has ID 16, matching its index in the unit type list in the BIQ, and it has an AI strategy of 1, which means offense only. The second one with ID 124 was tacked onto the end of the list and has strategy 2, meaning defense only. If either had both strategies available, it would show a strategy of 3 since it's a bit field.

Next I inserted a bit of code to show the type IDs for the human player's riflemen and ran it on an old save I had. Interestingly, all my rifles had ID 124, not 16 like I thought they would. That means they'd be considered defensive not offensive units. I don't know how the game decided to give them that ID but it means it's not as simple as the human player gets the first strategy in the list.

It would seem then that the ai simply treats each strategy as a separate unit and makes its calculations accordingly. I am not surprised at your findings with the human-made unit. A while ago, I tested a game where the spearman was given 2/2 A/D and both strategies checked. When I built a large number of spearmen, the computer opponents treated my civ with utter contempt, the way they would if I had no offense-tagged units. Thanks for looking into this.
 
It would seem then that the ai simply treats each strategy as a separate unit and makes its calculations accordingly. I am not surprised at your findings with the human-made unit. A while ago, I tested a game where the spearman was given 2/2 A/D and both strategies checked. When I built a large number of spearmen, the computer opponents treated my civ with utter contempt, the way they would if I had no offense-tagged units. Thanks for looking into this.
So the AI treated all of your spearmen like def units? And then why don't they do the same for warriors? Warriors in stock game have both def and atk strats ticked and have even stats.
 
Back
Top Bottom