Shining Force II Hacking: SFII Exp Tweak experience

My adventures in ASM hacking this game to tweak exp gain

A place for Shining Force 2 hack discussion, editing tools, new hacks etc.

Moderator: Shining Moderators

ronnen
Shining Member
Shining Member
Posts: 162
Joined: Fri Jan 20 2012 9:01pm
Status: Offline

Re: SFII Exp Tweak experience

Post by ronnen »

Earl wrote:How does the game determine character placement after a casting of Egress? Just curious if messing with a map and/or priest location could result in Bowie ending up inside a wall or something. Seems like something that would have a table for the different map possibilities... but then again, I know that the game updates your egress point regardless of last save at certain milestones (so you can't get back to Grans Island immediately after landing in Parmecia, for example).

I'd check this myself, but either it's not in the documentation I'm looking at, or I'm looking for the wrong things.
0x00021366 - contains some code that gets spell definition, decreases current MP, makes the screen flash, and then calls what BNC refers to as "LoadPlayerSaveLocation"

0x000075EC - LoadPlayerSaveLocation: does a bunch of stuff and loads two tables of data: "SaveLocations" (from 0x00007B71 and is 84 bytes long, examined in 4 byte chunks so 15 entries... though to be honest I don't see anything to keep this from rolling into the next table) and some "unknown" table (from 0x00007BCA and is 12bytes long, examined in 4 byte chucks so 3 entries)

Of note is that the "unkown" table only gets looked at if TRAP #1 (0x0040)... i.e. if the 0x0040 flag is set... which I believe is the "last" character joined flag?
The "unkown" table section also puts the retrieved data in a different location for usage...

Not sure what's going on there but yeah, those would be the places I'd look at if you have any egress into walls scenarios :)
User avatar
Earl
Shining Legend
Shining Legend
Posts: 3018
Joined: Sat Apr 24 2004 6:39am
Status: Offline

Re: SFII Exp Tweak experience

Post by Earl »

Thanks! That's exactly what I was looking for.

But there's some weirdness...
First, though, the data is in 4 byte chunks, in the format [map] [x coord] [y coord] [facing]
Clear enough. But there seem to be 23 entries, not 15.
Spoiler
1 Granseal
2 Granseal (earthquake)
3 Yeel
4 Galam Castle
5 New Granseal
6 Ribble
7 Polca
8 Bedoe
9 Ship (after breaking)
10 Ketto
11 Hassan
12 Moun
13 Tristan
14 Hawel's House
15 Dojo
16 Floor World
17 Fairy Woods
18 Roft
19 Ancient Tower
20 Desktop World
21 Dwarven Village
22 Pacalon
23 Pacalon Castle
But I think I might have a lead on a couple of the 'unknown' table entries... if they start a byte later at 0x00007BCB, we've got:
1) 0501FF09 - this would correspond to Yeel, not anywhere sensible though...
2) 451C370D - Overworld Ribble/Hassan, coords correspond to raft in river outside Hassan
3) 482B300A - Overworld Ketto/North Cliff, does something N of Bedoe?
4) 482B300D - Overworld Ketto/North Cliff, does something N of Bedoe?
5) 452A0F11 - Overworld Ribble/Hassan, coords correspond to raft in river by cave south of Ribble

I know the raft definitely defaults to those locations, presumably so you can't strand yourself by egressing to somewhere you wouldn't be able to reach. The flag doc has the raft flag at 0041 though... then again, I haven't yet confirmed that for myself, and it doesn't seem impossible for it to be off by 1.

Then again again, I don't know what the hell those other 3 entries are doing... and there were only supposed to be 3 and not 5... but the lining up of map coordinates feels too pat to be a coincidence.


In any case, I don't need to worry about wall egressing anymore. Nice to have a problem solved before you ever see it in practice :thumbsup:
ronnen
Shining Member
Shining Member
Posts: 162
Joined: Fri Jan 20 2012 9:01pm
Status: Offline

Re: SFII Exp Tweak experience

Post by ronnen »

Earl wrote: First, though, the data is in 4 byte chunks, in the format [map] [x coord] [y coord] [facing]
Clear enough. But there seem to be 23 entries, not 15.
Oh your right, I fail at subtraction.
User avatar
Earl
Shining Legend
Shining Legend
Posts: 3018
Joined: Sat Apr 24 2004 6:39am
Status: Offline

Re: SFII Exp Tweak experience

Post by Earl »

Speaking of math fail...

Those two Overworld Ketto/North Cliff entries... those coordinates aren't north of Bedoe, they're south. Specifically, they correspond to the starting position for the raft. I don't know why there'd be two entries*, but yeah, those 0040 checkers are definitely horsing around with the raft.


*Maybe one is for the initial placement, and the other for if you've made a return trip? Since the only thing that's different is the facing, and if you're coming back to Bedoe, the raft can only face one way (up), while I think that initially it faces down...
User avatar
Earl
Shining Legend
Shining Legend
Posts: 3018
Joined: Sat Apr 24 2004 6:39am
Status: Offline

Re: SFII Exp Tweak experience

Post by Earl »

Earl wrote:The flag doc has the raft flag at 0041 though... then again, I haven't yet confirmed that for myself, and it doesn't seem impossible for it to be off by 1.
Yep, looked though the setups and battle scenes...

0040 unlocks the raft
0041 unlocks the Caravan

After the flag is set (at 0x0581EE) there's some ASM I don't recognize... but it does contain the same 48 2B 30 that's present in the egress tables, so I guess that's handling the initial placement.
bum_199
Shining Member
Shining Member
Posts: 240
Joined: Thu Jan 20 2005 3:47am
Status: Offline

Re: SFII Exp Tweak experience

Post by bum_199 »

does anyone still have sf2expedit around or a link to it?
User avatar
greyskies
Shining Member
Shining Member
Posts: 438
Joined: Wed Feb 02 2011 11:55am
Location: Seebenstein, Austria
Status: Offline

Re: SFII Exp Tweak experience

Post by greyskies »

Apologies for unearthing this ancient topic, but I already tried to contact ronnen to no avail about a month ago. I hope someone else on the forum can perhaps help me out.

Basically, I can't get ronnen's experience editor to work (I downloaded it from the link on SirHedge's hacking resources page). What I am trying to do is to cap the experience characters may get from casting healing spells, as in my hack the healers tend to get too far ahead in XP in the later battles.

Does anybody know with which part of the code I would have to fiddle in order to get this done, or what could be the issue with the experience editor?
.
Check out Return to Grans - A Shining Force II hack which features a completely
reworked story, numerous visual improvements, and tons of balance changes.

Also available as storymode hack only.
User avatar
SirHedge
Shining Hero
Shining Hero
Posts: 1189
Joined: Sat Mar 15 2008 4:10am
Status: Offline

Re: SFII Exp Tweak experience

Post by SirHedge »

I am away from my main computer for a couple of months, so I doubt I can be much help, but I figured I'd ask if you could provide more details as to what is not working. Does it just not do anything? Does it break the game?
User avatar
greyskies
Shining Member
Shining Member
Posts: 438
Joined: Wed Feb 02 2011 11:55am
Location: Seebenstein, Austria
Status: Offline

Re: SFII Exp Tweak experience

Post by greyskies »

The application simply doesn't seem to do anything... on windows 10 I get a "not responding" message, on older systems nothing happens at all after I attempt to run it
.
Check out Return to Grans - A Shining Force II hack which features a completely
reworked story, numerous visual improvements, and tons of balance changes.

Also available as storymode hack only.
User avatar
SirHedge
Shining Hero
Shining Hero
Posts: 1189
Joined: Sat Mar 15 2008 4:10am
Status: Offline

Re: SFII Exp Tweak experience

Post by SirHedge »

Weird. I'm pretty sure Ronnen uses Visual Studio Windows Forms, which have no reason to suddenly break with a new version of Windows. Really, the whole reason you use Windows Forms is for it to work consistently with Windows.

That said, I just downloaded it and tried it and it crashes for me just like it does for you, so something really isn't working. If I remember, I'll try to check it out again two months from now when I have access to my other computer. I'm reasonably confident I ran it with Windows 10 there.

Have you tried using an original, unaltered 2MB rom? I only have access to a 4MB rom at the moment.
jordanelias
Newbie
Newbie
Posts: 10
Joined: Mon Aug 14 2017 10:04pm
Status: Offline

Re: SFII Exp Tweak experience

Post by jordanelias »

Ronnen originally linked to a .zip file, which makes me question whether he only uploaded a .txt and a .exe.
User avatar
SirHedge
Shining Hero
Shining Hero
Posts: 1189
Joined: Sat Mar 15 2008 4:10am
Status: Offline

Re: SFII Exp Tweak experience

Post by SirHedge »

It was a zip file! And after a bunch of testing I found what was missing! Here's a working .zip for those who still want to use this.
https://app.box.com/s/fg8fa9nsv6gcv03zrxfl6frpe2i8gjxl" onclick="window.open(this.href);return false;
User avatar
greyskies
Shining Member
Shining Member
Posts: 438
Joined: Wed Feb 02 2011 11:55am
Location: Seebenstein, Austria
Status: Offline

Re: SFII Exp Tweak experience

Post by greyskies »

Thanks a lot, SirHedge! (and kudos to ronnen for creating the editor, of course.)
This should finally stop my Aura users from running away with their levels.
.
Check out Return to Grans - A Shining Force II hack which features a completely
reworked story, numerous visual improvements, and tons of balance changes.

Also available as storymode hack only.
User avatar
Guy Jepson
Shining Member
Shining Member
Posts: 336
Joined: Sat May 25 2019 2:25am
Status: Offline

Re: SFII Exp Tweak experience

Post by Guy Jepson »

Hello, everyone! Long-time listener, first-time caller.

Can one simply use Space King's SF2Edit to increase the monsters' level so they drop maximum experience for longer before higher level characters reach diminishing returns?

I tried this with Gizmos and they still drop 24ish experience every time I kill one. I bumped their levels to 2, 12, and 99 and there was no difference in exp.

Did I do something wrong? Was my logic flawed? Was is something else entirely?
User avatar
Lord Kane
Shining Member
Shining Member
Posts: 457
Joined: Sun Mar 09 2008 10:46am
Location: Berlin, Germany
Status: Offline

Re: SFII Exp Tweak experience

Post by Lord Kane »

Gizmos are a special case. They are programmed to grant you only half of normal EXP. So you won't ever get more than 25 points from them regardless what level they are.
Post Reply