Land Artillery - New AI-Routine

Civinator

Blue Lion
Supporter
Joined
May 5, 2005
Messages
10,109
Since the first days of Civ 3 a fix for the spoiled AI-routine of handling land artillery was becoming something next to the search for the philosopher´s stone. May be this could be an important step ahead in fixing the AI-routine for land artillery. As I noted in another thread, one of the most remarkable options of the great editor of Quintillus, is the possibility to chance AI routines. I used the WWII in the Pacific Conquest biq, as here only one land artillery unit must be treated with the new settings.

This is what I did with the unit Artillery when opening that biq with the Quintillus Editor:

1. I removed the AI-routine artillery
2. I set the unit to the AI-routine Naval Power
3. I gave the artillery some light attack and a defense value
4. I left the setting bombard of that unit
5. I gave the unit the option "Capture" (so may be this isn´t needed)

The result is, the AI now uses the land artillery also in the offensive bombardement (and sometimes too offensive so I think the land artillery needs a good defense value as the "Escort Flag" still doesn´t work).

I had to reset all preplaced artillery units in that scenario, as all land artillery units with the old artillery AI-routine that were originally preplaced in that scenario, did magically disappear, when the conquest biq with the new land artillery settings was started - but the replacement artillery units with the new settings stay in the game when the scenario is started.

The new setting could also be a great setting for attack helicopters.

I haven´t tested yet, if the AI is building the land artillery with the new settings normally, or if it should be autoproduced, but I can say something from deep in my heart:

Quintillus, thank you very much! You are a genius. :):goodjob:

Attached is the WWII in the Pacific Conquest biq with the new settings in DEBUG mod so you can see all actions in the game. Rename your old biq in the C3C conquest folder, copy the biq in the conquest folder, play America, so you have to do nothing but observing the performance of the land artillery of the other civs. Nearly every time in the first turn you will see an offensive artillery attack by Japanese artillery in the region Nanking-Kaifeng.
 
Wait so it works!!!!!!!!????? Well done! I was testing that in a different way lol. I created naval artillery by doing so. I see you used it in a much better way omg. This is ground breaking.

Civinator I think the AI will treat it as a naval power unit but thats just a theory for now, and I mean it might build it thinking its building a destroyer or something lol. Lets see...

Man now that you've finally proven it is possible to make 1 type of unit act as another we could do so much. I'm sure you have an idea. Anything from air unit satellites scouting the land and more!

CCM 2.0 will officially be the next civ 3 expansion haha.
 
Very exciting find Civinator, well done! For what it's worth, I did a little testing this morning on the epic game using catapults and can verify this method works very well. I did the following changes, however, which may or may not have had any behavioral effect:
  1. Gave them 0 attack.
  2. Increased bombard range to 2.
  3. Increased movement rate to 2.
The catapults went out on their own and bombarded everything from units in the field to cities. Sometimes even bombarding and then retreating. The only issue I had was getting the AI to build them. Even with no pre-reqs, plenty of gold in the treasury, 0 support cost and nothing else to build the AI still chose Wealth instead. I also flagged the Build Naval Units often without success. This was in an inland city though, so maybe if it had been a coastal city it might have built them. The unit is still flagged as a Land Unit, though, so those last two items probably wouldn't be relevant. Idk... Anyway, I did do an auto-production test and it worked really well with the new catapults being very aggressive.
 
This works with Steph's editor as well.

It also works with the blitz flag and multiple bombardments. Attack helicopters work.

As for the mysterious disappearing pre-placed artillery units, there is a method to avoid having to replace all these units.
  • Make all necessary adjustments in the editor (Quintillus or Steph).
  • Save as scenario biq.
  • Open the scenario with the regular civ 3 editor.
  • Save the scenario.
  • Play the game. The original units will function with the Naval Power flag, and will not have disappeared.
  • Do not go back into the normal Civ 3 editor after the first save. At this point, if you need to change any aspect of the biq, you must do so in the special editor. Be sure to preserve all necessary flags. Then repeat the process of opening and resaving with the Firaxis editor.
  • I haven't tested anything regarding epic mods (ie. random maps). The Firaxis editor probably isn't necessary here, though.

Is there a lifetime achievement award that we can give to Quintillus and Civinator? You guys are our Newton and Leibniz.

Meanwhile, Firaxis has been hard at work on the new Labels.txt file...

Spoiler :
Careerbuilder_Pointers_640x360.jpg
 
Exciting stuff here! Can't wait to test it out.

So Tony are you saying that just giving a unit blitz and multiple bombardments will make the AI move it around and bombard but not attack normally? Could one do this for all modern units and have them all shooting (bombarding) each other? Or with the method civinator outlines above?
 
This might come with a price. I think the AI will think they have naval units, therefore they might only build on coastal cities at the same rate they build ships which is not enough. Nick I think what you suggest will work for special units.

It doesn't matter what kind of unit it is what matters is what the AI thinks it is. I think for the first time we could make snipers work too. Giving those settings to an auto-produced sniper with 1Hp will cause the unit to not engage in a 1v1, but to fire from a distance while aggressively looking for a target. This doesn't only have a use for artillery I think. Just imagine an invisible sniper with deadly bombard and you cant find it. What a panic lol.

I wouldnt go as far as giving it to all modern units. To the AI they will be naval, and not defenders for example. Might have weird unintended consequences.
 
Great find Civinator! One of the goals I had in leaving a lot more options open than in the Firaxis editor was that creative people would find ways to enable functionality we didn't know existed, and you've found another way to do that. :goodjob: I'll have to take the BIQ you've posted for a spin after work.

I have a hunch what's going on with the disappearing old artillery, too. The game is probably seeing that they have an AI strategy set that isn't valid, and is thus removing them. That should be fixable with an update to the editor - if the AI strategy changes, and in particular is removed, find all units of that type on the map and make sure their strategy is a valid one. Alternately, and what Firaxis's editor probably does, check that all units on the map have a valid strategy upon saving, and if not assign them one.
 
I am currently experimenting with Civinators idea.

And I am observing some strange behavior of both the French and Persian.

They both move a Catapult (now naval power), a Spearman and a settler in and out of one of their harbor cities until they used up their movement points.

While this happens in the interturn I was unable to picture it. But in the last turn one of the french Catapults remained outside of Paris.

23063384op.jpg


Could it be that the KI is now confused by the naval power mark of the catapult.

I have not seen any offensive catapults or cannons in my last game and also not in this game (Spanish-Portuguese-War and the Great French-Persian-Japanese-War). :(

My Catapults are 2/1/1 with naval power.
 
So Tony are you saying that just giving a unit blitz and multiple bombardments will make the AI move it around and bombard but not attack normally? Could one do this for all modern units and have them all shooting (bombarding) each other? Or with the method civinator outlines above?

I've only tested with scenario and pre-placed units so far. The blitz is not necessary, but they will bombard multiple times if they have blitz. The bombard routine works if the unit has an offensive value or even with a zero offense. As Civinator noted, the computer will not necessarily escort these artillery units, although they often retreat after firing if they have multiple movement points (especially with friendly roads). I imagine that snipers and such would work similarly, since it's just a change of graphics.

I certainly wonder what this could mean for Zombie Island.

I wonder if AI will stop loading artillery aboard naval/air transports when it marked as naval power. Have anyone already tested it?

I haven't tried this yet. I also suspect the Ai will not airlift these units, as it normally only wants to airlift offensive land units.

I am currently experimenting with Civinators idea.

I have not seen any offensive catapults or cannons in my last game and also not in this game (Spanish-Portuguese-War and the Great French-Persian-Japanese-War). :(

My Catapults are 2/1/1 with naval power.

Kirejara, did you alter a game already in progress or are these complete games from the start? My suspicion is that even an improved routine won't make the AI any smarter.

They both move a Catapult (now naval power), a Spearman and a settler in and out of one of their harbor cities until they used up their movement points.

So basically they act like Civ 2 units. :p
 
Kirejara, did you alter a game already in progress or are these complete games from the start? My suspicion is that even an improved routine won't make the AI any smarter.
These are new games after I altered the artilliery units. I do not know a way to alter the rules of a game in progress.
So basically they act like Civ 2 units. :p
Should we count it then an improvement? :D

Supplemental: I am currently at war with France. During the Siege of Paris my forces were attacked (not bombarded!) by a Catapult.
 
These are new games after I altered the artilliery units. I do not know a way to alter the rules of a game in progress.

Should we count it then an improvement? :D

Supplemental: I am currently at war with France. During the Siege of Paris my forces were attacked (not bombarded!) by a Catapult.

In my experience I was able to update a saved game of a modded scenario. But what you have to do is make the edits, and then load the scenario again in civ-content to update the information of the mod folder and I think the .BIQ also will update. After that just load the saved game and it should have updated unit stats and other data like civilopedia etc.
 
So, I ran the WWII scenario that Civinator posted up until December 1942, observing as the U.S. and doing nothing but supplying the Allies with tech. Observations:

- The Japanese did indeed send out some artillery on offensive bombardment missions in Dec 1941. These were not guarded, and by February of 1942, the Chinese had destroyed them. These were artillery from the north, and they targeted Hankow.
- The Japanese had additional artillery in Indochina, but did not send them out. They did occasionally use island-based artillery to bombard British ships that approached.
- The Chinese had some artillery as well, and used these to bombard nearby Japanese units, but did not send them out of cities.
- The British had a couple artillery in Australia, and sent one of these to Perth. On one turn it moved around as Kiejara described, but most of the time it just sat there. The British did not attempt to send reinforcements to the front (which often is the case).
- The Dutch did not acquire artillery, but were the only ally to go on the offensive (go figure).
- I did not witness anyone building new artillery, although this doesn't necessarily mean that the AI would never do so. China and Japan focused on MG Battalions and Combat Engineers; Britain focused on Bombers, and the Dutch on infrastructure (workers and buildings).

At this point I'm leaning towards thinking that this would work better with auto-production, but again the AI may build them with different stats; I know if I were China, I'd also have been focusing on MG Battalions early on. At a future date I plan to resume this save and see if the AI builds more artillery in 1943, and whether the Japanese send out the rest of their artillery at some point (currently they are helping to guard the victory point at Saigon).

So all in all, promising, but needs more evaluation to determine how well the AI will use them and what the best way to set them up is. After all, we are talking about the same AI where, in this observation, the Japanese left two transports unguarded in open waters for easy sinking during the allies' turn, and the British send ships out on pointless bombardment missions against targets they had no intention of destroying rather than concentrating to defeat the Japanese navy :rolleyes:. The fact that they sent any artillery at all out on the offensive is an improvement and half the problem; the other is the age-old problem of getting them to build things well.
 
I have reset all "conventional" artilliery units (Catapult, Trebuchet, Cannon, Artillery) back to normal.

But I have left the fast artillery units (Horse Artillery, Camel Artillery and Towed Artillery - all with 2 MP) on "Naval Power" since the KI builds them very rarely.

However today I noticed that both Byzantines and Portuguese moved Horse Artillery throught their lands. They have not shipped any of them (island map) and I have not seen them attacking anything yet (my skirmishes with them were mostly on my mainland or at sea - while I was tearing the Hittitties apart).

This is a screenshot of F3 with human turned Byzantine KI:

23118130gr.jpg


They have 8 Horse Artilleries, but only 3 Dragoon (6/3/3 Horses + Salpeter), 2 Cuirassier (6/4/3 Horses + Salpeter + Iron) and 1 Nizam (5/4/1) as offensive units. The other units are naval or defence.

I am sure that I will be attacked by Theodora once again, and then I will see if (and how) she uses her Horse Artillery on her homeland.

The equaly advanced Persians have not build a single Horse Artillery. I assume that both Theodora and Henrique as seafaring leaders build more naval power.
And the Aztecs did not even connect their salpeter (and half of their cities...). ;)

After Action Report:
After being ambushed by the Portuguese. I started an invasion on their homeland. The portuguese Horse Artilleries remain mostly inactive. Only one of them bombarded my battlefleet (and scratched the paint of the Richelieu Class Battleship HMCS Venator).

But since I landed in the east of Portugal and Xerxes made a near simultan, but futile invasion in the west, my forces destroyed only two out of six Horse Artilleries reported by my spies. So I assume that the others were destroyed by the Persians. I do not know if they played a more agressive role against the Persian as I was unable to spare an observer.
 
It's a shame Tom is not still around. He would have loved testing this. He was always trying to get the AI to use units better.

Man, I just checked his profile, and it's hard to believe it's been nearly two years since he's been here. Apparently it's been since October of 2013; it feels like it's been since last week. I figured it'd be a couple months ago when I checked after you pointed it out.

Appropriately enough, his most recent post is about this very problem.
 
Man, I just checked his profile, and it's hard to believe it's been nearly two years since he's been here. Apparently it's been since October of 2013; it feels like it's been since last week. I figured it'd be a couple months ago when I checked after you pointed it out.

Appropriately enough, his most recent post is about this very problem.

Yeh sad eh. I check his profile occasionally to see if he has popped up as people sometimes do.
 
I was able to observe with aircraft the second Aztec-Byzantine-War (I am allmost innocent in this... ;) ).

Since the war was on the Aztec homeland I was hoping that Montezuma would show me the use of his Horse Artilleries (Naval Power).

But they moved them only in and out of their cities unless they run out of movement points. Half of them were quickly destroyed by Theodoras Infanterie (6/10/1) and Late Cavalry (8/4/3) while outside of the cities. None even tried to bombard or attack an enemy in the field, even if it was standing right next to them.

I will now convert them back to "Artillery" and "Offensive". :(

But despite not working as planed, it was a good idea by Civinator.
 
I just saw this thread! :) Sorry, super late bump, but had to post how it is a cool function. I had to check it out, in a regular epic map to see how it works. Here was what I saw happen in the first hundred turns or so.

I had one civ, that could only build the unit: land naval power artillery (as Civinator had outlined above). I'll just call this unit "Land Naval Power" (was a catapult pretty much with 2 off and 2 def)

For that civ, I never saw them build the unit, even on coastal cities. They pretty much built all the buildings, and resorted to building scouts. Their towns remained empty of untis. I had one building to auto-produce this unit, in which they did build that.

All of those auto-produced "Land Naval Power" units sat in the city throughout the test game. They did however, fortify them (or more likely used Sentry). (Even with fortify standard unchecked, AI still fortifies them). Seems you can't force the AI to use them to "Go To" and "Explore" only.

If an enemy barb or enemy civ goes within range, the AI will open fire with those units though. As well as enemy naval units, the AI will open fire.

This I think is enough evidence that the AI fully understands it to be a naval power unit (bombarding and fortifying), and is using that piece of the AI. It also will move them around if outside of town, so seems to function to an extent there as well, probably using the Sentry and Go To standard orders. Even if those are unchecked, the AI uses Fortify/Sentry anyways.

I tried pre-placing a few "Land Naval Power" catapult units outside of a city, and the AI did move them around and even away from their city to bombard a nearby enemy unit 5 tiles away. But once those enemy units were destroyed, it brought them to various cities and fortified them there, and then they did not move out from the city any longer (even when more enemies showed up nearby). AI did not move them to attack barbarians, but would bombard barbarians that moved within range.

Seems if placed somewhere outside of a city, they are semi-actively used, but once they go to a city they get stuck on the foritfy/sentry standard order.

A great use I can see for epic games, is auto-production in cities for a Town Keep or defensive structure, which will bombard and has to be destroyed also. I was using auto-production of immobile naval units as Castle Towers, but like ships in port, those don't defend against land units, whereas these will.
 
Back
Top Bottom