I think I figured it out, but it's a little different. I opened the map.xdb file with Notepad, found the necessary code snippets, but I was too afraid to edit them 😁 in case I accidentally broke something.
In the end, through trial and error, I found the following method:
- I added the hero through Map Properties / Player Properties / Player 2 / Reserve Heroes List / Add to the reserve, as described above.
- A new line with this hero appeared in MapPropertiesTree / Players / [2] / ReservedHeroes. I edited it, selecting the hero from the Shared list. I also experimented with both options, including heroes not from the tavern.
- After getting crashes when calling such a hero, I started comparing the fields, and through a scientific approach, I found that adding stats in MapPropertiesTree / Players / [2] / ReservedHeroes and specifying the location level (land/dungeon) is enough. The hero's abilities (Timhan was used as a test subject) were displayed and worked in battle.
But it's already night, I'll continue tomorrow. For now, I tried to get two heroes this way, and "it worked."