Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
Auto-translated
I've encountered this issue with GiveHeroSkill (heroname, skill_id) several times now. So, how can I give a hero an ultimate skill, like Uber-Shriek for a Necromancer or Super-Gate Opening for a Demon? I don't remember the exact names anymore.
It doesn't work with the standard method, unfortunately. Or maybe I'm just doing something wrong...

Whatever
In reply to Heroist
User Avatar
Auto-translated
Heroist
I've encountered this issue with GiveHeroSkill (heroname, skill_id) several times now. How do I give a hero an ultimate skill, like Uber-Cry for the Necromancer or Super-Gate Opening for the Demon? I don't remember the exact names anymore.
It doesn't work with the usual method, unfortunately. Or am I doing something wrong?

DEMON_FEAT_ABSOLUTE_GATING = 98; -- Urgash's_Call
NECROMANCER_FEAT_ABSOLUTE_FEAR = 111; -- Howl_of_Terror
RANGER_FEAT_ABSOLUTE_LUCK = 124; -- Nature's Luck
WIZARD_FEAT_ABSOLUTE_WIZARDY = 137; -- Arcane Omniscience
WARLOCK_FEAT_ABSOLUTE_CHAINS = 150; -- Rage_of_the_Elements
HERO_SKILL_ABSOLUTE_PROTECTION = 167
KNIGHT_FEAT_ABSOLUTE_CHARGE = 85; -- Unstoppable charge - is this something like that? Or does it not work?
Кампании для 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
Yes, but for example, when I place a demon and enter `GiveHeroSkill(hero1, 98)` in the console, nothing happens.

Whatever
In reply to Heroist
User Avatar
Auto-translated
Heroist
Yes, but for example, I place a demon, type GiveHeroSkill(hero1, 98) in the console, and nothing happens.

And it doesn't give any errors?

Maybe the hero needs a set of corresponding skills to gain this ability? (although I doubt 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:

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
Auto-translated
1) the hero must indeed possess all the necessary skills,
2) if you need to bypass this limitation, you can use consoleCmd, but only in single-player mode.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
consoleCmd
what kind of monster is that?

Whatever
In reply to Heroist
User Avatar
Auto-translated
consoleCmd(command_string)
This function allows you to input console commands through a script. The only parameter is the command string itself. For example:
consoleCmd("enable_cheats")
consoleCmd("add_skill WILDFIRE")
will grant the currently selected hero the Wildfire skill, without checking for prerequisites like the Archery skill, etc. Only basic attack skills are required.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
consoleCmd("enable_cheats")
consoleCmd("add_skill Call of Urgash")

Instead of "Call of Urgash," use the name of this skill. I enter these two lines into the script, and then I will receive the "Call of Urgash" skill, right?

Whatever
User Avatar
Auto-translated
You also need an ID there (a digital one is acceptable), Russian won't work. Otherwise, yes.

Added 2 minutes later
Just make sure that the hero is selected.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
Yes, it’s great, everything worked, thank you very much!

Whatever
User Avatar
Auto-translated
So, here's the situation... A hero is in reserve. When a battle is initiated with him, the player participates. How can I prevent the player from receiving artifacts from the defeated hero after the battle ends? I assume this can be done using the SetHeroLootable(sHeroName, bEnable) function, but does it work for reserved heroes?
Кампании для 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 Ment
User Avatar
Auto-translated
Ment
It should work, try it...

Yes, it seems to be working.
Кампании для 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
I would like to ask about the function `
SetDisabledObjectMode('h1', DISABLED_BLOCKED);
`. For some reason, it doesn't seem to be working. What could be the problem? The sequence is as follows: first, enable, then disabled (this function), then set selectiontype to 0, and finally animation (death). Everything works, but the information frame remains, which is a pity. In the campaign, it disables successfully. (A2C2M2)

Whatever
In reply to Heroist
User Avatar
Auto-translated
That's not all. To remove the tooltip, the developers used this:
OverrideObjectTooltipNameAndDescription("monster_name", "-disabled-", "")
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

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

Statistics

Welcome our newest member: Emil