ROM Hack Fire Emblem Fates: ROM Hacking General Thread

DeathChaos

Unmei wo koeru!
OP
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
I have a question, would it be possible to hack the game so that the A+/S rank system gives the character a secondary class always?

For example, Leo does not get anything out of marrying Felicia, because his secondary base class is the same as her primary base class (Troubadour). What I want, in this case, would be for Leo to obtain Felicia's secondary class instead (Mercenary).

Other examples of this would be: Xander getting Fighter from Beruka, Camilla getting Samurai from Odin, Subaki and Hinoka giving each other Samurai and Spearfighter, Hinata getting Ninja from Rinkah, Kagero getting Apothecary from Orochi, etc...
Good luck digging into code.bin to make that kind of change.
 

thane98

Well-Known Member
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,534
Country
United States
Has anyone had success editing the base game .cmb files? I'm using Thane98's Fate Script Editor (Beta), but it seems that whenever I re-compile an event it loops then crashes.

I did some trouble shooting and this happens even if I just take the base file and recompile it without any changes, so it might be something with the editor? Anyone had similar issues or found a work around?
Just curios, which file is giving you the issues? I'll be the first to say that the code for Fates Script isn't the best stuff - there are a couple of scripts which don't load. That said, I tested most scripts from the base game to make sure that they compile without causing issues.
 

DeathChaos

Unmei wo koeru!
OP
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
I've done a ton of cmb editing and I can guarantee you any crash I've had with them has been caused by my lack of knowledge and NOT by the programan compiling bad cmbs, not to say that the program is perfect, but it hasn't given me any trouble so far.
 

AgahnimD

Well-Known Member
Newcomer
Joined
Apr 11, 2016
Messages
61
Trophies
0
XP
527
Country
United States
Just curios, which file is giving you the issues? I'll be the first to say that the code for Fates Script isn't the best stuff - there are a couple of scripts which don't load. That said, I tested most scripts from the base game to make sure that they compile without causing issues.

It's B028_EV4, although I've reproduced the problem with A001_OP1.cmb, A002_ED1.cmb by opening and re-compiling them with no changes. Would there be an additional master file that I should be editing as well? I made a similar post on your FEFE thread and attached the two B028_EV4 files in a zip if you wanted to take a look. By the way, thank you so much for your tools, they've been fantastic and made the game a lot more fun!

I've done a ton of cmb editing and I can guarantee you any crash I've had with them has been caused by my lack of knowledge and NOT by the programan compiling bad cmbs, not to say that the program is perfect, but it hasn't given me any trouble so far.

I definitely meant no disrespect. I figure it's most likely my own incompetence with the program, but I did notice there was a small size difference in the two files which made me think it might have something to do with it.
 

thane98

Well-Known Member
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,534
Country
United States
It's B028_EV4, although I've reproduced the problem with A001_OP1.cmb, A002_ED1.cmb by opening and re-compiling them with no changes. Would there be an additional master file that I should be editing as well? I made a similar post on your FEFE thread and attached the two B028_EV4 files in a zip if you wanted to take a look. By the way, thank you so much for your tools, they've been fantastic and made the game a lot more fun!
Thank you for the kind words.

I'm not in a position to look at the files at the moment, but I'll try to do so later today.
 

HeartlessSeph

Member
Newcomer
Joined
Jun 20, 2016
Messages
13
Trophies
0
Age
27
XP
107
Country
United States
Hi, does anyone know how to make a specific unit gain an item at the end of a chapter using Fates Script? I found this in the Chapter where Corrin gains Yato (though I changed the IID):
pass {
ev::UnitGetPlayer(storein(1))
raw(23)
call(1)
pass {
ev::ItemGain(call(1),string("IID_Gundari"))
}
ev::CutSceneGameEventEnd(call(0))
}
end

Any help on this would be appreciated. Thank you.
 

DeathChaos

Unmei wo koeru!
OP
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
Hi, does anyone know how to make a specific unit gain an item at the end of a chapter using Fates Script? I found this in the Chapter where Corrin gains Yato (though I changed the IID):
pass {
ev::UnitGetPlayer(storein(1))
raw(23)
call(1)
pass {
ev::ItemGain(call(1),string("IID_Gundari"))
}
ev::CutSceneGameEventEnd(call(0))
}
end

Any help on this would be appreciated. Thank you.
UnitGetPlayer is a Corrin Specific Event, replace it with ev::UnitGetByPID(storein(1),string("Enter Your PID Here"))
 

DeathChaos

Unmei wo koeru!
OP
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
Updated the main post to add a small tutorial on using Dynamic Blocks
 

thane98

Well-Known Member
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,534
Country
United States
@AgahnimD, I was unable to reproduce the issue during some of my own tests. I loaded and recompiled all 3 scripts that you mentioned using the version of Fates Script included with FEFEditor without running into any issues. The files were the exact some according to HxD, so the scripts recompiled to exactly what they were previously.

I'm not sure what the issue could be on your end. I'd try updating Java just to be sure, though I don't know if that will fix the issue.
 
  • Like
Reactions: AgahnimD

HeartlessSeph

Member
Newcomer
Joined
Jun 20, 2016
Messages
13
Trophies
0
Age
27
XP
107
Country
United States
UnitGetPlayer is a Corrin Specific Event, replace it with ev::UnitGetByPID(storein(1),string("Enter Your PID Here"))

Ah thank you, that's very helpful. I couldn't think of any other event in the game where a character automatically received an item so I just went straight to the Yato event. Is there by any chance a list of events that can be used in Fates script? Also thank you for the video following this post. Dynamic character blocks are always a fun thing to mess with.
 

DeathChaos

Unmei wo koeru!
OP
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
Ah thank you, that's very helpful. I couldn't think of any other event in the game where a character automatically received an item so I just went straight to the Yato event. Is there by any chance a list of events that can be used in Fates script? Also thank you for the video following this post. Dynamic character blocks are always a fun thing to mess with.
There's way too many to list, your best bet would be to find a chapter that does what you want and just grab the event from there.
 

HeartlessSeph

Member
Newcomer
Joined
Jun 20, 2016
Messages
13
Trophies
0
Age
27
XP
107
Country
United States
There's way too many to list, your best bet would be to find a chapter that does what you want and just grab the event from there.
Sorry to bother you again, but does the Character who the item is going to need to be present when I use that event? I'm trying to make Gunter gain an item at the end of Chapter 26 of Revelations, and since he's the boss of that chapter I need to be able to make him receive it without him being present.
 

DeathChaos

Unmei wo koeru!
OP
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
Sorry to bother you again, but does the Character who the item is going to need to be present when I use that event? I'm trying to make Gunter gain an item at the end of Chapter 26 of Revelations, and since he's the boss of that chapter I need to be able to make him receive it without him being present.
Hmm, no idea, I don't think they have to be?
 

HeartlessSeph

Member
Newcomer
Joined
Jun 20, 2016
Messages
13
Trophies
0
Age
27
XP
107
Country
United States
Maybe I did the script wrong, I'm not that well versed in the scripting language, though I hope to be through practice. This is what I put at the end of the last event in C026.cmb:

Header ev29(15,false,false)
Event ev29
ev::CutScene(string("C026_ED"))
ev::CutScene(string("C026_ED2"))
pass {
ev::UnitGetByPID(storein(1),string("PID_Gunter"))
raw(23)
call(1)
pass {
ev::ItemGain(call(1),string("IID_Gundari"))
}
}
end

My thinking is that, since Gunter is not on the field during the chapter, they can't get his PlayerID, and so the ItemGain event isn't played at all.
 

DeathChaos

Unmei wo koeru!
OP
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
So, since FEFEditor has been updated, and everything seems to work as intended (for now), I'll be remaking the tutorial later today and removing the old one, since now we only need to use FEFEditor instead of downloading a few extra tools.
 

AgahnimD

Well-Known Member
Newcomer
Joined
Apr 11, 2016
Messages
61
Trophies
0
XP
527
Country
United States
@AgahnimD, I was unable to reproduce the issue during some of my own tests. I loaded and recompiled all 3 scripts that you mentioned using the version of Fates Script included with FEFEditor without running into any issues. The files were the exact some according to HxD, so the scripts recompiled to exactly what they were previously.

I'm not sure what the issue could be on your end. I'd try updating Java just to be sure, though I don't know if that will fix the issue.

Thank you very much for checking! I've double checked and made sure all my programs are up to date, but I'm still getting the same error. How vexing.

I'm using Asia81's latest version of PackHack to rebuild the CIA and install it onto my O3DS. I've been able to modify the .lz files without issue, so it seems that modifying .cmb files is linked to my problem.

Each time I install I make sure to delete the software, extra data, and save-data backup, but I wonder if there's something else that I'm forgetting which is interfering with the install?

I'll keep messing around. Thank you for your help!

Edit: Interesting, I just re-compiled a new .cmb with no edits and used HxD to compare the two. It says that the two files are identical, but the file sizes are different. Could that be my issue?
 
Last edited by AgahnimD,

DeathChaos

Unmei wo koeru!
OP
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,726
Country
Puerto Rico
Alright, I remade the tutorial, now it was done entirely on FEFEditor, and I showcase adding both a Dynamic Block and an NPC to a map, hopefully this allows other people to easily get started on this.

 

thane98

Well-Known Member
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,534
Country
United States
Edit: Interesting, I just re-compiled a new .cmb with no edits and used HxD to compare the two. It says that the two files are identical, but the file sizes are different. Could that be my issue?
The difference in file sizes only occurs because Fates Script doesn't include the same amount of zeroes at the end of the file. In practice, the files are the exact same.
 
Last edited by thane98,

AgahnimD

Well-Known Member
Newcomer
Joined
Apr 11, 2016
Messages
61
Trophies
0
XP
527
Country
United States
The difference in file sizes only occurs because Fates Script doesn't include the same amount of zeroes at the end of the file. In practice, the files are the exact same.

Drat, I had a feeling that'd be too easy. Thank you for your reply!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Bunjolio @ Bunjolio: j