I found a mod in the data folder that changes the castle building system. Could this be the cause of the game glitch, and when the opponent tries to rebuild, the game freezes?
Added 2 minutes later
I've done that too; I process all the maps I create in the map editor. The point is that when I load an existing standard template map, presumably created by the developers, the dwellings work adequately, i.e., the battlefield is expanded, the atmosphere is appropriate (in the crypt of the dead, in the dwarves' Dungeon, etc.), the army grows, and winning gives gold + resources + artifacts, as described on the first page of the thread. However, when I create my own map using the utility, these dwellings only have armies, but there is no expanded battlefield, nor are there any rewards; it just gives 100 gold, regardless of the dwelling level, from crypt to utopia. Perhaps some script is not being applied, or what could be the problem.