Resource icon

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

In my current testgame of the upcoming German translation of the GOG version of C3C combined with the German translation of the Flintlock patch, Persia declared war on Germany. Among several stacks that are moving through India into German territory, there is an AI stack with 5 catapults (!) escorted by 5 spearmen. It seems, the patch for the AI landartillery routine is really working - and this is next to a miracle. :worship:

 
there is an AI stack with 5 catapults (!) escorted by 5 spearmen. It seems, the patch for the AI landartillery routine is really working - and this is next to a miracle.
Yes indeed, THAT is, to use your expression "Phantastic" :clap:
 
1. Is it possible to allow AI offense/defense strategy to use artillery bombardment occasionally, if they have this ability? Like, before attack against full health unit with 50% chance or if defensive unit has nothing else to do and there is enemy nearby.
2. Thinking of stealth attack single unit in stack fix, I was thinking about actually using that bug to make special type units, like if offensive units can be attacked in stack by other offensive units even if guarded, so you cannot have more than 1 of them per tile which can help against sod, but the question is, will AI understand when he can attack such unit or if he puts his unit in danger, so will it try to spread them out into several guarded tiles if available?
Thank you.
 
A couple of points.

1) I noticed that when I move a group of units with differing MP left, it goes to the maximum distance of the unit with the lowest MP. Then the others have no MP left.

2) When achieving a technology, there is often unused science points. Would it be possible to roll over unused points to the new technology?
 
2) When achieving a technology, there is often unused science points. Would it be possible to roll over unused points to the new technology?

Similarily shields could be rolled over to either the next project or wealth as a fallback solution.

Edit: Wealth might be a bad idea as it is calculaeted at a different point in time.
 
ı stick to rejecting anything short of Civ III Plus , but isn't that common that you move a warrior in stack with the horseman and if you choose the horseman , the stack will follow the warrior , and if you choose the warrior before ordering the stack to go , the horseman will still move after ghe warrior stops ?
 
Not sure what civ III Plus is, but I was mostly referring to naval units. Typically, even if they all have the same movement, if I attack with one unit in the stack and then try to move the stack as a whole, it will more the distance the unit that attacked can and then the rest of the stack will have zero movement remaining, even if they should have had one or more movement points left.
 
1. Is it possible to allow AI offense/defense strategy to use artillery bombardment occasionally, if they have this ability?
Modifying the offensive AI to mix in bombardment with its normal behavior would be tricky, in general modifying the middle of a block of code is difficult while inserting something before or after the block is easy. Like it should be easy to have defensive units run their normal routine then afterwards bombard any nearby targets if they can.
will AI understand when he can attack such unit or if he puts his unit in danger, so will it try to spread them out into several guarded tiles if available?
I highly doubt it, I haven't seen anything like that in the code, and in general the Civ 3 AI just isn't that clever. Internally the unit AI does little to no analysis or planning, it just performs basic reactions to its surroundings.
1) I noticed that when I move a group of units with differing MP left, it goes to the maximum distance of the unit with the lowest MP. Then the others have no MP left.
This would be difficult because there's no way for a unit to skip its turn without discarding the rest of its moves, which is presumably why Firaxis made group movement work that way in the first place. Even if the faster units didn't lose their extra moves, what would you have them do instead? Asking for new orders would probably overwrite the group move. A better option would be to fortify them, but then you'd have to remember somehow that they're only temporarily fortified, and store that info into the save file, and make sure to delete it in case the unit gets killed, etc., all that would be quite a lot of work.
2) When achieving a technology, there is often unused science points. Would it be possible to roll over unused points to the new technology?
I haven't looked into this kind of thing so I can't say much but I doubt it would be too hard.
 
First, wanted to say thanks for this mod. Played a game on Monarch and a game on Emperor on it. Overall a much improved experience, both UI and AI-wise

The AI went a little crazy with the artillery - in both games I captured over 100 pieces, so I may tone down that setting in the config somewhat.

I noticed the Hittites created a tank army in one game and used it to wipe out the Chinese, but it had disappeared inexplicably (e.g. not lost in battle or over unit cap by the time we went to war a few turns later). In the other game they created a one guerilla army. I think this was because they didn't have rubber and it was the strongest unit they could produce, but they also didn't have enough guerillas, so cavalry would have been the better option.

Question: if I comment out the lines in the config file related to AI behavior, but leaving in the ones for bug fixes, would I be able to use this mod in GOTM/HOF play? Probably they are the people to ask directly, but wanted to see if anyone here had experience with that. Really don't want to go back to irrigating and negotiating the old carpal tunnel way.
 
Glad to hear you're enjoying the mod, and yeah, the default ratio for AI artillery production errs on the side of too many rather than too few. I think the ratio is okay for the late game but in the ancient & medieval eras the AI does invest too many shields in artillery stacks that would be better spent on swordsmen, knights, etc. I added the "artillery value damage percent" to try to compensate for that but it should probably be set lower than it is.
I noticed the Hittites created a tank army in one game and used it to wipe out the Chinese, but it had disappeared inexplicably (e.g. not lost in battle or over unit cap by the time we went to war a few turns later). In the other game they created a one guerilla army.
I have no idea why their army would disappear, hopefully C3X didn't cause that. About the guerilla army, the mod doesn't significantly change the logic the AI uses for the first unit added to an army, the biggest change to the army inclusion logic fixes a bug that was preventing the AI from adding subsequent units. I've never looked into how the AI decides what unit to add first to an army, but from what I've seen it usually (3 out of 4 times or so) does a good job of it.
Question: if I comment out the lines in the config file related to AI behavior, but leaving in the ones for bug fixes, would I be able to use this mod in GOTM/HOF play?
I don't know what the GOTM guys would allow, but be aware that commenting out lines from the config file won't necessarily disable features. The way it works is that a modded executable starts with a hardcoded base config, whose values are all set to the defaults from the INI, then when it's launched it overrides those values with the ones it reads from the INI. So commenting out a line is like leaving it unmodified. To disable a mod feature, set its config value to 0 or false. I have it set up so that 0/false always corresponds to unmodded game behavior.
 
There is the special upgrade path of the dutch where their UU replaces the Pikemen but the Musketmen is upgraded to the UU. This makes sense for the human player as both units have defence 4, but the Musket costs twice as many shields.

However, AI may be dumb enough to upgrade a Musket to the UU. This will thereby decrease the value of the unit and it will make the later upgrade to Riflemen more expensive. Can the AI be fixed to not make the upgrade to a lesser unit?
 
Can the AI be fixed to not make the upgrade to a lesser unit?
I haven't yet looked at, or even found, the AI upgrade logic but I expect it would be easy to find it and make that change. The only catch I can think of is that the Dutch UU isn't completely inferior to the musketman since it has the ability to trigger a golden age. So the AI shouldn't avoid that upgrade entirely until it's had its GA, before then it should do it only up to some limit. Figuring out that limit and applying it might be tricky.
1. Is it possible to add multiple levels of Irrigation, so that Bronze Age irrigationdoesn't remain the norm through the present?
2. Likewise Road movement, and for equivalent reasons?
I was thinking about this recently because I was looking at the code for the map renderer (I'll show why soon) and noticed that it would be very easy to modify it to draw different kinds of roads. In general for adding new tile improvments the easy parts would be drawing them and implementing their effects, e.g. I've already modified the movement code to limit railroad movement and making fast roads work would be similar but easier. The difficult parts would be saving the locations of the new improvements into the save file and enabling workers to build them. In particular making automated or AI controlled workers know to build the new improvements might be very difficult.
 
Is it possible to add multiple levels of Irrigation, so that Bronze Age irrigation doesn't remain the norm through the present?
That's essentially already represented by:
(1) changing to a more advanced government (no more despot-penalised food-production on Grassland or food-bonus tiles) towards the end of the Ancient Age
(2) railing an already-irrigated tile (adds +1 food) at the beginning of the Industrial Age.

I've basically come to regard Civ3 rails as a visual representation of the "industrialisation" process. And with rail-movement already nerfable in the patch, I don't think it's worth trying to add additional/intermediate Worker-jobs à la Civ IV. Might as well just play Civ IV... ;)

How do AI Workers "recognize" that a Road "should" be upraded to a RR?
I think the short and flippant answer is "Because it's there!"

AI-Workers run the same terrain-improvement routines as are applied when the human player automates their Workers. Based on my observations of what my late-game automated Workers do (the return on effort invested into Worker-shuffling around low-priority/corrupt towns is very low, so if I control my landmass by that point, I'll generally just set them going and leave them to it!), the AI will generally prioritise Roads, then Irrigation (food), then Mining (shields), then Rails.

They do recognise which tiles are more "valuable" (in terms of total yields), and will therefore prioritise those tiles accordingly (but rarely/never assigning >2 Workers on any given tile). But they will (eventually) build Roads, and then later on Rails, on all BFC-tiles.
Spoiler Other rules...? :
For tiles with immediate access to freshwater (whether via adjacency to a river or lake, or via Irrigation serving a neighbouring town), the AI will also irrigate all Floodplains, Plains, and Desert, and about 50% of the Grassland tiles.

For tiles which do not have immediate access to freshwater, and prior to learning Electricity, the AI will mine 100% of Grass and Plains, and will not change this unless the tile is pillaged.

(IIRC, the Vanilla + PTW AI would alter its terrain improvements, but the Conquests AI was changed to use the "Automate, keeping existing improvements" routine).

And they will chop Forests (regardless of whether that helps with the nearest town's current build) before clearing Jungle and Marsh, and later plant Forests on all Tundra, but rarely if ever on Grass + Plains (presumably because Irrigation or Mining give higher raw-yields).
In the late game, if the nearest town already harvests sufficient food to grow (at least +2 food net), building Roads and Rails on pillaged/unimproved tiles will happen before any other improvement is added.
 
I haven't yet looked at, or even found, the AI upgrade logic but I expect it would be easy to find it and make that change. The only catch I can think of is that the Dutch UU isn't completely inferior to the musketman since it has the ability to trigger a golden age. So the AI shouldn't avoid that upgrade entirely until it's had its GA, before then it should do it only up to some limit. Figuring out that limit and applying it might be tricky.

Agreed this would be tricky. I also agree there are special cases where you would actually want the AI to upgrade to a "lesser" unit if they have certain abilities. For instance, in ToC, the Militia unit is an alternate form of Plodders (worker unit). There may be a situation where upgrading from a militia to a Plodders would be useful, if there is more need for terrain improvements than defense of your towns (i.e. during peace time).
 
That's essentially already represented by:
(1) changing to a more advanced government (no more despot-penalised food-production on Grassland or food-bonus tiles) towards the end of the Ancient Age
(2) railing an already-irrigated tile (adds +1 food) at the beginning of the Industrial Age. I've basically come to regard Civ3 rails as a visual representation of the "industrialisation" process..

Significant improvements in pre-industrial agriculture include:
  • Basic organization of workers into classes: "peasants" (of widely different sorts), serfs, and slaves (the first recorded mention of which is in Hammurabi's famous "Code.")This would also have extended troughout the entire society into into various sorts of efficiencies/hierarchies: Hammurabi mentions Slaves, "Regular People," and "Superior People," and his Code was written ca. 1,750 BCE. "Agriculture" itself began about 9,000 BCE.
  • Watermills were introduced by the Romans, and were used to grind grains into flour.
  • In the Middle Ages, three field crop rotation. Crop yields then peaked in the 13th century, and stayed more or less steady until the 18th century.
Industrialized agriculture began with the The "British," or "Second Agricultural Revolution," which was fueled by a scientific understanding of natural fertilizers (sodium nitrate; phosphorus; potash) and the ability to import these, globally. Combined with all of the new-fangled machinery of the time, the British population increased from about 11 million in 1800 CE to about 37 million in 1900 CE.

I'll leave the 20th Century to your own, well- informed imagination ;)

Might as well just play Civ IV... ;) .

HERETIC! :nono:

- Also, the AI worker rules you mention are well-documented and understood. But perhaps I am out of date with Flintlock's RR work: I thought that the RR movement limit is set in the .ini file ... ?

That being said, Roman roads (which were, themselves, a massive improvement over all which preceded for thousands of years) lasted in use until the 18th Century (Trivia: the British RR gauge was quite understandably based upon the standard distance between the wheels of a horse drawn coach-and carriage - which were, themselves, based upon the centuries well-worn ruts, in Roman roads, worn in by the standardized distance between Roman chariot wheels.) But then came along (let'sleap forward in time a bit) to the first paved roads for autombiles, to the Autobahn. And, indeed, the changes from the first commercial RRs to the TGV might also be taken into account.

So - lapsing into Latin - Q.E.D.

;)
 
A curiosity, then, about the code which you might have uncovered: How do AI Workers "recognize" that a Road "should" be upraded to a RR?
I don't know exactly, it's pretty complicated. I've looked into it somewhat and one big problem I can see immediately is that the number of worker jobs and unit states is hard-coded. For example there's a function that's responsible for controlling AI units with the terraformer strategy. It decides if a worker is going to be assigned to building roads, clearing pollution, improving some city, etc. (it's also responsible for making the worker flee from danger, moving it where it's needed, and joining it into a city if it has nothing to do). The job of determining what to actually build on a tile around some city is delegated to another function which communicates its decision by returning one item from the enum of possible unit states, and the controller then puts the worker in that state. Adding a new unit state is probably not possible. I could work around this specific communication problem with a global variable but I expect there are many more problems like it.
Agreed this would be tricky. I also agree there are special cases where you would actually want the AI to upgrade to a "lesser" unit if they have certain abilities. For instance, in ToC, the Militia unit is an alternate form of Plodders (worker unit). There may be a situation where upgrading from a militia to a Plodders would be useful, if there is more need for terrain improvements than defense of your towns (i.e. during peace time).
If I were to do this I would make sure the AI is only stopped from upgrading when the new unit is totally, unambiguously inferior to the old one, with the exception of triggering golden ages. Also, how does the current AI manage militia and plodders? Does it ever keep militia units around? AFAIK the AI will always upgrade a unit if it can.
 
If I were to do this I would make sure the AI is only stopped from upgrading when the new unit is totally, unambiguously inferior to the old one, with the exception of triggering golden ages. Also, how does the current AI manage militia and plodders? Does it ever keep militia units around? AFAIK the AI will always upgrade a unit if it can.

I played around with situation based scenarios to allow the AI to use both Plodders and Militia. Plodders are available at the start of the game, and Militia are only available after researching a unique tech.

This, the AI will always produce Plodders at the start of the game as their 'worker' units. Once the tech/resource required for Militia is attained, the AI will indeed upgrade any chance it gets. However, since Plodders can only upgrade in cities with Barracks (or Arms Camp), and since the upgrade costs 5 gold (AI doesn't always have money dependent on how they spend it), not all Plodders are upgraded to Militia. There will be a mix of both. Militia also have ability to work the terrain (although at a slower pace). Thus, any upgrades to militia will not entirely stagnate the Osiri, as I've seen them use Militia to irrigate/chop/etc.

Later, when the AI gains access to Oerza Crystals, they can upgrade Militia back to Plodders. Obviously, they don't "think" but just upgrade whenever they have a chance. Again, they obv need to do so in a city with a Barracks, so some Militia will never get upgraded due to Barracks unavailability, or because the militia is already engaged in warfare of improveming terrain (so it never makes its way back to a city for upgrade). Again, I usually end up seeing both types of "alternate" forms at different stages of the game when I run simulations with the AI, which is great!
 
Top Bottom