Resource icon

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

Simply put, HN units can attack an opponent's units without that opponent declaring war in response.

What you probably mean is that HN units can attack an opponent's units without having to declare war against that opponent first.

It is of course not the defending nation that has to declare the war and therefore suffer the diplomatic penalty.
 
The problem with the AI handling tactical nukes, precision strikes, cruise missiles, airlifting etc. is, that they appear very lately in the game in a phase when most normal epic games are still finished and therefore not so much observations about the handling of those concepts by the AI in real game play are done and when having a look at those settings by creating a "laboratory environment" with the editor, it is not sure if the AI is behaving like that in the real game.

Until now I have not experimented with Civ 3 land artillery units. The land artillery in CCM and SOE works different to normal Civ 3 land artillery. The collateral damage flag was introduced for land units with the C3C conquest "Fall of Rome" as an additional flag for normal land units (not artillery). So at least it should work for attacks by normal land units with that additional flag.

The screenshot of bombarding Rheims and simultaneously taking out two buildings of a city by a combination of precision strike and collateral damage, was done many years ago, showing the bombardment of a city by an air unit (strategic bomber) done by me and not by the AI.



Yes, the bombing of cities by air units is in accordance with the observations in the German Civ 3 Wikipedia, based on a test in 2013. Air bombardment at first destroys planes and citizens of a city, if there are no planes in the city, ships, citizens and buildings of the city will be destroyed. If there are neither planes nor ships in the city, according to that article units, citizens or buildings will be destroyed. You can find that article here. So the article is in German, I think the Google translator will do its job in translating it well to the English language. The article holds many more observations about different kinds of bombardment in C3C.

I happen to speak some german so no google translator needed :lol:.

I've given Harbors, Commercial Docks and Ports some Sea Bombard defense value. This way, AI naval strategic bombard will be threatening if you don't build Coastal Fortresses. There is also an more modern version of the Coastal Fortress that obsoletes the Metallurgy one.

The thing with walls (improvements with Land Bombard defense value) is that they stop working (and be land bombard shields) once the settlement becomes a city. This means I can't do the same routine above with Land Bombard defense value to make artillery cause strategic damage. Artillery would just target units first again once you reach size 7 in standard settings.

What is the mechanism behind Civil Defense being targeted first? Is is having "Defensive Bonus" value?
 
I have not been online in forum for at least 6 months. Yesterday I took time to read whole thread. I could use some help to clarify couple things:

1. While browsing through thread I read about having improvements as prerequisite for certain units. Is that implemented?

2. Is 32 strategic/luxury resource cap fixed? If so, is there any rule/order how to put them in editor or picture slots while modding?



One unrelated question. Is there posibility to adjust years needed to pass (IIRC 1000) to activate tourism gold if improvement/wonder is flagged as tourist attraction?

Big thank You Flintlock for battling with Civ3!
 
I just installed this, and it looks awesome overall.

My quick test though involved using two workers to stack work a road. Of course, that's an inefficient use of workers since 2 workers complete one road in 2 turns doing 3 units of work, when they could have been on two different tiles roading using 4 units of work. This is not a criticism of the stack work function. It's fine as it is. But, what I had expected to see was how many turns the stack workers would complete the job before roading. In contrast, when I hover the cursor over the regular work button, it tells me the number of turns to completion for a job.

It might be an improvement if the stack worker command allowed use to see how many turns it would take the entire stack to complete a job.

Some way to tell if we're using a maximally efficient stack or not might be beneficial. I think that maximally efficient stacks of workers (ignoring movement to get to the tile), correlate to some sort of ratio which is always a natural number, while less efficient stacks of workers don't have that ratio. Examples:

If we have 2 workers mining a tile to start with industrious workers, since a mine takes 4 turns to complete, we have a ratio of 4/2. But, if we have 3 workers mining the same tile, the ratio is 4/3 and thus there is some unused unit of work.

Another example. Say a worker started foresting a square as non-industrious. If I recall correctly, that job takes 9 turns to complete. On the next turn it will take 8 turns to complete. If you join 3 workers to the stack of one worker, you have 4 total workers with 8 turns left, and the ratio is 2, I think for maximally efficient work. But if you join only 2 workers, I think the job takes 3 turns, and the ratio is 8/3, so it's less efficient.

Or maybe it would be more clutter and annoy people to know that, I could be wrong.

And my apologies if this idea got mentioned before. I tried to scan through and didn't see it.
 
Hi, Flintlock. Thank you again for the terrific work and I'm looking forward to testing out the features further. I saw that my last post was over a year ago so I thought I'd just throw out my wish list again to see if any of these interest you. Regardless, thanks for all of your work and for opening up lots of possibilities for us.
  • Buildings as requirements to build specific unit(s)
  • Resource in city radius as requirement to build unit(s)
  • Era graphics changes for mines and radar towers
  • Interception mission takes effect immediately
  • Plus or minus bonuses (e.g. +1 food) for buildings
And here are some outlandish wish items that I've always wanted, but are likely more suitable for Civ 7 modding.
  • Buildings that produce resources
  • Separate bombardment types against land and sea units
  • Limited number of improvements (e.g. max of 6 barracks)
  • Buildings that can change your civ's reputation or relations
  • MPP does not activate if civ initated war
  • Lethal bombardment by unit type
  • Stealth bombardment
 
1. While browsing through thread I read about having improvements as prerequisite for certain units. Is that implemented?

Not currently.

2. Is 32 strategic/luxury resource cap fixed? If so, is there any rule/order how to put them in editor or picture slots while modding?

I can confirm it is fixed, and there aren't any such rules!
 
The other changes are: when you ask for or offer gold the set amount popup is automatically filled with the best amount so you don't have to try 10 different values while you hone in on the most gold you can get or least you have to offer, and the minimum city distance is now adjustable upwards or downwards.

This doesn't appear to work with techs thrown into the deals, if I'm doing the process correctly (and the mod I'm using isn't causing interference, which I doubt). I don't think you said you should. Having it usable with techs might be nice to have.

I ring up Arabia and ask "what may I trade you for Bronze Working and Pottery?" Abu Bakr wants 1. Alphabet and 80 gold. I then offer 2. Alphabet and 79 gold, and I still get "this deal will probably be acceptable" (I should get any other message than that if the algorithm is correct assuming nothing from my mod is causing interference). Maybe you have some cleverer way to do it than me. I'm back to implementing a modified guess the number algorithm if I'm playing carefully...

Lower_guess = 79. I'm calling it lower_guess, because the message implies that we have the number, or it is a lower number.

Alphabet and 1 gold. Higher implied by "I doubt they will accept this proposal".

Higher_guess = 1.

Difference between higher_guess and lower_guess is not 1, so

1. check ceiling((lower_guess + higher_guess)/2) (or floor?).
2. Reset lower_guess if lower message of "acceptable", reset higher_guess if any of the higher messages (either "never", "close", etc.).
3. Check if lower_guess - higher_guess = 1. If so, return lower_guess. If not, goto 1.

Alphabet and ceiling((79 + 1) /2) = 40 gold. "We're getting close to a deal", so higher.

Higher_guess = 40.

Alphabet and ceiling((79 + 40) / 2) = 60 gold. Lower or equals implied by "this deal will probably be acceptable".

lower_guess = 60.

Alphabet and ceiling((60 + 40) / 2) = 50 gold. Acceptable.

lower_guess = 50.

Alphabet and ceiling((50+40) / 2) = 45 gold. Getting close.

higher_guess = 45.

Alphabet and ceiling((50+45) / 2) = 48 gold. Acceptable.

lower_guess = 48.

Alphabet and ceiling((48+45) / 2) = 47 gold. Acceptable.

lower_guess = 47.

Alphabet and ceiling((47+45) / 2) = 46 gold. Getting close.

higher_guess = 46.

47 gold in this case.

Could the mod be causing interference?

Save I used:
 

Attachments

  • Caesar of the Romans, 1650 BC.SAV
    186.6 KB · Views: 14
@CivFan94 (1) This is not implemented but it's the sort of thing I could do for R11. The hardest part of the implementation would actually be reading the prereq rules from the config file, after they're read in enforcing them is straight forward. I've been refactoring the mod's config loader to make that kind of thing easier. Another example of this sort of thing, which I'm planning for R11, is a rule that allows a building to grant its city access to a resource. (2) It is fixed as of R10, and as of R10B, the fix is fixed too. There are no special requirements for the order of resources. (3) That should be doable. I looked at the logic for tourist attractions a while ago and as I recall it was pretty straight forward.



It might be an improvement if the stack worker command allowed use to see how many turns it would take the entire stack to complete a job.
I agree it would be nice to show how many turns are required for stacked worker actions, and that's something I'd thought of when I was implementing them in the first place, but it's unfortunately difficult to do. I don't see any simple way to intercept & modify the tooltip. There's also the problem that holding the control key hides tooltips, for whatever reason, so I'd have to stop that from happening as well. It's just too much work for too little benefit IMO. About warning for wasted worker turns, that's a good idea but the only place I can think to put that is the tooltip, which again I don't have a practical way to modify.
This doesn't appear to work with techs thrown into the deals, if I'm doing the process correctly (and the mod I'm using isn't causing interference, which I doubt). I don't think you said you should. Having it usable with techs might be nice to have.
The gold amount autofill applies only to the popup asking you to input a gold amount when you're adding gold to the trade table. What you're describing, modifying what the AI asks for/offers so it doesn't try to cheat the player, is how I wanted the feature to work originally but that turned out to be difficult to do. The function that calculates the AI's offer is long and I wasn't able to see where it tilts the trade in its favor. Instead I just inserted some code that runs when that gold amount popup is opened that finds the optimal amount and fills it in as the default. The algorithm to calculate the optimal amount isn't anything particularly clever, in fact you can see it starting here: https://github.com/maxpetul/C3X/blob/Release_10B/injected_code.c#L2762. The gist of it is that it starts by asking/offering gold in increments of 1000 until the trade is rejected/accepted, then moves to increments of 100, then 10, finally 1. As is usually the case with this mod, the hard part is not writing the new behavior but integrating it with the existing compiled program.



@AnthonyBoscia I did fix intercept missions not taking effect until the next turn. I considered that to be a bug since what was happening was that setting a unit to intercept was also skipping its turn. The turn skipping was being done by the interface logic, not the gameplay logic, and notably the turn skipping didn't affect the AI, so I figured was not intentional. Buildings as prereqs for unit construction and buildings granting resource access to their city are two things I'm planning for R11. Programming those rules should be easy, I just need to load them in from the config, which is something I'm working on.
 
Buildings as prereqs for unit construction and buildings granting resource access to their city are two things I'm planning for R11. Programming those rules should be easy, I just need to load them in from the config, which is something I'm working on.

This would be another really important addition to C3C. For buildings granting resource access, if possible there should be two options here:

1. The building provides the resource only to the city where the building is located.
2. The building provides the resource to all cities that are on the trade net of a civ.

Flintlock I love your work ! :)
 
Buildings as prereqs for unit construction and buildings granting resource access to their city are two things I'm planning for R11. Programming those rules should be easy, I just need to load them in from the config, which is something I'm working on.
Flintlock...This will allow far more to making New Games as well as adding to existing Games that will enhance Game Play... :cheers:
 
I did fix intercept missions not taking effect until the next turn. I considered that to be a bug since what was happening was that setting a unit to intercept was also skipping its turn. The turn skipping was being done by the interface logic, not the gameplay logic, and notably the turn skipping didn't affect the AI, so I figured was not intentional. Buildings as prereqs for unit construction and buildings granting resource access to their city are two things I'm planning for R11. Programming those rules should be easy, I just need to load them in from the config, which is something I'm working on.

Thanks, man, it is much appreciated. I thought you had already addressed the intercept rule, but wasn't sure. The others will be a great boon. The thing I've always liked to see in Civ is differentiating between raw materials and manufactured goods. But like Civintator and Vuldacon said, there are many possibilities on how to implement this. Looking forward to seeing everyone's ideas.
 
When I read 'gold' I think of a lump sum, not gold per turn, which I think of as a rate.

I tried offering purely gpt for a tech, and got a suggested amount which was the exact gold per turn in my case (which is likely more expensive than using a combination of gpt and a lump sum of gold).

Is the code intended to work for gpt like that also?
 
Just discovered this existed, amazing!!!!

I read through the updates, but didn’t see anything regarding the AI’s tendency to send a bunch of units to the interior of the empire to attack weak defended cities versus storming border well defended border cities like human would. Has that been fixed here too?
 
For buildings granting resource access, if possible there should be two options here:
#1 will be easy but #2 will be difficult, maybe not possible, but I'll have to give it some thought first. The issue with #2 is that the game adds resources to each trade network on a per-tile basis. In other words, it processes all tiles on the map and for each one with a resource, it marks every city on the same trade network as that tile as having access to the tile's resource. A city could add a resource to its tile but the assumption that each tile only has one resource is baked in. So enabling cities to add resources to their trade networks will either require extensive machine code edits, or I'll have to think of something clever.
Flintlock I love your work !
Thanks. And thanks to everyone else for the kind words. I really do appreciate it. :)
Is the code intended to work for gpt like that also?
Yes, it works for both GPT and lump sum. It's the same algorithm for both cases, the only difference is how to determine the upper & lower bounds.
I read through the updates, but didn’t see anything regarding the AI’s tendency to send a bunch of units to the interior of the empire to attack weak defended cities versus storming border well defended border cities like human would.
I haven't tried tweaking the combat AI's behavior yet, other than enabling it to use artillery and armies. Changing how it targets cities sounds difficult, but maybe it'll prove to be easy. I haven't located, never mind read, that part of the code yet.
 
Just discovered this existed, amazing!!!!

I read through the updates, but didn’t see anything regarding the AI’s tendency to send a bunch of units to the interior of the empire to attack weak defended cities versus storming border well defended border cities like human would. Has that been fixed here too?

This would be a huge change as the AI is always seeking out the weakest area to attack. I know it is highly exploitable, but I don't know how the AI would be able to know what you consider your "border cities" are. Its very subjective that I imagine only a human could infer.

Also it would totally ruin my strategy with the AI! :mischief:
 
Just discovered this existed, amazing!!!!

I read through the updates, but didn’t see anything regarding the AI’s tendency to send a bunch of units to the interior of the empire to attack weak defended cities versus storming border well defended border cities like human would. Has that been fixed here too?

This is an issue during the stage of the game where defenders heavily outstat attackers like infantry vs cavalry. Having the AI use artillery and bombers better helps somewhat. Also, you can choose to have airdropped units be able to move right away and perfume/autoproduce airborne troops. The threat from the air in your interior cities will force you to spread your defenses thinner.
 
Just discovered this existed, amazing!!!!

I read through the updates, but didn’t see anything regarding the AI’s tendency to send a bunch of units to the interior of the empire to attack weak defended cities versus storming border well defended border cities like human would. Has that been fixed here too?

I'm not sure that your inference is correct. I thought it was more about where the individual weakest unit that is in range of the AIs allowed pathing calculation, rather than the strength of all the units in the city. My understanding from reading Sirian playing Sid Vicious and the Magnificent Seven was that if you have 3/3 mechs and 5/5 mechs, ceteris paribus the AIs will go after the 3/3 mechs if they can. For sure, an AI will send units to capture an undefended city that it can capture in one turn. Consider a city with 20 4/4 cavalry vs. one with just a 4/4 infantry. The city with 20 4/4 cavalry has more defense for that turn, because of so many cavalry. It's stronger defense wise. Needs at least 7 attacks to capture it for starters without armies.... 7 with armies come to think about it also. So, if it were about attacking the weaker city, the AI would attack the city with just the 4/4 infantry. But, ceteris paribus, it won't, because the best individual unit in the cavalry city is weaker than the 4/4 infantry, I think. So, it would attack the city with 20 cavalry.
 
I'm not sure that your inference is correct. I thought it was more about where the individual weakest unit that is in range of the AIs allowed pathing calculation, rather than the strength of all the units in the city. My understanding from reading Sirian playing Sid Vicious and the Magnificent Seven was that if you have 3/3 mechs and 5/5 mechs, ceteris paribus the AIs will go after the 3/3 mechs if they can. For sure, an AI will send units to capture an undefended city that it can capture in one turn. Consider a city with 20 4/4 cavalry vs. one with just a 4/4 infantry. The city with 20 4/4 cavalry has more defense for that turn, because of so many cavalry. It's stronger defense wise. Needs at least 7 attacks to capture it for starters without armies.... 7 with armies come to think about it also. So, if it were about attacking the weaker city, the AI would attack the city with just the 4/4 infantry. But, ceteris paribus, it won't, because the best individual unit in the cavalry city is weaker than the 4/4 infantry, I think. So, it would attack the city with 20 cavalry.

The AI will usually not attack when the odds of winning are too low. But I've seen it make exceptions when it comes to armies inside cities. There the AI will happily suicide multiple units to take out the army while avoiding them in the open.
 
@Flintlock The no tresspassing is working well, in my game The AI declared wars normally to each other

there is a strange behavioru I noticed when using a HN unit to attack another unit inside its border but at the edge of it or vice versa but attackign a HN unit this time in its border after winning the unit will remain at a middle position like
positionofunit.png
in the picture and gain 2 tiles movement back
 
Top Bottom