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: Hex editing building requirements
Thread: Hex editing building requirements
Albyx
Albyx


Known Hero
posted July 15, 2022 05:33 PM
Edited by Albyx at 19:01, 15 Jul 2022.

Hex editing building requirements

While working on my plugin I've found a way to edit or remove building requirements, that will be useful for modders who  can't or don't want to use plugins based on H4API and Patcher. Only thing you need is hex editor.

I must also say, that now I'm working on plugin for adding new buildings to already existing requirements or creating more complex requirements like we have on creature dwellings (choosing one of two buildings, requiring only one of several buildings etc.), so method in this thread will not be really useful if you use Patcher in your mod.

So, here there are 6 addresses (without additional offsets):

1. 48d500 - common buildings
2. 48db60 - life
3. 48e890 - order
4. 48f2e0 - death
5. 48fde0 - chaos
6. 4908a0 - nature
7. 491380 - might

You need to search for this bytes:

89 68 04 C7 00 7C  5D 99 00 C7 40 08 XX 00 00 00 ,

where XX is code of building, that is required for building (NOT the building you are changing requirement for).

Change that XX byte and it should work.
If you want to remove requirement, set it to 00(village hall).


For example, I'll change Seminary requirement from Abbey to level 5 mage guild:
1. Search for 89 68 04 C7 00 7C  5D 99 00 C7 40 08 1D 00 00 00 starting from 48db60. It is at 48db92.
2. Change 1D (Abbey) at 48db9e to 18 (level 5 guild).
3. Save the change and run the game!

Buildings codes:
00- Village Hall;
01- Town Hall;
02- City Hall;
03- Fort;
04- Citadel;
05- Castle;
06- Shipyard;
07- Caravan;

08- Prison;
09- Tavern;
0A- Blacksmith;
0B- Grail;
0C- Level 1 up;
0D- Level 1 down;
0E- Level 2 up;
0F- Level 2 down;

10- Level 3 up;
11- Level 3 down;
12- Level 4 up;
13- Level 4 down;
14- Institute of Magic Level 1;
15- Institute of Magic Level 2;
16- Institute of Magic Level 3;
17- Institute of Magic Level 4;

18- Institute of Magic Level 5;
19- First Library;
1A- Second Library;
1B- Seminary(Haven)
1C- Stable(Haven)
1D- Abbey(Haven)
1E- University (Order)
1F- Treasure (Order)

20- Undead Transformer(Necropolis
21- Necromancy Amplifier (Necropolis)
22- Battle Academy (Chaos)
23- Thieves Gauntlet(Chaos) or Wrestling Pits(Stronghold)
24- Mana Vortex(Chaos)
25- Creature Portal(Nature)
26- Rainbow(Nature)
27- Sacred Grove(Nature)

28- Breeding Pens(Stronghold)
29- Magic Dampener(Stronghold)
2a- Arena of Honor(Stronghold)

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


Famous Hero
posted July 15, 2022 06:21 PM
Edited by vulcancolak at 18:22, 15 Jul 2022.

Hello my friend. First of all, thank you for your share. I always admire people like you.

I have opened Heroes4.exe with HxD software.
Searched for this one 89 68 04 C7 00 7C  5D 99 00 C7 40 08 and changed this value as you said

Check the picture, it looks like this now. But it is not worked for me.

Click for the picture

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


Known Hero
posted July 15, 2022 06:48 PM
Edited by Albyx at 18:56, 15 Jul 2022.

vulcancolak said:
Hello my friend. First of all, thank you for your share. I always admire people like you.

I have opened Heroes4.exe with HxD software.
Searched for this one 89 68 04 C7 00 7C  5D 99 00 C7 40 08 and changed this value as you said

Check the picture, it looks like this now. But it is not worked for me.

Click for the picture



It worked, but for ghosts dwelling.
You should be careful with addresses, from 48f2e0 death buildings start.

Also keep in mind, that this method just changes buildings' codes, so in your example you change 0c (upper 1 level dwelling) to 18. But 1 level dwellings are only required for building 2 level dwellings, and there is OR condition (building A or building B required). So as result you get ghosts dwelling that requires imps chamber OR level 5 magic guild.

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


Famous Hero
posted July 15, 2022 07:43 PM
Edited by vulcancolak at 19:44, 15 Jul 2022.

Hmmm yes it worked. It changed Undead Transformer requirement Now i am going to experiment on this. Thank you so much.

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


Legendary Hero
posted July 15, 2022 08:51 PM

Really great Discovery! We have now Heroes 4 modding volcano now! More things we know since this month as past 20 years!
Go ahead! If you have programming knowledge all will be very precious! We have now not one but some qualified programmers. 3d graphics creators too! Go ahead!

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


Famous Hero
posted July 16, 2022 09:06 AM

I have an another issue. Could you check it please?

CLICK TO ME

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


Legendary Hero
posted July 16, 2022 11:41 AM

Something wrong.
Here you have all buildings. First you must write a code. At the end is aklways 08 and next is building number.

Common x 48d500
077c5d99 00c74708 XX 00 00 00
01,02,03
04,05,07
09,0a,14,15
16,17,18
19,1a

Life. x 48db60
895804c7 007c5d99 00C74008 XX 00 00 00 ,
1d,1b,1c,0c,0d,0e,0f,11,10,
Order x 48e890
1e,1f,0c,0d,0e,0f,11,10,
Death x 48f2e0
896804c7 007c5d99 00C74008 XX 00 00 00 ,
0c,0d,0e,0f,10,11,20,21
Chaos. x 48fde0
0c,0d,0e,0f,10,11,23
Nature x 4908a0
0c,0d,0e,0f,11,10,27,26,25
Might. x 491380
0c,0d,0e,0f,10,11,23,2a

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


Known Hero
posted July 16, 2022 11:42 AM

vulcancolak said:
I have an another issue. Could you check it please?

CLICK TO ME


Yeap, looks like not all buildings are set in the same way.
To change genies library requirement, edit 48ee64.


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


Famous Hero
posted July 16, 2022 02:26 PM

Albyx said:
vulcancolak said:
I have an another issue. Could you check it please?

CLICK TO ME


Yeap, looks like not all buildings are set in the same way.
To change genies library requirement, edit 48ee64.




Hmmm. Thank you but are we sure about that? Here is how it looks like. But still it is requires Clerical Library.

Click for the picture

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0294 seconds