How to force the AI to build weaker units

Steph

Multi Many Tasks man
Retired Moderator
Joined
Sep 1, 2002
Messages
18,162
Location
Pont de l'Arn, FRANCE
I just had an idea in another thread, and I'd like to know if someone tried that to force the AI to build something else than very strong units.

Imagine you want a large force of destroyer, with a few battleship.

Obviously, if you make the BB 40/40 and the DD 20/20, the AI will likely built more BB than DD.

So...

Make 4 units:
- Destroyer hull. Make it weaker, but not to much. Something like 10/10.
- Battleship hull. Make it slightly weaker than the D, something like 9/9.

Now, change your BB and DD to king units, so they can't be built directly. Have their cost low, similar to the hulls.

Make the DD hull upgrade to the DD, and the BB hull upgrade to the BB.

It is likely the AI will built more DD hull than BB hull. And then, as the upgrade cost is low, the AI could upgrade his hull to full ships.

End result: more DD than BB.

Would this work? Anyone tried it?
 
Cannot each civilization only have 1 King unit? Which is selected from the Civilizations tab.. Or can you have multiple king units by simply selecting that ability on the units page (which will just make them non-buildable)?

If the 2nd instance is the case, then it should indeed work, and then the 'upgrade' would be historically accurate since building the Hull would signify the Launch of the ship, and the Upgrade would signify the Commissioning of the ship.

The pain side of doing something of this sort would be if you had a mod with a large number of ships in it, as it would require that many more Hull units to be built which would 'commission' into the actual ship itself.

Ingenius idea though, we'll have to test it out! :goodjob:

Tom
 
That wont work :(
I think you will only be able to build the hulls untill you research the tech required for the ones with the king flag, but since they probably have the same tech as the hulls, the hulls will be obsolete and you wont be able to build the others because of the king flag.

Only way for it to work is have the hulls be produced by city improvements
 
It's an old problem since the AI is too stupid to build a balanced fleet. Most of the older ships in my game upgrade to DDs, a few to CLs, none to CAs or higher. BBs cost 15 or more population, and become obsolete after ww2, without any chance to upgrade them (only exception is the Iowa Class). Early predreadnoughts and WW1 battleships can be upgraded to weak, refitted WW2 ships (Wyrm made several excellent units for that purpose). Now the AI won't build 60+ BBs any more since they simply cannot afford the population cost, but it's still far from a perfect solution. One thing I noticed that the German AI loves the Deutschland Class in my game even more than BBs, but I guess it's because these raiders will spawn auxiliary cruisers when victorious...
 
So the "king" will make the unit obsolete, even if you can't build it?

Grr..

I'm pretty sure this is not the case.
 
I just did testing on unit upgrades recently in an attempt to figure out a decent way to stop units from being available to be built at certain times without having a buildable upgrade.

When a unit upgrades, the new unit is always available to be built (in which the old one is not) unless the civ does not have the proper resources to build the new unit (in which case the old one is still available). It's possible the king unit may be different since it is unbuildable anyways, but it is also possible that it may make both units not available to be built from the start.

I'm doing a test now, I'll post the results in a few...

Tom
 
I knew my idea was good!

Test in the Napoleonic scenario.

Fr- Fusilier buildable by France, normal unit, upgrades to Fr+ Fusilier, buildable by France, but is a king unit.

I cannot build Fr+ Fusilier in my city, I can build only Fr- Fusilier, and after they are build they can upgrade to Fr+ Fusilier.

It works!

I'm the best :goodjob:
 
attachment.php



The idea with the hull unit (or basic unit as I described it in my posting about advanced autoproduction) is not so new. In SOE I used this idea about 5 years ago to have the correct battlehip with the correct name at the correct place, but at that time I made some mistakes with the upgrading behaviour of the AI and the setting that is needed for such a naval hull unit.

In CCM the hull unit, combined with a single small wonder, produces three levels of carrier units for each civ in that mod. So for level 1 Britain has the Ark Royal class, Italy the Aquila Class, the US the Lexington Class, the French the Bearn Class, the Germans the Graf Zeppelin Class and so on. With the proper tech the hull unit now upgrades to level 2 carriers (Ark Royal II, Forrestal Class and so on) and later to level 3 carriers as the Nimitz Class, the Gorshkov Class (and so on).


To use the king flag for carriers has another big advantage as units with that flags are used last to defend. In SOE it happened frequently, that big carriers were sunk by a second attack with a simple destroyer as the AI used these ships for defense very early. This was stopped after all carriers received the king flag.

In CCM the methode of advanced autoprudction is used heavily for landunits and in my eyes this new option is one of the best new concepts for Civ 3 in CCM.

There is one annoying bug in upgrading units with the king flag: If a unit with a king flag is upgraded to another unit with a king flag that unit will not carry the normal name but the name of the ruler of that civ. So it must be avoided to upgrade a unit with a king flag to another unit with a king flag. As far as I know, Vingringjoe was the first to formulate that rule. So the upgrade path for different king units in CCM (for different civs) is set for the next king unit, but at the same time the unit that should be upgraded doesn´t receive the flag that allows to upgrade that unit. Therefore, when a certain tech is researched, the old king unit (basic unit or hull unit) gets obsolete and the basic unit upgrades to the next king unit in the chain that is up to date
 
Bouhouhouh! Someone had the idea before :cry:

There is one annoying bug in upgrading units with the king flag: If a unit with a king flag is upgraded to another unit with a king flag that unit will not carry the normal name but the name of the ruler of that civ. So it must be avoided to upgrade a unit with a king flag to another unit with a king flag. As far as I know, Vingringjoe was the first to formulate that rule. So the upgrade path for different king units in CCM (for different civs) is set for the next king unit, but at the same time the unit that should be upgraded doesn´t receive the flag that allows to upgrade that unit. Therefore, when a certain tech is researched, the old king unit (basic unit or hull unit) gets obsolete and the basic unit upgrades to the next king unit in the chain that is up to date
I just did an additional update. I made the Fr+ Fusilier upgrade to the Fr+ Grenadier. Both are king units.
I build a Fr- Fusilier in a city, and then upgraded it to Fr+ Grenadier. The upgraded unit is properly named Fr+ Grenadier.
 
Indeed... Tested it and it works perfectly. This is with NON-AUTOPRODUCTION. So the Unit #1 is the Non-King HULL unit... and Unit #2 is the King Unit.
Unit #1 is always available to be built even before the Unit #2 tech (if there is one) is discovered and Unit #1 can upgrade to #2.

OCCASIONALLY, if you discover a tech that allows a unit to upgrade to a king unit, the computer may switch it over to unit #2 automatically, but probably just a glitch of sorts.

This is terrific, as auto-production is not needed.

Tom
 
The telephone and other interesting things were also (at least) invented twice when the time was ripe for them. :) Nevertheless this methode in my eyes has a big potential in modding civ 3.

tom2050, yes of course preplaced units can be treated with this methode, too as for example El Justo did it in his mod TCW, I mentioned above. The problem here is the correct setting for the hull unit or basic unit. In SOE with this methode the units for the Africa Korps and some other mostly amphibious operations are simulated.
 
QUESTION: Will the AI always upgrade these 'hull' units after it makes them? Or will it occasionally use them? I think as long as there is no upgrade costs, it would probably upgrade them immediately.

It's a terrific work around Civinator, and quite simple as well. Perhaps we should get Oz to update the front page of his thread 'How the AI decides to build units' with all this great info. :) Since it also includes ways to get the AI to build properly.

Tom
 
Excellent idea Steph, even if you weren't the first :D

That wont work :(
I think you will only be able to build the hulls untill you research the tech required for the ones with the king flag, but since they probably have the same tech as the hulls, the hulls will be obsolete and you wont be able to build the others because of the king flag.

Only way for it to work is have the hulls be produced by city improvements
It falls under the same mechanism as building obsolete units in a city without resources- technically it's not knowing the technology that makes a previous unit obsolete, but being able to build its upgrade at a given location. If you can't build the latest unit for some reason, then the unit that upgrades to it will be available, and so on.
 
This is fricken fantastic!!! An easy way to get the AI to build a balanced force. Let me just check I understand correctly. You could have multiple 'Hull' or first level units produced all the same or similar in stats but have them upgrade to a variety of king units?

I take it that if the AI has say five first level units all with identical stats, cost etc it will build them all in the same quantities? So you could then have the AI's land army for example made up of five different land units (five level one non-king units and five level two king units) with each type making up roughly 20% of it's forces?
 
Back
Top Bottom