Guides: MMH7 Editor – Part 4

This guide has been created in collaboration with The original article written by Lord Graa (in Czech) can be found here.


Might & Magic: Heroes VII Editor – Part 4

Our previous part of the guide, along with the first two articles, was dedicated to getting to know the basics of the editor. Now we’re looking a bit deeper into the scripting, creating tasks, events and dialogs. If you want to explore and learn from a finished map, you can download the file below.

Download map
(4,6 MB .zip file)
Map name: First
Type: Scenario
Size: Small (75×75)
Number of players: 2 players (1 human)2 players (1 human)
Save location: \My Documents\My Games\Might & Magic Heroes VII\MMH7Game\EditorWorkspace

In this article we’re going to create a quest for Player 1 with following steps:
1. Talk to The Storm Emperor who will give the spell Ice Strike.
2. Enter underground and defeat Player 2 demon hero.
3. Return to The Storm Emperor and gain access to the well containing a secret underground passage.
4. Defeat the Light Elemental guarding The Celestial Key item.
5. Exit the portal (and end the game) using The Celestial Key.


Now that we have some buildings and objects on our map, it is time to create some tasks and events. Clicking the Script Tool opens the main script window.

In the scripting window you will see four tabs: Quests, Events, Narration and Scenes. Select the Quests tab. You should see only two pre-defined folders, Primary and Secondary Quests. If there are any pre-existing quests they can be deleted via the right-click menu.

Now right-click on the Primary Quests and select Add Primary Quest. Fill in the quest details as seen in the image below.

Primary Quest

Player: Determines the player who the quest will be given.
Title: Title of the quest (will be displayed in the game).
Description: Short description of the quest.
Active at start: Determines whether the quest is active from the beginning or if it is activated later by an event.
Reward Text: Text which is displayed in the reward pop-up.
Reward 1/2/3: You can select up to three rewards (attribute/artifact/creature/resource/experience) for finishing the quest successfully.
If Quest completed do: Here you can define actions which trigger when the quest is completed successfully.
If Quest failed do: Here you can define actions which trigger when the quest is failed.

Now you have created sort of a container quest, but in order to function properly it needs some targets. Right-click the quest on the left column and select Add Objective. Objectives can be implemented either in parallel stage (all objectives can be completed independently) or in series (second objective can be completed after the first one etc.) Usually the objectives are arranged in series, and the order is determined by the Stage selection. Fill in the objective details as shown in the following picture.

Objective settings

Editor Title: Name used in the editor (not visible in-game).
Description: Description for the objective (visible in-game).
Activation Stage: Activation order of the objectives (serial order = 1-2-3…, parallel order = 1-1-1…).
Ignore Fail: Whether the objective can be failed but still considered as completed.
Show on minimap: Enable minimap and adventure map tracking for this objective.
Winning Condition: You can add conditions which trigger the objective as completed.
Losing Condition: You can add conditions which trigger the objective as failed.

In order for the player to know where the first objective is, “Show on the minimap” option is set to Custom. Right-click the item “Objects for minimap tracking” and select Add. From the list of objects choose our NPC hero The Storm Emperor, since this is where we want the player to go first.

First objective will be triggered as completed when the Player hero learns the spell Ice Strike. So for Winning Condition we select Add Hero Condition > Has Hero with Spell. 1 Right-click the newly created condition “Any Hero has any Spell” and select Edit Condition. For Spell select Ice Strike and change Use Interacting Hero to False. 2

Note! Unfortunately, there is currently a bug which prevents objectives requiring a learned spell to not trigger properly. Until this is fixed, you can use eg. giving an artifact instead of a spell to trigger the objective.

The next objective will be to defeat the Player 2 hero which we created in the earlier article. Create a second objective as shown in the image. 3 Remember to set Activation Stage to Stage 2, in order to trigger this objective after the first one (Stage 1) has been completed. Set the Winning Condition to Add Army Condition > Armies Defeated and select the Player 2 demon hero to be the one to defeat. 4

quest 1
quest 2

quest 3
quest 4

Next we need to create a bodyguard for the Celestial Key artifact. Switch to the underground and place Light Elemental in front of the artifact. Double-click the Elemental and set the size of the army to contain only one creature. 5 Create another objective and set the Winning Condition to defeat the Light Elemental. Again, use the Armies defeated condition. 6

Next we want to create the final portal which The Celestial Key will give the entrance to. Drag a Dimensional Channel to the small island and set it’s color and name to your liking. You don’t need to set a Linked Exit since the gateway will just end the game and not lead anywhere. 7 Then we need to create an objective that is finished when the player enters the portal. Set the Winning Condition Add Player Condition > Has visited sites and select the Dimension Channel for the Required Site. 8

quest 5
quest 6

quest 7
quest 8


Now that the quest structure is ready, it’s time to create Events. Unlike quests, events are not directly visible to the player, and they can combine different triggers, actions and conditions. Switch to the Events tab, right-click the left column and select Add new Event. 1 The first event we create will be to deactivate the gates, since they will be activated only when the hero receives the key. So create an event which triggers when the adventure map is loaded.

Event tab

Name: Name used in the editor (not visible in-game).
Status: Specifies whether the event is active or inactive. Active event will be present in the game right from the start and trigger whenever the conditions are met. Inactive event can be activated later with script.
Execute: Determines how many times the event can be triggered. If set to Multiple, Count specifies the exact number.
Triggers: What needs to happen to trigger the event.
Conditions: What are the conditions that have to be met.
Actions: What happens when the event triggers.

Conditions are not necessary for this event, so we’ll add an action: Add Destructible Action > Manipulate Destruction State. 2 Right-click the newly created action and select the underground Dimensional Channel as a Destructible site. The Operation field should be set to Destroy. 3

Now that the gate will be deactivated from the start, we need to create an event which activates it again when the hero receives the key. So create a new event which will trigger when the hero picks up The Celestial Key item. 4 Select the correct item and assign the event only to Player 1 (since this is a single player quest). 5 Then we need to set the action that makes the gate functional again. Again add a Manipulate Destructible State action, and this time set the Operation field to Repair. 6

event 1
event 2
event 3

event 4
event 5
event 6


We’ll return to events later, but now let’s take a look at how to set up narration and dialogues.

Under the Narration tab, right-click Dialogues and click Add new Dialogue. Select the newly created dialogue and set the Dialogue Type to HDG – Hero Dialogue. This will make the dialogue happen between heroes. 1 Add new dialogue lines by right-clicking the dialogue name on the left column and select Add new line to Dialogue. 2 Do this few more times so that you have several lines of dialogue.

Note! There is a bug in some versions of the editor where the Hero Dialogue option will not function correctly if done this way. You can avoid this bug by creating a CIN – Council Intervention dialogue and changing it’s type to HDG – Hero Dialogue after you have created the lines.

Now you can finish the dialogue (you can make up a dialogue in which The Storm Emperor guides the player to defeat the demon hero and return to The Storm Emperor). Remember to select the speaker hero and the position that the hero portrait will be displayed in the dialogue window. 3 Note! If you create your own hero, do not use accent marks or other special characters in the hero name, since the editor doesn’t always function correctly with them.

You can also create a classic text message like in previous Heroes games. The options are simple, just set a title (not visible in-game) and the message body. 4

dialogue 1
dialogue 2

dialogue 3
dialogue 4


Now that we have prepared dialogues, we can get back to the events. Create a new event as seen in the image and add a Trigger Add Hero Trigger > Talked to NPC. 1 Right-click the new Trigger line and select The Storm Elemental as the NPC army that will talk to the Player 1 hero on the ford we created in the previous article. 2 This will make The Storm Emperor have a little speech bubble above him in the adventure map.

As you may remember, the first objective we created required the Player 1 hero to have the spell Ice Strike. The Storm Emperor is going to teach him the spell, so we’re going to need to set a proper action for it. Select Add Hero Action > Learn Spell for Hero. 3 Set Ice Strike as the Spell to learn and set Use interacting army to True. 4

events 1
events 2

events 3
events 4


Next we want to guide our player to the underground entrance. However, we don’t want the player to enter the underground too soon, so let’s create a new Manipulate Destructible State action which destroys the underground entrance when the adventure map is loaded. 5 Now let’s return to our meetup event and create an action that focuses the camera to the underground entrance: Add Camera Action > Focus camera. 6 Set the Camera target to the underground entrance object. Follow target and Take camera control from player are set to True to make sure the camera is following the target (useful when the target is a moving hero) and to prevent the player from interrupting the script flow.

Then we want to display the dialogue we just created. Select Add Quest Action > Start Dialogue. 7 Edit the action and select the correct dialogue from the drop-down.

The actions run in order from top to bottom, so we need to adjust the order a bit. We want to display the dialogue first, so right-click the dialogue action and select Move Action up twice to move it to the top. 8

events 5
events 6

events 7
events 8


Since the Player 1 hero is instructed to go to the underground entrance, we need to make it accessible again. Again create Manipulate Destructible State action and set the Operation state of the entrance to Repair. 9 And finally, add an action for the text message we created earlier (we use this to tell the player that the hero has learned Ice Strike and instruct him to fight the demon hero): Add Quest Action > Start Text 10

If you don’t want AI to move around the Player 2 hero (the underground demon hero), you can “freeze” him by creating an event with an action Add Hero Action > Set Hibernation State for Hero AI. 11 Set New Hibernation State, Target army and Target player properties correctly. 12

events 9
events 10

events 11
events 12


Now the player has hopefully defeated the demon hero and will return to The Storm Emperor. The Cell Trigger Tile (found in the Editor Objects tab ) is a useful tool for scripting and triggering events. An event can be triggered when a hero enters the Cell Trigger Tile. Drag one in front of The Storm Emperor hero. 13

To use this cell, we create a new event and add a Trigger Add Hero Trigger > Cell Event. 14 The Outcome property has two options: OnArmyEnter and OnArmyExit. The first triggers when an army enters the tile, the latter when leaving the tile. Assignee is the name of the tile that we want to control. 15 Since we don’t want this event to trigger too early, we have to add a Condition that the demon hero has to be defeated. Next add an action Add Hero Action > Remove Heroes/Armies to remove The Storm Emperor from blocking the path to the well. 16 Select The Storm Emperor as the Target army to be removed. 17

events 13
events 14
events 15

events 16
events 17


You can also create a message to inform the player that the path to the well is clear. 18 Set the action correctly 19 and move the action to the top, since we want the message to appear before The Storm Emperor disappears. 20

events 18
events 19
events 20



The last tab on the Script Tool is Scenes. We can use Scenes to create the effect of the hero teleporting to underground through the well. Right-click the left panel and Add new Scene. Insert action Add Hero Action > Move to Tile. 1

You can either enter the exact location using x and y coordinates, or use the Tile Marker we created in the previous article. Select Tile Marker 0, Teleport = True, Camera follows = True and Use Interacting Army = True. 2

Now we need to create an event which triggers the teleport scene. Use the Trigger Add Hero Trigger > Hero visits shell. As you may remember, the well is actually a Visitable Shell which only masquerades as a well. If you have multiple shells on the map, you may specify the specific shell on the Trigger, but since we have only one shell we can leave the Trigger properties to default. 3 Insert an action Add Quest Action > Activate NPC Scene to activate the scene we prepared a moment ago. 4 Remember to select the correct scene from the action properties.

scene 1
scene 2

scene 3
scene 4



Now that the main quest is ready, it’s time to add some finishing touches to make the map functional. First give the Player 1 hero some units so he can manage the fight against the demon hero. 1 Open the Map Properties and make sure the default winning and losing conditions are disabled (to ensure the map will follow your custom script). 2

Since the default losing condition is disabled, we need to create a quest that will replace it. 3 A simple objective will do, insert Add Player Condition > Player has no hero. 4 Of course the player may conquer the underground Player 2 town, so if you want you can trigger the game to be lost when a specific hero (the Player 1 main hero) is defeated by adding the condition Add Army Condition > Armies defeated and selecting the Player 1 hero from the properties. Note! When you add several conditions, you can set OR / AND operators to determine how the conditions should apply.

final 1
final 2

final 3
final 4


Now you can test the map and see if there’s something that we’ve missed with this tutorial.

You may notice that the game ends when The Storm Emperor attacks the Player 1 hero. The Storm Emperor should only be a friendly unit guarding the ford, so we forgot to set a hibernation action for him to stay still.

Go and create a new event (which triggers at Adventure Map loaded) and set Add Quest Action > Set NPC Properties. Edit the action and set NPC army = The Storm Emperor, NPC = True and Talks = True. This will make The Storm Emperor a talking NPC. 5 Then create another event with an action that makes The Storm Emperor hibernate (as we did with the demon hero): Add Hero Action > Set Hibernation State for Hero AI. 6 Remember to set New Hibernation State, Target army and Target player from the action properties.

final 5
final 6


And that brings us to the end, you may again test the map and make sure all the quests and triggers are functioning properly.


This article concludes our first editor guide series, hopefully you’re now a bit more familiar with the basic functions of the Might & Magic: Heroes VII map editor. The editor includes also a small help documentation which explains some of the features a bit more thoroughly.

There are of course a lot of features in the basic editor that we didn’t address, not to mention the advanced Unreal Editor which offers nearly endless customization possibilities. Maybe we’ll return to them in another article series in the future.

Feel free to explore the editor and discuss your findings in the comment section!

2 comments on “MMH7 Editor – Part 4

  1. For all those who are trying out the editor, please keep in mind that many things need to be done BEFORE you save the game for the first time. All texts, dialogues, portal linkages, gate to underground linkages, interactive objects (such as destructible objects), cell triggers, names of players (if you want it to list something other than “Player 1,” “Player 2”, etc.) and probably some other items I have not listed all have to made before the first save. Otherwise they will not work (at least they did not in my map editor). This makes designing a map something that needs to be planned out well in advance rather than something you can simply add to it as you go after your first save. Even changing the foliage may cause the editor to crash. Just wanted to give a head’s up to all aspiring mapmakers.

    1. I should have added that the things you CAN change after your first save are height sculpturing, and adding buildings, creatures, town objects, area of control, and quests, to name a few. I would recommend experimenting with simpler maps first (such as skirmish maps) before you attempt to make something more complex (like a scenario map).

Leave a Comment

Your email address will not be published.