Do AI combat units found cities if settleAI and right flag?

Which do you think ;)

The AI divides it's units by operation - settle, offense, defence, workers, patrol/explore, garrison, sentry. It only considers civilians when looking for workers. I've modified that code so I can control if it looks for civilians or combat units (but not both) and changed the operation sequence to - settle, offense, defence, workers(civilian), patrol/explore, garrison, workers(combat), sentry. Which makes any combat unit capable of doing a relevant task that is otherwise on sentry duty (ie running from hill to hill) perform that task. Combat workers are limited to looking for tasks within three tiles of themselves (configured in XML as it may need to be two or even one) - this is to stop all the units supposedly on homeland defence piling into one area and leaving the borders undefended. The changes should also work for the Samurai's new ability, but I've not tested that. Combat workers won't dedicate themselves to a task - they may half build a fort, leave it if something more important comes their way, and then come back to it later. Workers will also remove forts in they need to build farms, etc.

W
The reason why I asked was because I was curious, if/when(/now?) that you got the AI to actually use those units to settle, would this also work if one adds new unique units through mods that have the ability to settle besides their normal actions?
 
Mmmmm. Half way through a game with Spain, Rome and Japan and the results are not good during real game play, despite having Legions and Samurai in abundance none of the units actually built anything - they were all too busy ganging up on minors and posturing on borders. I'll have to see what Izzy does with the Conquistadors she's just started producing.
 
Quick update - AI Roman Legions seem to be building Forts/Roads when they have nothing better to do (this makes taking the Roman Homelands tough!)

And major progress on getting the Samurai to build fishing boats - I've got the AI code that is used to make recommendations to the player (and ultimately helps to decide what AI units should build) to suggest building fishing boats when the unit is still on land :cool:

attachment.php


(Before the AI would only recommend building fishing boats if the unit was embarked, and as the AI will never embark units for the LOLZ (believe it or not ;)) AI Samurai would never consider improving the fish et al resources.)
 

Attachments

  • SamuraiRecommendFishingBoats.jpg
    SamuraiRecommendFishingBoats.jpg
    102 KB · Views: 306
I can only cheer from the sidelines,...

Download v26 of the DLL and you can see the effects Roman Legions have for yourself - as I inadvertently left the features on by default. Just be aware that if you start a game and plop a load of Legions down you'll get different results than from a natural progression to those Legions (as it appears the AI will see the super-advanced Legion units and use them for everything but Homeland sentry duties!)
 
Fishing AI Samurais :)

Spoiler :
attachment.php


The ones bottom left embarked last turn and build fishing boats this turn, the ones bottom right embark onto the fish under the Frigate this turn and build boats next.

Now if I can just get the Samurais to disembark after building the fishing boats and not sail up and down the coast continuously ...
 

Attachments

  • FishingAiSamurai.jpg
    FishingAiSamurai.jpg
    174.4 KB · Views: 304
Oooo! One of Izzy's Conquistadors she sent to a neighbouring island to wipe out a barb-camp for a CS quest just founded a city :)

Now if I can only work out why those Samurai won't disembark!
 
I guess his means hope if I waned to make an Australia mod where workers can found puppeted cities!!
 
I guess his means hope if I waned to make an Australia mod where workers can found puppeted cities!!

Not really, as it's very rare for workers to be standing around doing nothing - at least not until the end game

Bear in mind these are secondary roles for units, not alternative primary (default) roles - the units will always try to perform their primary role - settle, explore, offense, defence, work - and only attempt their secondary role if they have nothing better to do. For example, Legions won't build roads if they are all needed on the borders to repel/dissuade hostile forces.
 
And the Samurai are now disembarking after building fishing boats :woohoo:
 
Back
Top Bottom