Post tutorial RSS MMH5.5: Mapmaking, Scripting & Console Commands

This article provides all the necessary info about the process of making maps for Might & Magic: Heroes 5.5, which can have many new adventure objects and heroes compared to the original game.

Posted by on - Intermediate Mapping/Technical

Which editor to use?

The regular H5 mapeditor can be used, as well as the included Advanced RMG editor, the RMG and the editor are basically seperate entities.I noticed that sometimes after installing patch 3.1 the patcher did not install the editor with the best RMG, this is the one with a filesize of 17,137kb, so I included a special one with the mod.

Compatibility

You can start making a map for TOE 3.1 and then move it later to MMH5.5, but as soon as it contains a single object from MMH5.5 it must always have the mod installed while editing and for playing the map. The map will always be compatible with future versions of the mod.

How to add new objects?

It is very hard to add new objects to the H5 editor, I have not really found a good way yet. Therefore I have made a special map that contains all new objects. You should open this map and select the object you need or alternatively select multiple objects. then press Ctrl+C, close the map, open your own new map and press Ctrl+V. It is ofc useful to place many or all new objects in one corner first and then use and multiply them while mapmaking.

Heroes

Heroes are basically also mapobjects, if you want all heroes available for a multiplayer map the setting should be the same as for random maps = no setting. To pick specific new heroes like Sandro or Crag Hack for example you need to use trick with the RMG, in the editor you can preset heroes in the ARMG properties window. After the map is generated the new hero will be standing before the town of the player that had a preset hero, you can then copy paste him to your map. In the object properties tree you can open the 'shared' file to verify the internal name of the hero that is required for scripting.

Artifacts

The map properties --> artifacts section doesn't work properly with H55, because it doesn't recognize all the artifacts, it will generate a buggish list with many ARTIFACT_NONE entries.
It needs to be edited in the 'map properties tree' (you will see many more artifact IDs popup in the drop down list), alternatively the lists can be edited with a text editor from inside the maps .h5m archive (I personally find this much easier, a h5m file is actually a zip file). If you want the map to have all artifacts, simply remove the artifact list completely in the map properties tree! This basically applies to the heroes and spell lists as well. If you are not sure you did it right, compare with a random map.
If you want one of the new artifacts to appear in a specific place on the map, then you need to copy-paste it from the MMH55-AdvObj.h5m downloaded below!

Configuring Battle Sites

Since RC7 I have added the possibility to remove artifacts from battle sites (means they will not spawn), to do this add the following lines in the script editor (example for removing the tomes):

H55_RemoveTheseArtifactsFromBanks = {
ARTIFACT_TOME_OF_DESTRUCTION,
ARTIFACT_TOME_OF_LIGHT_MAGIC,
ARTIFACT_TOME_OF_DARK_MAGIC,
ARTIFACT_TOME_OF_SUMMONING_MAGIC
};

Ultimate artifacts can also be removed from the obelisks by adding them into this list (make sure at least one remains, if the map has RMG-type obelisks or shantiri discs). The IDs for all Artifacts can be found in MMH55-Index.pak --> scripts, advmap-startup.lua. Make sure not to make a syntax error, otherwise the entire map will be bugged, If artifact IDs are used which are only available in H55, the map will become incompatible with TOE

Downloads

Download New Adventure Objects

This map also contains a huge amount of ready to use Mixed neutral stack templates for the faster creation of XL maps they are ranked from tier 5-13, as a generic rule for balancing I recommend to let the player kill around 10 stacks from a tier before moving to the next one! The stacks are set to grow! If the map causes lag switch off animations!!!

Script Functions

H55_Round(number);

Rounds up or down the number, replaces all missing math functions from EE

H55_ContainsAmount(array, sample);

Counts the amount of occurences of an item in a table.

H55_TakeResources(PlayerID,ResourceID,chosenamount,AffectedHero);

H55_GiveResources(PlayerID,ResourceID,chosenamount,AffectedHero);

Allows resource modification, without the need to know how much the current amount is.

H55_GetHeroClass(hero);

Returns the class of the hero as string, returns "Knight", "Paladin" etc.

H55_GetHeroClassType(hero);

Returns "Mind" for balanced class, "Barbarian" for stronghold or otherwise "Might"/"Magic"

H55_GetTownRace(town);

Returns townrace as number

H55_GetHeroRace(hero);

Returns hero race as string

H55_GetHeroRaceNum(hero);

Returns hero race as number

Console commands

These are also script functions but they are more likely useful in game as console commands for testing purposes. How to Activate Console?

@H55_ChallengeMe(1);

Teams up all AI players against player 1 (accepts numbers 1-8). Makes your game much more challenging and speeds up the turns in late game. Highly recommended!

@H55_KillMe(1);

Same as previous command but also boosts AI cheating by another 50%.

@H55_NoFog(1);

Removes Fog on surface and underground for player 1, much simpler than old cheat code.

@H55_Speedrun(1);

All heroes from player 1 receive 9999 black dragons for a speedrun, much simpler than old cheat code.

@H55_SetBankDay(day);

Removes timer from battle sites and sets army size to indicated day, does not add extra stacks so it is not a simulation of what really happens in game, it only simulates growth.

@H55_BanksOnTimer()

Restores battle site timer after use of previous script command.

@H55_WTF();

Investigates if H55 scripts are running, attempts to fix if not.

@H55_On();

Switches on all H55 scripts

@H55_Off();

Switches off all H55 Scripts

@H55_SetSleepTime(x);

Modifies amount of cycles the script engine spends in sleep mode between H55 continues event threads, default is 2. Only accepts values between 1 and 100. Above 5 is very likely to increase amount of script engine crashes. Setting to 1 possibly lowers amount of crashes on very high end PCs.

Comments
Lel_XXl
Lel_XXl - - 1 comments

Так и не понятно как создавать карты для героев 5.5. Дело в том , что при сздании через MMH55_Utility на карте потом нельзя использовать многие возможности иры :1)Сборные артефакты не собираются 2) Артефакты не работают 3) Навыки героев работают не согласно описанию . 4) Все хранилища существ в качестве награды выдают 100 монет и ни грамом золота больше не говоря уже об артефактах . 5) В хранилищах нет ужасающей стражи . 6) 80% хранилищ не работают вовсе 7) Тележки и скелеты больше не содержат ни ресурсов ни артефактов ни стражи .

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.