Connection ErrorBad RequestSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
How can I set a hero limit for the AI, so that it can't hire more than 3 heroes? Thanks in advance for the answer!
Generally, there's no way to do that. Because even if you ban hiring after 3 heroes, one will still remain in the tavern, and the AI will hire him anyway. On the other hand, if you need to prohibit all heroes except certain ones, you can use AllowPlayerTavernRace(player, race, 0/1 (prohibit/allow)) 8 times for each race, and then use AllowPlayerTavernHero(player, script name of the hero, 0/1 (prohibit/allow)) to allow the AI to hire specific heroes. For example, I used this to create a player character who could only hire Andrias and Lorenzo (as in the last mission in the campaign for Freya). To ensure that heroes are always with the player, you can link them using MakeHeroReturnToTavernAfterDeath(script name of the hero, 0/1 (prohibit/allow)). It's unlikely that you'll be able to force random heroes into a hero limit (and campaign heroes in general), because you probably won't be able to create a script that will delete the least useful extra heroes, for example, only those hired after the ban is activated. Although, I might be wrong about this)