Resource icon

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

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.

This can be edited in the scenario editor, just check workers as "build often" for every civ. If the EXE mod increases workers being built, it would mean that checking this flag in the editor can cause an overabundance of workers that might break AI game balance. Just a thought. :).
 
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.

Flintlock, thank you very much for pointing me to that thread.:)

Such a movement function for naval units would be great for scenarios on fixed maps. Per example the secret for those mighty invasions in the WWII scenario SOE from Europe to Britain (and vice versa) is a land bridge from Dover to Calais (and the Isle of Wight to Cherbourg). At present, if a ship wants to pass the channel, it must move through the city of Dover or Calais. With such a working setting as Antal1987 described it, those ships can move into the Channel without moving through one of those cities.
Spoiler :

landbridges-britain-france-jpg.459650


landbridges2-jpg.459652
 
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?
Swapping out the AI's production choices is easy but making detailed changes to how it chooses its production is not. In other words, I could insert some code to swap its city production to workers but I wouldn't know how to make it value workers higher compared to its other options when deciding what to build in the first place. This is something I ought to look into but I have been avoiding it since the AI production chooser function is such a pain to work with. The "build often" flag is a good mention, I forgot it existed and could probably learn a lot by looking into how that function treats it.

On a related note, improving the AI's naval invasions might be as simple as encouraging it to build many more ships including transports, like if the AI is alone on an island it should build enough transport capacity to carry the majority of its land forces. I've noticed that in the late game the AI often lands multiple transports worth of units at the same time & on the same tile, which is good, it's just that it never lands nearly enough. This might be like with artillery and armies where the AI had competent behavior programmed in that it never got the chance to use.
Such a movement function for naval units would be great for scenarios on fixed maps.
Alright I'll add it to the list. I wonder what this feature should be called. Micro-canals? Land/sea intersections?
 
Swapping out the AI's production choices is easy but making detailed changes to how it chooses its production is not. In other words, I could insert some code to swap its city production to workers but I wouldn't know how to make it value workers higher compared to its other options when deciding what to build in the first place. This is something I ought to look into but I have been avoiding it since the AI production chooser function is such a pain to work with. The "build often" flag is a good mention, I forgot it existed and could probably learn a lot by looking into how that function treats it.

On a related note, improving the AI's naval invasions might be as simple as encouraging it to build many more ships including transports, like if the AI is alone on an island it should build enough transport capacity to carry the majority of its land forces. I've noticed that in the late game the AI often lands multiple transports worth of units at the same time & on the same tile, which is good, it's just that it never lands nearly enough. This might be like with artillery and armies where the AI had competent behavior programmed in that it never got the chance to use.

AI worker production: Only a point to reflect about AI worker production: With the current settings of C3C the problem of AI worker production can be solved not by multiplying the production of workers, but by strictly limiting the production of workers. Per example in the CCM mod, workers until the late phases of a game can only be gained by autoproduction or by enslaving. This makes the decision of the human player what to do with those limited workers even much tougher and more interesting and also levels the number of workers between the human player and the AI civs.

Amphibious operations: I think the main problem is, that the AI fills the naval transporters mostly with much too less troops.If amphibious operations should be successful, the attacker needs a much larger number of units than the defender or a very big difference in the quality of units.

Alright I'll add it to the list. I wonder what this feature should be called. Micro-canals? Land/sea intersections?[/QUOTE]

This is great, as it can be a very good work-around for massive amphibious invasions on preset maps of scenarios. I think your name suggestion 'Land/sea intersections' is much better than my former suggestion 'Naval Choke Points' or 'Ferry Terrain'. :)
 
This can be edited in the scenario editor, just check workers as "build often" for every civ. If the EXE mod increases workers being built, it would mean that checking this flag in the editor can cause an overabundance of workers that might break AI game balance. Just a thought. :).

(previous comment struck)

If you scroll down to about the 8th post in this thread, you'll significant evidence that "Build Often / Never" has about 0% effect on units ... However, the highly regarded modder Rob (R8XFT) wrote: "When testing the Anno Domini mod, I had the "build often" flag checked for offensive land units for militaristic civs. The map was overrun with units until I later unchecked it, when a more sensible number of units were built by the AI."

- So, welcome to the world of Civ3 modding! :crazyeye:

Beyond that, choosing more than 3 (perhaps 4) "Often/Never" choices, overall, will simply overwhelm the AI, and it will simply ignore you selections.
 
Last edited:
Swapping out the AI's production choices is easy but making detailed changes to how it chooses its production is not.

Quite a bit of what can genuinely be called research (consistent methodology, etc.) went into how this can be manipulated for unit builds, via Unit values in the .biq:

The Big Question - How Does The AI Choose Which Units To Build? | CivFanatics Forums
The BIG Q Continued - AI Flag Choices For Building Units | CivFanatics Forums

I've also been (figuratively) tearing my hair out, trying to find tom2050s extensive investigation about how "Unit Abilities" further affects the AI's builds - perhaps @Civinator might still have the link? - @Takhisis? @DJ Bonebraker? (you two are the only other participants in the second thread who are, "Still around.")
 
Amphibious operations: I think the main problem is, that the AI fills the naval transporters mostly with much too less troops. If amphibious operations should be successful, the attacker needs a much larger number of units than the defender or a very big difference in the quality of units.
A couple of weeks ago I was playing a normal archipelago game where I watched one AI (Zulu) invade another (Germany) with 6 transports full of units, including 2 armies, landed over 2 turns. That kind of thing makes me think the AI isn't that bad at naval invasions, and if only it had 10 - 15 transports it could have landed a force capable of taking and holding a few cities. (In that case the invasion failed because Germany brought a stack of 20 artillery to bombard the invaders and one of the armies was full of cavalry and died attacking a mech infantry.) I've noticed all of the examples of semi-competent AI naval invasions I've seen have been in the modern era. I guess this is because the AI has an easier time filling its transports when it has railroads.
Quite a bit of what can genuinely be called research (consistent methodology, etc.) went into how this can be manipulated for unit builds, via Unit values in the .biq:
The Big Question - How Does The AI Choose Which Units To Build? | CivFanatics Forums
The BIG Q Continued - AI Flag Choices For Building Units | CivFanatics Forums
The AI production rules are so complicated, way more complicated than they have any right to be considering the quality of their output. I'm going to start with something simple, like a build often effect for individual units and buildings. For buildings my plan is to look into how culture is factored into the AI's decision and try to put my finger on the scale there, for example the mod could allow each building type to have a "phantom" culture amount that applies only when the AI is deciding what to build. According to Predator145 (here: https://forums.civfanatics.com/threads/using-culture-to-influence-ai-improvement-build.670397/) the AI can be enticed to build improvements by giving them more culture yield. For units I don't know what I'll do, maybe there's something analogous for them, or maybe not because of all the intertwined rules regarding unit production.
... Moving right along - It's been awhile, but, last I checked, there were serious issues with escorting/escorted ships -
I remember a few months ago in this thread someone mentioned that AI ships on escort duty won't attack anything around them and suggested it would be better if they could. Is that what you're thinking of? Making that change would probably be difficult. I haven't looked closely at the ship AI but it's unfortunately much more complex than e.g. the artillery AI.
 
Wow, that's amazing.

It strikes me that a whole bunch of previously successful recommended strategies for Civ3 are in the process of getting utterly junked as a result of this patch. And also that the higher diffs (Emp+?) are going to get a whole lot harder to win on.

Which is also awesome.

I also wonder if anyone has alerted the Civ3 GOTM crowd? They might need to add a specification to their rule-lists (and/or remind their regulars) to disable this patch for all future GOTMs...
 
I just dealt with the pictured stack (and 2 more on a different front with the Hobbits) just to find another stack behind it. These hobbits have come with more arty than I started the war with!
 
*looks up from cursed DOS-based game*

Yes? What do you need?

... Aside from helping you find a specialist in "Doom Therapy Addiction?"

Last I checked :cowboy:* the "Escort"/"Requires Escort" flags didn't "synch" properly, causing ships to main in port, for, oh, say, as long as a "Doom" addiction. :D

* A random emoji, in an undoubtedly fruitless attempt at, "DOSDOOMADDICTION" therapy
 
It was me who pointed out the C3C AI wasting its combat fleet being punching bag escorts for transports. It didn't do that in Vanilla and PtW. Simply reverting back to pre C3C behavior should do the trick. Unescorted AI Deity transports will manage to get through because their combat fleet outnumbers the human one at least 2:1. In Vanilla and PtW, that fleet was busy bombarding both cities and terrain improvements. In C3C my 6 frigates were able to wage naval war vs 2 Deity AIs.
 
It was me who pointed out the C3C AI wasting its combat fleet being punching bag escorts for transports. It didn't do that in Vanilla and PtW. Simply reverting back to pre C3C behavior should do the trick. Unescorted AI Deity transports will manage to get through because their combat fleet outnumbers the human one at least 2:1. In Vanilla and PtW, that fleet was busy bombarding both cities and terrain improvements. In C3C my 6 frigates were able to wage naval war vs 2 Deity AIs.
Ah-hah! TY - That's what I'd forgotten.
 
Progress update: I'll post a new version of C3X in a week or two. It won't have any really big features, just various small things I've been working on casually over the past two months, including many things suggested recently. The biggest new feature is the ability to issue stack fortify, upgrade, and disband commands like the existing stack worker commands. I didn't bother making a gif since it's self explanatory. Recently I implemented the option to disallow trespassing but I haven't yet watched the AI play to see if it can deal with having trespassing disallowed.

Also recently, over the past few days, I've been decoding the AI production chooser function, specifically the part that evaluates the available city improvements. My original idea was to give some buildings additional culture that only applied during that evaluation but I discovered a better option. The evaluation gives each available improvement a point value based on its abilities, culture, etc. Adding culture is not ideal since culture is not directly translated into points but a different part of the evaluation is [**] so I modified that instead. Now I can insert any code I want to add to the AI's valuation of any given improvement. As a proof of concept I added a worthless improvement:

worthless_building.png


Normally the AI would never build this but if I add 1000 points to its value then the AI builds it whenever it can:

ai_digging_holes.png


[**] More specifically, I was looking for a location where some function gets called and its return value is added to the running point total. This occurs several times but most simply in the part of the chooser that checks if the improvement has the +1 commerce per tile wonder effect. In this case, the chooser first calls a function to check if the improvement has this effect then if it does it calls another function to get the city's population count and adds the count to the point total. I replaced both function calls with calls to custom functions, the first just returns true every time so the second is always run. The second replacement then returns (pop count if the improvement has the effect or otherwise zero) + (whatever extra points I want to be added).
 
It occurred to me the other night, that since there is no in-game way to see which tiles have already been shield-chopped, a(nother) potentially useful feature for C3X, might be an in-game pop-up for the 'Plant Forest' command, to notify the player when a tile has already been de-Forested ("This tile will not provide bonus-shields. Proceed with Forestation Y/N?")

The information is certainly available in the .sav file: CivAssist II provides the "Bonus shields still available?" information as an optional overlay in its World Map view — or, when selecting any individual Forest-able tile in the map-view, this is noted in the tile-description below the map. But (1) opening or updating the CAII map-view while the game is also running, always takes a long time (at least on my machines; CAII also doesn't always play well with modded terrain-graphics); and (2) those (Win10) players who can no longer run CAII, don't have any access to this information.

Especially in (semi-)corrupt areas, and/or in the late game, I freqently want/ need to assign Worker-stacks to plant-and-chop Forests, to speed up builds (or at least to reduce the cash-rushing price). But if a tile has already been harvested, I might as well just set my Workers to mining — or more likely irrigating — that tile instead. So how difficult (or desirable, for all you other Civvers?) would it be to (locate the tile-chop info in the .sav file and) implement this?

If it can be done, it would obviously also be preferable to tie it into the stacked-Worker commands, so that planting a non-choppable Forest didn't have to be confirmed for each Worker — since there are still going to be times when it might be preferable to Forest an already-chopped tile anyway (e.g. along borders to slow down incoming forces, or to help mitigate the effects of Global Warming).
 
It was me who pointed out the C3C AI wasting its combat fleet being punching bag escorts for transports. It didn't do that in Vanilla and PtW. Simply reverting back to pre C3C behavior should do the trick.
Added to the list. Reverting to pre-Conquests behavior is hopefully only a small modification but the problem is finding where & what to modify. The naval AI is made up of several long (500-1000 line) functions so it's no easy task to find out what's responsible for that behavior. That's unlike e.g. the broken army inclusion criteria which was only about 20 lines so the buggy movement check was obvious.
Especially in (semi-)corrupt areas, and/or in the late game, I freqently want/ need to assign Worker-stacks to plant-and-chop Forests, to speed up builds (or at least to reduce the cash-rushing price). But if a tile has already been harvested, I might as well just set my Workers to mining — or more likely irrigating — that tile instead. So how difficult (or desirable, for all you other Civvers?) would it be to (locate the tile-chop info in the .sav file and) implement this?
I expect it would be easy to find where this bit of info is stored in the game's memory. Antal already decoded most of the layout of the Tile object but unfortunately not this bit. I think the best place to display this info would be in the tile info box. The problems with using a popup are that it requires the player to have a unit on the tile to get the info, requires more work to implement, and is a potential annoyance (the game has too many popups already IMO). Another option would be to add the info to the tooltip for the plant forest button but again you'd need a unit on the tile to see it and it doesn't mesh well with the stack worker commands since holding the control key prevents the button tooltips from appearing. Also when I'm modifying the tile info box I could add the tile coordinates there too as Romulo requested.
 
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.
 
Back
Top Bottom