Jump to content

FEditor causes a gameplay bug after text insertion


dondon151
 Share

Recommended Posts

I did a round of text insertion with FEditor, inserting the dialogue for chapter 1 of my hack, and it looks like everything is good: all of the text works, nothing bugs up, etc.

Then I go to chapter 2 and realize that all of my player units have inflated stats.

Example:

hectornormal.png

Here's what Hector's supposed to be (his chapter 1 stats).

hectorbeefy.png

And here's Hector afterwards (his chapter 2 stats).

Hector hasn't gained any levels, and it doesn't matter if he gained any anyway because he has 0% growths. It seems that units are fine when they are loaded onto the map, but once they are required for a subsequent chapter, their stats screw up.

I loaded a chapter 3 save and Hector has the same beefed up stats at L7.

I allocated 60000 bytes of free space at offset D20000, in case that matters.

Edited by dondon151
Link to comment
Share on other sites

Apologies for the double post, but I experimented a bit more with this and concluded that I have to replay the chapters in sequence and use new saves instead of the old ones made before the text edits.

It seems like the game was adding personal bases twice onto the class bases for stats other than HP and luk for whatever reason. In any case, please disregard this thread (and maybe lock it too).

Link to comment
Share on other sites

Yeah, FEditor changes how the game saves/loads a unit's stats. Normally, the game saves/loads the full stats, so the save data reads 14/18/13/12/3/9 (in some fashion.) FEditor changes the method to save the difference between the hardcoded bases and the actual stats (and therefore to load the data it adds the saved stats to the unit's hardcoded bases), so for example if the bases were 5/5/5/5/5/5, loading the save with the modified ROM would add 5 to all the stats. This is in fact one of the autopatches it adds:

This patch causes the base stats of each character to be subtracted from that character's stats before storing their "Resume Chapter" data into the SRAM. It adds those stats back afterward, and also adds them back when they are loaded from the SRAM.

The effect is that as long as a character's stat for STR, SKL, SPD, DEF or RES is within 0 through 31 points of their base stats, that stat will be stored and loaded without any data loss when a chapter is suspended and then resumed.

As an example, a character with a base STR of 13 could have their STR be anywhere from 13 through (13 + 31), or 44, without the stat being corrupted during Resuming. Normally the range of values would be 0 through 31 (notice however in this example that values 0 through 12 would no be usable, but when would a character whose starting stat is 13 ever have less than 13 of that stat?).

Edited by BoxMulder
Link to comment
Share on other sites

Oh dang the above guy knows what he's talking about

But yes pretty much you should like, read up on it and account for this change ahead of time.

also note that it lets you have stats over 31 for allied characters

Link to comment
Share on other sites

i find it's always a good practice to save with feditor before i start playtesting because autopatching bugs like this pop up all the time

the autopatch should only affect resume data though, unless i'm reading this asm source wrong (and i very probably am) that's the only thing it's affecting

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...