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 4 - Lands of Axeoth > Thread: Can i ask a favor. I am sorry for requesting this but..
Thread: Can i ask a favor. I am sorry for requesting this but.. This thread is 2 pages long: 1 2 · NEXT»
vulcancolak
vulcancolak


Famous Hero
posted March 14, 2023 04:40 PM
Edited by vulcancolak at 09:50, 26 Mar 2023.

Can i ask a favor. I am sorry for requesting this but..

Some of you will remember probably. It's been 3 years and still i don't understand how to.

THIS IS UNSOLVED ISSUE MORE THAN 3 YEARS

Is anyone with a hearth of gold
Is anyone have this knowledge
Is anyone have the patience
I BEG YOU

How can i REPLACE  any item from any of the shops (shops that build in castles) For example i want to replace Plate Mail with Elven Chainmail from Life Shop.

Is anyone can tell me STEP BY STEP please.

My mod based on Equilibris 3.51

If you need additional info, visit this topic but please tell me STEP BY STEP FROM THE BEGINNING
http://heroescommunity.com/viewthread.php3?TID=47126

--- Current progress ---

Required files:
1-)Any of the hex editors
2-) ResEdit2.01
3-) H4ResourceEditor

Step 1: Open the heroes4.exe with hexeditor(for me it's inside h4.dll)
Step 2: Find the location of the shops (check the next post)

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


Known Hero
posted March 14, 2023 05:15 PM
Edited by Albyx at 17:17, 14 Mar 2023.

1. Change artifact codes that can be bought in blacksmith.
Address I have for equi 3.55 are:
Life items - 0xA45750
Life potions - 0xA5AF88
Order items - 0xA5AFB8
Order potions - 0xA5AFA0
Death items - 0xA5AFE4
Death potions - 0xA5AFCC
Chaos items - 0xA5B010
Chaos potions - 0xA5AFF8
Nature items - 0xA45634
Nature potions - 0xA5B020
Might items - 0xA5B060
Might potions - 0xA5B048


All these artifact codes end with FFFFFFFF, you should do the same when adding new artifact.

2. Edit layers.dialog.blacksmith of the town you change with Resource Editor.
You need to add picture layer with THE NAME OF ARTIFACT YOU ADD, otherwise game will crash after opening blacksmith. I don't remember if it tells you what layer is missing in error text, if it does then you can copy artifact name from there.

P.S. I've never done this myself, only experimented a bit with artifact codes

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


Famous Hero
posted March 14, 2023 05:48 PM
Edited by vulcancolak at 17:49, 14 Mar 2023.

Thank you so much but can you please tell me step by step? This is why since 3 years i cannot make this change. Please let us go step by step..

First of all i have HxD. Which file should i open?
I will edit my post when we proceed, so the people can learn how to do it.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted March 14, 2023 06:30 PM

I still await for the artifact blacksmith hex locations in non-equilibris

Anyways vulvancolak, I would give up from changing this, this is too complex for ypu...
____________
Never changing = never improving

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


Legendary Hero
posted March 14, 2023 06:41 PM

Yes and it must be 2 times. First for artifacts second for layers. Changes inside layer is very primitive method.

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


Famous Hero
posted March 15, 2023 08:46 AM
Edited by vulcancolak at 08:47, 15 Mar 2023.

NimoStar said:
I still await for the artifact blacksmith hex locations in non-equilibris

Anyways vulvancolak, I would give up from changing this, this is too complex for ypu...


No. This time i will not give up.
--- Current progress ---

Step 1: We haven't found which file we should open.

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


Legendary Hero
posted March 15, 2023 09:19 AM
Edited by baronus at 09:20, 15 Mar 2023.

baronus

Yes its very very small question. These shops has really only 2 powerfull mixtures. Of life and of health. Rest are only simple artifacts for begin. You fast get better from the map. Better is always exploring than buing. And it should be basic artifacts because powerfull things completly waste sense of map exploring. Because you can simply buy it.

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


Known Hero
posted March 15, 2023 10:26 PM
Edited by Albyx at 22:29, 15 Mar 2023.

vulcancolak said:

--- Current progress ---

Step 1: We haven't found which file we should open.

NOTE: I've never done it myself and the following guide is based purely on my assumptions.

1. Use hex editor to open heroes4.exe (h4mod.exe for Equilibris). Go to one of blacksmith addresses I posted above.

If you got address correctly you'll see array of numbers separated by zeroes in hex (7E 00 00 00 69 00 00 00 C3 00 00 00 2F 00 00 00 FF FF FF FF for example). These are codes of artifacts available in blacksmith. Each array ends with FF FF FF FF.

To change artifact in blacksmith change one of these codes and save changed exe file.


2. Add new layers to layers.dialog.blacksmith.*town name* using Resource Editor.
Open heroes4.h4r (equi.h4r for Equilibris) with Resource Editor and find this file. After double click "layers.dialog.blacksmith.*town name*.H4D" edit perspective will open. In fact this h4d file is a bunch of png images, our task now is to add new png in it:

a) You can't do it directly, at first go to "File/Export .png folder" and choose EMPTY FOLDER.

b) We need to add 5 pngs per artifact, names are: "*artifact_name*.png", "Number_*artifact_name*.png", "Text_*artifact_name*.png", "L_Arrow_*artifact_name*.png", "R_Arrow_*artifact_name*.png". (You can make this files based on pngs extracted in step a).

c) Go to folder you extracted pngs into in file explorer and paste images prepared in step b for artifacts you want to add.

d) Go back to Resource Editor into H4D edit perspective. Do "File/Import .png folder".

e) "File/Save".

f) Close h4d perspective window, you should be in heroes4.h4r or equi.h4r perspective now. If it's equi.h4r you can continue using it. If it's heroes4.h4r, open updates.h4r or x2_override.h4r instead. Adding changed resources directly to heroes4.h4r may fail because of how big this file is.

g) "File/Add" and choose h4d you saved in step e.

h) "File/Save as". Save your h4r IN DIFFERENT FOLDER FROM ORIGINAL.



3. If you are adding artifact that can be bought in other blacksmiths, go to step 5. Otherwise (for example if you are adding treasure artifact) we need to do more :


a) In a similar way to step 2, you should add icons for your artifact. They should be in their own h4d named "layers.dialog.blacksmith.*artifact_name*". There should be "Box", "Highlighted", "Layer 1", "Pressed" and "Released" pngs in this h4d. As references you can use original artifact h4ds. (Sorry, but I won't describe it in details because it's basically the same to step 2)

b) Add h4d from step A into equi.h4r, updates.h4r or x2_override.h4r (the same to step 2.f).

4. Add cost of the new artifact in "table.artifacts.h4d". Open text.h4r (equi_text.h4r for Equilibris) and open table.artifacts there. You should see a table with artifact stats. Add value to "Cost" column for artifact you add. Save table.artifacts.h4d and add it to h4r as in steps 3.b or 2.f.

5. Replace h4r in Data folder of the game with one you changed. Run the game to check if it works.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted March 16, 2023 03:14 AM

Quote:
1. Use hex editor to open heroes4.exe (h4mod.exe for Equilibris). Go to one of blacksmith addresses I posted above.


Just a note, the addresses as provided here are empty on every .exe, even with -400000 hex
____________
Never changing = never improving

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


Known Hero
posted March 16, 2023 07:12 AM
Edited by Albyx at 07:14, 16 Mar 2023.

NimoStar said:

Just a note, the addresses as provided here are empty on every .exe, even with -400000 hex


No they are not. Checked in XVI32 hex editor for 0x645744 (equilibris life artifacts) and 0x65AF84 (life potions for both equi and original).

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


Famous Hero
posted March 16, 2023 09:29 AM
Edited by vulcancolak at 09:44, 16 Mar 2023.

You are simply amazing Albyx. I am starting to work and update my post. It takes time because i have stucked at the very beginning.
Opened h4mod.exe with my editor and here is the results.
For example i am trying to find it but i have failed.

https://pasteboard.co/w1z2vDKqw2JR.png



Step 1: We haven't started and verified yet.

By the way my mod works with Heroes4.exe but results are the same. I cannot find something like this in both exe files
0xA45750

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


Known Hero
posted March 16, 2023 01:14 PM
Edited by Albyx at 13:15, 16 Mar 2023.

vulcancolak said:

By the way my mod works with Heroes4.exe but results are the same. I cannot find something like this in both exe files
0xA45750

You should use "Go to" and remove 0x from the address. If there will be an error saying that address is unavailable or out of range, subtract 0x400000 from address (basically change the first A in address to 6)

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


Famous Hero
posted March 16, 2023 01:33 PM
Edited by vulcancolak at 13:38, 16 Mar 2023.

Currently i cannot find A45750
When i search for 45750 i am here.
Here is the new picture with details.
Let us start with Iron Plate.
Next step: Find the Iron Plate


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


Responsible
Legendary Hero
Modding the Unmoddable
posted March 16, 2023 08:06 PM
Edited by NimoStar at 20:08, 16 Mar 2023.

Albyx said:
NimoStar said:

Just a note, the addresses as provided here are empty on every .exe, even with -400000 hex


No they are not. Checked in XVI32 hex editor for 0x645744 (equilibris life artifacts) and 0x65AF84 (life potions for both equi and original).



See this for eq360 exe. Hex editor neo.



Now for original Winds of War:



That Vulcan was also unable to find it suggests you are wrong.
____________
Never changing = never improving

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


Known Hero
posted March 16, 2023 09:21 PM
Edited by Albyx at 21:26, 16 Mar 2023.

vulcancolak said:
Currently i cannot find A45750
When i search for 45750 i am here.
Here is the new picture with details.
Let us start with Iron Plate.
Next step: Find the Iron Plate



You should search for 645750, also bear in mind that this address is for Equilibris only, since they changed life blacksmith items.

Code of Iron Plate is 0x7E ( search only for 7E, it's the first in array)
Code of Elven Chainmail is 0x40 (you put in only 40 instead of 7E).


NimoStar said:

See this for eq360 exe. Hex editor neo.


It's literally there
0x645750 as it should be

Take addresses from my first message in this thread not to copy my occasional mistypes, hex editor selects wrong addresses sometimes

It's Equilibris life blacksmith artifacts, of course you can't find it in vanilla exe.


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


Famous Hero
posted March 17, 2023 08:46 AM
Edited by vulcancolak at 09:02, 17 Mar 2023.

Hello Albyx. I have realized this is the Life Blacksmith because these offsets matches with my list

7E 00 00 00 69 00 00 00 C3 00 00 00 2F 00 00 00
7E Iron Plate
69 Long Sword
C3 Telescope
2F Crossbow

I am changing 69 > 0e (Long Sword to Axe) for testing purpose and saving Heroes4.exe and testing but still it looks as Long Sword. I am purchasing and trying to verify but still it is Long Sword.

Then i have decided to check the other things we have and i have noticed h4.dll have the similar offsets like this



And i did the same thing with .dll file (changing 69 > 0e) and game crashes when i try to click Life Blacksmith.

Then i have decided to change 69 to 0e in both files (heroes4.exe & h4.dll) and game still keeps crashing.

That means we have to work on h4.dll instead of heroes4.exe? Game is not running when i delete the .dll file

First let us verify this, then i will proceed for the Resource Editor thing.

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


Known Hero
posted March 17, 2023 10:22 AM
Edited by Albyx at 10:25, 17 Mar 2023.

If it crashes you are doing everything right. Game tries to load missing resources and fails, that's why you need to add pngs into h4r.

Equilibris team may have moved their code from exe to dll at some point and what I provided as address may be obsolete data from old equilibris versions. If editing dll makes game crash instead of editing exe, you should work with dll.

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


Famous Hero
posted March 17, 2023 10:57 AM
Edited by vulcancolak at 11:38, 17 Mar 2023.

Now i have exported layers.dialog.blacksmith.life.h4d within heroes4.h4r and working on it. I will share the results when i am done.

Here is the result.
I have extracted layers.dialog.blacksmith.life.h4d from heroe4.h4r
I have opened the file and replaced all names with Plate_Mail with Golden_Plate_Mail

L_Arrow_Plate_Mail
Number_Plate_Mail
R_Arrow_Plate_Mail
Text_Plate_Mail
Plate_Mail

Changed into

L_Arrow_Golden_Plate_Mail
Number_Golden_Plate_Mail
R_Arrow_Golden_Plate_Mail
Text_Golden_Plate_Mail
Golden_Plate_Mail

Opened h4.dll and replaced 7E > 4d

Opened ResEdit. Opened equi.h4r and imported layers.dialog.blacksmith.life.h4d into equi.h4r

Tried to run the game but game won't open. What am i missing?

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


Known Hero
posted March 17, 2023 01:41 PM

1. You extracted layers.dialog.blacksmith.life.h4d from heroes4.h4r, it's vanilla life blacksmith resources and not from Equilibris. Better extract it from equi.h4r.

2. You are adding artifact that doesn't have blacksmith icon and cost. It requires layers.dialog.blacksmith.golden_plate_mail.h4d with "Box", "Highlighted", "Layer 1", "Pressed" and "Released" pngs. (step 3 in my guide). These images are where you put actual artifact graphics to be displayed on the screen.

For a test you can copy layers.dialog.blacksmith.plate_mail.h4d, change name to layers.dialog.blacksmith.golden_plate_mail.h4d and add to h4r

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


Famous Hero
posted March 17, 2023 03:18 PM

And we have a serious problem in here. I was saved original equi.h4r file (last change 2008) i have extracted layers.dialog.blacksmith.life.h4d but it won't open with Resource Editor.
But i was able to open exported file from heroes4.h4r
Now i have to solve this issue. By the way i was using 3.51 because somehow 3.55 caused many errors to me.

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

Page compiled in 0.0588 seconds