Grandia(c) Game Arts/SCEA, 1997

Save State Hacking Guide
Copyright 2015 Carlos Eugenio

******************************************************************************
  This guide is licensed under the Creative Commons Attribution-Sharealike,
avaiable here http://creativecommons.org/licenses/by-sa/2.0/legalcode
Simplifying the legalese, that means that you are free to copy, print,
distribute, and otherwise use this guide any way you want as long as you don't
violate the license i.e. give credit where it is due!
  Derivative works of this guide are allowed provided that you credit me for
the original work *AND* release it under this same license or other free,
copyleft license compatible with Creative Commons Attribution-Sharealike. If
you indeed produce a derivate, kindly inform me after it's done so I can enjoy
it too and maybe even improve this guide (you will be credited for it too of
course!)
******************************************************************************

Version History
------------------------------------
2015 December 23: v. 0.2
       -Initial version of this guide. There's still plenty of work ahead but
this is a good beginning :) Added Justin's stats offsets, gold offsets, most of
the items, shoes and jewelry. Still missing other chars' stats, magic, most
weapons and armor.
------------------------------------

      This is a save state hacking guide for Grandia, a classic PSX J-RPG
by Game Arts (published by SCEA). Why I bothered writing this stuff? Well...
<insert witty joke here>
So I did fiddle a little with a hexeditor, a diff tool, some save states and
now I want to share it with you, my dear lazy classic RPG gamer. Enjoy :)

PS: This guide won't teach you hex editing. There are plenty of other guides
who'll teach you better than me.

PS2: I used ePSXe. State hacking with ePSXe is a bit tricky but I'll explain
it in detail on section 1.0.

PS3: Use this guide with moderation! You can ruin your fun if you go overboard
and max out everything. In fact, I recommend that you beat the game first
without cheating, and in subsequent replays hexedit away.

Well, on to the guide...

Index
1.0 Save state?
1.1 Characters stats offsets
   1.1.1 Justin
1.2 Gold
1.3 Lists
   1.3.1 Shoes
   1.3.2 Jewelry
   1.3.3 Consumables & key items
   1.3.4 Weapons
   1.3.5 Armors
   1.3.6 Shields
   1.3.7 Helmets
1.4 Thanks & contact info

1.0 Save state?
       Save state is a file with a snapshot of the game progress on a given
instant. More specifically, its the CPU & Memory data on a given instant. This
guide was made and tested on ePSXe for Linux (stated above, before the index).
I guess that the files structure are the same on Linux and Windows but I cannot
be certain, since I can't and won't install Windows EVER AGAIN :P
EDIT: in fact the save states works in both versions. Just tested the Windows
version using wine. (and, surprise! running the Windows version via wine is way
better than playing the native Linux version. Go figure...)

       As I said earlier it takes some effort to hack the states. First thing,
ePSXe save states are compressed using gzip, so before you edit anything at all
you must decompress it (used gunzip but I guess 7-Zip, WinRAR, should do the
trick on Windows). Then you load the file on your hexeditor, edit whatever you
want, then recompress the file. Remember to remove any file extension that gets
added to the recompressed file, if any. Now you can load the save state on the
emulator. A word of warning, it seems that ePSXe somehow keeps the save state
in memory, so to edit it you must close it before. Phew! I said it was tricky :)

EDIT: I recently used ePSXe 1.7 -- wine emulation :P -- and there's no need to
gzip the file again after you're done editing it... just load it (no need to
restart the emulator too!!)

So, to be clearer, that's how I (used) to do it myself:
$ mv SCUS_942.54.001 SCUS_942.54.001.gz
$ gunzip SCUS_942.54.001.gz             #decompressing the file
$ bless SCUS_942.54.001                 #loading on the hexeditor
$ gzip SCUS_942.54.001                  #done editing, recompressing it
$ mv SCUS_942.54.001.gz SCUS_942.54.001 #removing file extension
$ cd ..
$ ./epsxe                               #play away

Since now there's no need to gzip again the file neither restart the emulator
it may be already running... SO here's the improved way:
$ wine ePSXe.exe &                      #yeah the windows version IS better :P
$ cd sstates/
$ mv SCUS_942.54.001 SCUS_942.54.001.gz #save state name of course
$ gunzip SCUS_942.54.001.gz             #decompress file
$ bless SCUS_942.54.001                 #load it on hexeditor
                                       #reload it on ePSXe and play away

       BACKUP YOUR FILES before you edit them to save yourself a lot of grief
in case something goes wrong! Saving in two or more slots and editing one does
the trick neatly.

1.1 Characters stats offsets
      I'm still not sure if the character's offsets are dependent on their
position on the party. So, they're listed here in the order I've found them
on the save state BUT I'm not sure what happens when characters leave the
party, I've only recently started a game to test this. Future revisions will
shed light on this subject.
      All values offsets are reversed i.e. most significant digit goes last.
For example, if you want to have 1000 HP on Justin (0x03E8), you should edit
his maximum HP offsets (0x10432-0x10433) like this: 0xE8, 0x03.
      A side note, if you change any of the items equipped, the game doesn't
automatically correct your battle stats. You must swap the weapon off then on
again (or maybe level up the char? haven't tested that yet) and only then the
correct value will be on. You can equip any item in any slot (i.e a Sneakers on
your shield slot o_0) BUT if the item can't normally be equipped in the slot
you put it on (or at all) when you swap another item in, you won't be able to
re-equip it in the wrong slot unless you hack the value back in again.

1.1.1 Justin (or 1st Party Member?)
HP (Current/Maximum)       0x10430-0x10431 / 0x10432-0x10433
STR                        0x10434-0x10435
VIT                        0x10436-0x10437
WIT                        0x10438-0x10439
AGI                        0x1043A-0x1043B
SP (Current/Maximum)       0x1043C-0x1043D / 0x1043E-0x1043F
Weapon (Sword) skill level 0x10456
Weapon (Mace)  skill level 0x10457
Weapon (Axe)   skill level 0x10458
L1 MP (Current/Maximum)    0x10462/0x10463
L2 MP (Current/Maximum)    0x10464/0x10465
L3 MP (Current/Maximum)    0x10466/0x10467
Total Experience           0x1045A-0x1045D
Weapon Equipped            0x10472-0x10743
Shield Equipped            0x10474-0x10745
Armor Equipped             0x10476-0x10477
Helmet Equipped            0x10478-0x10479
Shoes Equipped             0x1047A-0x1047B
Jewelry Equipped           0x1047C-0x1047D
Inventory slots            0x1047E-0x10495

1.2 Gold
       All values offsets are reversed i.e. most significant digit goes last,
just like char stats. For example, say you want to be filthy rich and have
one million gold pieces (0xF4240), fill the offsets this way: 0F on 0x10320,
42 on 0x1031F, and 40 on 0x1031E.

Gold offsets: 0x1031E, 0x1031F, 0x10320

1.3 Lists

      The value 0x0000 corresponds to a empty slot. Note that each item
consists of two offsets, so there are 65535 possible values. I made a broad
sweep through this range of values, only tested a few hundred of them. There
may be items that I didn't find because of this. If someone smarter than me
manages to automate this tedious task of checking all possible values, a
comprehensive list of *ALL* combinations may emerge. But, my guess is that most
values will be garbage anyway.
      Garbage offset values may or may not work. This includes things like
unnamed items, "+35 move", "+5 water level", iconless things, Japanese strings,
and so on. Some even are equippable, for example you can equip "+5 water level"
as a weapon, I wonder what it does in combat... :)

1.3.1 Shoes
0001 Drgn Boots         0101 Ninja Sandals       0201 Wing Boots
0301 Beach Sandals      0401 Mach Boots          0501 Heavy Boots
0601 Queen Heels        0701 Iron Clogs          0801 Ogre Boots
0901 Rabbit Shoes       0A01 High Heels          0B01 Wolf Boots
0C01 Lion Boots         0D01 Battle Boots        0E01 Sprint Shoes
0F01 Slippers           1001 Warp Shoes          1101 Crampons
1201 Zero Boots         1301 *garbage*

1.3.2 Jewelry
1401 Diana Amulet       1501 Hero Badge          1601 Demon Amulet
1701 Officer Badge      1801 Black Belt          1901 C Earring
1A01 Titan Ring         1B01 Fire Cape           1C01 Fire Charm
1D01 Water Charm        1E01 Wind Charm          1F01 Earth Charm
2001 Counter Ring       2101 Move Ring           2201 Hurricane Belt
2301 Mama Amulet        2401 Jade Charm          2501 Tree God Amulet
2601 Light Amulet       2701 Ancestor's Amulet   2801 Rain Coat
2901 Irides. Amulet     2A01 Move Unblocker      2B01 Yore Medal
2C01 Spirit Charm       2D01 Phantom Silk        2E01 Lightn. Amulet
2F01 Forest Charm       3001 Explosion Charm     3101 Blizzard Charm
3201 Wind Belt          3301 Confusion Charm     3401 Paralysis Charm
3501 Magic Block Charm  3601 Sudden Death Charm  3701 Poison Charm
3801 Talisman           3901 Sonic Belt          3A01 Metal Frog
3C01 *garbage*          3D01 Scarab              3E01 Demon Eye Stone
3F01 Jewel of Life      4001 Ankh of Temptation  4101 Anklet
4201 Energy Ring        4301 Disease Charm       4401 Paperweight
4501 Combat Anklet      4601 Chain of Gems       4701 Satisfaction Gem
4801 Soul of Asura      4901 Crescent Jade       4A01 Dragon Scales
4B01 Spectacles         4C01 Rune Ring           4D01 Tear Jewel
B801 Snake Earrings     C301 Elite Badge         CF01 Ring of Rage
D001 Holy Ring          D101 Mysterious Veil     D301 Telescope
D401 Energy Charm       D501 Devil's Anklet      D701 Astral Miracle
D801 Ethereal Miracle   D901 Miraculous Scales

1.3.3 Consumables & key items
3B01 Revival Stone      4E01 Spirit Potion       4F01 Wound Salve
5001 Baobab Fruit       5101 Coconut             5201 Chocolate Cookies
5301 Honey              5401 Ultra Drink         5501 Weeds
5601 Dried Fish         5701 Bamboo Shoots       5801 Beef Jerky
5901 Box Lunch          5A01 Herbs               5B01 White Sulfa Weed
5C01 Smarna Weed        5D01 Cholla Flowers      5E01 Bamo Fruit
5F01 Squid Guts         6001 Move Mushroom       6101 Power Mushroom
6201 Poison Antidote    6301 Ginseng             6401 Banana
6501 Bandage            6601 Box of Sweets       6701 First Aid Kit
6801 Red Medicine       6901 Blue Medicine       6A01 Yellow Medicine
6B01 Crimson Potion     6C01 Deep Blue Potion    6D01 Golden Potion
6E01 Magic Lamp         6F01 Poison Antidote     7001 Vaccine
7101 Eye Drops          7201 Smelling Salts      7301 Paralysis Ointment
7401 Speel Breaker      7501 Move Breaker        7601 Ressurect Potion
7701 Panacea            7801 Bond of Trust       7901 Seed of Power
7A01 Seed of Defense    7B01 Seed of Speed       7C01 Seed of Running
7D01 All-Around Seed    7E01 Seed of Life        7F01 Seed of Magic
8001 Seed of Moves      8101 Mace Coloring Book  8201 Bow Coloring Book
8301 Sword Secrets      8401 Fire Secrets        8501 Earth Secrets
8601 How To Cut 'Em     8701 How To Pound 'Em    8801 How To Chop 'Em
8901 Roach Bomb         8A01 Firewood            8B01 Mana Egg
8C01 Holy Fire          8D01 Hand Grenade        8E01 Dynamite
8F01 Rocket Fireworks   9001 Launch Fireworks    9101 BOOM! Scroll
9201 Howler Scroll      9301 Vacuum Scroll       9401 Tremor Scroll
9501 Zap! Book          9601 Lightning Scroll    9701 Gale Scroll
9801 Overflowing Walnut 9901 Restraint Walnut    9A01 Sonic Walnut
9B01 Running Walnut     9C01 Snooze Scroll       9D01 Poisoned Apple
9E01 Culture Medium     9F01 Dream Truffle       A001 Paralyze Mushroom
A101 Orb of Silence     A201 Black Onyx          A301 Weak-knee Weed
A401 Ragged Weed        A501 Slouch Weed         A601 Trudge Weed
A701 Root of Confusion  A801 Torte's Whistle     A901 Freesia Flowers
AA01 Cone of Light      AB01 Mikeroma Scroll     AC01 Shuffle Card
AD01 Miracle Drink      AE01 Gold Key            AF01 Silver Key
B001 Key of Temptation  B101 Soldier's Key       B201 Pretty Jewel
B301 Pretty Jewel       B401 Pretty Jewel        B501 Horn of Inogon
B601 Key (garbage)      B701 Health Weed         B901 Resurrect Potion
BA01 Expensive Jewel    BB01 Rainbow Weed        BC01 Smoked Salmon
BD01 Prime Rib          BE01 Rescue Set          BF01 Black Nail Polish
C001 *garbage*          C101 Thor's Fury         C201 Magic Lipstick
C401 Fruit of Power     C501 Fruit of Defense    C601 Fruit of Speed
C701 Fruit of Agility   C801 All-Around Fruit    C901 Fruit of Life
CA01 Fruit of Magic     CB01 Fruit of Moves      CC01 Mogay Teachings 1
CD01 Mogay Teachings 2  CE01 Mogay Teachings 3   D201 Blizzard Scroll
D601 *garbage*          DB01 Brown Crayon        DC01 Blue Crayon
DD01 Red Crayon         DE01 Sky-Blue Crayon     E001 Soldier's Soul
E101 Poison of Power    E201 Poison of Defense   E301 Poison of Speed
E401 Poison of Agility  E501 All-Around Poison   E601 Poison of Life
E701 Poison of Magic    E801 Poison of Moves     E901 +1 Dagger Skill
EA01 +5 Dagger Skill    EB01 +1 Sword Skill      EC01 +5 Sword Skill
ED01 +1 Mace Skill      EE01 +5 Mace Skill       EF01 +1 Ax Skill
F001 +5 Ax Skill        F101 +1 Whip Skill       F201 +5 Whip Skill
F301 +1 Bow Skill       F401 +5 Bow Skill        F501 +1 Fire Skill
F601 +5 Fire Skill      F701 +1 Wind Skill       F801 +5 Wind Skill
F901 +1 Water Skill     FA01 +5 Water Skill      FB01 +1 Earth Skill
FC01 +5 Earth Skill

1.3.4 Weapons
DA01 General Staff      DF01 Emperor's Whip      FD01 100 Sword
FE01 100 Mace           FF01 Fire Mace

1.3.5 Armors
--TODO still pending

1.3.6 Shields
--TODO still pending

1.3.7 Helmets
--TODO still pending


1.4 Thanks & contact info

-Thanks to GameArts/SCEA, for this wonderful game, I enjoy it to this day!
-Thanks to the free & open source software people!
-Thanks to the GameFAQs people!
-Thanks to Zhi Cheng Liu for his BoF3 Secrets Guide with the Hidden stats
info, it would take even more work to figure out WTF where those offsets...
-Thanks to anyone who deserves a thanks but I forgot to mention!

You can reach me on demonsword at gmail dot com. Please, if you want to mail
me, write in proper English so I can understand you. Offensive mails won't
be replied. And please, I'm a busy man, so if I don't reply to you the same
day/month/year/century don't be mad at me ok? :)

---EOF