Skip to content

Posts from Current questions and answers regarding the map editor. Auto-translated

5.0 (12 ratings)
User Avatar
#3056
Auto-translated
Links with long hexadecimal names have a tendency to disappear if copied from their original location. You can try copying an existing town, but without using the editor, and do it manually.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#3057
Auto-translated
If you decide to tinker with the executable file, I'm not an expert, but here's what I know: use IDA, find the relevant part of the assembly code, and then go to the binary file and make the corresponding changes. I haven't tested it myself, but when I asked around, people suggested a less universal but simpler method. Unfortunately, I didn't quite understand its principle.
 

К А
Стикеры GBF в Telegram
User Avatar
#3058
Auto-translated
1. The view on the map.
Is it a city model?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#3059
Auto-translated
I'll try asking Psatkh how he added IDs for creatures. And if he tells me, we can try to do something similar for towns. (And it will turn out to be WoG:))

Added 40 seconds ago
RedHeavenHero
Is it the town model?
Yeah, that's it.

Added 8 minutes ago
And if it's WoG, there will be a huge mess in the messages of that thread about how unbalanced and unoptimized the mod is, at least that's how it was in the first versions of WoG for Heroes III.
Жизнь за Айур!

Карты которые готовятся: Пролог: День незвисимости 4% :smile52:
User Avatar
#3060
Auto-translated
Do you already have ideas for new factions, heroes, and creatures?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#3061
Auto-translated
Just recording two battles won’t be enough.
Жизнь за Айур!

Карты которые готовятся: Пролог: День незвисимости 4% :smile52:
User Avatar
#3062
Auto-translated
When connecting a combat script to a hero, the console throws errors regarding these functions within the script: GetHeroLevel, GetObjectArmySlotCreature. "Attempt to call a nil value." Why is this happening? How can I avoid it?
Кампании для 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
#3063
Auto-translated
These functions don't work in battles at all; they are only for the map.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#3064
Auto-translated
Wow, that's great... So, is it completely impossible to find out the level of a hero and the number of specific creatures in their army during a battle?
Кампании для 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
#3065
Auto-translated
With each hero level up, you can set a global game variable using SetGameVar, and during combat, you can retrieve its value using GetGameVar. The number and type of creatures can be determined using the functions GetDefenderCreatures, GetAttackerCreatures, GetCreatureType, and GetCreatureNumber.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#3066
Auto-translated
Thanks, I'll try. Could you provide more details about the last part? For example, I need to know if there are any creatures with a specific ID in a hero's army, and if so, how many?
Кампании для 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
#3067
Auto-translated
GetAttacker/DefenderCreatures() - returns an array with the names of creatures in the army of the attacking or defending side.
GetCreatureType(unitName) - the type of creature by name.
GetCreatureNumber(unitName) - the number of creatures by name.
Availability checks are performed using a loop.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#3068
Auto-translated
So, is this approximately how it should be done?

flag=0;
DefC=GetDefenderCreatures()
for i, def in DefC do
if GetCreatureType(DefC)==id then
flag=1;
num=GetCreatureNumber(DefC);
end;
end;

Or not?
Кампании для 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
#3069
Auto-translated
Here. It calculates the total number of creatures in the defending army.
local num = 0
for i, unit in GetDefenderCreatures() do
	if GetCreatureType(unit) == id then
		num = num + GetCreatureNumber(unit)
	end
end
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
#3070
Auto-translated
RedHeavenHero
Here. It calculates the total number of creatures in the defending army.
local num = 0
for i, unit in GetDefenderCreatures() do
if GetCreatureType(unit) == id then
num = num + GetCreatureNumber(unit)
end
end
Thank you very much for your help!
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира