I read the "Savegame Hacking" Guide on the GearHead wiki, but it seemed a bit lacking in certain areas. Specifically, I wanted to learn how to hack the Talents in the savegame. But, I couldn't find anything about that.
So, I tried some experimentation with a new, junk character. I saved before and then after buying a talent. Then I used a hex editor to compare the two files. It was more complex that I had imagined and part of the problem lies in how GearHead often rearranges the codes between the character's Stats and
"-1..SDL_COLORS" after saving.
Anyway, here's what I've learned so far:
After buying a talent, I noticed that the following ASCII lines were added immediately after the space (30h) after the last (Ch) Stat:
..0 4 1 1000..0 16 11 1
The first part (..0 4 1 1000) tells GearHead to reserve 1000 experience points from now on. So, for example, if you had 5655 Free Exp. before, now you have only 4655 Free Exp.
The second part (0 16 11 1) is the code to add the Talent - which, in this case, adds Bishonen.
Experimenting some more, I noticed a few other things. From my experience, I would hazard to guess that all Talent codes begin with "..0 16 ", followed by a unique number, and then a " 1". I'm basing this on the two codes I've found so far:
Code for adding Talent: Bishonen:
..0 16 11 1 --or-- 0D0A302031362031312031
Code for adding Talent: Stunt Driving:
..0 16 9 1 --or-- 0D0A3020313620392031
Also, since GearHead rearranges the codes between the Stats and SDL_COLORS when it saves, I would guess that it doesn't matter where the code goes as long as it is between these areas and as long as it doesn't split up an existing code. (But I like to add the code right after the Stats.)
Through experimentation, I learned that you don't have to add the "..0 4 1 1000" code to tell GearHead to reserve 1000 XP. It's cheating, but you could leave that out. I also learned that if you add a new Talent, GearHead will assume you bought it and thus the 5 Talent limit is still in effect. Further, you won't be able to buy a new Talent until your XP is high enough as per the usual.
BTW: I recommend using the hex code instead of the ASCII code. So, instead of inserting "..0 16 11 1" in the ASCII field, you would insert "0D0A302031362031312031" in the hex field. And instead of "..0 4 1 1000" you would insert "0D0A30203420312031303030".
The reason I was interested in hacking the savefile to add a Talent was because I wanted my character to have the Bishonen Talent without having to buy it. And the reason for this is because I wanted to try a female character without the added conversation difficulty with major NPCs. (Everyone knows that flirting and conversation in GH1 is heavily bent towards favoring male characters.) I thought the situation was unfair and so I searched for a way around the 5 Talent limit to get Bishonen for free.
This technique almost works, but it still imposes the 5 Talent limit. However, I was thinking of doing the following:
1) Buy or hack the Bishonen Talent.
2) When the PC would have enough XP to buy a new Talent (as if it had Bishonen for free), hack the save to remove Bishonen, then buy a new talent, and finally hack the save again to add Bishonen back.
3) Repeat this until the PC has 5 Talents, plus the hacked Bishonen.
I think doing it this way would allow for more than 5 Talents. But I won't know for sure until I try it. However, it sure would be nice if there was an easier way.