|
Thread: Hex editing building requirements | |
|
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)
|
|
vulcancolak
Famous Hero
|
posted July 15, 2022 06:21 PM |
|
|
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
|
|
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.
|
|
vulcancolak
Famous Hero
|
posted July 15, 2022 07:43 PM |
|
|
Hmmm yes it worked. It changed Undead Transformer requirement Now i am going to experiment on this. Thank you so much.
|
|
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!
|
|
vulcancolak
Famous Hero
|
posted July 16, 2022 09:06 AM |
|
|
I have an another issue. Could you check it please?
CLICK TO ME
|
|
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
|
|
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.
|
|
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
|
|
|
|