|
Thread: Hex editing - changing the Rules | |
|
rottenvenetic
Known Hero
Derusticated
|
posted May 26, 2014 11:40 PM |
|
|
Hex editing - changing the Rules
My brother accidentally rekindled my interest in Heroes 3 and modding it.
Only problem is, some of the game rules I want to edit are in the exe and the only way I found to get there is a hex editor, and I don't know how to find offsets in there.
For example, I read in UndeadHalfOrc's post here:
http://www.celestialheavens.com/forums/viewtopic.php?p=320850#320850
that the offset for the Luck secondary skill value is 0x0023e998 (just 23E998 in my editor) and 23E9A8 is the next skill, leadership. In between there are four bytes which read 00 00 00 00, 01 00 00 00, 02 00 00 00 and 03 00 00 00 which I take to mean 0, 1, 2 and 3 for the skill's possible values (not taken, basic, adv, expert).
What tells me this is the offset for the luck skill, or for any skill at all? How do I find offsets for other things? How do I make a byte read negative 1, if I want heroes to start with -1 luck?
Stuff like that. I really can't make heads or tails of this hex editing malarkey and I'd appreciate any help.
Edit: I've learned how to search for 32 bit int and float variables and tried to find close patterns of values that would correspond to the numbers around luck and morale, from the obvious to the far-fetched with no success.
____________
In the darkness, a blind man is the best guide; in an age of madness, look to the madman to lead the way.
|
|
OxFEA
Promising
Famous Hero
feanor on DF2.ru
|
posted May 28, 2014 12:22 PM |
|
|
Quote: How do I make a byte read negative 1, if I want heroes to start with -1 luck?
FF FF FF FF
Quote: How do I find offsets for other things?
Old function for changing skill values
Quote: !?FU27512;//set power of some SS
;x1 - secondary skill
;x2 - mastery
;x3 - value for write or read
;x4 - mode: 0 - read 1 - write
;x5 - index of (e-)-variable if need convert (in this case must be less than 0)
!!FU|x4<0/x4>1:E;//wrong mode (must be 0..1)
!!FU|x1<1/x1=5/x1=7/x1=10/x1>26:E;//skills aren't supported
!!FU&x1>13/x1<21:E;//skills aren't supported
!!FU|x2<0/x2>3:E;//wrong mastery (must be 0..3)
!!VRy1&x1=1:S6547944;//archery
!!VRy1&x1=2:S6548072;//logistics
!!VRy1&x1=3:S6547928;//scouting
!!VRy1&x1=4:S6548024;//dyplomacy
!!VRy1&x1=6:S6547880;//leadership
!!VRy1&x1=8:S6547912;//mysticism
!!VRy1&x1=9:S6547864;//luck
!!VRy1&x1=11:S6548008;//eagle eye
!!VRy1&x1=12:S6547896;//necromancy
!!VRy1&x1=13:S6547992;//estate
!!VRy1&x1=21:S6548056;//learning
!!VRy1&x1=22:S6547960;//attack
!!VRy1&x1=23:S6547976;//armorer
!!VRy1&x1=24:S6548104;//intelligence
!!VRy1&x1=25:S6548088;//sorcery
!!VRy1&x1=26:S6548040;//resistance
!!VRx2:*4;
!!VRy1:+x2;
!!if&x4=0:;
!!UN:Cy1/4/?x3;
!!UN:C10784536/4/x3;//10784536 - address of e1
!!VRex5&x5<0:Se1;
!!el:;
!!VRe1&x5<0:Sex5;
!!UN&x5<0:C10784536/4/?x3;//10784536 - address of e1
!!UN:Cy1/4/x3;
!!en:;
Quote: 6547864;//luck
6547864 dec = 63E998 hex (memory addr)
63E998h - 400000h = 23E998 (file addr)
|
|
rottenvenetic
Known Hero
Derusticated
|
posted May 28, 2014 05:57 PM |
|
|
Ok, the FF FF FF FF worked, and I altered some other stuff in there but necromancy didn't work and this doesn't help me with anything but numeric values on some of the secondary skills.
I don't know what that function was written in/for or what it's even supposed to do; I just hex edited the new values over the old (I had a look with the hex editor into other files to build a small collection of float numbers).
Edit: if it's EDC script, that's WOG only; I have some other stuff but not WOG.
|
|
murphy0512
Tavern Dweller
|
posted May 29, 2014 04:21 AM |
|
|
I'm not sure if this is the right place for this, but is there a manual to help modders/newbie modders on how to Hex edit or to read Hex for homm3-3.5(Wog)?
____________
Thanks, Murphy
|
|
rottenvenetic
Known Hero
Derusticated
|
posted May 30, 2014 02:04 AM |
|
|
There is not; it would've come up in my endless Google searches
|
|
murphy0512
Tavern Dweller
|
posted May 31, 2014 12:08 AM |
|
|
rottenvenetic said: There is not; it would've come up in my endless Google searches
lol thanks it was worth a try anyway
____________
Thanks, Murphy
|
|
|