ROM Hack FEFTwiddler - Fire Emblem Fates Save Editor

DeathChaos

Unmei wo koeru!
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
It might just be more trouble than it's worth but in the previous New Game Plus, sometimes they would recruit the character a second time (another Saizo even if you have one) but a possible work around could be to just change all the duplicates to recruited characters and just dismiss them so no problems.

I can answer this, you're not recruiting a "duplicate", you're recruiting a "different" Saizo.

I've explained this before, every time you see a character in the story, it's not actually that character per say.

As far as the player is concerned, the Saizo from Chapter 7 Birthright is the same as chapter 11 Saizo in revelation who is the same as Chapter 12 Conquest Saizo, etc.

Within the game's code however, this is not the case, far from it.

Every instance of a character is unique and different, with a different PID and sometimes even Character ID, once Saizo is on your squad, he is "PID_Saizo", on Birthright chapter 7, before he has joined you, he is "PID_A_Saizo", on Conquest chapter 12 he is "PID_B012_Saizo", on Revelation chapter 11 he is "PID_C_Saizo", in the prologue, he is "PID_A000_Saizo", it just so happens that when the Chapter ends, "PID_A Saizo" or "PID_C_Saizo" get converted into "PID_Saizo".

So as far as the game is concerned, even if you have Saizo on your team, A_Saizo and C_Saizo are completely different units that you have not yet recruited.
 
Last edited by DeathChaos,

Soaprman

Well-Known Member
OP
Member
Joined
Apr 9, 2016
Messages
166
Trophies
0
Location
Georgia, USA
XP
727
Country
United States
@DeathChaos25: Interesting details there. What's a PID? Is that something in the unit block? Also, you wouldn't happen to have a list of these PIDs and alternate Character IDs handy, would you? I mean, don't go too far out of your way for it or anything, but it might be interesting to try some stuff with the IDs. Or even knowing where to look in the ROM FS... maybe I should try exploring that stuff sometime.

EDIT: Maybe never mind the request there. I found a post on your blog, of all places, that should point me in the right direction: http://deathchaos-25.tumblr.com/post/139940544429/do-you-already-have-any-of-the-addresses-for-any

Maybe I'll look into that Nightmare stuff RainThunder made too.
 
Last edited by Soaprman,

DeathChaos

Unmei wo koeru!
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
@DeathChaos25: Interesting details there. What's a PID? Is that something in the unit block? Also, you wouldn't happen to have a list of these PIDs and alternate Character IDs handy, would you? I mean, don't go too far out of your way for it or anything, but it might be interesting to try some stuff with the IDs. Or even knowing where to look in the ROM FS... maybe I should try exploring that stuff sometime.
Well, PIDs is what the game uses to call a unit the very first time they are loaded, the PID is not stored in the save, just the Character ID, which the game then correlates with the character PID and then loads all of the needed character data.

For PIDs, in a character block (inside the romfs), the PID is the very first thing that is pointed to after the 8 bytes of bitflags, there are 2 ways you can find a character's PID and stuff inside the romfs, they are .bin.lz file that you can decompress with FEAT or BatchLZ77.

If the character is playable, then most likely you can find their data inside GameData/GameData.bin.lz
If a character is an enemy/ally in a specific route, you can find their data in GameData/Person/(A/B/C)/(A/B/C)0(Chapter Number).bin.lz

For example, I pulled Garon's block from Birthright chapter 12 boss Garon, so GameData/Person/A/A012.bin.lz
When you fight Xander in chapter 1, his data is on GameData/Person/A001.bin.lz (since the first 6 chapters are route neutral), with his PID being PID_A001_ボス (boss), all chapter bosses will have this exact PID but changing the chapter/route numbers.

So, for example, in Revelation Mikoto is PID_C024_ボス, Sumeragi being PID_C025_ボス, Zola being PID_A009_ボス, etc.

I haven't made an updated image, but here's an old one with character blocks mapped out;
dPhWylp.png

And here are the most recent notes on character block maping;
http://pastebin.com/PtRd7eyC

In GameData.bin, Character blocks start from offset 0xDF0, this is a dummy block, each block is 0x98 in size, then the blocks should be arranged in order of character ID.

Route specific character blocks are found in the HANDOVER files, A/B/C_HANDOVER, so for example, Birthright Saizo could use the original PID_Saizo, however, Revelation Saizo uses PID_C_Saizo from the C_HANDOVER file, these files are also in GameData/Person, and the character blocks in these files start from 0x30 onwards.

Another thing I want to note is, Growths rates are not actually used at face value, and it is confusing me as to how or why this is the case, an example of this is my DLC characters, which all contain 0% growth rates across all of their stats, and yet while using Chrom in my Lunatic playthroughs he keeps getting good level ups with +4s and +5s, another example is, I took a generic witch, gave her a speed growth of 50%, and she somehow got a +2 Speed level up, which is mathematically impossible.
36EeqkX.png
 
Last edited by DeathChaos,
  • Like
Reactions: RainThunder

magikarpnoms

Member
Newcomer
Joined
Apr 21, 2016
Messages
6
Trophies
0
XP
61
Country
United States
I can answer this, you're not recruiting a "duplicate", you're recruiting a "different" Saizo.

I've explained this before, every time you see a character in the story, it's not actually that character per say.

As far as the player is concerned, the Saizo from Chapter 7 Birthright is the same as chapter 11 Saizo in revelation who is the same as Chapter 12 Conquest Saizo, etc.

Within the game's code however, this is not the case, far from it.

Every instance of a character is unique and different, with a different PID and sometimes even Character ID, once Saizo is on your squad, he is "PID_Saizo", on Birthright chapter 7, before he has joined you, he is "PID_A_Saizo", on Conquest chapter 12 he is "PID_B012_Saizo", on Revelation chapter 11 he is "PID_C_Saizo", in the prologue, he is "PID_A000_Saizo", it just so happens that when the Chapter ends, "PID_A Saizo" or "PID_C_Saizo" get converted into "PID_Saizo".

So as far as the game is concerned, even if you have Saizo on your team, A_Saizo and C_Saizo are completely different units that you have not yet recruited.

Oh I understand the game recognizes them as different units. I was just suggesting a potential work around if it's possible/worth it.
 

EmblemCrossing

That Towel!Niles Cosplayer
Member
Joined
Apr 11, 2015
Messages
487
Trophies
0
Age
26
XP
197
Country
United States
Well, PIDs is what the game uses to call a unit the very first time they are loaded, the PID is not stored in the save, just the Character ID, which the game then correlates with the character PID and then loads all of the needed character data.

For PIDs, in a character block (inside the romfs), the PID is the very first thing that is pointed to after the 8 bytes of bitflags, there are 2 ways you can find a character's PID and stuff inside the romfs, they are .bin.lz file that you can decompress with FEAT or BatchLZ77.

If the character is playable, then most likely you can find their data inside GameData/GameData.bin.lz
If a character is an enemy/ally in a specific route, you can find their data in GameData/Person/(A/B/C)/(A/B/C)0(Chapter Number).bin.lz

For example, I pulled Garon's block from Birthright chapter 12 boss Garon, so GameData/Person/A/A012.bin.lz
When you fight Xander in chapter 1, his data is on GameData/Person/A001.bin.lz (since the first 6 chapters are route neutral), with his PID being PID_A001_ボス (boss), all chapter bosses will have this exact PID but changing the chapter/route numbers.

So, for example, in Revelation Mikoto is PID_C024_ボス, Sumeragi being PID_C025_ボス, Zola being PID_A009_ボス, etc.

I haven't made an updated image, but here's an old one with character blocks mapped out;
dPhWylp.png

And here are the most recent notes on character block maping;
http://pastebin.com/PtRd7eyC

In GameData.bin, Character blocks start from offset 0xDF0, this is a dummy block, each block is 0x8C in size, then the blocks should be arranged in order of character ID.

Route specific character blocks are found in the HANDOVER files, A/B/C_HANDOVER, so for example, Birthright Saizo could use the original PID_Saizo, however, Revelation Saizo uses PID_C_Saizo from the C_HANDOVER file, these files are also in GameData/Person, and the character blocks in these files start from 0x30 onwards.

Another thing I want to note is, Growths rates are not actually used at face value, and it is confusing me as to how or why this is the case, an example of this is my DLC characters, which all contain 0% growth rates across all of their stats, and yet while using Chrom in my Lunatic playthroughs he keeps getting good level ups with +4s and +5s, another example is, I took a generic witch, gave her a speed growth of 50%, and she somehow got a +2 Speed level up, which is mathematically impossible.
36EeqkX.png

Deathchaos, if I understand this correctly.. You're giving us our precious generic witch? Or was she a personal test </3
 

Soaprman

Well-Known Member
OP
Member
Joined
Apr 9, 2016
Messages
166
Trophies
0
Location
Georgia, USA
XP
727
Country
United States
@DeathChaos25: Thanks. I rummaged through some of the files. I kinda sorta know what I'm looking at, though I'm thinking there probably isn't anything that'll let me make save-editing-based randomization more possible than it already is. I might dig in again in the future, though.

@Green Mii: Noted.
 

DeathChaos

Unmei wo koeru!
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
@DeathChaos25: Thanks. I rummaged through some of the files. I kinda sorta know what I'm looking at, though I'm thinking there probably isn't anything that'll let me make save-editing-based randomization more possible than it already is. I might dig in again in the future, though.

I actually already have a fully working class randomizer for GameData.bin written in Python that I plan to release and work on after I'm done with finals and my current projects, I could PM it to you if you'd like, although I've literally never written in Python before so the code might be a bit hard to chew on.

However, there's a LOT, and I mean, a LOT of behind the scenes stuff that has to be changed for it to work, one of the main things being trying to make it consistent between GameData and all 3 HANDOVER files, another is seeing how to deal with the weapon spawns and whatnot, not to mention that you literally can't randomize or change the MU's class, since the game forcibly writes Nohr Prince(ss) as the MUs base class upon character creation.

Here are some example screenshots;
ZtMme3x.png
DoHQOFt.png
V9lg4CP.png
UWC5cwA.png
r4y5tza.png
Oawvi1F.png

I'd like to note that the dancer class has none existent sprites, Azura has a sprite because it is a full body sprite for her in the class, the class itself has nothing, so I though I'd just copy her sprite as the generic one to prevent any crashes that might happen from that.
(and yes, Kaze actually got Ninja through the randomizer, what are the odds).
 
  • Like
Reactions: GCNMatt

Soaprman

Well-Known Member
OP
Member
Joined
Apr 9, 2016
Messages
166
Trophies
0
Location
Georgia, USA
XP
727
Country
United States
Nice. I still haven't decided whether I want to take the plunge into full-on ROM hacking yet. I'll let you (and probably others) know if I do, though!

As for Python, I haven't used it in years (and when I did, it was for only really small things) so I probably wouldn't have the teeth to chew on much of anything anyway.

Basically, you can send me whatever you want, but it's a while before I'd be both willing and able to make sense of it.

I've long known that doing a randomizer with just save data isn't going to be nearly as good as doing it with ROM hacking. I'm kind of surprised I was able to do as much as I've done already, thanks to the game pulling quite a large number of units (even many who don't show up before chapter 6) from what I've called the "absent" block if they're there instead of creating them anew. There's no playing around some of the shortcomings of the save-based approach, though, like some units having their class forcibly changed (Most notably Corrin after the chapter 5 dragon rampage), and some units not being pulled from the absent block. It was a decent experiment nonetheless, though, and I still plan on releasing a "good enough" version of it for people who want an easier time that doesn't require ROM hacking.

Also, confession time: I've never actually done a real randomized FE playthrough. Though I've seen some videos and it sure seems like a fun thing to do next time I'm between games!
 

DeathChaos

Unmei wo koeru!
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
Neither have I to be completely honest, which is why I though I'd try to make one myself, since it'd seem like something fun to do.

The randomizer isn't anything special in fact, all I did was calculated all addresses based off of Male Corrin's addresses (since his block is the first real playable block), and then just write a random value on the calculated addresses, nothing too fancy.
 

TorchPegasus2089

Member
Newcomer
Joined
Oct 3, 2015
Messages
24
Trophies
0
Age
36
XP
73
Country
Canada
Can someone help? Whenever I use Jakob online, it disconnects me. Unequipping my weapons and skills don't do anything. Why does it disconnect me?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Materia_tofu @ Materia_tofu:
    im not a very bright individual, but we live and we learn
  • SylverReZ @ SylverReZ:
    @Materia_tofu, We do learn a lot from plenty of talented individuals.
  • Materia_tofu @ Materia_tofu:
    this is true! i learned how to make soundfont remixes from a friend back in 2021
    +1
  • BakerMan @ BakerMan:
    Update on my brother: He's home now, tired and hungry, obviously, but other than that, seems to be doing fine.
    +2
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
    The Real Jdbye @ The Real Jdbye: you can report it and request deletion