Originally Posted by
Callistonian
The same happens when you use a multi-turn move to move a character onto a tile that becomes occupied with another army. The move command that you issue in game, which is the same as the 'move' command in script, is only for movement, merging is a separate command that you haven't issued. I don't know of any script command for merging. There is a merge_selected_button but I'm not sure when that's usable. It may be referring to merging units as in 15 + 20 => 35 or tt might just be for agents (princesses have a button to merge into army instead of attempting a marriage mission). Even if there is a merge command, I'm not sure who it would act on - it would be unique as the only script command that acts on units on the strat map instead of characters.
It's not completely clear what you're trying to do. If Stannis has a bunch of generals with him, wouldn't they lead their own armies anyway? If his faction is AI-controlled, just ensure they're all within a tile of one another and they will always fight together in battle as reinforcements (unless you changed the reinforcement probabilities or limited the number of men on the battlefield in the configs). A 2x2 death ball of generals will always participate in the battle, there's no way to attack one without attacking the other three. I think 4 is the theoretical max you can ensure will engage, obviously you can have more armies in a battle (I guess 9 is the limit without accounting for AI-requested regional reinforcements) but you can always attack the death ball from a different corner to get no more than 4 enemies at once.
The alternative is that Stannis has a bunch of generals with him in his stack which seems a bit odd to me. Or maybe these characters aren't meant to represent generals but more like minor characters in Stannis' retinue? If that's the case, you could give Stannis some ancillaries representing those characters, and then monitor PostBattle and check if the ancillaries still exist after waiting a few seconds (for death animations to finish, just like in your other thread). If the characters exist somewhere on the map, but their ancillaries don't exist, then kill those characters. It will be a bit odd if these characters are on the other side of the map and yet still die with Stannis at Winterfell, but if you force them to stay nearby, then it would work well even if they manage to avoid participating in the battle. An even simpler solution is to just kill these characters if Stannis dies, but the ancillaries can visually convey their link to Stannis to the player.