Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
Auto-translated
I still haven't found a way to change these properties...
In reply to Eleondor
User Avatar
Auto-translated
When you select a regular hero on the map, their properties tree appears. In it, you need to find "Shared" and click on the value (the "value" column). Two buttons will appear: "new" and "...". Click on the ellipsis, and a window with the hero's general properties will appear. Somewhere at the end of the window, on the right side, there are two values: "ScenarioHero" and "HideInEditor," which should be set to "false." In the left part of the window, you can select a hero.

The list of allowed heroes is here: /MapObjects/_(AdvMapSharedGroup)/Heroes/Any.xdb
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
Auto-translated
RedHeavenHero
OverrideObjectTooltipNameAndDescription(script name of the object, name of the object in the window, description of the object in the window)
The last two parameters are paths to the texts.
Will this function work with creatures?
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
Auto-translated
There are separate options for them: SetMonsterNames, as well as in the properties tree: SingleMonsterNameFileRef (for a single monster) and MultipleMonstersNameFileRef (for an "army").
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
Auto-translated
RedHeavenHero
They have their own - SetMonsterNames, as well as in the property tree: SingleMonsterNameFileRef (for a single creature) and MultipleMonstersNameFileRef (for an "army").
How to understand what "single" refers to? Does it mean only 1 creature, or only 1 stack? Does the SetMonsterNames function have the same parameters?
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
Auto-translated
For single-player, it's where there's only one stack. You can give the same link to both points. SetMonsterNames has three parameters: monster name, text, and monster type (single, army, or both), but I don't remember the order. Check the script manual; it should be there.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
Auto-translated
RedHeavenHero
For single-player, it's where there's only one stack. You can give the same link to both points.
SetMonsterNames has three parameters: monster name, text, and monster type (single, army, or both), but I don't remember the order. Check the script manual; it should be there.

I've tested everything now, and it works with creatures, but not with objects:( The console doesn't show any errors, but the objects to which the function was applied have lost their name and description; there's just an empty space left.
Here's an example: OverrideObjectTooltipNameAndDescription("Tavern1", "tavn", "tavo"); Of course, the text files with these names exist, and they are all in the correct format.
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
User Avatar
Auto-translated
You need to provide the full path, just like in a message box.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
Auto-translated
RedHeavenHero
You need to provide the complete path, just like in a message box.
Aaa... Oops, I messed up. Thanks!)

Added after 5 hours and 34 minutes
In one of the Hammers of Fate maps (I think), there was a mission with a caravan. I've seen a function that creates a caravan, but I don't know how to move this caravan each turn, how to prevent the computer player from attacking it, and how to trigger a battle when it is attacked. Has anyone done something similar?
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
Auto-translated
CreateCaravan(caravan name, player, floor, x, y, destination floor, destination x, destination y)
The caravan moves on its own each turn. The AI will attack it if the opportunity arises, but you can place impassable static objects around the caravan during its turn, blocking its path, and remove them during the player's turn. Only standard hero interaction with the caravan is possible; a touch trigger does not affect it.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
I need to implement a system where, if a hero intercepts a caravan before it reaches its destination, the mission is considered successful; otherwise, it's a failure. I already know how to handle the AI so that it won't interfere. I believe I need to create a loop that checks if the caravan exists using `IsObjectExists(caravan name)` and retrieves its coordinates using `GetObjectPosition(caravan name)`. Is that correct? And how do I assign an army to the caravan?
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
Auto-translated
The flow is correct. You can define the army by adding AddObjectCreatures.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
Juss456, when adding an army using AddObjectCreatures, make sure to include a sleep(1) between creating the caravan and adding the army. If needed, there was a similar quest in the Mercenaries map – a caravan was created, and it had to be killed before reaching a certain location.
In reply to Jack_of_shadows
User Avatar
Auto-translated
Jack_of_shadows
Juss456, when adding an army using AddObjectCreatures, make sure to include a sleep(1) between creating the caravan and adding the army. If needed, there was a similar quest in the Mercenaries map – a caravan was created, which needed to be killed before reaching a certain location.

Thank you all! I'll try to create the mission tomorrow. I always insert sleeps in questionable places; otherwise, I've already had trouble creating creatures and working with them.

Added after 14 hours 33 minutes
There is a function called EnableHeroAI(sHeroName, bEnable). Is there a function that checks the state of bEnable? Something like IsEnableHeroAI?
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира
User Avatar
Auto-translated
Hello! Could you please tell me why the map-tag.xdb file is missing from my map files?
Готовиться компания за мага Сайруса. Готовность = 10%.
____________________

Всех моих врагов я беспощадно рву в клочья :mad: !

Statistics

Welcome our newest member: Emil