Skip to content
User Avatar
#3683
Auto-translated
The computer player should have a random town, and in the map properties, under Player Properties, each player needs to have the "Generate hero in town" checkbox checked and the town specified.

Added 6 minutes later
Markel the Imperor
:smile15:
Is it possible to influence the behavior of a specific AI hero in battle using scripts?
Because it's annoying when, for example, a knight who has mass slow casts it on only one unit, or a demon with the ability to summon a phoenix uses magic arrows. I think you understand what I mean.
And if it's possible, where is this described in detail?
Sorry for being a noob – I haven't done this in a year :smile15:

Added 1 hour 31 minutes later
Another question. How do I create my own artifact? For example, a ring of vampires (gives the Vampirism spell) or a heavy shield with +5 defense, like in one of the maps. And is it possible to at least gain access to the existing abilities of artifacts so that I can create my own artifact based on them, which has the abilities of several existing ones?
1) Yes, you can give a hero commands to cast specific spells, but this only works in single-player maps. The scripting guide describes the functions that make a hero cast spells: UnitCastAimedSpell, UnitCastGlobalSpell, UnitCastAreaSpell. 2) You cannot create your own artifact; you can only replace an existing one. Usually, they replace rarely used ones: Frída, Princess Aeliana, Ring of the Shadowed. At the same time, you can only create artifacts that change characteristics.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4

Statistics

Welcome our newest member: leyu