NOTE: This is a warning and a disclaimer. From the forum rules page: "Illegal Topics: Do not discuss anything that is illegal. This includes, but is not limited to, illegal drugs, solicitation, ROMs or other copyrighted products." I legally own both a Playstation 2 and the NA version of the PS2 game Suikoden 5. What I'm saying here is DON'T ASK ABOUT ILLEGALLY ACQUIRING THIS GAME (or any others)!
With that out of the way, I'll get on with it. I'm using Cheat Engine 6.2 and the emulator PCSX2 r5350.
Suikoden 5 is much more difficult to figure out than the first 4 main series titles. In those games, stats, MP, items, affinities, all of it is determined by a very simple memory location + value.
In this game things are more complex -- much more complex, it seems, but I also know next to nothing about programming so I can't really judge.
I've mostly figured out the equipment system. There are a total of 7 equipment categories, each with a unique value system:
1: All 3 rune slots share the same value system
2: Head slot
3: Body slot
4: Hands slot
5: Feet slot
6: All 4 aux slots share the same value system
7: Both skill slots share the same value system
Runes, head items, body items, hand items, feet items, and skills
The first 5 things I listed plus the 7th -- Runes, head, body, hands, feet, and skills -- are all pretty similar. All of them are 1-byte memory locations with a similar range of values. They all start with 0 (which is an empty slot), and each whole number value thereafter corresponds to a unique item in each type of slot. Here are some examples to make sure I'm being clear:
-A value of 0 is an empty slot.
-A value of 1 is a Dawn Rune in a rune slot, a Bandana in the head slot, a Robe in the body slot, a Bandage in the hands slot, a Mules in the feet slot, and the skill Stamina in a skill slot.
-A value of 16 is a Beast rune, a Forehead Guard, a Fantasy Half Coat, Leather Gloves, Long Boots, and Triple Harmony skill.
Despite being similar, each category has a different total amount of values:
Rune slot values: 0-97. There are a total of 93 runes. (Note: 20, 38, 57, and 58 are all blank)
Head slot values: 0-32. There are a total of 32 head items.
Body slot values: 0-71. There are a total of 71 body items.
Hand slot values: 0-37. There are a total of 37 hand items.
Feet slot values: 0-30. There are a total of 30 feet items.
Skill slot values: 0-48. There are a total of 47 skills. (Note: 27 is blank)
The aux slots are different, and I haven't quite figured them out. Aux slots appear to be 8-byte memory locations, though I have never seen more than the first 4 bytes used at a time. To me it seems like only 2 bytes should be necessary for this -- using the extra byte to measure consumable quantity values -- but again, I know nothing about programming so I really have no idea.
The values assigned to aux items appears to be random (though there's probably a not-very-complicated logic to it that would be obvious/not hard to find if I knew anything about programming), so here's some examples:
261 = Cape
2313 = Sacrificial Jizo
3333 = White Rose Brooch
4357 = Scarf
10501 = Lightning Ring
11781 = Eyeball Ring
11525 = Defense Ring
83951881 = Medicine1
84214025 = Medicine5
50398986 = Breath of Ice S1
50530058 = Breath of Ice S3
I've also found the memory locations of potch, party SP, character SP, character EXP, character weapon level, character skill levels, character stats, and character affinities. All of those but the last 2 (character stats and character affinities) are very simple.
Potch, party SP, character SP, character EXP, character weapon level, character skill levels
Potch: there are two 4-byte memory locations for potch. One is the actual amount, the other is the counter displayed on the bottom-left after you win a battle
Party SP: similar to potch; there are two 2-byte memory locations for party SP. One is the actual amount, the other is the counter display
character EXP: similar to the above; there are two 2-byte memory locations for character EXP. One is the actual amount, the other is the EXP counter displayed under the character's name, hp, etc on the right of the screen after you win a battle
character SP: same as above; two 2-byte memory locations for character SP. one is the actual amount, the other is the SP counter under the character after you win a battle
character weapon level: a 1-byte memory location just before the string of three 1-byte character rune slot locations. a value of 0 is weapon level 1, 2 is weapon level 3, 9 is weapon level 10, etc.
character skill level: a string of many 1-byte memory locations, each corresponding to a different skill
0 = no skill
1 = E
2 = D
3 = C
4 = B
5 = A
6 = S
7 = SS
Character stats and character affinities are more complicated
Character stats, character affinity (note: i'm leaving HP and MP aside for now)
Character stats are 2-byte memory locations, one each for: ATK, MAG, PDF, MDF, TEC, ACC, EVA, SPD, and LUK (in that order)
Character affinities are 1-byte memory locations, one each for: Su, Fi, Li, Wi, Wa, Ea, St, So, Ho, Da, Sl, Th, Pu, and Sh
(note: 0 is not a valid value)
(note: 6, or S, is the highest value, meaning there is no SS rank for affinity)
My current problem is that I can't figure out how to change stats or affinity. If I change the values, they are automatically reset when I open the menu (pressing square) and also when I confirm ending my turn in battle.
From what I can tell, this is a fairly common problem programming-illiterate people have when using Cheat Engine and similar programs. My current guess is that there is some algorithm that determines both stats and affinities, then writes the answer it comes up with to the character stat and character affinity addresses I've found. Hopefully someone who knows what they're doing will see this and let everyone know what's going on.
If not, I'll probably figure it out eventually. I can already sort-of get around it by telling the Cheat Engine debugger to find what writes to those addresses, then adding the code to the code list, and right-clicking it and replacing it with "code that does nothing". Leaving aside the major problem that this tends to cause the game to crash, this works fine with affinities, because the game doesn't need to recalculate affinities when characters level up. But for stats -- let's take the magic stat as an example -- it's different. So, I could disable the code and set Cornelio's magic to 500. But then, the magic stat for him and all other characters will stay the same even if they level up until I re-enable the code, at which point it will reset back to what it should be for whatever level they are.
I'm really interested in figuring out a way to reliably change affinities without causing a freeze/crash, because it would be a tremendous help in figuring out exactly how affinity factors into casting speed.
Anyway, if anyone wants my .CT (not sure if it's worth anything cause i have no idea how to use pointer scans) and/or my (incomplete) spreadsheet of equipment values, I'd be happy to post them once I figure out where to do it.
edit: fixing typos, etc