Wednesday, September 3, 2008

Hex editing guide for Genghis Khan 2 SNES by Dave

I've taken this from gamefaqs message board.
Photobucket

Unit's should each be about 22-23 bytes long, and should look something like..

{47}{65}{6E}{67}{68}{69}{73}{20}{4B}{68}{61}{6E}{00}{00}{00}{FF}{42}
{44}{2C}{03}{04}{00}

The first 12 = The units name, in this case Genghis Khan.
{47}{65}{6E}{67}{68}{69}{73}{20}{4B}{68}{61}{6E}

The next two byes I am unsure about their exact function.. all I'm positive about here is it isn't also part of the naming values. If you try naming a unit 13-14 letters the game glitches. As far as I know it's best to keep the next two values at {00} (or, in the event they're different, the default which they started as.)
(so.. the second value after the 12 naming ones) is used for which country the general can be recruited from. still have no idea what the first value does, though.
The value after that: {FF}

Is for bodypoints.

FF -- 15/15
EE -- 14/14
DD -- 13/13
CC -- 12/12
BB -- 11/11
AA -- 10/10
99 -- 9/9
88 -- 8/8
77 -- 7/7
66 -- 6/6
55 -- 5/5
44 -- 4/4
33 -- 3/3
22 -- 2/2
11 -- 1/1
00 -- 0/0

Are the values you can use there. x)

The value after that: {42}

Is for both politics and war.

77 -- 9/9 (glitched again, but still higher than 66)
66 -- (glitched visually, shows nothing.. still higher than */* though)
55 -- */*
54 -- A/*
53 -- B/*
52 -- C/*
51 -- D/*
50 -- E/*
45 -- */A
44 -- A/A
43 -- B/A
42 -- C/A
41 -- D/A
40 -- E/A
35 -- */B
34 -- A/B
33 -- B/B
32 -- C/B
31 -- D/B
30 -- E/B
25 -- */C
24 -- A/C
23 -- B/C
22 -- C/C
21 -- D/C
20 -- E/C
15 -- */D
14 -- A/D
13 -- B/D
12 -- C/D
11 -- D/D
10 -- E/D
05 -- */E
04 -- A/E
03 -- B/E
02 -- C/E
01 -- D/E
00 -- E/E

Are the appropriate values there..

The value after that one, {44} is for both lead and charm. Again the values above can be used for editing these stats. =)

After that; {2C}:

Is for age.

I didn't bother to write down any values for this since it's 255 different ones.. if you know basic hex you'd know {FF} = 255 and {01} = 1 etc :) so it's easy enough to just assume which age is close to what you want it set as.

The value after age {23} again i'm not 100% sure of. All I've managed to figure out is if it's set to {41} the unit starts plagued and will die the turn afterwards. ;D
Photobucket
The value after: {03} is for his rank.

01 -- Neutral
02 -- Married/Related
03 - Ruler

The value after that: {04} is for the units picture. If this value is set to {00} the last value after this one {04} {00 in this case} is also used for characters picture. It's hard to explain, but in the address above/below..

{47}{65}{6E}{67}{68}{69}{73}{20}{4B}{68}{61}{6E}{00}{00}{00}{FF}{42}
{44}{2C}{03}{04}{00}

Normally {04} is where the value ends. It tells the game to use Genghis Khan's picture for the unit Genghis Khan. If you change {04} to {00}, the next {00} value also becomes the characters picture, but, not "important characters" like Genghis Khan or Muqali, so for instance if we changed the address to:

{47}{65}{6E}{67}{68}{69}{73}{20}{4B}{68}{61}{6E}{00}{00}{00}{FF}{42}
{44}{2C}{03}{00}{04}

Instead of keeping it at:

{47}{65}{6E}{67}{68}{69}{73}{20}{4B}{68}{61}{6E}{00}{00}{00}{FF}{42}
{44}{2C}{03}{04}{00}

Genghis Khan's picture changes to an "unimportant" mongol in a red and yellow hat, with a brown shirt and black moustache instead of Genghis Khan. Hopefully that makes sense. =)

As for actually editing states, I did check around with that but I didn't experiment much with it. Aside from their name which is I think 14-15 bytes long, all states share another 9 bytes..

{A0}{39}{7E}{D5}{2F}{7E}{AB}{C8}{C4}

All I really figured out checking it, is..

1st (byte) - Seems to effect turn order, but I don't know how it's calculated yet.. I didn't really look into it but A0 for example represents Genghis Khan and his "1" state. "CC" is state 7. So it isn't like {01} is the value for 1, {07} is 7 etc which is mildly confusing, also if you try to switch this value with another state (say 7--) to control 7 the game glitches/freezes also.
2 - ?
3 - ? (Seems all states have this set as 7E so I left it alone.)
4 - ?
5 - ?
6 - ? (Again seems all states have this set as 7E so I left it like that once more.)
7 - Incharge the wife name/sprite, I only tested this once so I only know the values:

30 - Strange glitch :) starts with a wife named "your orders?" who if you spend time with says "Ooh.. I feel so sick." After a turn she'll die, and if you spend time with family after that the ruler will spend time with the advisor instead, who usually remarks; "Young children are such a joy!"
AB - Borte. (Genghis Khan's)
BD - Nidon. (Jamuga's Wife)
E1 - Mualun. (Tayan Khan's)

8 - ?
9 - ?

So as you can see it's really limited as I spent little to no time on it at all. I'm pretty sure I could figure it out of I really looked into it since one of the things I managed to do playing around with states was start in Poland, except it was majorly glitched because I don't know what the function is of maybe 70% of the values above. =)

(I started in Poland with a bunch of general's named like UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU393093) 0 population, loyalty, troops, economy, farming, 8000+ food and 15000+ gold.)

So I guess it is possible to start/play in other states, although for it to work I think you would have to change a few things.

a) Find where the start up values for generals starting in certain states are stored. One problem with Poland is it tried loading a list of start up generals that didn't exist so I was left with a long list of nonsensically named units. I think in order for that not to glitch you would have to give Poland say, the generals Genghis Khan in state 1 starts off with. Also..

b) Give him family. All countries you can't play have no family set to them; one of the things I tried to do when I started as Poland was spend time with family but the advisor (also horribly named like UUUUUUURRRRUUUUUUUUU)(#)$(#)) said I didn't have one. (Which would also explain why if you take over places like Poland in the game, no matter the year, you never seem to capture the son of a ruler.) So without borrowing again maybe Genghis Khan's wife for example it would be impossible to give birth to a successor playing as states you normally can't. I didn't bother to check if two rulers could share the same wife (and if it would glitch in anyway) but.. I'd assume that's probably possible.

haha and probably historically accurate too.

3 comments:

Sartaq Khan said...

MOST OF THIS WORKS FOR SUPER AOKI

Sartaq Khan said...

ALL OF IT WORKS

ALSO ALL THE EXTRA WOMEN WOULD BE NEEDED FOR A FULL PERFECT MOD WITH ALL RULERS USABLE

WaitingontheWorld said...

is there a already hacked version of this will all rulers unlocked? i'm a newbie to hex and don't quite understand this. Would really really love to play one of you too, I have been playing this game alone for many years (since 95).