Resource icon

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

@Flintlock have you noticed that when you switch from one advisor to the next on the trade screen that the music "jumps" to another track for each advisor? For me, the music eventually freezes and I have to turn all sounds off and after a while, I can turn it back on again. I wonder if it is because I am running via Wine?
 
If I go down this route, I'm sure I'll get more requests to add more conditions to the limits. I'll end up building up a little ad hoc scripting language to specify the limits. It would be much better to use Lua in the first place.

Well I may as well bring in the three suggestions which I would think would round the idea off:
1. Being able to increase the limit via improvements and wonders (e.g. Spy: 0, Spy: (Intelligence Agency) 5, Spy: (Secret Police HQ) 5, Spy: (Sun Tsu's Art of War) 5)
2. Being able to give a global limit to the amount of a unit on a map (e.g. Relic: [GLOBAL] 10)
3. Perhaps further in the future since it will involve modifying game saves, a per-game limit of a unit
 
Have any of you had problems with the game freezing when you load a save or start a scenario for the second time, i.e. not initially after launching the game, that got worse with R18 Preview 1? I ask because someone mentioned this to me over PM and it's something I noticed myself but it's a weird bug that I can't reproduce. It seems to freeze the game at "2%" loading progress. BTW, there's a similar bug in the base game, unrelated, that freezes loading at "configuring human player". I can reproduce that one but haven't figured it out yet.

@Flintlock have you noticed that when you switch from one advisor to the next on the trade screen that the music "jumps" to another track for each advisor? For me, the music eventually freezes and I have to turn all sounds off and after a while, I can turn it back on again. I wonder if it is because I am running via Wine?
I think I had the music turned off back when I was testing the game on Wine so I wouldn't have noticed that. I'll test again some time. Civ 3 seems to have a lot of sound issues when running on Wine for whatever reason.

Well I may as well bring in the three suggestions which I would think would round the idea off:
1. Being able to increase the limit via improvements and wonders (e.g. Spy: 0, Spy: (Intelligence Agency) 5, Spy: (Secret Police HQ) 5, Spy: (Sun Tsu's Art of War) 5)
2. Being able to give a global limit to the amount of a unit on a map (e.g. Relic: [GLOBAL] 10)
3. Perhaps further in the future since it will involve modifying game saves, a per-game limit of a unit
It would be nice if the unit limits could vary based on regular city improvements but that's not easy to implement since the game doesn't maintain a counter of how many improvements of each type players have. Of course I could add that, like I added a counter of units by type to make unit limits work in the first place. Limiting units by wonder would be easier since the game already tracks where wonders are built. If I were to make limits vary based on improvements, it would be something like:
Spy: 5 from "Intelligence Agency" + 5 from "Secret Police HQ" + 5 from "Sun Tsu's Art of War"
I expect allowing multiple entries for the same unit type would quickly become a mess of ambiguity. Even in your example, I'm not sure if you intend the each wonder to increase the spy limit by 5 or if you mean building any of them should allow up to 5 spies.
 
There is a game C-evo, it is similar with Civilization. I listened that AI in this game very clever and strong. Is it possible to take AI code and some game`s mechanics from C-evo to Civilization 3?
I really love Civilization 3
 
Even in your example, I'm not sure if you intend the each wonder to increase the spy limit by 5 or if you mean building any of them should allow up to 5 spies.
I'd meant the former
 
Unfortunately in my current CCM 3 testgame with the R17 version of your mod I ran into a freeze during the later phases of the game. China is initiating a big scale invasion into my territory and I gave the first Chinese units on my territory the "remove or declare war" order. Than the game freezes...

I made a save file before the boot order, restartet the game with the normal C3C-unmodded exe and loaded the save-file. Now it shows that China wanted to declare war, as in the restart with the normal C3C exe this decision showed up. As the R17 version exe always lead to the freeze in that situation and the normal C3C exe always lead to the declaration of war, I think it must be something in your mod, that triggers the freeze in that situation.

All other diplomatic options in that situation are working very well. Even the diplo-screen can be left with the current name of the Chinese leader without any problem, if there was no click on the option to "remove or to declare war" before.

The two screenshots show the diplo-screen with the R17 version and the freeze option (marked by the eraspecific name of the Chinese leader) and the normal C3C screen showing the Chinese decision with no freeze (marked by the general Chinese leader name in the CCM 3 biq).

Freeze:

Remove your forces or declare war.jpg


No freeze, when the save-file is played by the C3C unmodded exe:

China declares war.jpg


Continued:

I made an additional save-file in a game started by the C3C-unmodded exe directly after China declared war on me. Than I quitted the game played with the C3C-unmodded exe and started the game again by the R17 Flintlock exe and loaded the save-file where China declared war on me. When China had to use its units next to my units, so that combat occurs, the game freezes again.

When I started the game again with the C3C-unmodded exe and loaded the save-file where China declared war on me, China´s first attack on a unit on my territory triggered a popup window, that Arabia declared war on China due to a mutual protection pact that Arabia had with me.

Mutual Protection Pact.jpg


It seems, there is a conflict between the R17 version of the Flintlock mod and diplomatic reactions shown by popup-messages (here declaration of war by the AI civ that was asked to remove its units and later the AI declaration of war on another AI civ by a mutual protection pact).

Addition: The problematic texts in the popup-windows come from the text script-file: FOREIGN STATEMENTS:

#SUMMARY_THEY_DECLARE_WAR_ON_US
#advisor Foreign Angry
The $CIVNOUN0 declared war on us!

-------------------------------------------------
#SUMMARY_DECLARE_WAR
#advisor Foreign Surprised
$CIVNAME0 declared war on the $CIVNOUN1.

---------------------------------------------------------

#comment CIVNOUN = one of the civilizations Noun Form.
#comment CIVNAME = one of the civilizations Name Form.

To change the text "The $CIVNOUN0 declared war on us!" to "The invaders declared war on us!" did not stop the freeze. Neither China nor Arabia in that test game have modded civilizations Noun nor civilizations Name Forms.
 
Last edited:
After being exhausted trying to modify the game's textures and being unsatisfied with the limitations I couldnt help but to wonder:

I'm not trying to be over-complicated here but I'm curious how difficult would it be to implement a function where instead of having the game load the textures from its native civ3 Art folders, it would instead be handled externally with your C3X's mod very own Art folder? It could have a clone of the "Art" folder inside the C3X's folder where we could replace textures directly from there and maybe even add modifiers for textures to show/replace under certain pre-requisites such as eras, tile resource, and tech.

Example: C3X/Art/Terrain/TerrainBuildings1 through 4.pcx: & a configuration file also named TerrainBuildings.config (which would push the TerrainBuildings1 through 4.pcx textures) with config line that reads:
(Example: Textures in folder are TerrainBuildings1.pcx, TerrainBuildings2.pcx, TerrainBuildings3.pcx, and TerrainBuildings4.pcx):

//TerrainBuildings Age
{
eraAncient=1
eraMedieval=2
eraIndustrial=3
eraModern=4

if (age=1), then (TerrainBuildings=TerrainBuildings1),
if (age=2), then (TerrainBuildings=TerrainBuildings2),
if (age=3), then (TerrainBuildings=TerrainBuildings3),
if (age=4), then (TerrainBuildings=TerrainBuildings4),

//Or simply if age is not specified one then keep specified texture till age met:

if ( (!age=4), then (TerrainBuildings=TerrainBuildings1 ); otherwise TerrainBuildings=TerrainBuildings4 )
}

Similar idea with era, tile resource, and tech.
I apologize but it was a mouth full to put into words. Hopefully this was easier to understand.
 
Last edited:
There is a game C-evo, it is similar with Civilization. I listened that AI in this game very clever and strong. Is it possible to take AI code and some game`s mechanics from C-evo to Civilization 3?
I really love Civilization 3
No. C-evo is an open-sourced project more reminiscent of Civ 2 than Civ 3. Flintlock has managed to achieve what has defeated many excellent coders over two decades; he has hacked the .exe; prior efforts have "only" managed to hack the .exe's header. (The other "Holy Grail" would have been access to the source code itself, which has been tried many times over many years, including no less than four times by Yours Truly, and by four entirely different avenues.)

- So, Ave @Flintlock! :thanx:
 
After a handful of play throughs testing my mod and using C3X I have settled on some settings and still thinking on others. 3 city spacing is great. I like disallow trespassing on land. It is more of a hinderance for naval units. You have to get a scout ship or two out fast! I have my early ships wheeled with ocean tiles impassable. Now "suicide galleys" are for getting around borders. I introduced Pirate Galleys in the first era to spice up naval gameplay, but it has the side benefit of working great in conjunction with disallow trespassing naval borders. I am digging sea retreat. I have also noticed the improved ZoC. The artillery improvements are most excellent. I like the building pre-reqs for units. In addition to tech tree changes I have made, it helps to slow building of new units a bit to give existing units a little more time before being obsolete. It also limits unit spamming, to an extent, requiring you to build up infrastructure, especially since you can have multiple buildings as pre-reqs.

I haven't gotten to mess around with the resource buildings, yet. Or the new aliases for era. Or some of the later era stuff like paradrops because I haven't made it past the middles ages yet in any of my games.
 
Last edited:
There is a game C-evo, it is similar with Civilization. I listened that AI in this game very clever and strong. Is it possible to take AI code and some game`s mechanics from C-evo to Civilization 3?
I really love Civilization 3
In general, the hard part about moving code from one project to another is that it rarely comes in nice little self-contained pieces. It's usually full of references to other code in the project it was created for, which means to port it you'd need to rework a lot of it or write a translation layer. Either way it would be a lot of work. I highly doubt it would be feasible to bring over code for game mechanics or AI.

Unfortunately in my current CCM 3 testgame with the R17 version of your mod I ran into a freeze during the later phases of the game. China is initiating a big scale invasion into my territory and I gave the first Chinese units on my territory the "remove or declare war" order. Than the game freezes...
Damn. Any chance you could send me the save file? I would need to be able to run it too, which makes this difficult. Otherwise I can only guess as to what's wrong. My best guess, knowing little about the problem, would be that it's resource generation from buildings again. Can you try removing all resource generation settings and see if that fixes the crash?

I'm not trying to be over-complicated here but I'm curious how difficult would it be to implement a function where instead of having the game load the textures from its native civ3 Art folders, it would instead be handled externally with your C3X's mod very own Art folder? It could have a clone of the "Art" folder inside the C3X's folder where we could replace textures directly from there and maybe even add modifiers for textures to show/replace under certain pre-requisites such as eras, tile resource, and tech.

Example: C3X/Art/Terrain/TerrainBuildings1 through 4.pcx: & a configuration file also named TerrainBuildings.config (which would push the TerrainBuildings1 through 4.pcx textures) with config line that reads:
(Example: Textures in folder are TerrainBuildings1.pcx, TerrainBuildings2.pcx, TerrainBuildings3.pcx, and TerrainBuildings4.pcx):
Loading alternate PCX files would be easy but the hard part would be modifying the drawing code so it uses those alternate images. That's totally doable but it has to be done in a piecemeal way which makes it laborious. For example, the game loads TerrainBuildings.PCX then slices out the mine image and stores it for use when drawing mines. I could modify the code that draws mines to use an image from a different PCX instead, but of course that only works for mines. I'd need to make separate modifications for barricades, fortresses, colonies, and barb camps, just to cover TerrainBuildings. And if you want the other PCX files to be replaceable too, that's yet more modifications. Still, it's doable with enough effort. If you want complex rules to control which PCX gets used for which player, again I'd like to rely on Lua instead of building some ad hoc scripting language for the config INIs.
 
Loading alternate PCX files would be easy but the hard part would be modifying the drawing code so it uses those alternate images. That's totally doable but it has to be done in a piecemeal way which makes it laborious. For example, the game loads TerrainBuildings.PCX then slices out the mine image and stores it for use when drawing mines. I could modify the code that draws mines to use an image from a different PCX instead, but of course that only works for mines. I'd need to make separate modifications for barricades, fortresses, colonies, and barb camps, just to cover TerrainBuildings. And if you want the other PCX files to be replaceable too, that's yet more modifications. Still, it's doable with enough effort. If you want complex rules to control which PCX gets used for which player, again I'd like to rely on Lua instead of building some ad hoc scripting language for the config INIs.

For simplicity's sake if irrigation and mining would be all that you did, that alone would do a ton to improve the visual feel of the eras. I know the irrigation pcx has about 12 variations but if that would make it that much more complicated, then I'd settle with just mines if that all you did since they have no variants.

If the mines would show alternate textures based on terrain type, or resource on tile even better. If mines based on eras is all that would be possible that would also be ok. Thank you for your interest.
 
Damn. Any chance you could send me the save file? I would need to be able to run it too, which makes this difficult. Otherwise I can only guess as to what's wrong. My best guess, knowing little about the problem, would be that it's resource generation from buildings again. Can you try removing all resource generation settings and see if that fixes the crash?
It was no problem to delete all resource generating buildings in the scenario.c3x_config of CCM 3 and indeed your guess is correct! :hatsoff:

When these settings are deleted, no more freezes in that situation are occuring. All generated resources in CCM 3 are "virtual resources", meaning they are not appearing on the map otherwise. Of course you can have the save file and I hope that the CCM 3 files (even with that problem in the scenario.c3x_config file) will be available about the end of next week, if all runs well with the upload at CFC.
 
It was no problem to delete all resource generating buildings in the scenario.c3x_config of CCM 3 and indeed your guess is correct!
Good to know. I figured that was the problem because the mod tries to recompute resource access and production whenever a trade deal is broken for any resource that might be an input to a resource generating building. When I inserted that bit of logic I had the feeling it was sloppy and sure enough it's causing problems now. I'll have to take a second look at that and figure out how to do it properly.
 
Good to know. I figured that was the problem because the mod tries to recompute resource access and production whenever a trade deal is broken for any resource that might be an input to a resource generating building. When I inserted that bit of logic I had the feeling it was sloppy and sure enough it's causing problems now. I'll have to take a second look at that and figure out how to do it properly.
Another observation about that problem:

When I started CCM 3 with the R16 exe, but with the R17 scenario.c3x_config file from the resourcegenerating buildings in that file, R16 had only problems to recognize the word "yields", the building generated resources were appearing in the cities with those buildings - and the most important:
With R 16 the freezes in the 1913 save file are not happening!

So it seems that the problem could be in the code that was added from R16 to R17.

Yields.jpg
 
I finally worked out all the (known) bugs in the first two eras of my mod and made into the third era on my current play through. With C3X, I love that the AI is using artillery offensively. The only thing that saved me in my war with Germany and their larger numbers plus trebuchets, was getting Cavalry and Rifleman. Anyhow, a side effect of the AI using artillery out in the field is that it is easy pickings for the human player if you have a military advantage. I must have picked up two dozen (or more) trebuchets from the Germans, I upgraded to cannons, and then it was lights out.

So, I need to work out a balance. Maybe make it not able to be captured? Or maybe something simpler like artillery can't be upgraded. So, it can be effective for a short time, but after being captured outdated artillery can be converted to shields and act like booty from your victories.
 
Last edited:
Does the captured artillery require maintenance? Not upgradable artillery would make sense I think, also field artillery can logically have good defense value, though less hit points than infantry.
 
I made a small(ish!) mod for use with the Flintlock patch where I broke the upgrade between Hwacha (now available with Gunpowder) and Cannon (shield-cost also increased to 50), and gave Arty and Radar Arty a nominal D=1 and -1HP, making them destroyable if attacked (also means you'll need enough attackers -- or Bombers! -- to destroy enemy Arty after taking out their defenders).

So all bombard-units up to Cannon can be captured, but only Cannon can be upgraded to Arty or Radar Arty (for 30g less than in the base game). Once Cannon are available, obsolete (/captured) Cats/Trebs could e.g. be sentried on coastal land tiles to block AI landings, or disbanded for shields (yes, that works for captured units as well).

I also made Arty + RadarArty Wheeled, so they're subject to the same terrain-restrictions as their predecessors (they aren't Wheeled in the base-game, for some reason). And I nerfed Armies, but created an upgrade-path for them, so that their extra abilities are obtained over time (partly inspired by the Daimyo units in the Sengoku Conquest).
 
Last edited:
Thanks to Flintlock for his great work and its result - a wonderful mod.
And a few questions:
1. Motion and attack indicators are very useful in the game. But for stationary units they also show the ability to move and attack. Can this be fixed?
2. Reloading a saved game when using C3X_R18_Preview_1 freezes at 2%.
I also drew indicators (green - movement; yellow - partial movement; red - no movement; blue - work that can be interrupted) and swords when an attack is possible.
Indicators_1.jpg
Indicators_2.jpg
 

Attachments

  • UnitRCMIcons.pcx
    3 KB · Views: 7
Last edited:
Top Bottom