Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 5 - Modders Workshop > Thread: [MMH5.5] Mapmaking, Scripting & Console Commands
Thread: [MMH5.5] Mapmaking, Scripting & Console Commands This thread is 4 pages long: 1 2 3 4 · NEXT»
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted June 23, 2015 08:04 PM bonus applied by Galaad on 04 Aug 2017.
Edited by magnomagus at 18:48, 15 May 2016.

[MMH5.5] Mapmaking, Scripting & Console Commands

In this thread I will collect all info about the process of making maps for MMH5.5, which can have new adventure objects and heroes.

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 easier).
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

In RC6a or RC7 (not available at time of writing this, but this thread is about to expire). I will add 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

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 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.
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
stachnie
stachnie


Known Hero
posted June 24, 2015 07:18 AM
Edited by stachnie at 07:38, 24 Jun 2015.

O.K., so I will ask a question posted in another thread. How to adjust initial skills of a manually put hero? Usually I cannot do that, especially if the default skill of the hero was the `old' racial skill.

And two more thoughts. I am not sure if this is a good thread for that, but I have some doubts about Witch Huts and battle sites.

1. Witch Huts seem to be much worse than they used to be. Now only one hero may benefit from them (maybe one hero for each player, and maybe there are some object properties I have missed); moreover, if the hero cannot learn this skill, the bonus is gone (I had this problem with a Wizard trying lo learn Combat IIRC). Maybe it would be a good idea to alternate between skills like Barbarians learning Shatter Dark instead of Dark?

2. Now battle sites seem not to regenerate (like in H3) - maybe it would be a good idea to make it possible for at least some of them? Perhaps regenerating Dragon Utopias were imbalanced, but Crypts, Mage Vaults or Elemental Stockpiles? Dragon Utopias and Mage Vaults used to be excellent ways to learn spells not present in the towns.

S.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
lotihoti
lotihoti


Famous Hero
posted June 24, 2015 08:41 AM

stachnie said:
O.K., so I will ask a question posted in another thread. How to adjust initial skills of a manually put hero? Usually I cannot do that, especially if the default skill of the hero was the `old' racial skill.

Place a hero in Editor: On the right side, there is a "shared" button. There you can set all skills etc.
To set them outside the Editor you Need to browse through the files. There are all heroes in them with the same structur as the shared system


And two more thoughts. I am not sure if this is a good thread for that, but I have some doubts about Witch Huts and battle sites.

1. Witch Huts seem to be much worse than they used to be. Now only one hero may benefit from them (maybe one hero for each player, and maybe there are some object properties I have missed); moreover, if the hero cannot learn this skill, the bonus is gone (I had this problem with a Wizard trying lo learn Combat IIRC). Maybe it would be a good idea to alternate between skills like Barbarians learning Shatter Dark instead of Dark?

2. Now battle sites seem not to regenerate (like in H3) - maybe it would be a good idea to make it possible for at least some of them? Perhaps regenerating Dragon Utopias were imbalanced, but Crypts, Mage Vaults or Elemental Stockpiles? Dragon Utopias and Mage Vaults used to be excellent ways to learn spells not present in the towns.
Actually they regenerate. They need 2 months for that.
S.


My answers in red.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted June 24, 2015 11:10 AM

Quote:
1. Witch Huts seem to be much worse than they used to be. Now only one hero may benefit from them (maybe one hero for each player, and maybe there are some object properties I have missed); moreover, if the hero cannot learn this skill, the bonus is gone (I had this problem with a Wizard trying lo learn Combat IIRC). Maybe it would be a good idea to alternate between skills like Barbarians learning Shatter Dark instead of Dark?


I strongly disagree, I can learn far more useful skills from them, then in the past, i know there is an issue with the last slot, but you can still advance it, in 31j this bug was much bigger and extended to 2 entire slots. Also they are already alternating shatter dark to barbarians, if not then it is a bug.

Quote:
2. Now battle sites seem not to regenerate (like in H3) - maybe it would be a good idea to make it possible for at least some of them? Perhaps regenerating Dragon Utopias were imbalanced, but Crypts, Mage Vaults or Elemental Stockpiles? Dragon Utopias and Mage Vaults used to be excellent ways to learn spells not present in the towns.


they regenerate for you in 56 days but if another player hits one it takes only 7 days. In practice you will actually be able to hit far more treasure buildings than you could in the past with a flat 28 days rating. Also you can now also learn spells from many of the other buildings
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
stachnie
stachnie


Known Hero
posted June 24, 2015 02:07 PM

lotihoti said:
Place a hero in Editor: On the right side, there is a "shared" button. There you can set all skills etc.
To set them outside the Editor you Need to browse through the files. There are all heroes in them with the same structur as the shared system


Thanks, I will try that.

[about Witch Huts ]

magnomagus said:
I strongly disagree, I can learn far more useful skills from them, then in the past, i know there is an issue with the last slot, but you can still advance it, in 31j this bug was much bigger and extended to 2 entire slots.


So this may be the reason - my main hero (a Wizard) could not learn anything with 6 and 7 slots filled. She could not learn Combat and even War Machines - maybe I should try that with a lvl 1 hero. But what was even more irritating, after my main hero visited these huts no other hero could use them.

Quote:
Also they are already alternating shatter dark to barbarians, if not then it is a bug.


I have not tried Barbarians, I meant other heroes (like Wizards who cannot learn Combat).

[ regenerating battle sites ]

Quote:
they regenerate for you in 56 days but if another player hits one it takes only 7 days.


Not when playing my map (maybe I should make it from scratch? this is a H5 map with some minor changes). It passed much more than 2 months since the last visits and the sites did not regenerate. Moreover, I can see AI heroes visiting nearby sites, always with the same message about nothing left. However, I noticed that I may visit battle sites visited by the AI.

Quote:
Also you can now also learn spells from many of the other buildings


So I should give them a try - I have downloaded the map with sample buildings.

S.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted June 24, 2015 02:40 PM

@Stachnie:

These bugs are hard to verify and I cannot reproduce them, for me it works fine. The AI will try to hit buildings to extend the recovery time for you (by 7 days) but it doesn't really know the timers. Surely you don't have to redo your map from scratch.
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
stachnie
stachnie


Known Hero
posted June 24, 2015 08:33 PM

So this may be e.g. a problem with installation. I have installed MMH5.5 to a new dir, it did not work so I copied there all existing installation of H5 TotE (without overwriting any files) with all H5 AI Mod/EE files. No other mods installed.

My system: Windows 7 64 bit (I run 64 bit executables, Jun 12).

TotE 3.1, Polish version.

S.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted June 24, 2015 09:24 PM

That's a very weird way of installing, MMH55 must be installed to the regular TOE folder, it can be changed by the user. Also read the instruction text: the non-binary EE files can be trouble.
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Elessar
Elessar


Adventuring Hero
posted June 24, 2015 10:29 PM
Edited by Elessar at 22:30, 24 Jun 2015.

I also had non-regenerating battle sites in a Maps4Heroes map I DLed and modded.

Appreciate the new object map tho-very helpful.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted June 24, 2015 10:55 PM

There is a possibilty, triggers are overwritten by mapspecific ones from custom maps. Map-specific triggers will always get preference to avoid conflict, that is why certain objects in the campaign do not behave like MMH55 objects
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
stachnie
stachnie


Known Hero
posted June 25, 2015 10:01 AM

magnomagus said:
That's a very weird way of installing, MMH55 must be installed to the regular TOE folder, it can be changed by the user. Also read the instruction text: the non-binary EE files can be trouble.


Yes, I have read it and I removed (hopefully) all files that may conflict: EE*.pak, a*.pak (campaigns?) and most of the Maps directory. Now I have started a new game and I will check if everything is O.K.

BTW: an old bug with artifact sets is still present. If you have a set of artifacts (or at least a part of it with a partial effect) on a hero and an extra one, all heroes may benefit:

- give both sets to a second hero and equip one of them
- move all artifacts from appriopriate slots of the second hero to the backpack or to another hero

Now you may remove all artifacts from the second hero and the effects of the set are present - some routine must `think' these artifacts are still present. This may be imbalanced especially for full Dragon sets (imagine 8 heroes with +6 to all stats, bonus to lvl 7 and an extra upgraded lvl 5 creature every day).

S.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted June 25, 2015 11:28 AM
Edited by magnomagus at 11:29, 25 Jun 2015.

Thanks to your guide i have now been able to reproduce this bug, but you need multiple artifacts of the same set. I guess this will keep haunting me forever now. You should have reported this to Quantomas years ago, now it is too late

I don't think stat increases on secondary heroes are really an issue, but I may need to lower the creature tier from the dragon set even more, to keep the farming abuse to a minimum.
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
stachnie
stachnie


Known Hero
posted June 25, 2015 08:04 PM

I reported this maybe 2 or 3 years ago, but I did not know exactly how to reproduce it. And some players knew about this bug, perhaps it had been present since the first versions of TotE.

S.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dredknight
dredknight


Honorable
Supreme Hero
disrupting the moding industry
posted June 25, 2015 08:35 PM

magnomagus said:
I don't think stat increases on secondary heroes are really an issue, but I may need to lower the creature tier from the dragon set even more, to keep the farming abuse to a minimum.


@Magno, if people want to cheat they will always find a way.
____________
Join our official discord channel | NCF Utility Beta

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted June 26, 2015 11:50 AM

I have investigated this issue more thoroughly and it is really a serious issue, not just a glitch people can use to cheat. It will also affect players who want to play a fair game, because multiple (already overpowered) set artifact bonuses can be piled up on the main hero even when you don't want it, it just happens when they have lots of artifacts in there bagpack. If it happens the effects are also hard to remove I was hoping save/load would do it but no, the bug is also saved.

There is only one fix, all set effects must be removed in the defaultstats, then new ones need to be programmed by scripts. I have tested only scripted effects are not buggish (C++ effects are buggish in all Quantomas exe files, there is no alternative!)

Unfortunately all the green updating texts need to go and replaced by static texts also many modifiers like +-ATB cannot be scripted.
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
stachnie
stachnie


Known Hero
posted June 26, 2015 07:07 PM

magnomagus said:
multiple (already overpowered) set artifact bonuses can be piled up on the main hero even when you don't want it, it just happens when they have lots of artifacts in there bagpack.


And this is how I had found this bug - by accident, when playing a map with very strong monsters, lots of Dragon Utopias etc. and swapping artifacts back and forth. It took me a long time to figure out how it works (I managed to do that not so long ago).

S.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Tiptoe_McGuffy
Tiptoe_McGuffy


Adventuring Hero
posted June 28, 2015 08:59 PM

I have a few questions about making scenarios:

1.) Is it possible to choose what skill a witch hut offers? I thought it was always possible since the hut in vanilla C2M1 always gives Logistics, but I looked at the map and it turns out it takes a disproportionately large amount of scripting. Is there any way to make the skill(s) offered an editable property?

2.) Can you make a hero with 8 skills in the map editor? Will it cause problems if the 8 skills button isn't selected?

Thanks!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted June 28, 2015 10:37 PM

1. No, actually compared to the current script the C2M1 script is very simple.

2. never tested this.
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted August 20, 2015 03:30 PM

Download link has been updated with new version of template including all new artifacts and ultimate items.

Objects and Artifacts
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
VodevilX
VodevilX


Hired Hero
Skeleton Jack
posted November 22, 2015 01:12 PM

I'am no map maker at all... My question is: is it possible to make a moded map to work with this mod?
We have a very long time favorite map for our Hot Seat games with my cousin...
[url=http://www.toheroes.com/h5maps.html]http://www.toheroes.com/h5maps.html[/url]
That'd be the 5th map here, Genesis-v2.0
But sadly it is not compatible... Is it even possible, to somehow convert it or whatever... just to make it work?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 4 pages long: 1 2 3 4 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0796 seconds