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 > Library of Enlightenment > Thread: Multirelease: h3mconvert, HDE Mod, h3msnake2, h3mdllembed, h3mdemosign, h3mlib & more
Thread: Multirelease: h3mconvert, HDE Mod, h3msnake2, h3mdllembed, h3mdemosign, h3mlib & more This thread is 3 pages long: 1 2 3 · «PREV / NEXT»
potmdehex
potmdehex


Known Hero
professional ERM™ scripter
posted November 22, 2015 04:35 PM

Caesius said:
Salut,
I've got the same issue with GUI as Meridian82 described and sendspace link is no longer available, could you please reupload?
Thanks

Here you go: new link.

If you try it, please report if it fixed your problem and provide screenshot if possible.

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


Admirable
Supreme Hero
posted December 10, 2015 05:39 AM

Replying here as it seems more appropriate...

from: This Post

potmdehex said:
[...]
2:
Make a map editor mod which can apply the changes you want by editing the h3m data. There are other ways to mod the map editor to achieve the same behavior, but simply having it edit the h3m data directly would be the easiest and should be extremely easy with h3mlib. It could for example be made so that whenever a map is saved, the desired changes are applied (e.g all heroes are given spellbook etc).
[...]


I had not previously noticed this was possible

So I have 2 questions...

1- What are the possibilities with this? I've seen the Snake video but would there be any limits... for instance, would it be possible to increase the number of Dwellings/Garrisons/... on a map? (Hard caps)

2- Is there a tutorial/example somewhere? I have no idea how to get started

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


Known Hero
professional ERM™ scripter
posted December 10, 2015 08:28 AM
Edited by potmdehex at 08:41, 10 Dec 2015.

RoseKavalier said:
Replying here as it seems more appropriate...

from: This Post

potmdehex said:
[...]
2:
Make a map editor mod which can apply the changes you want by editing the h3m data. There are other ways to mod the map editor to achieve the same behavior, but simply having it edit the h3m data directly would be the easiest and should be extremely easy with h3mlib. It could for example be made so that whenever a map is saved, the desired changes are applied (e.g all heroes are given spellbook etc).
[...]


I had not previously noticed this was possible

So I have 2 questions...

1- What are the possibilities with this? I've seen the Snake video but would there be any limits... for instance, would it be possible to increase the number of Dwellings/Garrisons/... on a map? (Hard caps)

2- Is there a tutorial/example somewhere? I have no idea how to get started

For much of what I have programmed, reverse engineered and researched I have yet to document and explain it well so I can understand you have questions if you are interested.

I need to make sure you understand there are two separate concepts there that are not to be confused:

Concept one, which is what I actually meant in the text you quoted, is simply achieving things that are normally possible in the map editor through editing h3m data. For example, the map editor has a "Has spellbook" checkbox when editing heroes. My library h3mlib allows to open a map and achieve the same result as checking this checkbox would, then saving the map again. It has support for all standard settings and possibilities of RoE, AB and SoD maps, although for example the individual spells are not yet mapped which means an extra step has to be taken to for example give a starting spell to a hero, namely finding out which bit represents the spell in the spell bytes.

In the snake video, actually the map editor is constantly reloading a map which changes according to key presses (for example if the player presses up then the "Snake" consisting of the Serpent flies is moved by moving the "tail" above the "head"), which is done by editing the h3m data with h3mlib.

This method CANNOT change things like hard caps. It can in general not achieve that much outside of what is usually possible in the map editor, although some notable exceptions are:

*It can be used to add terrain that is normally not shown in maped:
screenshot (this screenshot is of a map editor extension which allows selecting tiles and hex editing them)
*It can be used to put several objects above each other, for example a One Way Monolith or an artifact over impassable terrain like a mountain. The Monolith/artifact is still accessible
*It can be used to add non-RoE objects to RoE maps (which will then still work when playing for example Heroes 3 Complete)
*It can convert maps "backwards" (the map editor can only upgrade maps RoE->AB->SoD, but h3mlib allows downgrading to RoE)

Concept two, adding code to a h3m, CAN be used to achieve anything. There is no limit to what can be achieved, you can change hard caps of any kind (although depending on what you are changing the difficulty might be quite steep, especially if say a value is expected to be 16-bits only in size throughout all of the game's code and is used in many different places, then you would have to have code fixing all of those places).

This is what makes the Snake game start in the snake video. Just by opening the h3m map, suddenly a game of Snake in the map editor starts. Clearly this is far from something normally achievable. Of course less drastic things can be done, such as changing gameplay in various ways. I have a PoC map that I worked on a bit but did not finish yet (I have been working a bit behind the scenes together with others on others' Heroes 3 projects lately), in which there is a Stable giving unlimited movement speed and a Seer's Hut which gives a quest to kill not one but three monsters (such a quest type does normally not exist), and also reveals their location in the fog when he gives the quest (just to show some examples of what can be done). In making this PoC, I also made a very (very) simple trigger system which makes it possible to add triggers for when certain events occur, such as visiting an object and/or walking on specified coordinates. Here is the specific code, and under the rest of h3mcodepoc you find the generic trigger stuff: code (its missing the part where all three monsters actually are required to be killed, but I already reverse engineered all the necessary stuff to make it)

This method works by exploiting a bug in the .def-name loading code of the game and is thus prone to not work the same across different versions of the game. However, this same bug exists all the way from the RoE demo to Heroes 3 Complete, so it is mainly a matter of adding support for each version. So far I have added support for the RoE Demo, Heroes 3 Complete and HD Mod. Currently separate .h3m maps have to be produced for e.g Heroes 3 Complete and HD Mod (one .h3m to use in standard Heroes 3 Complete and one to use in HD Mod), but it should be possible to make it so that they are cross compatible. However cross compatiblity with all versions of the game including HD Mod to one map might be hard specifically due to how HD Mod rebases a common DLL from 0x10000000 (and grabs this address for itself) that is the same across all other versions and could otherwise have been used.

Anyway, after reading this wall of text you might just be more confused. I intend to do documentation and some tutorials but that might be a long while before that is done. If you are interested and have specific questions I can answer them.

Just for the sake of it, I will append an ultra mini tutorial covering the extreme basics of Concept two above:
1. Code a DLL in any way you want, that alters the Heroes 3 game in any way you want during runtime.
2. Run h3mdllembed.exe on it in this way (if your map is Arrogance.h3m and your DLL is Tower_Defense.dll):
h3mdllembed Arrogance.h3m Tower_Defense.dll

Step 2 is also shown in h3mdllembed's Usage, which is shown in this screenshot: screenshot

After following that mini tutorial you will get a new h3m file which will load your DLL when the map is started, then continue the map as normal letting you play.

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


Disgraceful
Undefeatable Hero
posted December 10, 2015 10:36 AM

intriguing work. i have some questions, if you don't mind.

1. is this compatible with any mods, like era?

2. is it possible to have custom maps made larger than what is available in the xxl mod(252x252)?

3. would i be able to create custom buttons and selections for creating a map? essentially, could i tweak the homm3 complete(or era) editor to fit my own personal preferences?

4. if it IS possible to do the above, would i be able to make a dll that encompasses all that, so that others would be able to play my custom maps?

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


Admirable
Supreme Hero
posted December 10, 2015 04:46 PM
Edited by RoseKavalier at 16:48, 10 Dec 2015.

@potmdehex

Superb reply!

I guess I have too many questions to ask them, the best thing I can do is wait for your documentation to be released so you don't waste time answering me instead. I've looked around the repository a bit, the coding is readily understandable but requires knowledge of the various functions I guess.

Adding "triggers" in base-SoD is really nifty... I guess the sky is the limit.... events revealing/hiding parts of the map... modifying units abilities/stats? ... and if I understand the answer to my original question break hard caps (48 Garrisons ...).

Modifying the MapEditor itself is possible (I've seen a few modified ones) but I'm not sure how it was done.

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


Legendary Hero
posted December 10, 2015 08:17 PM
Edited by bloodsucker at 20:27, 10 Dec 2015.

fred79 said:
2. is it possible to have custom maps made larger than what is available in the xxl mod(252x252)?


I didn't play enouch HotA to talk about it but in WoG this is useless unless you change a lot of other things. Even in a XXL random environment you will need things like Overflow Fix mod and edit map to limit the experience levels that can be gained by heroes (wich I believe can now be done automatically with this add-on) or you will end up with a level 0 hero with 0 in all prims and so on. Also the number of objects you can have on map is limited so huge maps will tend to be more about crossing deserts and oceans then the three battles, one powerup and one creature bank visit a day I presume you are imaginning.
Also game mechanics make the extension of the primary skills limit pointless, since the difference between attack and deffense is only considered up to 60.

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

Tavern Dweller
posted December 10, 2015 08:23 PM

Can I get some help with the launcher?
I get the following error after I hit play using the latest launcher 1.11_DPIFIX - "Hook failed ==> X screen_refresh". I click OK and the game starts, but crashes after the intro.

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


Legendary Hero
posted December 10, 2015 09:28 PM

Would it be possible to add a survive condition to maps (like "Survive till month six to win")? I can imagine some maps using this, for instance where you start with a large amount of towns and heroes but then enemy heroes with unbeatable armies start wandering around and you have to sneak pass through them to retake your towns.

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


Admirable
Omnipresent Hero
Wog refugee
posted December 10, 2015 09:45 PM

Mah, you make condition of win acquire artifact x, you prohibit artifact x and place it behind border guard asking 9999 gems, month 6. Event month 6 gives you 9999 gems, pick artifact, win game because you survived till there.

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


Legendary Hero
posted December 10, 2015 09:54 PM

Salamandre said:
Mah, you make condition of win acquire artifact x... pick artifact, win game because you survived till there.
I know several ways to do this with and without ERM. What I was asking is: is it possible to make it appear in the Maps Editor as a default condition?

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


Supreme Hero
Heroes 3 Fan
posted December 10, 2015 11:56 PM

Hota have this and kill all monsters on map victory conditions. It is possible to do double lose condition? Ex. Time limit and Keep main hero alive?

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


Known Hero
professional ERM™ scripter
posted December 12, 2015 03:04 PM
Edited by potmdehex at 15:12, 12 Dec 2015.

Quite a bit of interest for this suddenly, one of the reasons I have prioritized other H3 stuff is that there was not that much interest when I posted this.

fred79 said:
...


1. Depends on what you are specifically asking about, there is quite a range to the software posted in this thread and in my repository - Everything from stuff specifically for the original RoE Demo, to stuff specifically for HD Edition to generic stuff for several/all versions. Not all of it works on all versions, but for example the core h3mlib supports WoG format maps, albeit not completely (for example, no regard for ERM).

2. Yes. But apart from the problems bloodsucker mention below and other difficulties, when using h3mlib to add a mod to a map it is important to keep in mind that that mod loads when the map starts and NOT when it is viewed in the map list. This means that maps of other sizes cannot display their true size in the map list.

3. Yes. I have made several such map editor extensions for myself and others. If you have a specific request, you should share what you have in mind. I might not have the time to prioritize it any time soon, but it won't hurt for you to say what you want.

4. Yes, DLLs of various kinds could be made that you could share with others. If you are using the mod-in-map functionality of h3mlib you would only need to share the actual .h3m for others to be able to play it even if it has changes to gameplay etc - the DLL is inside the .h3m and is loaded from there.

RoseKavalier said:
...


Documentation/questions:
If you have a specific question that you want an answer to don't hesitate to ask it. I am rarely at home anyway when I write on HC (like now) so it usually doesn't "waste" time for me to answer. For the same reason and because I am working on other H3 related things, it might take a while for documentation to come out, unfortunately.

hardcaps:
I misunderstood what you meant by hardcaps previously. There are many kinds of hardcaps, some harder to modify than others. What I was talking about in my last post with e.g 16-bit vs 32-bit values is a type of hardcap that is harder to change. But the garrison hardcap can be exceeded even with concept one in my previous post, here is an example code snippet which does that: code and screenshot. In other words, embedding a mod is not needed for extra garrisons.

Modifiying map editor:
There are some examples in my repository, and I have more locally. I can explain more if you are interested.

brymski said:
...


Which version and language of the game are you using? It should be working with a fully updated HD Edition on Steam, in any language, but older versions of HD Edition could cause compatibility issues. If you want to get it to work I can help you troubleshoot it even if you have an older version if you add me on Steam, which could also be a help if a solution is found that could help others as well:

bloodsucker said:
...

zmudziak22 said:
...


Yes and yes, but the true victory condition won't be shown while in map list (can still be written in description). The victory condition texts are hardcoded and the mod that would be embedded in the .h3m is loaded only when map starts, not while still in the map list, so even if those texts are changed then it is too late. But the actual condition can be changed when map starts.

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


Supreme Hero
Heroes 3 Fan
posted December 12, 2015 03:13 PM

Ok, thanks for answer. Also Accuquire/Transport Artifact, Build Grail can be done without condition "or Defeat All Enemies", Campaign Like).

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


Known Hero
professional ERM™ scripter
posted December 12, 2015 03:18 PM
Edited by potmdehex at 15:18, 12 Dec 2015.

Yes. Anything can be changed when embedding a mod into a map, it's just important to remember that the mod starts when map starts, not while still in maplist or before.

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


Supreme Hero
Heroes 3 Fan
posted December 15, 2015 12:00 PM

Ok. Heroes3.exe controlled campaign map condition i think. I tested with New Beginning, On map 2 defeating AI is optional task. When I replay it as custom campaign, killing AI gave me victory.

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


Disgraceful
Undefeatable Hero
posted December 15, 2015 04:30 PM

potmdehex said:
fred79 said:

1. is this compatible with any mods, like era?

2. is it possible to have custom maps made larger than what is available in the xxl mod(252x252)?

3. would i be able to create custom buttons and selections for creating a map? essentially, could i tweak the homm3 complete(or era) editor to fit my own personal preferences?

4. if it IS possible to do the above, would i be able to make a dll that encompasses all that, so that others would be able to play my custom maps?


1. Depends on what you are specifically asking about, there is quite a range to the software posted in this thread and in my repository - Everything from stuff specifically for the original RoE Demo, to stuff specifically for HD Edition to generic stuff for several/all versions. Not all of it works on all versions, but for example the core h3mlib supports WoG format maps, albeit not completely (for example, no regard for ERM).

2. Yes. But apart from the problems bloodsucker mention below and other difficulties, when using h3mlib to add a mod to a map it is important to keep in mind that that mod loads when the map starts and NOT when it is viewed in the map list. This means that maps of other sizes cannot display their true size in the map list.

3. Yes. I have made several such map editor extensions for myself and others. If you have a specific request, you should share what you have in mind. I might not have the time to prioritize it any time soon, but it won't hurt for you to say what you want.

4. Yes, DLLs of various kinds could be made that you could share with others. If you are using the mod-in-map functionality of h3mlib you would only need to share the actual .h3m for others to be able to play it even if it has changes to gameplay etc - the DLL is inside the .h3m and is loaded from there.


thank you very much for answering my questions, i appreciate it. i'll have to expand on specifics later; as my questions were only research (for now). i am juggling a bunch of different things atm. i gather info like i gather graphics(almost daily); most of it for future use.


@ bloodsucker: thanks for the info. i know it'll be a more complex task to implement what i want, but what you posted will certainly help me along the way. i appreciate it.

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


Known Hero
professional ERM™ scripter
posted January 01, 2016 02:32 PM

HDE Mod 1.12 now available:
* Fix crash when using hotkeys to swap artifacts between heroes (thanks Rai-Zen for report)
* Fix heroes sometimes adding a spellbook to backpack when using trade hotkeys (thanks Rai-Zen for report) NOTE: _Visually_ spellbook in backpack still sometimes bugged, but cannot be used and dissapears visually next time backpack is refreshed
* Fix artifacts sometimes staying in the backpack of the hero moved from when using trade hotkeys

Download: https://github.com/potmdehex/homm3tools/releases/download/v1.12_hde/HDE.Mod.1.12.zip

I have been working mostly on things unrelated to HDE Mod lately (most recently improving my mod-inside-h3m functionality for H3 Complete and HD Mod), but am now releasing this update after a critical bug report.

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


Promising
Famous Hero
posted January 21, 2016 01:21 PM

Hello, potmdehex. Just notifying you, that I've sent you an IM. Please, answer it when you have time

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


Famous Hero
Dragon of justice
posted January 21, 2016 02:06 PM

nik312 said:
Hello, potmdehex. Just notifying you, that I've sent you an IM. Please, answer it when you have time


Ooooh, H3D merged with HOTA?
/popcorn

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


Known Hero
professional ERM™ scripter
posted January 26, 2016 08:38 PM
Edited by potmdehex at 20:48, 26 Jan 2016.

HDE Mod 1.2 now available:
* Added a new town selection feature to RMG dialog: new GUI elements in the RMG dialog allow selecting towns for each player if desired, leading to starts with correct terrain + dwellings etc being generated

Screenshot:


Download: https://github.com/potmdehex/homm3tools/releases/download/1.2/HDE.Mod.1.2.zip

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

Page compiled in 0.0986 seconds