Resource icon

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

I have two requests:
1. allow road/railroad usage if hostile territory if there is a fortified unit on that tile.
2. make the stacked buttons work in multiplayer. i nearly only play civ3 in MP with friends
 
A few suggestions and ideas for next patch.

-The option to get PTW style targeting with checking the "Charm" Special Order in the editor. With lots of flavor unit, adding them to the configuration patch is a long and brutal task as errors do not inform you where except for the line number.

-Charm bombard being applicable to cruise missile ability units. That's the only place where it's not overpowered.

-PTW naval AI behavior. I know this is tough. But look how far you've come. I did not expect PTW style artillery to be doable. But here we are.

-Tactical Nuke and Cruise Missile AI strats are still broken. They both need to behave like artillery strat. Right now one can solve it by having these units upgrade to a king ability version with the artillery strat flag.

-Option to disable the king unit being targeted last function.

-Stealth Bombard is something the AI uses well. This has been a resounding success. But it requires line of sight. The AI is bad at that. Having units with radar ability that it can use as bombard spotters helps. It doesn't seem like it flies recon missions with aircrafts at all. I'm not sure if air transport strat units fly recon. The AI never suicide airdrop on occupied tiles. But it is because it performs recon or cheats?

Thank you for your great work and happy new year!
 
So many questions…

1. What happens when cruise misssiles have charm bombard?

2. What did the AI Navies do back in the PTW days?

3. How does the Ai use nukes and missiles when they have King and Arty, abilities and strats?
 
So many questions…

1. What happens when cruise misssiles have charm bombard?

2. What did the AI Navies do back in the PTW days?

3. How does the Ai use nukes and missiles when they have King and Arty, abilities and strats?

1. They would die after bombarding. Charm bombard halves the defense stat of the entire stack. It's the best counter to stacks of doom. You can only half it once though. I forgot if you can still bombard again after that but it'd be to zero effect regardless of hits. If that's true the AI would still be wasting its charm weapons compared to the human player.

2. PTW sea bombard AI strat units would not be tied to escorting transport and carrier ships. C3C AI warships will become harmless punching bags once they escort. They will never bombard or attack. A couple of your own bombarding ships would be able to hold a huge AI navy at bay. In PTW, those ships would be out hunting your navy and bombarding your cities/coastal improvements. Your navy hiding shall be redlined, your coastal tiles cratered and your improvements +pop slowly chipped away.

3. Here's how you get the AI to properly use Tactical Nukes and Cruise Missiles: Give these units an identical version with the king ability and artillery AI strat to upgrade to (King units can't be built). That means the AI will still build the Tactical Nukes and Cruise Missiles as nukes and CM instead of artillery, but will upgrade them and use them like artillery in flintlock patch. Works best with barracks perfumed.
 
Hi Flintlock! I'm not sure if anyone has ever brought this up, but do you think it would be easy to have an option to get rid of Civ unit easter eggs for units with the "king" flag?

- Example:. King units will become undead zombies/Elvis on Halloween and Elvis's birthday respectively, and this happens on other holidays too I believe. This is especially painful for Tides of Crimson (and I'm sure other mods) since King units are often used to allow non-buildable upgrade units, making it hard to tell which unit is which (i.e. on Elvis' birthday all these units become Elvis).

More info on this thread:
 
Thank you for your great work and happy new year!
Hello again and happy new year to all of you. I've had C3X and Civ in general on the back burner for the past few weeks during the holidays. There is one thing I did though, something I've been wanting to do for a while, and that's run the game with a performance profiler attached to see if it's possible to improve turn times at all. This is a big enough topic that I think it deserves its own thread, and I'll post one soon-ish. But to make a long story short, it actually is possible to further optimize the game, to my surprise. In one case I was able to reduce the turn time very significantly, from ~6 min to 1 min 12 sec, with a relatively simple edit to the code. I don't know how widely applicable that optimization will be, but I'd guess not very. Anyway I'll post all the details soon.



I have two requests:
1. allow road/railroad usage if hostile territory if there is a fortified unit on that tile.
2. make the stacked buttons work in multiplayer. i nearly only play civ3 in MP with friends
That's an interesting idea about letting fortified units unlock access to enemy roads. I imagine it would be extremely powerful when used against the AI. It should be relatively easy to implement, if I ever get around to it. In my experience the movement code is some of the most malleable game logic. About multiplayer, I've had that in the back of my mind for a while now. Since I originally implemented the stack unit actions, I've learned enough about the game code that I now think I could make them work in MP as well. It's good to request things like this since I'm more likely to work on things that I know people actually care about.
A few suggestions and ideas for next patch.
- It would be relatively easy to make the charm flag control PTW-style targeting in addition to the list. That would need to be disabled by default to avoid interfering with mods that use charm for its normal effect. Since it's a small thing, I'll add this to the short list for the next version. By the way, if you have any suggestions for improving error messages, I'd like to hear them. The messages show misspelled unit type names, but for grammatical errors like mismatched quotation marks it's hard to know what to show that would be useful.
- Enabling charm attack via cruise missiles shouldn't be too hard, although after looking at the code to perform cruise missile strikes, I don't immediately see an easy way to modify it to do that.
- The problem with restoring PTW naval behavior is that it might not be present in the program any more. Restoring PTW artillery targeting turned out to be easy because of how the code is structured. (Basically, there's a separate method to damage a city by bombardment and the normal bombard method prioritizes damaging units. So to restore PTW-like targeting the mod only needs to insert a bit of code during bombardment that checks for a city on the target tile and if present rolls a die to call either the city-damaging method or the normal one.) One easy thing I could to do free up naval units from being trapped in escort mode is reduce the escort requirement for naval transports. Right now it's 1-3 units but I could make it always be 1. That might backfire, though, since the units freed from escort duty could wander off and leave the transports vulnerable.
- I could easily replace the cruise missile & tactical nuke AI routines with the artillery routine. Would that improve AI behavior in all cases? Is there any reason not to do that?
- As far as I know the AI never does recon missions. Where a human player would do a recon mission the AI cheats instead. I might be able to make the AI recon a tile before bombing it with a unit capable of stealth attack bombard, but maybe not since the unit AI just isn't set up to coordinate anything.
Hi Flintlock! I'm not sure if anyone has ever brought this up, but do you think it would be easy to have an option to get rid of Civ unit easter eggs for units with the "king" flag?
I'll look into this and the matter of king units defending last for the next version. I expect removing the Easter egg will be easy, not sure about changing the defense priorities.
 
Having the option to have PTW style targeting by ticking charm in the editor is gonna be much appreciated. I can't imagine the time and frustration it would take to manually type in my million artillery and naval units.

The problem with the error message is while it says which line the error is on, there's no knowing exactly what doesn't compute. By now I know it's mostly my perfume list. But back then if the message tells me there's an error on line 123 I'd have to scan row by row by hand. If the message shows exactly what doesn't make sense one could easily Ctrl+F.

PTW AI navies are still more likely to land despite unescorted transports due to their fleet suppressing the player's. The AI would literally have 3 times more naval power. The units freed would be bombarding the player's cities, damaging the ships hiding there or fight them in the open. Having escorts would work somewhat well if there are purely defensive ships like spearmen. But warships are all offensive units with bombard. Being turned into an escort is a huge waste for the AI.

The AI cruise missile and tactical nuke strat are broken just like the artillery one before you fixed it. These units will never leave their original cities. By changing them to artillery routine the AI would escort and leave the city instead of being a waste of shields.

There's also the AI's inhibition about nuclear weapons. It is the AI strat that determines that, not the unit ability. The AI will not use "Tactical Nuke" and "IBCM" strat units unless you've hit them with a Nuclear Weapon Ability unit (not a unit flagged with the 2 above). Now if you manage to preserve the same inhibition coding that Tactical Nuke and IBCM AI strat flags have then the AI shall retain its restraint. But if the artillery routine completely replaces them expect all out nuclear war every time the AI has access to them.

Tactical nukes being loaded into subs may not work as well. But in stock game unless the tactical nuke happens to be built in a coastal city it'd never be able to get to the sub. Then again, if you manage to retain some of the traits of the tactical nuke AI strat the AI may escort it like artillery for land use but load it unescorted into a sub.

For now I'm looking to mod tactical nuclear weapons into non nuclear options. After all, they're not supposed to have the same yield and destruction of a strategic one. Nor should they sever all infrastructure, pollute and radiate friendly troops in neighboring with the enemy. I was looking into charm cruise missiles but charm doesn't work on sea units. For now what I do is make them a non lethal bombard 10 ROF high bombard value cruise missile. The AI gets some auto produced to make up for their unintelligent use. This gives the AI an answer to human armies and heavily fortified positions. Makes for some Fulda Gap like fighting.

There are no drawbacks to fixing Cruise Missile Artillery Strat. Cruise Missiles are also a great solution to the artillery SODs not being able to take ground due to offensive units not combining soon enough. Cruise Missiles can finish off redlined defenders, die and thus free their escorts to capture cities. Speaking of artillery SODs, the AI escorts always pillage the tile they're on. This could result in the entire wheeled artillery SOD being trapped if it's wheeled inaccessible terrain having its roads pillaged.

Overall, having the option of Tactical Nukes and Cruise Missile Strat units being used like Artillery AI strat units would make them relevant in the hands of the AI. In stock game, these units are better off not existing
.
The AI performing recon would be huge. Stealth Bombard targets like C3C artillery. That means you're far more likely to hit the target. With line of sight stealth bombarding AI aircrafts can perform SEAD or target the player's aircrafts 6 day war style. This would open up so many modding options.
 
Last edited:
I'll look into this and the matter of king units defending last for the next version. I expect removing the Easter egg will be easy, not sure about changing the defense priorities.

Thanks Flintlock! You are a god among men for what you've done for Civ 3 's community! :)
 
I've just tested to confirm that air units with the cruise missile and nuclear weapon ability can never be intercepted or shot down. Since you've managed to make land and sea units not be intercepted when performing precision strikes maybe there's something that can be done?

Also, air units can be shot down performing airdrop. But I don't think that's the case with land units like paratroopers. It'd look strange graphics wise if you were able to fix that though.

I've also observed fighter units flagged as "air defense" being shot down by ships. I've never seen that in the past. Air defense strats don't bomb (I've never seen them do that). That probably means the AI does fly recon since you've fixed recon to be shoot downable and I've enabled that. But they still don't use it intelligently though.
 
I've just tested to confirm that air units with the cruise missile and nuclear weapon ability can never be intercepted or shot down. Since you've managed to make land and sea units not be intercepted when performing precision strikes maybe there's something that can be done?
I'd been speccing nuclear bombers for a project and this would be a godsend.
 
The problem with the error message is while it says which line the error is on, there's no knowing exactly what doesn't compute. By now I know it's mostly my perfume list. But back then if the message tells me there's an error on line 123 I'd have to scan row by row by hand. If the message shows exactly what doesn't make sense one could easily Ctrl+F.
Alright, I'll see what I can do. At the very least the error message could show the name of the key that was being processed when the problem was encountered, or maybe the last key successfully processed. It would be better to show a snippet of text leading up to the problem, but the way the parsing code is written makes that difficult.
I've just tested to confirm that air units with the cruise missile and nuclear weapon ability can never be intercepted or shot down. Since you've managed to make land and sea units not be intercepted when performing precision strikes maybe there's something that can be done?
That sort of thing is easy to do, except the catch is the animations. The game has a procedure I called Unit::try_flying_over_tile which makes a unit fly over some tile. It rolls for interception, does air combat, and also plays the flying animation. For example, to stop land/sea units from being shot down when doing precision strikes, I cut out the call to that procedure. To make recon missions vulnerable to interception, I inserted a call. I could do the same thing for when air units nuke a tile, but then the game will play the regular bombing animation and then also the nuke animation if the unit isn't shot down.
I've also observed fighter units flagged as "air defense" being shot down by ships. I've never seen that in the past. Air defense strats don't bomb (I've never seen them do that). That probably means the AI does fly recon since you've fixed recon to be shoot downable and I've enabled that. But they still don't use it intelligently though.
Interesting. I wonder how the AI chooses where to recon.
 
What is meant by "nuclear weapon ability"? SDI can shoot down ICBM's and often does.
It's the unit ability that makes a unit act like a nuclear weapon when it bombard/bombs. Yeah, only SDIs can shoot them down. But interceptors and SAM batteries as well as Air Defense value units can't.
 
The animation part is indeed tricky. The same goes for intercepting airdropping paratroopers.
Cruise Missile and Nuclear weapon abilities make the unit use its attack animation to bombard/bomb instead of victory. So unlike conventional air units they can't have a separate animation for air to air combat and one for nuking/exploding.
 
The nuclear flag (not the ICBM or tactical nuke strategy) also makes a unit immun against nuclear attacks.
 
The animation part is indeed tricky. The same goes for intercepting airdropping paratroopers.
Cruise Missile and Nuclear weapon abilities make the unit use its attack animation to bombard/bomb instead of victory. So unlike conventional air units they can't have a separate animation for air to air combat and one for nuking/exploding.
On second thought, I was wrong about Unit::try_flying_over_tile. It occurred to me that I never had to deal with recon aircraft playing the bombing animation when calling that procedure for them. That's because it doesn't play an animation when the attempt to fly over a tile is successful. It only animates aircraft being intercepted. So there wouldn't be an extra bombing animation for nuclear bombers but there's still the problem with the attack animation like you mentioned. Also, you're right that the lack of flying animations would be a problem for paratroopers. It would be the same problem that used to exist for precision strikes by land/sea units, only there's no simple fix.
 
Don't know if it has been asked, but does this works with mods? And also, could it be possible to finally unload units from armies?

Finally, could it be possible to have units with different upkeep and/or limited like say armies or with some arbitrary limits? Say, you can have only 5 fighters per each airport, or 15 fighters in total. And fighters cost 1 gold per turn while bombers cost 2 and nukes 10?

If doable, could it be possible to implement such limits on units that are spawned every X amount of turns by a building. Like, say the Statue of Zeus only spawn 5 units and stops, and starts spawning more only if the units die and are below 5 (this could or not count the regular Ancient Calvary units, if not the solution is as simple as to create a "clone" unit type for the building to spawn).
 
Last edited:
does this works with mods?
Yes, though you may need to set up a special "scenario.config" file (in the ...Conquests/Scenarios/[ModName] folder) to ensure that the mod acts as intended

e.g. @Vuldacon's Escape From Zombie Island was designed to work with (and around!) all the bugs and quirks of unpatched C3C, so the EFZI scenario.config file would need to be adjusted to turn off (nearly) everything that the patch fixes. Conversely, the most recent versions of @haluu's Tides Of Crimson, and the next version of @Civinator's CCM and RARR mods are/will be designed to use the patch, so have been/ will be supplied with an appropriate scenario.config file accordingly.
And also, could it be possible to finally unload units from armies?
This can actually already be done via the Editor, using (one of) at least 2 methods that I know of:

(1) Give Armies the "unload" unit ability. The "problem" is that doing this prevents Army-units from being loaded onto boats or aircraft for transport overseas — but you could give them the "Airlift"-ability instead, which would at least allow them to be moved via Airports/Airfields during the late game. (To get an Army on another landmass in the early game, you would first of all need to control a town there, and then either be lucky enough win an MGL on that landmass, or ship an MGL to your overseas colony, and convert him into an Army on arrival).

(2) Allow an Army to upgrade into a more advanced Army-type (or an MGL, which can then form a new Army; to allow the upgrade while still preventing them from being hand-built, MGLs would need the "King" unit-flag). Upgrading will throw out all the currently-loaded units (which can themselves then be upgraded if you wish). The drawback here (AFAIK) is that Armies can only be upgraded in a town containing an improvement(s) with both the building-flag "Allows veteran units" and the SWonder-flag "Allows Armies to be built without a Leader" — so while the human player would be able to use this to 'modernise' their Armies, the AI likely would not.
Finally, could it be possible to have units with different upkeep and/or limited like say armies or with some arbitrary limits? Say, you can have only 5 fighters per each airport, or 15 fighters in total.
This might be possible, since there is already existing code limiting the number of Armies which any Civ can generate/ control (based on number of towns) at any given point in the game, so the functionality is already there in principle.
And fighters cost 1 gold per turn while bombers cost 2 and nukes 10?
While I would also love for this to be possible, I suspect it will not be, since in the .exe and Editor, (excess) unit-maintenance costs are tied to the current government-type, not the unit-type (all you can do per-unit is specify whether or not it costs maintenance).
 
Hello tjs282!

Thank you very much for the reply. Is possible I had forgotten about the army unload.

For the upkeep, perhaps could it be possible to somewhat make units count themselves twice, thrice or ten times depending on the wanted upkeep? Granted, that might cause a lot of other issues like the army being reported as way bigger than actually is. Or perhaps employ a counter of your units (by type) and then apply a modifier to the upkeep value based on that?
 
Back
Top Bottom