Auto-translated
Alliances cannot be formed; you simply need to have a hero of a specific color (allied) from the beginning, ensuring that they are not killed (you can hide them in a corner and surround them with rocks). After a certain event, the script for that event will change the ownership of the required towns (heroes, creatures) to the color of the ally.