Resource icon

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

I think the best place to display this info would be in the tile info box.
That occurred to me after I'd posted, and I agree: if it could be added there, that would be better than yet another pop-up.
With respect to the chop forrest notification, wouldn't it just be easier to allow the subsequent forrest chops to give the shields? It seems to me as if you chop wood, it should still provide the bonus shields. There is shouldn't be anything magical about the first cut of wood.
The 'inifinite forest shields' were actually available in one of the early patch-versions of the original 16-Civ Civilization3.exe, but this was far too easily exploitable

If you had the patience, you could set a huge stack of Workers to plant-and-chop the same couple of tiles multiple times per turn (which would be even easier now, with the new stack-Worker commands), allowing essentially cost-free 1-turn builds of relatively expensive items, even in the Ancient Age — which is why the "one chop rule" was patched into later releases.

(I agree it would have been better from a realism PoV, to limit the chop-shields to e.g. "once per tile per X in-game years/turns", but that's not what FXS did)
 
Done!

detailed_tile_info.png
 
So... where's this patch-version then...? ;)

I spent an hour or so last week copying files I wanted to keep out of my GamersGate-installation, then re-installing from GOG, and copying the files back in, just to be able to use your patches. And it seems to be working perfectly (although (Army-)attack animations seem to be weirdly slowed, at least on the initial turn).

But now we wants thiss one, yess we doesss....
 
So... where's this patch-version then...? ;)
It's coming soon. I've added everything I wanted for R8 now I just want to give it one last lookover. I'll post it this week if I can. Here's the list of additions as a little tease:
- Stack fortify, upgrade, and disband
- AI routine for "pop units" that may appear in mods
- Group units on right click menu
- Show coordinates and chopped status in tile info box
- Show golden age turns remaining
- Trespassing prevention (experimental)
- Land/sea intersections
- Adjustable anarchy length
- "Perfume" an improvement to make it more appealing to the AI
- No special king unit names in non-regicide games
- Stack worker commands apply across unit types
 
The AI could really use a courthouse priority. The order by which a 50% shield waste city builds improvements has a huge impact on development.
 
Noted. Right now I only have the mod set up to add a fixed value to a given improvement type, but valuing the courthouse properly would require scaling by the city's corruption rate. That would be easy to do.
 
Something probably easy, maybe has even been done before, but well. Every once in the while, the game gives you top 10 lists. 10 most powerful, 10 happiest, etc. It would be nice to have those screens available in for example, the F8 series of metrics.
 
It would be nice to have those screens available in for example, the F8 series of metrics.

Interesting idea, and I'd like that, too. But I'm not sure the game stores that anywhere. I've never seen it in the save file. It may just be a hard-coded snapshot of current rankings.

If so, putting new info into a save file adds a few challenges.
 
Flintlock may be this is no good news about the houseboat bug. In my current testgame with CCM 2.50 I wanted to test the later units in CCM 2.50 and the last version of your patch, especially the fix of the houseboat bug. That´s why I made tons of save-files during that test.

In 1889 I eliminated Australia and unfortunately the game did freeze. Therefore I reloaded the last save file when the year 1889 did start and planted a spy to catch the Australian plans for the locations of its units. They had an old ship of the line without the reach of my units. There was no settler on board of that ship (and the ship of the line in CCM is not set to transport other units).

Ship of the Line.jpg


In that turn I captured Australian city after city and made save files every time when one more city was captured. When the last Australian city was captured, the Australian leader was still there, but now all spying functions were blocked and no more Australian cities were shown in the spionage screen.

When I finished the turn of my civ, 11 minutes nothing happened. Than came a message, that Canada and Israel made peace. After two more minutes civs on my continent started to move (Brazils, Aztecs). 14 minutes after I ended the turn of my civ, now the Australian ship of the line started to move. The Australian ship moved two tiles into the black space on the map (the Bermuda triangle ?) and than suddenly the movement of the ship and the sound of the game stopped - and the game did freeze.

I attache a save file when the last Australian city was captured and the following freeze to that post (some more save files of that turn are still available if needed). It seems the houseboat bug now became even worse. In all former versions of that bug there was always a settler on the boat that started the freeze - now when playing your patch it seems, that this evil bug can even happen, without any settler on board of that ship.
 

Attachments

C3X Release 8 is up now. I never did give a thorough look at the trespassing prevention to see if the AI handles it properly. @Rômulo Prado did some tests with it and reported that he saw some strange behavior similar to the submarine bug, i.e. he saw the AI declaring war seemingly unintentionally by running its units into his around their border even though they had an ROP. That's odd and not something I would have guessed could happen, but there's a lot of code governing unit movement and I only understand bits and pieces of it. So trespassing prevention is still experimental, and if anyone does experiment with it I'd appreciate it if you report back.

About the next version, R9, I don't have any solid plans. The first thing I'm going to do is modify the production chooser function to show the point value of each buildable improvement so I/we can get a better idea of what the AI thinks of its options. For example the AI considers courthouses (or more specifically the "reduces corruption" improvement feature) to be worth two points per corrupt shield and corrupt commerce in the city. That should put a pretty high value on courthouses in corrupt cities based on my understanding of how much a point is worth, but maybe other things get valued even higher. We'll see.



Something probably easy, maybe has even been done before, but well. Every once in the while, the game gives you top 10 lists. 10 most powerful, 10 happiest, etc. It would be nice to have those screens available in for example, the F8 series of metrics.
Added to the list. I had a quick look at what this would entail and you're right that it's fundamentally easy. There's one function that assembles and displays the list. There's one little hitch in that which list you get is determined randomly inside that function, so to get a specific list I'd have to intercept its call to the RNG to make it non-random as needed. The hardest part would be adding new buttons to the F8 screen.
Interesting idea, and I'd like that, too. But I'm not sure the game stores that anywhere. I've never seen it in the save file. It may just be a hard-coded snapshot of current rankings.
The rankings are based on the game's current stats. Most of the stats are computed elsewhere and stored in the Leader object, except for the happiness which is tallied up just to produce the list. I don't know if those stats ever get stored into the save file, probably not, but some similar stats must get stored for the game to plot the demographics back to turn 1.



I attache a save file when the last Australian city was captured and the following freeze to that post (some more save files of that turn are still available if needed). It seems the houseboat bug now became even worse. In all former versions of that bug there was always a settler on the boat that started the freeze - now when playing your patch it seems, that this evil bug can even happen, without any settler on board of that ship.
I'll have a look at the save to see where it's crashing. Did you try with the unmodded EXE to verify that this freeze only happens when using C3X?
 
Last edited:
Flintlock,
Thanks again for the latest version! Another wonderful improvement on an already amazing EXE mod! Great job!

In my mod, there are units with the "King" flag (lower left hand corner when looking at the units tab in Quintillus' editor). This King flag is used to create units that can't be built normally in cities, but can be upgraded to from another unit.

Unfortunately, this causes these units to defend 'last' in a stack, even if their defense value is the highest in the stack, since "King" units are supposed to defend last in Regicide games.

This is another non-Regicide game mode request. Would you be able to allow units with the King flag to defend normally in a stack (i.e. highest defense value units will defend first when attacked) when Regicide mode is not selected?

Let me know if you think this is doable. Thanks again for everything!!!
 
@Civinator I had a look at that save. Australia does have a settler on a boat, see pic below. I noticed it when it moved during the interturn. You wouldn't have seen it if the houseboat bug triggered since in that case the game freezes before the unit can move at all. But I don't know why the bug is triggering for you, when I tried it everything worked as expected. With the C3X R8 EXE it made it to the next turn and with the unmodded EXE it froze during the AI's movement phase, as expected. Are you sure you had the mod configured to patch the houseboat bug?
australian_settler.png




This is another non-Regicide game mode request. Would you be able to allow units with the King flag to defend normally in a stack (i.e. highest defense value units will defend first when attacked) when Regicide mode is not selected?
Added to the list. That would probably not be too difficult to do, I've never looked at that portion of the code but I expect I could hone in on the relevant area by finding where the game checks the king flag then make a similar change as I did for the naming issue.
 
Is the ability to unload units from an army on the list?

In regular C3C one often needs to disband armies once better units for filling them become available. This can even lead to a situation where you avoid filling an army because waiting for cavalry is preferable to being stuck a something slower.
 
Is the ability to unload units from an army on the list?
This is already moddable via the Editor (sort of).

The simplest method would be to give Armies the 'Unload' unit-ability (like Galleys and Helicopters). The drawback is that units with the Unload flag cannot be loaded onto another Unloadable unit, so unloadable Armies would then not be able to board sea- and air-transport units (although they could still be Airliftable from Airfields or Airports). The unpatched AI would probably not understand how to use this (AFAIK, it does not currently/properly use 'land-transport' units in mods which have such units, such as EFZI).

Alternatively, allow Armies to be 'upgraded' (back) to the MGL (or, if that doesn't work in the Conquests Editor due to the addition of SGLs, a new 'Army-Leader' unit which has all the same flags as an MGL). Since the MGL/Army-Leader has a transport capacity of zero, the currently loaded units should be kicked out (to be upgraded or disbanded as the player chooses), and the MGL can then create a new empty Army. Since the upgrade would not be an Army per se, the Military Academy should not be required, but obviously a Barracks still would. The AI would almost certainly not understand how to use this.
 
The rankings are based on the game's current stats. Most of the stats are computed elsewhere and stored in the Leader object, except for the happiness which is tallied up just to produce the list. I don't know if those stats ever get stored into the save file, probably not, but some similar stats must get stored for the game to plot the demographics back to turn 1.

I believe the histogram/replay stats are stored in the HIST sections/object-data in the save, but I haven't got into decoding that info so far. Each city also has its founding date in its CITY data; I have no idea if that's duplicated in HIST or if/how the save tracks changes of ownership and city razing or abandoning.

"Alternate replay viewers" exist, although I'm not sure if any are up to date with Conquests. In any case, it has been figured out before, but a lot of that knowledge seems hidden and/or lost. Bummer.

FYI.
 
First, this is an amazing breakthrough for modding Civ 3, congratulations.

Second, besides the ability to unload an army already asked above, is there any plan or way to make different units upkeep different? I.E. a cavalry unit costing 2 of gold per turn, a infantry costing 1, a tank costing 5 per turn and so on, even if just for the human players?

Third, is there any way to make a "cap" for units, be it with conditions or simply arbitrary ones? Like you can't build more than 1 cavalry unit per horse resource, or you can't have more than one military unit per barracks or city, or a simple number were you can't build or spawn any more of those units? An example would be, I have a wonder that spawns an infantry unit called "warrior monk". If I set it to spawn one unit every two turn then after a while the map is flooded with them. Is there a plan to implement at least simple caps so I can make it spawn only 10 "warrior monks" and then stop spawning them unless one of them is killed/disbanded.

Fourthly, could it be possible to make a requirement for an unit to have an elite level? Example: I want to upgrade a musketeer unit to a royal bodyguard musketeer unit, is possible to make it so not only resources and/or gold but combat experience level is required for the upgrade, so only the musketeer units that have become elite can be upgraded?

Fifthly, you are awesome. Thanks.
 
Last edited:
Is the ability to unload units from an army on the list?
It is. I haven't looked into it yet so thanks to @tjs282 for the info. It sounds like the best thing to do would be to modify the engine so that armies can be loaded into other units even when they have the unload ability. Though I wonder why the developers disallowed that in the first place, it's possible unloading from a unit that's loaded into another will break or crash the game somehow. If that's the only issue I could disallow that specifically but there might be others.
First, this is an amazing breakthrough for modding Civ 3, congratulations.
Thanks!
Second, besides the ability to unload an army already asked above, is there any plan or way to make different units upkeep different?
...
I don't know how difficult it would be to make unit maintenance vary based on type. It depends on how the base code to compute unit maintenance is structured and I've never looked at that area so I can't say anything right off hand. The other things you mentioned should be easy enough. I've already found the function that determines if a given city can build a given unit type so modifying that to exclude unit types based on some criteria would be easy as long as the criteria aren't too complex. Similarly, I've found the function that determines whether each unit can perform a given action, so disallowing the upgrade action based on some criteria should not be a problem. I'll add all this stuff to the list but I don't know when I'll get around to it. What's blocking these kind of features is that the mod doesn't have a good way to load scenario-specific rules, right now it can only load a single config file with a very basic format. That's something I've been planning to change but I haven't gotten around to yet.
 
Another beautiful breakthrough. In order to "perfume" an improvement, do we need to enter the in game name of said improvement into the " " or is it the civilopedia entry? How many improvements can be "perfumed"? And is it possible to do the same with small wonders and wonders as well?
 
Suggestions for next patch:

  • They've managed to improve AI worker handling in PTW. It stopped irrigating green in despotism. This was reverted in Conquest. Of course the problem is then its core cities would lack irrigation later on because the AI does not go back and correct old terrain improvements to suit its current needs. On the other hand, it doesn't put enough priority on worker production that it'd be out of despotism long before the core tiles have been all mined on higher difficulties.

  • Naval behavior: This has been suggested before. I understand that naval coding is very complex. Is there really no way to copy paste vanilla/ptw codes?

  • Trait modification:

Civ traits are hardcoded to do things. Unfortunately, the case of Agricultural, it's hard coded to give the despot waterside food bonus. This alone makes the trait overpowered. There is simply no way to balance it. Taking away the cheaper improvements doesn't change the fact that it expands far faster than anything else.

Is there a way to prevent the AI from founding cities 1 tile away from the coast? It's esp detrimental to seafaring ones.

  • Airfield Terrain Improvement:
    The AI seems to not even know these exist.
 
Last edited:
Back
Top Bottom