[Guide] Suikoden II Hex Editor

If you are stuck in the Dunan Unification Wars; or wish for more details on the gameplay systems, this is the place.
User avatar
Pyriel
Webmaster
Posts: 991
Joined: Wed Aug 18, 2004 1:20 pm

Re: [Guide] Suikoden II Hex Editor

Postby Pyriel » Sat Nov 17, 2018 2:13 pm

The main executable (SLUS_009.58). The value is defined as a signed byte, so changing it to anything else would take some doing. The most you could really expect to do is make it max out at 255. The Kindness rating function is a get/set/add sort of thing based on what's in $a0 (0 is get). If you wanted to make it unsigned, most of the work would be there. I just don't know if it's used anywhere else that expects a signed value, and that might take steps to always force it to be one.

TEXT:80088950 loc_80088950: # CODE XREF: sub_80088864:SolitudeBonusj
TEXT:80088950 bne $s0, $v0, loc_80088968 # branch if $s0 != 0x66 (Kindness)
TEXT:80088954 move $a0, $0
TEXT:80088958 move $a1, $a0
TEXT:8008895C jal KindnessRating
TEXT:80088960 move $a2, $s1
TEXT:80088964 move $s2, $v0
TEXT:80088968
TEXT:80088968 loc_80088968: # CODE XREF: sub_80088864+94j
TEXT:80088968 # sub_80088864+E4j ...
TEXT:80088968 lhu $v0, 0x38+var_28($sp) # Running total of ATK (str + wpn + armor + ...)
TEXT:8008896C andi $v1, $s4, 0xFFFF
TEXT:80088970 addu $v0, $v1
TEXT:80088974 andi $v1, $s2, 0xFFFF
TEXT:80088978 addu $v1, $v0, $v1
TEXT:8008897C slti $v0, $v1, 0x3E8
TEXT:80088980 beqz $v0, loc_80088994
TEXT:80088984 li $v0, 0x3E7
TEXT:80088988 bltz $v1, loc_80088994
TEXT:8008898C move $v0, $0
TEXT:80088990 andi $v0, $v1, 0xFFFF

psychedelist
Posts: 20
Joined: Sat Oct 27, 2018 1:45 pm

Re: [Guide] Suikoden II Hex Editor

Postby psychedelist » Sat Nov 17, 2018 4:44 pm

Thanks a lot, I should have realized that the "128" was coming from it being signed byte, not a real constraint, so impossible to do much about it, but that's fine.

Struggling with another thing right now, trying to figure out how to change the money given to the player during special events, such as opening a chest with 3000 potch in Cave of Wind (040_ard\vd06.bin) or 30k/300k money during Hans dialogues (80_arh\vh01/04/06/11/12/13/15/16/17.bin, they all have a copy of that dialog). I looked and looked and there doesn't appear to be any values like those written out explicitly in those modules. I'm afraid those money operations could be hardcoded on the opcode-level, and that could involve any kind of operations that may obfuscate the actual values being added. That would be very difficult to figure out.

Edit: figured it out (Cave of the Wind 3000 potch chest) using a debugger, indeed the worst case possible - a bunch of SLL instructions building the value out of nothing.

psychedelist
Posts: 20
Joined: Sat Oct 27, 2018 1:45 pm

Re: [Guide] Suikoden II Hex Editor

Postby psychedelist » Thu Jun 06, 2019 9:29 am

Wasn't sure if should post here, or in "Crit chance...", or in "Reverse Engineering...", or in a new thread. Forgive me if i chose poorly.

I been doing a hard/rebalance mod for the last half a year, changing a lot of things. Along the way, i compiled a bunch of various info and findings that apply to the original game. I was planning to post them when the mod is done, but it's still gonna take some time till it's complete, and i figured there's no point in holding back the "various info" stuff because some of it may be interesting, for example an attempt to explain the trading mechanics, or figuring out the Boost status.

https://docs.google.com/document/d/1jTZ ... YbXGHkJ7F4
https://docs.google.com/spreadsheets/d/ ... OwyvxHLrg/

The two documents are meant to compliment each other, for example the first one explains the trading mechanics, second one has listing of the actual trading values parsed from the game data. Some of the info is still not complete, particularly the enemy attack properties data, i'll be completing it along with my next playthrough to make final adjustments to the mod.

Edit: Omnigamer, thanks, didn't see that trading thread before.

Edit2: just found that Luck also affects Wind of Sleep success, using formula (Luck / 10) + 30
Last edited by psychedelist on Tue Jun 11, 2019 1:15 pm, edited 2 times in total.

Omnigamer
Posts: 323
Joined: Wed Feb 13, 2013 11:48 am

Re: [Guide] Suikoden II Hex Editor

Postby Omnigamer » Fri Jun 07, 2019 9:53 pm

Thank you for posting your collected information!

Just to add some more details, the trading code is discussed in more detail here: http://suikosource.com/phpBB3/viewtopic ... 8&start=15
And some extra detail on rare finds is here: http://suikosource.com/phpBB3/viewtopic.php?f=9&t=14369

I can confirm that half of your luck affects crit chance - I saw that part of the code myself. Further info on that is in the "Crit rate..." thread, including oddities surrounding dodge/counter-attack, encounter mechanics, and war battle mechanics.

The extra info for Nanami's death will help with routing the TE speedruns. Just in general, all of the extra tidbits and quirks really help with planning things out and understanding our options.

Lyrinix
Posts: 6
Joined: Sat Jul 06, 2019 5:28 am

Re: [Guide] Suikoden II Hex Editor

Postby Lyrinix » Sat Jul 06, 2019 5:31 am

I tried editing the Hero's stats at

111E1E7A

and it didn't work.

I also tried editing all 5 instances where the Hero's stats appeared (i.e. I searched 65457675 and made the exact same edits 5 times) to no avail - in-game my stat growths remained unchanged.

Would appreciate help.

psychedelist
Posts: 20
Joined: Sat Oct 27, 2018 1:45 pm

Re: [Guide] Suikoden II Hex Editor

Postby psychedelist » Sat Jul 06, 2019 4:07 pm

Are you starting a new game after applying the changes? It'll work only when starting a new game. If you want to change them for a saved game, you need to find and change that data string in the save file data, but it won't recalculate the existing stats, will only affect subsequent level ups.

Lyrinix
Posts: 6
Joined: Sat Jul 06, 2019 5:28 am

Re: [Guide] Suikoden II Hex Editor

Postby Lyrinix » Sat Jul 06, 2019 4:52 pm

Hi psychedelist,

Thank you for your response - yes, I am starting a new game, and leveling at the waterfall to see Hero's stat growths. I leveled multiple times in each test, to no avail - and this is across attempts where I changed just the address 111E1E7A as well as changing all 5 instances of 65457675 in the code. I am sorta familiar with HxD and ROM editing, having done the same for other games. Not sure what I am doing wrong here.

psychedelist
Posts: 20
Joined: Sat Oct 27, 2018 1:45 pm

Re: [Guide] Suikoden II Hex Editor

Postby psychedelist » Sat Jul 06, 2019 6:07 pm

Even though the waterfall battles won't give too many levels (unless you're updating the enemies' level), having a growth rate at 0 or 8 (worst and best) should make a difference even that early in the game, have you tried those values? Otherwise I have no idea, it's very strange. I updated all characters' growth rates and it most definitely works.

Lyrinix
Posts: 6
Joined: Sat Jul 06, 2019 5:28 am

Re: [Guide] Suikoden II Hex Editor

Postby Lyrinix » Sat Jul 06, 2019 6:22 pm

I have tried a growth rate of 8.

Was hoping someone would confirm that it works - that means it is something on my end. Did you change all 5 instances, or just the specific address given for Hero?

Lyrinix
Posts: 6
Joined: Sat Jul 06, 2019 5:28 am

Re: [Guide] Suikoden II Hex Editor

Postby Lyrinix » Sat Jul 06, 2019 6:42 pm

Just tried again, and it doesn't work - just to confirm, I am using HxD and changing 65 45 76 75 to 88 88 88 88, starting a new game with the hex-edited .bin file using Mednafen, and going through the steps up until the waterfall before leveling up through battle to see stat growth. I still get numbers like 2, which should be impossible for the MC with 8 in all stats.

psychedelist
Posts: 20
Joined: Sat Oct 27, 2018 1:45 pm

Re: [Guide] Suikoden II Hex Editor

Postby psychedelist » Sun Jul 07, 2019 3:25 am

I'm changing all 5 instances. A rate of 8 could still give increments of 2, any rate corresponds to a set of increment values and their probabilities which may also vary depending on the current level. It's random how exactly a stat is upgraded every time. You could try 0 rates as well, then it'll be likely to have a stat not upgraded at all on a level up.

One thing that could prevent the change from working is loading a savestate created in the main menu, you need to load the game properly. But it doesn't sound like you could do such mistake.

You could try setting Highlands' level to 99 so that they give a lot of exp, then see if the change doesn't work even on high levels. I don't know the address but can explain how to find it, if you need it.

Edit: actually, here're the level addresses (original, unpatched game) for the two Commanders in the camp, one of them has to be for the waterfall: 794cb2c, 7b72b84

Edit2: Forgot the growth increments can be as powerful as 4-5 in the beginning, although i still think an increment of 2 would be possible for the best growth rate in 60-99 level interval.
Last edited by psychedelist on Sun Jul 07, 2019 10:41 am, edited 1 time in total.

Lyrinix
Posts: 6
Joined: Sat Jul 06, 2019 5:28 am

Re: [Guide] Suikoden II Hex Editor

Postby Lyrinix » Sun Jul 07, 2019 4:52 am

Hi psychedelist,

I think that's incorrect - I RAM-hacked instead and set my growth rates to 888888 for Hero, and now my growths are always 4 - 5. I don't think an increment of 2 is possible with an S stat growth rating.

Noted on the save states = i did load the game properly though. Many times >.<.

makotech222
Posts: 5
Joined: Sat Mar 05, 2016 1:30 pm

Re: [Guide] Suikoden II Hex Editor

Postby makotech222 » Tue Sep 24, 2019 4:50 pm

Hi Guys, I made some changes to the project that made by KakCAT. I added functionality to save changes to your ISO file, as well as a 'Max All' button. Preliminary testing shows it working pretty well.

Caveats:
- Weapon stats don't save. I didn't bother to implement
- I added my code on top of KakCAT's code, so it is a bit messy.

Source: https://github.com/makotech222/suiko2edit
Binary: https://github.com/makotech222/suiko2ed ... r/binaries


Return to “Suikoden II”

Who is online

Users browsing this forum: No registered users and 6 guests

cron