Page 1 of 1

AI Defending Castles

Posted: Tue Feb 24, 2015 9:42 pm
by GBISSET
Ive been making some large fortifications for my solo campaigns, and have discovered an unfortunate trait in the AI which will often charge out of the castle when one of my attacking units looks weak, and also will pursue routing units, out into the open country (which is filled with besiegers). Both moves work out badly for the AI.

Other than that PS works well for assaults, and I have lost a lot of men while attacking castles (I should say I am making castles with 10 or twelve castle squares one next to the other, back to back etc.) I just was glad to take a 10 square castle with loses of around 1000 vs 600 defenders, a bit Alamo-like. I took the place, but was it worth it? I might not have taken it if the AI hadn't used these two moves.

Is there any kind of infantry unit that wont leave fortifications? Id like it to move around within them as needed. Or is there one that cant move? Do we need one like that?

Thanks!

George

Re: AI Defending Castles

Posted: Tue Feb 24, 2015 10:56 pm
by Adebar
Have you tried to adapt the AI in the editor? You can form groups of units and assign a specific AI behaviour to them.


In case you haven't tried that yet:

Go to "Open custom AI dialog"

A pop-up menu opens. Choose "AI team: 1". By left clicking on several units you can assign them to Team 1.

Then open the info ("i" button). Here all possible AI behaviours are listed.

In your case chose "stay in current tile"; it has value 64. (You might try "ignore all enemies unless close - don't move towards them even if close", perhaps that works also.)

Close the info menu, then go to "Agression", insert 64.

That should do it.

(Sorry for my crappy school English; I hope you can understand my explanation.)

Re: AI Defending Castles

Posted: Wed Feb 25, 2015 1:10 am
by rbodleyscott
As Adebar says, giving them Aggression 64 in the Editor will prevent them from emerging from the fortifications in normal circumstances.

However, I don't think it will completely prevent them from pursuing routing assaulters, because the program currently gives a small chance of infantry pursuing out of fortifications when assaulters rout. (Regardless of their orders). This is intentional, but should really only apply to field fortifications, so we will look at preventing them from pursuing out of Heavy Fortifications for the next update.

Re: AI Defending Castles

Posted: Thu Feb 26, 2015 12:48 pm
by GBISSET
Great! Thanks, guys, that's what Ill do!

Re: AI Defending Castles

Posted: Thu Feb 26, 2015 8:04 pm
by rbodleyscott
The code to prevent troops from pursuing out of heavy fortifications has now been implemented and will be in the next update.