Auto-translated
I don't know if it's possible to set the status of a defeated hero to "surrendered" in tactical mode; if so, it would eliminate the need for all these manipulations. We activate the main hero, disable the auto-completion of the battle, and when the army in the garrison runs out, we set the status to "surrendered" so that the hero simply appears in the tavern later. Of course, all this needs to be done through a **script, disabling/enabling the outpost, clearing it, and making it active/inactive**, but that's not as cumbersome anymore.