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: [TOOL] Homm5 Patcher & patch collection
Thread: [TOOL] Homm5 Patcher & patch collection This thread is 13 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 · NEXT»
Deflaktor
Deflaktor


Responsible
Known Hero
posted June 16, 2015 02:19 AM bonus applied by VokialBG on 15 Jul 2015.
Edited by Deflaktor at 22:59, 04 Sep 2017.

[TOOL] Homm5 Patcher & patch collection

Now that the amount of hex edited and patched exe files has increased, it has become hard to keep track of which patch was incorporated into which exe file. Also to serve as a repository of various ASM hacks, hex edits and other kinds of patches, I made this tool.



This is a Patch Installing Tool which is able to install various Hacks into the Heroes5 EXE file. Patches are defined in YAML files which need to reside in the same directory as the tool.

Key:
- A square in the checkbox means the patch is already installed, patching will not do anything regarding this patch.
- An arrow means there is another version of the patch already installed and patching will overwrite it.
- A check means this patch will be installed.
- A patch which was previously installed can be uninstalled by unchecking it.

You can right-click a patch to see an overview of which addresses are changed. The (undocumented and messy) source code of the tool is included in the jar file.

Download (Version 2.9)

To be able to patch anything, a patch (.yml file) must reside in the same directory as the tool!! You can find various patches here:

Patch Collection

All patches are compatible with both the original EXE and the Quantomas AI EXE.

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


Responsible
Known Hero
posted June 16, 2015 02:20 AM
Edited by Deflaktor at 14:44, 24 Jan 2016.

YAML Patch Definition

--- YAML Patch Definition ---

The first commented line which contains text in the yaml file serves as the name of the patch. Comments are initiated with a #.
The second commented line with text will serve as tooltip for the patch. This is however optional.

Each patch is seperated by ---

Example:
Quote:

# Level 2
group: Original
checkAddress:   00B72DE0
checkBytes:     00 00 00 00 00 00 00 00 E8 03 00 00  # check these bytes at 00B72DE0
patchAddress:   00B72DE8
originalBytes:  E8 03 00 00        # 1000 exp (original)
patchBytes:     F4 01 00 00        # 500 exp (patched)
---
# Level 3
group: Original
patchAddress:   00B72DEC
originalBytes:  D0 07 00 00        # 2000 exp (original)
patchBytes:     DC 05 00 00        # 1000 exp (patched)
---
# Level 4
group: Original
patchAddress:   00B72DF0
valueType:      Integer
originalValue:  3200
patchValue:     1700
---
# Level 5
group: Original
patchAddress:   00B72DF4
valueType:      Integer
originalBytes:  F8 11 00 00        # 4600 exp
patchValue:     4000



Each patch has the following attributes:
- group: Which group this patch belongs to. Can be any string but should be common to the patches which can be applied to the same type of exe file. The patcher checks if it can apply every single patch of the same group to the exe, if not it proceeds to do the same check with the next group.
- [optional] checkAddress and checkBytes: At this address the patcher will check if the specified bytes are present in order to recognize the right EXE file. If they are not present, the patcher will refuse to apply this patch. The address must be in HEX format. The bytes must also be in HEX format but every single byte must be seperated by a space (" "). At least one per group per patch should be specified or else the patcher will allow to patch any EXE file without any validity checks. Therefore it is strongly recommended to always specify this.
- patchAddress: The address where to patch. Must also be in HEX format.

- originalBytes: The unpatched bytes in HEX format which are in the original exe at the patchAddress. Each single byte must be seperated by a space. If only a single byte is specified followed by an *, this will mean this byte will be repeated as many times as there are patch bytes. This is for the special case if new code is written in empty space and the empty space is a single byte value repeated many times. E.g. "01*" will mean "01 01 01 01" if patch bytes has 4 bytes. It is a fill up operator.
- patchBytes: The bytes to patch at the patchAddress. Each single byte must be in HEX format and seperated by a space. originalBytes and patchBytes must have the same amount of bytes.

AND/OR

- valueType: The type of value this address is. Possible values are Byte, Short, Integer, Long, Float, Double, Ascii, Unicode.
- originalValue: The original value in the original exe at patchAddress. It's format depends on valueType.
- patchValue: The new value that will be patched.

Here are some examples how different value types can look like:
Byte: any value between -128 and 255. This is because it can be either unsigned byte or signed byte, the internal representation is the same and does not matter.
Short: 65000
Float: -0.005
Integer: 250000
Long: 100000000
Double: -0.00000001
Ascii: SomeText
Unicode: SomeTextWithStrangeSymbols&%%

One can also mix both approaches using originalBytes and patchValue or originalValue and patchBytes. However, valueType must be specified if either originalValue or patchValue has been used.

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


Responsible
Known Hero
posted June 16, 2015 03:03 AM
Edited by xuxo at 03:05, 16 Jun 2015.

great job !! : D So NCF supports MMH55? automatic upgrade, that's very professional!

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


Responsible
Known Hero
posted June 16, 2015 03:22 AM

Yes, NCF supports now MMH55

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


Admirable
Legendary Hero
modding wizard
posted June 16, 2015 10:51 AM
Edited by magnomagus at 11:04, 16 Jun 2015.

This is brilliant but I'm afraid I have to be the bringer of bad news:

First if the NCF implementation is the same as this one then it will crash LAN and hotseat:

http://heroescommunity.com/viewthread.php3?TID=40435

Secondly I have been toying around with the lvl 60 cap increase, but I doesn't seem to have much use in this state. The requirements for L40 are still 200M so everything after L37 is not reachable without trees. A new experience graph will need to be designed to work in a balanced way with XXXL maps from the ARMG.

Thirdly the cap increase seems to have many bugs after lvl 40 the next 9 level seems to have almost the same cost (~200M) and then at lvl 49 next level costs 1000M but the bar gets stuck at ~30% and every time you get experience you get the message 'level cap' reached. All this seems very hard to fix to me, but you are the expert. (the only thing i could do here probably is make the txt message empty)

EDIT: OK forgot to test with faster levels sorry but it has the same hardcoded bugs as mentioned above. Also it is now way overpowered for XL+ ARMG maps you need only 3M for lvl 49 then bugs.



____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

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


Responsible
Known Hero
posted June 16, 2015 02:17 PM
Edited by Deflaktor at 14:26, 16 Jun 2015.

The NCF implementations are probably the same. However I am unable to test it, as I only have one computer.

Yes the level cap increase is buggy. It seems the wrong values for exp increase are taken after level 40. Gonna investigate that. Making the txt message empty is a good idea, this will take less work. But maybe I can find the offset for this check, too.

I'm never sure if it is possible to do something until I have taken a look at it.

EDIT: Small UI fix for the patcher regarding the right symbol for checkboxs with conflicts.

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


Admirable
Legendary Hero
modding wizard
posted June 16, 2015 03:29 PM

Maybe the mod can be fixed to work at least until lvl 48 or 49, actually makes sense as 8 x 6 slots = 48. because something new happens after that. I think the required amount of exp for the last level should at least be 50M, but I would prefer 200M as it was in MMH55. A large reservoir of exp before the last one can be useful for unique new features and abilities similar to the zehir campaign abilities.
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

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


Responsible
Known Hero
posted June 17, 2015 03:14 AM
Edited by Deflaktor at 22:38, 06 Jan 2016.

After investigating it a bit, it seems (not 100% sure yet) that the experience curve will have to be reimplemented from scratch to increase the level cap.
One thing is however sure: After increasing the level cap to 60 the experience curve easily goes over the 32 bit integer max value and causes the needed experience go negative.

So I thought about new designs for the experience curve to accomodate the new level cap.
Proposal 1 and Proposal 2 (Dead links). Both support up to level 100, at which the 32 bit integer max value will be reached at nearly 2,147,483,647 which is a ridiculous amount of exp. I think 1 million should be quite reachable on a large map, which is the blue line in the diagrams.

Which one do you like better? Or do you have a better proposal?

EDIT: Also here is the Original Curve and BAD's Faster Levels Curve which both cap out very soon (level 41 in original causes overflow and level 52 on BAD's faster levels patch)

Also the NCF patch has been updated in the collection, it can now also patch the editor EXE file.

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


Admirable
Legendary Hero
modding wizard
posted June 17, 2015 10:58 AM
Edited by magnomagus at 11:08, 17 Jun 2015.

First of all thanks for your enlightenment mod it is incredibly awesome

Secondly, do not forget there are hundreds (probably even thousands if you count maps) of parameters/modifiers and script functions dependant on hero level values. I may have to modify up ~30% of them to accomodate to the new levels to balance the game. Consequently in the end it is not possible to modify the level graph with an exe patcher alone, a large pack of game files has to go along with it. For MMH55 specifically I will have to settle for one cap, add it permanently in the exe file and then do the work of accomodating all my scripts and files.

That being said, both of your proposals are way too easy for my taste. This game was not designed 600k lvl 40, not even 1M lvl 40. In H5 primary skills are considered more valuable than H3 and this graph is even easier than H3 which has artifacts like +6 to all stats (which are btw in my opinion ridiculous). With regards to MMH55 the adventure map is much more challenging and has far bigger neutral armies than TOE. It has already been tested that on not even the largest maps 256x256+UG, 20M is a reachable amount of experience (and that was not on the highest difficulty).

I think a workable experience graph is the one from H3 (but I would also like to try one that is a little harder), this will keep enlightenment balanced with your fix + place 20M around level 50.

http://heroes.thelazy.net/wiki/Experience_levels

EDIT: Ofc i wouldn't mind if in order to achieve a similar graph the cap would need to be reduced to 80,70,60 or something like that. Also it is not problematic if there are unreachable levels in it, actually that is better because it makes it fun to search for knowledge trees and score a record!.
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

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


Honorable
Supreme Hero
disrupting the moding industry
posted June 17, 2015 11:24 AM

I just want to let you know is that altering level thresholds will break the balance even more.

The experience that is now in MM5.5 is very good.
Level cap of 50 seems reasonable.

The change of enlightment will reduce the destruction spell output which even without the change is under question after midgame.

It should be redone accrodingly.
____________
Join our official discord channel | NCF Utility Beta

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


Responsible
Known Hero
posted June 17, 2015 02:58 PM

20M is reachable? Okay that is a whole different story. Gonna make a new proposal soon.

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


Responsible
Known Hero
posted June 20, 2015 08:29 PM

magnomagus said:

First if the NCF implementation is the same as this one then it will crash LAN and hotseat:

http://heroescommunity.com/viewthread.php3?TID=40435



Just tested the NCF implementation with MMH5.5 in LAN and it works. Not sure what the problem was in that thread.

Since the EXE file in that thread is down I also cannot make sure if the implementation of the patch is different.

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


Admirable
Legendary Hero
modding wizard
posted June 20, 2015 08:51 PM

First of all, MMH55 cannot work with NCF with only a .exe hack, there are hundreds of files missing from the data, just installing Simonaks 3.1 NCF doesn't fix that, it is not compatible with MMH55.

So unless you did all that work + installed NCF creature, noticed NCF creature on the map, attacked it, killed it, finished the map then yes i would believe you that NCF works
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

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


Responsible
Known Hero
posted June 20, 2015 09:55 PM
Edited by Deflaktor at 22:01, 20 Jun 2015.

Did all that except for finishing the map. Just closed the game.

Not sure what you mean with "hundreds of files missing from the data" and "Simonaks 3.1 NCF"

The implementation of the patch is my own. I just guessed that it would be the same as in that thread as there are not any other offsets to change.

I can upload all that NCF stuff on my drive if you like.

EDIT: Actually it was test map with a few NCF creatures put on it. It was not a random generated NCF monster, so maybe there is a problem with that.

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


Admirable
Legendary Hero
modding wizard
posted June 20, 2015 10:00 PM
Edited by magnomagus at 22:01, 20 Jun 2015.

??? previously NCF was never a hack alone it was also a large framework of files, last version was created by Simonak.

http://heroescommunity.com/viewthread.php3?TID=27113

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


Responsible
Known Hero
posted June 20, 2015 10:03 PM

Yeah, I do have that. Thought you were talking about something else. I know it was made by him, I gave him credit in the patch collection for the NCF patch.

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


Famous Hero
posted June 22, 2015 05:37 PM
Edited by lotihoti at 17:44, 22 Jun 2015.

Problem with patcher:

Cant patch my exe for ncf. May someone can help me?
Game crashs during loading screen, after i patched.

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


Responsible
Known Hero
posted June 22, 2015 08:11 PM
Edited by Deflaktor at 20:15, 22 Jun 2015.

Sounds like it actually did patch.

If it crashes during loading screen it means that it cannot find the NCF Framework.

You need to have the right pak files in the Data folder.

EDIT: Try putting NCF_Core.pak into Data folder.

EDIT2: If you do already have a NCF_Core.pak in your Data folder, make sure it has 999 creature scripts. Because the NCF patch in the Patch Collection makes room for 1000 creatures. So the NCF Framework also needs to support 1000 creatures.

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


Famous Hero
posted June 22, 2015 09:12 PM

Got NCF_Core.pak in data folder and there are 999 scripts and 999 Creature_XXX.xdb in it. But still the game crashs during loading screen.

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


Admirable
Legendary Hero
modding wizard
posted July 03, 2015 08:49 AM

Hello Deflaktor,

I found the byte that 0053E1D0 & 005393E1 in 31j change the amount of possible artifacts, but as I understand these are 1 byte integers so the max amount is 128? Question: Is it possible to convert signed to unsigned to make the max amount 256? or otherwise convert to more bytes?
____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

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

Page compiled in 0.0942 seconds