AI Defending Castles

Byzantine Productions Pike and Shot is a deep strategy game set during the bloody conflict of the Thirty Years War.

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
GBISSET
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 72
Joined: Sat Mar 19, 2011 4:51 pm

AI Defending Castles

Post 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
Adebar
Sergeant First Class - Elite Panzer IIIL
Sergeant First Class - Elite Panzer IIIL
Posts: 400
Joined: Tue Oct 14, 2014 10:39 pm
Location: HRR

Re: AI Defending Castles

Post 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.)
Image
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28282
Joined: Sun Dec 04, 2005 6:25 pm

Re: AI Defending Castles

Post 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.
Richard Bodley Scott

Image
GBISSET
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 72
Joined: Sat Mar 19, 2011 4:51 pm

Re: AI Defending Castles

Post by GBISSET »

Great! Thanks, guys, that's what Ill do!
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28282
Joined: Sun Dec 04, 2005 6:25 pm

Re: AI Defending Castles

Post by rbodleyscott »

The code to prevent troops from pursuing out of heavy fortifications has now been implemented and will be in the next update.
Richard Bodley Scott

Image
Post Reply

Return to “Pike & Shot”