Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to Robertylia
User Avatar
Auto-translated
Robertylia
another question arose: how do you apply an animation to a creature on the map?
You give the creature a script name (Name) and write the following in the script:
PlayObjectAnimation('script.name', 'animation', MODE)
The animation can be, for example, 'idle00', 'death', 'attack00', 'happy', 'hit', 'rangeattack', 'cast', 'specability', 'stir00'.
Modes:
IDLE - repeat the animation,
ONESHOT - play the animation once,
ONESHOT_STILL - play the animation once and freeze in the position of the last frame, useful for 'death',
NON_ESSENTIAL - play the animation once if another animation is not currently playing on the object.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
Auto-translated
RedHeavenHero
Here are the xdb and dds files in the archive.
And I had to slightly increase the texture size to 240x180, adding empty areas to the right and bottom of it, so that it loads correctly.

Excellent! Thank you! I've finished my first mod, which adds new arenas. Should I publish it in the MODS thread for Heroes of Might and Magic 5: "Tribes of the East"? Or in the maps section?

And my imagination suggests: is it possible to slightly change the gameplay on the arena? For example, 1) add an object, approaching which any creature receives a random blessing or curse once per battle? 2) add several stacks of specific creatures to the battlefield, which would be neutral and fight against both players?
I suspect that this can be scripted, but, as far as I know, the scripts for battles are different from those for the global map.
Here, I found AddCreature(side, type, number, x = -1, y = -1); But this is only for one or the other player. And, I confess, I have never written scripts for tactical mods. I don't even know where to write them.
In reply to RedHeavenHero
Auto-translated
RedHeavenHero
You give the creature a scripted name (Name) and write in the script:
PlayObjectAnimation('script. name', 'animation', MODE)
The animation can be, for example, 'idle00', 'death', 'attack00', 'happy', 'hit', 'rangeattack', 'cast', 'specability', 'stir00'.
Modes:
IDLE - repeat the animation,
ONESHOT - play the animation once,
ONESHOT_STILL - play the animation once and freeze in the position of the last frame, useful for 'death',
NON_ESSENTIAL - play the animation once if another animation is not currently playing on the object.

And where exactly should I write the script?

Added 19 minutes later
Robertylia
And where exactly should I write the script?

Oh, I understand now, it worked, thank you:)
User Avatar
Auto-translated
Could you please explain why, when modding a map, I set both "human playable" and "computer playable" in the editor, save, and close it? Then, when I open the map again, it reverts to only having the "human playable" option checked. How can I fix this?
In reply to Eleondor
User Avatar
Auto-translated
I don't understand one thing... why, when I place an object on a LEVEL surface, the editor shows this error (see Figure 1). I seem to have leveled the terrain, but it still doesn't work (see example 2). This often happens when there is nothing on the map and you place, for example, a Castle...
Attachments 2
2 files attached • Total size: 404.0 KB

Прокрастинирую...
"...Завтра станет лучше
но солнце так и не взошло..."
In reply to Lucan_Porri
User Avatar
Auto-translated
^-^Furry^-^
I don't understand one thing... why, when I place an object on a LEVEL surface, the editor shows this error (see Figure 1). I seem to have leveled the terrain, but it still doesn't work (see Example 2). This often happens when there is nothing on the map and you place, for example, a Castle...
These errors don't affect anything; you can ignore them.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
Auto-translated
I've figured out how combat scripts work and how to summon creatures onto the battlefield. But is it true that they don't work in multiplayer?
User Avatar
Auto-translated
The problem is solved – it was a bug.
In reply to Eleondor
User Avatar
Auto-translated
When I was writing the attack script for the Monk, I checked it in the game, but it shows a MELEE ATTACK. How do I make it a ranged attack?

Прокрастинирую...
"...Завтра станет лучше
но солнце так и не взошло..."
In reply to Эритроцитоз
User Avatar
Auto-translated
Erythrocytosis
I've figured out combat scripts and understand how to summon creatures onto the battlefield. But do they not work in multiplayer?
They don't work.

Added after 30 seconds
^-^Furry^-^
When I was writing the Monk attack script, I checked it in the game, but it displays a MELEE ATTACK. How do I make it a ranged attack?
"rangeattack"
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
Auto-translated
Added after 30 seconds
[/U]
"rangeattack"[/QUOTE]
Thank you!

Прокрастинирую...
"...Завтра станет лучше
но солнце так и не взошло..."
In reply to RedHeavenHero
Auto-translated
RedHeavenHero
They don't work.

Added after 30 seconds

"rangeattack"

It's annoying, to say the least.
In reply to Эритроцитоз
User Avatar
Auto-translated
Sorry for asking so many questions, but when I'm making a map, I often encounter situations where I can't figure things out on my own. --------------------------------------------- So: 1) Regarding the scripted name in the prophet's hut. What is the scripted name for? 2) I know it's done with a script, but I still want to make it so that after a certain amount of time (e.g., 2 years in my case), a demon appears in a specific location (see the attachment below), and then a quest is given to kill it. How can I do this? + How are the animations translated (so I don't get confused): 'idle00', 'death', 'attack00', 'happy', 'hit', 'rangeattack', 'cast', 'specability', 'stir00'?
Attachments 1
1 file attached • Total size: 190.3 KB

Прокрастинирую...
"...Завтра станет лучше
но солнце так и не взошло..."
In reply to Lucan_Porri
Auto-translated
Here's a question: Is it possible to add new duel characters so that they appear not only in their price category but also among all other characters? I tried replacing one with another – it works. But adding a new one doesn’t work for some reason. In the PresetMap folder, in the Map file, there are only three heroes specified for each faction.

I tried adding a similar line and creating a corresponding file – it didn’t help. There are still only three. Probably, there is another file somewhere containing information about the number of possible characters. Please help! :smile45:
Attachments 1
1 file attached • Total size: 143.3 KB
In reply to Lucan_Porri
User Avatar
Auto-translated
^-^Furry^-^
Sorry for asking so many questions; it's just that when I'm making a map, there are times when I can't figure things out on my own.
---------------------------------------------
So:
1) Regarding the scripted name in the prophet's hut. What is the scripted name of?
2) I know this is done with a script, but still...I want to make it so that after a certain amount of time (e.g., 2 years in my case), a demon appears in a specific location (see attachment below), and then you get a quest to kill it. How do I do that?
+ How are animations translated (so I don't get confused): 'idle00', 'death', 'attack00', 'happy', 'hit', 'rangeattack', 'cast', 'specability', 'stir00'?
1) I didn't understand. The prophet's hut has its own scripted name, and there's also the name of the quest itself.
2) You can do it like this:
function NewDay()
if GetDate(MONTH) == 25 and GetDate(WEEK) == 1 and GetDate(DAY_OF_WEEK) == 1 then
CreateMonster("monster_name", monster_type, number_of_creatures, x, y, floor, mood, courage, rotation_angle, height)
SetObjectiveState('quest_name', OBJECTIVE_ACTIVE)
startThread(killDemon)
end
end

function killDemon()
while 1 do
if not IsObjectExists("monster_name") then
SetObjectiveState("quest_name", OBJECTIVE_COMPLETED)
break
end
sleep(10)
end
end

Trigger(NEW_DAY_TRIGGER, "NewDay")
The quest should be OBJECTIVE_KIND_MANUAL, and the parameters IsInitialyActive and IsInitialyVisible should be false.

And the animations are:
idle state, death, melee attack, happiness, taking damage, ranged attack, spellcasting, special ability, agitation (what creatures do in battle when you hover your cursor over them).

Added after 8 minutes
Erythrocytosis
I have a question: is it possible to add new duel characters so that they appear not only in their price category but among all other characters? I tried replacing one with another - it works. But adding a new one doesn't work for some reason. In the PresetMap folder, in the Map file, there are only three heroes per faction.

I tried writing an additional line and creating a corresponding file - it didn't help. There are still only three. There must be another file somewhere with information about the number of possible characters. Please help!:smile45:
Try changing this file: \UI\MPDMLobby\presets.(DuelPresets).xdb.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

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

Statistics

Welcome our newest member: Emil