anyone can change campaginmap ai's movement behavior?

they just wander without generals and attack on me without him.

because their morale is run down very fast, i can kill them vey easy.

it it possible to modding? i want to ai general with their army when attack on me.