Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
#4753
Auto-translated
Does anyone know how to use this function?
Play2DSound(SoundName);
It works the same way as with effects and videos. Nothing special.
There are only slight difficulties if you add a sound to the game yourself – this needs to be done during export, similar to adding models.
 

К А
Стикеры GBF в Telegram
#4754
Auto-translated
A very important question regarding Heroes 5 and the map editor. I'm creating a map. In the game's scenario, there's Railag, who has the ability "Terrifying" - the higher the hero's level, the more the initiative of enemy units is reduced, by 1% for each hero level. But I want to add Railag to the editor with the ability "Master of Initiative" - for each hero level, the initiative of enemy units is reduced by 1%, and for each hero level, the initiative of units under the hero's command increases by 1%, thus increasing the initiative of his own units by 1% and decreasing the initiative of the enemy's units by 1% for each hero level. But there isn't a Railag with that ability. Only with the "Terrifying" ability. Is there any way to change his ability in the editor or add this Railag with the "Master of Initiative" ability? Or how can I make him appear there?
In reply to MrKlarik
User Avatar
#4755
Auto-translated
MrKlarik
A very important question about Heroes 5, the map editor. I am creating a map. In the Heroes scenario, there is Railag, who has the ability "Terrifying" - the higher the hero's level, the more the initiative of enemy units decreases, 1% for each hero level. But I want to add Railag with the ability "Master of Initiative" in the editor - for each hero level, the initiative of enemy units decreases by 1%, and for each hero level, the initiative of units under the hero's command increases by 1%, so for each hero level, the initiative of your own units increases by 1%, and the initiative of the enemy decreases by 1%. But there is no Railag with that ability. Only with the "Terrifying" ability. Is it possible to change his ability in the editor or add this Railag with the "Master of Initiative" ability? Or how can I make him appear there?
In the properties tree, find Shared, click on "..." in that field, and find the Railag_A1 hero in the game resource tree on the left.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
#4756
Auto-translated
Thanks, I managed to do it. But how do I add "Hellfire" or "Devil's Chain"? I simply can't find them in the spells section of the editor. I would be grateful for your help, thank you in advance:cool:
In reply to Ment
User Avatar
#4757
Auto-translated
Ment
It works the same way as with effects and videos. Nothing special.
There are only slight difficulties if you add sound to the game yourself – this needs to be done during export, similar to adding models.
I haven't worked with videos for a long time; can you provide an example
with a description of where the sound comes from, etc.?
Кампания в разработке:
Название не придумал
Выполнено 5%
In reply to RedHeavenHero
#4758
Auto-translated
RedHeavenHero
In the properties tree, find Shared, click on "..." in that field, and find the Railag_A1 hero in the game's resource tree on the left.
How do you give a character the "Hell Wave" or "Devil's Chain" ability?
User Avatar
#4759
Auto-translated
The chain is called SPELL_UBER_CHAIN_LIGHTNING, and the wave, if I'm not mistaken, is SPELL_BOSS_FIREWALL. In the spellIds field of the desired hero, select these spells.
Нет войне.
In reply to Gerter
#4760
Auto-translated
Gerter
the chain is called SPELL_UBER_CHAIN_LIGHTNING, and the wave, if I'm not mistaken, is SPELL_BOSS_FIREWALL. in the spellIds field of the desired hero, you select these spells.
Thank you, it all worked and functions perfectly!:smile26: :p :)
In reply to Ment
User Avatar
#4761
Auto-translated
Ment
It works the same way as with effects and videos. Nothing special.
There are only slight difficulties if you add sound to the game yourself – this needs to be done during export, similar to adding models.
I would like an example and explanation; I haven't made videos in a long time, and I'm at the final stage.
Кампания в разработке:
Название не придумал
Выполнено 5%
User Avatar
#4762
Auto-translated
Here's an example:
StartDialogScene("/Maps/SingleMissions/NewRandomMap 19/StartScene2/DialogScene.xdb#xpointer(/DialogScene)");
It seems like it will be similar for Play2DSound. First, the path (ending in .xdb), then an addition like #xpointer, and then the name of the resource type in parentheses, (/Sound) will likely be it. It doesn't seem like there was a separation of 2D and 3D sounds in the resources themselves, only in the script.
I have no idea where to find them in data.pak.
To provide a more specific example... Well, maybe I will, if I find the map template where I used this... But it's unlikely.
 

К А
Стикеры GBF в Telegram
User Avatar
#4763
Auto-translated
DarkLordax, I think I only used 3DSound, but it's probably the same for 2D. Quote from the FAQ:
Sounds (used in the Play2DSound/Play3DSound functions)
Where to find them:
/Sounds/_(Sound)/
Postfix:
#xpointer(/Sound)
Example paths:
-- Haste spell
'/Sounds/_(Sound)/Spells/Haste.xdb#xpointer(/Sound)'
-- Positive morale
'/Sounds/_(Sound)/Spells/GoodMoral.xdb#xpointer(/Sound)'
-- Catapult attack
'/Sounds/_(Sound)/WarMachines/Catapult/attack.xdb#xpointer(/Sound)'
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
User Avatar
#4764
Auto-translated
2 questions:
- How can I prevent a specific hero from transferring troops/artifacts? I think the "isUntransferable" setting should affect this, but I don't understand how to configure it.
- Is it possible to redirect console output to a file?
Нет войне.
User Avatar
#4765
Auto-translated
-Is it possible to redirect console output to a file?
There is a method in the file FOLDER_WITH_THE_GAME/profiles/autoexec_a2.cfg to modify the line containing the words write_log; the console output will then be written to the file FOLDER_WITH_THE_GAME/bin/console.txt. I did this a long time ago and I clearly remember that it worked (possibly it was on version 3.0). Several years later, after reinstalling the game, I wanted to do it again, but I couldn't find the words write_log in that file, and I didn't investigate further. Unfortunately, I don't remember exactly what the line looked like.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
User Avatar
#4766
Auto-translated
game_writelog x
where x is 1 to enable and 0 to disable
You can (and should) enter this command through the console or the consoleCmd function. This is necessary because if you try to print a non-7-bit character, the output will stop and will not resume until the console.txt file is deleted. Therefore, I recommend using the command in a form like this:

consoleCmd('game_writelog 1')
print('...')
consoleCmd('game_writelog 0')
It might also be helpful to separate the enabling and printing with pauses.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to Jack_of_shadows
User Avatar
#4767
Auto-translated
Jack_of_shadows
There's a method in the file GAME_FOLDER/profiles/autoexec_a2.cfg to modify the line containing the words "write_log"; the console output will then be written to the file GAME_FOLDER/bin/console.txt. I did this a long time ago, and I clearly remember it working (possibly on version 3.0). Several years later, after reinstalling the game, I wanted to do it again, but I couldn't find the "write_log" words in that file, and I didn't look into it further. Unfortunately, I didn't write down exactly what the line looked like.

game_writelog x
where x is 1 to enable and 0 to disable
You can (and even should) enter this command through the console or the consoleCmd function. This is necessary because if you try to print a non-7-bit character, the output will stop and won't resume until the console.txt file is deleted. Therefore, I recommend using the command in some form like this:
Code:
consoleCmd('game_writelog 1')
print('...')
consoleCmd('game_writelog 0')
It might also be helpful to separate the enabling and printing with pauses.

thank you for your help)
Нет войне.