Suikoden editors

A forum for all general Suikoden related topics.
Post Reply
STARWIN
Posts: 29
Joined: Thu Sep 03, 2015 8:48 am

Suikoden editors

Post by STARWIN »

Hi. In the long term (~next year?) I plan to create an editor or editors to suikoden games. Which games? That depends on whether anyone else is making an editor to one or more of them currently, as it would be smart to avoid duplicate work. But I assume there are no game editors right now and that there are no obvious known projects for creating those either. (is that correct?)

In the short term I would like to know if there exists any documentation for game file offsets & data structures anywhere? I can see cheat codes, save data info (S2 & S3) and the usual game data listed in various places. I expect to be able to dig the offsets myself, so I'm asking this for reduction of work, not as a requirement.

Of course, even if a truck hits me, documented offsets are a major part of the work needed for creating an editor (or a mod if you have the basic skills). There may be cases where the game mechanics play a role also, and not only the numbers used by them, but in general just being able to modify some basic numbers probably makes a modder happy.
STARWIN
Posts: 29
Joined: Thu Sep 03, 2015 8:48 am

Re: Suikoden editors

Post by STARWIN »

I think I will start with Suikoden 1. I already accidentally documented some basics. I guess Pyriel is the only regular here who might have offset knowledge? In any case I'll continue documenting as it is relaxing, but these things can take a while (or not).

@initial equip guide: mina's magic robe is fixed .. will be simpler to just dump all the data from the game when the code is ready though, for these kinds of corrections

@stat growth: PWR stat growth number affects both PWR and HP, this may be a bug because there is a 7th growth number (or is it called rank?) in the character struct, [s]that the code grabs before increasing HP at lvlup,[/s] but does not use. edit: oops, does not load at all

I will be aiming for a rather low-tech editor, just a program to dump/insert game data of interest.

I quickly wrote a list of things that a modder might want to mod:

¤character
-initial LV/stats/W-LV/default W-El/equip (some fixed)
-stat growth
¤Weapon
-strength progression
¤Monster
-stats
-resistances
-bits
-drops
-AI?
¤Armor
-price/wearability/stat boosts
¤Item
-price
¤Army battles?
¤Shop selection?
¤Inn/blacksmith/appraiser price?
¤Unites?
¤Damn chests?
¤Minigame money values/prizes?

It has been a while since I played the game last time, so please tell if I forgot something. If some part seems to be too difficult to figure out, I'll just focus on the easier parts (to get something done).

About wind/earth rune pieces, are their strings swapped everywhere except in the stone tablet?

I noticed the topic about Bribe bug. Is there a listing of known S1 bugs somewhere?
Last edited by STARWIN on Sat Sep 12, 2015 9:03 am, edited 1 time in total.
User avatar
wataru14
Guide Writer
Posts: 718
Joined: Thu Aug 05, 2010 10:37 am
Location: Las Vegas

Re: Suikoden editors

Post by wataru14 »

STARWIN wrote:@stat growth: PWR stat growth number affects both PWR and HP, this may be a bug because there is a 7th growth number (or is it called rank?) in the character struct, that the code grabs before increasing HP at lvlup, but does not use
This work for everyone except Gremio. His PWR growth is Rate 13 and his HP grows at a normal Rate 04. Do you think his weird PWR growth is bugged since the only other person with an irregular PWR growth is Viktor (and both his PWR and HP are Rate 09)? It seems like his HP would follow his PWR if the odd growth rate was intentional. Or is Gremio the only case where that 7th growth number is used?
STARWIN
Posts: 29
Joined: Thu Sep 03, 2015 8:48 am

Re: Suikoden editors

Post by STARWIN »

At quick look I'd say Gremio uses the same code as everyone else. For the 6 main stats the code behaves a bit differently depending on how large the growth value is, viktor takes the path of PWRg<11, while gremio has PWRg>=11. The HP code doesn't have as many different paths. I'll see if I can reverse enough of the code, there isn't too much of it.

edit: from the code:

Gremio's (or anyone's with PWRg 13) HP growth:

<20: (0..511+2021)/256
<60: (0..511+2304)/256
>=60: (0..511+1115)/256

hopefully same as observations. no bugs, just custom mapping for each value.

edit2: should almost have a new topic for the specific S1 editor..

HP growth procedure in my own cryptic pseudocode, all numbers in hex:

Code: Select all


phase=2
if (LV<3C) {phase=1}
if (LV<14) {phase=0}
HP gain=([0...1FF]+[(PWRg*3+phase)*4+8016BE3C]....)/100
stat growth procedure:

Code: Select all


phase=2
if (LV<3C) {phase=1}
if (LV<F) {phase=0}
if (STATg<9 or STATg>A)
{
if (LV<14) {phase=0}
}
if (STATg==E)
{
phase=2
if (LV<50) {phase=1}
if (LV<3C) {phase=0}
}
STAT gain=([0...FF]+[(STATg*3+phase)*4+8016BEFC]....)/100
so both use a custom table to get the final value. the game engine should be OK with values from 0 to F. Note that certain growth values do not result in the familiar level limits for growth magnitude, but not many characters have those growth values.

current understanding of the char struct:

Code: Select all


char struct (hero/first base 801B8294) ss50 x4E
+0 character has stats for stone table? .... 08 cmp vs table in 80084B40
+4 Mhp .. 11 00
+6 hp .. 11 00 <hide cuz same as Mhp?>
+8 ?? . 00 rest=0
+9 mp1 . 00 <hide cuz MGC-based max?>
+A mp2 . 00
+B mp3 . 00
+C mp4 . 00
+D LV . 01 everyone is set to 1 <hide? depending on invisible lvlup mechanic>
+E EXP .. 00 00
+10 PWR . 0D
+11 SKL . 16
+12 DEF . 12
+13 SPD . 0F
+14 MGC . 0C
+15 LUK . 0F
+16 status? . 00
+18 PWRg . 06
+19 SKLg . 07
+1A DEFg . 05
+1B SPDg . 07
+1C MGCg . 06
+1D LUKg . 06
+1E unused HPg? . 05
+1F personal item list size . 05 <hide>
+20 item1 .. 01 00
+22 i1e . 01 00 not 01 helm 02 armor 03 shield 04 oth1 05 oth2 80 fixed
+23 i1q . 00
+repeat .. . . until i9q
+44 weapon . 01
+45 weapon LV . 01
+46 runePieceType . 00 00 not 01 fire 02 water 03 wind? 04 thunder 05 earth?
+47 firePieceQ . 00
+48 waterPieceQ . 00
+49 windPieceQ? . 00
+4A thunderPieceQ . 00
+4B earthPieceQ? . 00
+4C rune . 00 soul eater cannot be removed regardless of fixed
+4D fixedRune . 00 bool
Post Reply