Tutorial  Updated

Installing mods/hacks for Citra 3DS emulator

What you will need:

- 64-bit OS
- A decrypted .3ds file of the game you want to mod
- The mod you want to install
- 3DS to CIA by Katsu (python 2.7 required)
- 3dstool
- Citra 3DS Emulator (you won't need it to do the hacking, only to run the game afterwards)

How to install the mod:

0. Before you start, if you don't already have it, download Python 2.7 with the link provided and install it; also, if you use Windows you must add Python to the PATH Environmental Variable. (To check whether you need to do this last bit, type python in the command prompt and hit Enter: if you get the message ‘python’ is not recognized as an internal or external command, you need to add Python to PATH.)

<!> Since many people are asking me about Fire Emblem Fates, namely adding the Same-sex Marriage patch by @UnassumingVenusaur, I'll use it as an example.

1. Rename your .3ds to <filename_modified.3ds>. Extract the archives of both 3DS to CIA and 3dstool

step1.png


2. Drag and drop your .3ds on Make2.07.bat in the 3DS to CIA folder you've previously extracted.

step2.png


Wait until you get this window:

step3.png


4. Leaving this command prompt (3ds_to_cia_2.07) open so you can later rebuild the game, go to the folder where the files have been extracted (don't move or delete the .3ds file which has been moved there) and copy the romfs file to the 3dstool directory which you've previously extracted.

step4.png


5. To extract the romfs file, use the following command:

3dstool -xvtf romfs romfs.bin --romfs-dir romfs

If you're not familiar with using the command prompt, here is a quick walkthrough:

+++++++

To open the command prompt, go to Start and type "cmd" and open the program that comes up.

step5.png


You'll get a black window. Type this in (including the first space): cd "path to the 3dstool folder on your computer goes here"
Hit Enter, and you should get a string with the path to the 3dstool folder.
For instance, on my pc, I type:

C:\Users\Username> cd "C:\Giochi\Nintendo3DS\3ds hacking tools\3dstool"

And I get:

C:\Giochi\Nintendo3DS\3ds hacking tools\3dstool>

To extract the romfs file, use the command:

3dstool -xvtf romfs romfs.bin --romfs-dir romfs

Following the example above, it'll look like this:

step6.png


To use the command, after you've copy-pasted 3dstool -xvtf romfs romfs.bin --romfs-dir romfs, hit Enter.
Wait until 3dstool is done extracting the romfs.bin file. You'll know when it stops and the same string with the path to the 3dstool folder appears.

step7.png


+++++++

6. Keeping the console open so you can later rebuild the romfs file, delete the file you've extracted and go to the folder which contains the extracted files.

step8.png


7. Depending on the mod, you'll now have to follow the instructions provided by the modder themselves, but generally you'll have to copy and paste the files provided by the modder (usually replacing the original ones). Modders often provide different folders for HANS, Luma and NTR CFW but the files inside are the same. Just use the HANS ones if you don't know which ones to choose, and remember to use the ones for your region (USA/EUR/JP)!

In the case of FEF, copy the contents of the HANS version>Your region folder, and paste them in the romfs folder:

step9.png


step10.png


8. Having applied the mod/hack, go back to the command prompt and use the following command to rebuild the romfs file:

3dstool -cvtf romfs romfs.bin --romfs-dir romfs

step11.png


9. Replace the modified romfs file with the one in the extracted folder.

step12.png
step13.png


10. Go back to the 3ds_to_cia_2.07 window from step 3, press 6 (Rebuild 3DS) and then s to start

step14.png


Wait until the rebuilding is done. (The process is pretty long and heavy, you likely won't be able to do anything else in the meantime.)

step15.png


step16.png


step17.png


You should get two folders with your original file and the modded one respectively. Done!

step18.png


POSSIBLE ERRORS

An issue people who use Windows 10 have run into is the batch file (3ds to cia; step 2) not running at all (opening and closing right after). This may be caused by encoding.
If you've got notepad++ (or if you don't, you can find it among the 3ds to cia "tools": 3ds_to_cia_v2.07\tools\n++), you can open the batch file for editing with it and check "Encoding". If anything else besides UTF-8 (or ANSI) is selected, you should select UTF-8 (without BOM) and save the file.

Most errors occur when rebuilding the .3ds file (step 10), and they're mostly related to the rsfgen.py script and Python by extension.

error.png

If you get this error up here, it means you have Python 3.5 installed, and it's being used to run the script instead of Python 2.7

Other instances:
- You don't have Python installed
- Python is installed in a partition where the system can't find it: install python in the same partition where your OS is!
- [Windows] Python's directory hasn't been added to the PATH e.v. (see Step 0)
- Python is not selected as the program to open .py files. If this happens, Pythonw.exe might have been selected to open .py files, while it should be Python.exe. In this case a white window with the script will appear, and once you close it, you'll get the fateful ERROR. You'll have to change the default program to open .py files to the correct one.

error pythonw.png

(If you see this the default program used to open .py files is pythonw.exe, you need to change it to python.exe)

In case you experience any other issues, tell me and I'll help you out!

-------

If you have any questions, feel free to ask!

Credits go to the creators of Citra, 3DS to CIA and 3dstool. Thank you!
 
Last edited by FriendlyHacker,

Hadad

New Member
Newbie
Joined
Apr 7, 2020
Messages
2
Trophies
0
Age
23
XP
47
Country
Indonesia
Hey there.. thank you for the guide.. but i still have a little problem at the last part.
Im using python 3.8 and already added to the path.
Im also using decrypted Rom.
Can u help me?
 

Attachments

  • 15862461943008947780828101008033.jpg
    15862461943008947780828101008033.jpg
    688.6 KB · Views: 301
  • Like
Reactions: FriendlyHacker

LordLard

New Member
Newbie
Joined
Apr 24, 2020
Messages
1
Trophies
0
Age
21
XP
46
Country
Philippines
I tried doing this for the Gay Awakening hack, and it worked! There is a certain problem though. According the UnassumingVenusaur, you need to do some save file editing for sibling support convos, but the tutorial provided is only for physical 3dses
 
  • Like
Reactions: FriendlyHacker

Hotaru_Sakura

New Member
Newbie
Joined
May 2, 2020
Messages
4
Trophies
0
Age
27
XP
126
Country
United States
I'm not sure if this is the right place to ask this, but I'm trying to use luma plugins on animal crossing new leaf welcome amiibo. Sadly I don't have a working 3ds as mine needs to be fixed. Specifically, I want to use the new "fish can't be scared" and "fish bite right away" "codes". I'm not sure what to do. The files I got from downloading the NTR cheats folder on git hub have a .3gx file. What do I do with it? is it just not possible to use these cheats?
 

Yanna

New Member
Newbie
Joined
Jun 3, 2020
Messages
2
Trophies
0
Age
24
XP
66
Country
United States
It's not working for me. I tried to apply a mod for SMT Strange Journey Redux. It was alright from step 1-9.

But after the last step It says error processing RSF.

I get the same error, but for Fire Emblem Fates. Did you find a soultion, and if so how did you solve it? Thank you.

EDIT: Nvm haha I fixed mine. I don't think my file was correctly decrypted, because I redecrypted my game and it worked just fine.
 
Last edited by Yanna,
  • Like
Reactions: FriendlyHacker

FriendlyHacker

Well-Known Member
OP
Newcomer
Joined
Oct 19, 2018
Messages
82
Trophies
0
Age
26
Location
127.0.0.1
XP
386
Country
Italy
hi, this tutorial worked great! I was able to successfully install the gay fates mod on Citra, however, I'm wondering if there's something else you can assist me with. . . I can't figure out how to use the workaround that gives you the kids, I've tried installing the all-paralogues patch & messing with HxD but nothing seems to be working :ohnoes:

Hi! :)
I'm SO sorry for replying late! I didn't get reply notifications for a while, not sure why.
If you're still interested in finding a way to have the children and have them as siblings...
OLD METHOD
You can use the method described here. Use the "All Paralogues Unlocked" patch plus this method to change the children's data so the game would recognize them as siblings.

FEFTwiddler, if you don't already have it.

These are the numbers you want to change:
Children's raw blocks.JPG
EDIT: Apparently you don't need any of that! A kind soul made a patch that does all this for you!

Hey there.. thank you for the guide.. but i still have a little problem at the last part.
Im using python 3.8 and already added to the path.
Im also using decrypted Rom.
Can u help me?

Hi! ^_^
Sorry for the super late reply!
You have to use Python 2.7 otherwise it won't work! Python 2.x and 3.x are entirely separate releases and are not compatible with each other. The rsfgen script is not compatible with Python 3.x

--------------------- MERGED ---------------------------

It's not working for me. I tried to apply a mod for SMT Strange Journey Redux. It was alright from step 1-9.

But after the last step It says error processing RSF.

I'm sorry for the late reply, and I'm sorry you have this problem!
As @Yanna said, it's likely a bad decryption problem!
 

Attachments

  • Character and Class List Fates.pdf
    120.1 KB · Views: 229
Last edited by FriendlyHacker,

FriendlyHacker

Well-Known Member
OP
Newcomer
Joined
Oct 19, 2018
Messages
82
Trophies
0
Age
26
Location
127.0.0.1
XP
386
Country
Italy
I tried doing this for the Gay Awakening hack, and it worked! There is a certain problem though. According the UnassumingVenusaur, you need to do some save file editing for sibling support convos, but the tutorial provided is only for physical 3dses

Hi there!
I'm sorry for replying late! If you're still looking for a way to have sibling supports in FEA, it's a lot more difficult than with Fates. A step by step tutorial is inside the spoiler tag.

Before you start doing anything, you should know that you can only change the parent ID's after you've recruited both children.
Once you have both kids, you need FEAST and a program like HxD for hex editing.
Find the folder with the save files you want to edit. In my case, they're here

C:\Users\User\AppData\Roaming\Citra\sdmc\Nintendo 3DS\00000000000000000000000000000000\00000000000000000000000000000000\title\00040000\0009f100\data\00000001

Make a copy of your save folder somewhere (as a backup just in case), then copy the folder on your desktop so it's easier to find with FEAST. Then run FEAST, press "Open Compressed Folder", select your 00000001 folder which you've copied on the desktop. After this, press "Save Decompressed Folder" and you'll get a folder named 00000001_dec which contains the decompressed files.
With HxD, open the Chapter file corresponding to the save slot you want to edit (Chapter0 = First save slot, Chapter1 = Second save slot, Chapter2 = Third save slot).
Next, find one of the children by searching for their ID (07 XX).

Character IDs (the XX numbers):
00 Male My Unit/Male Avatar
01 Female My Unit/Female Avatar
02 Guest My Unit/Guest Avatar
03 Chrom
04 Liz/Lissa
05 Frederick
06 Viole/Virion
07 Soiree/Sully
08 Vaike
09 Sol/Stahl
0A Miriel
0B Callum/Kellam
0C Sumia
0D Ronku/Lon'qu
0E Richt/Ricken
0F Mariabelle/Maribelle
10 Velvet/Panne
11 Gaia/Gaius
12 Tiamo/Cordelia
13 Grego/Gregor
14 Nono/Nowi
15 Libera/Libra
16 Sariya/Tharja
17 Olivia
18 Serge/Cherche
19 Henry
1A Lucina
1B Sairi/Say'ri
1C Basilio
1D Flavia
1E Donny/Donnel
1F Anna
20 Wood/Owain
21 Azure/Inigo
22 Brady
23 Djelle/Kjelle
24 Cynthia
25 Serena/Severa
26 Jerome/Gerome
27 Male Mark/Morgan
28 Female Marc/Morgan
29 Chambray/Yarne
2A Loran/Laurent
2B Noire
2C Nn/Nah
2D Tiki
2E Gangrel
2F Valhart/Walhart
30 Emelina/Emmeryn
31 Lenha/Yen'fay
32 Inverse/Aversa
33 Paris/Priam
34 Marth_FE1
35 Dummy
36 Unpromoted_Monster
37 Promoted_Monster
38 Merchant

At this point you need to switch the "mother" ID with the "father" ID in one of the children's blocks, so that both children have the same "father" and "mother".
Here's an example of Morgan (F) and Lucina as Chrom and Robin (M)'s daughters (plus Inigo as a reference).

example.JPG


As you can see, there is always the same amount of numbers between the "father number", "mother number" and the next "character number" (it's 16 couples of numbers in both cases), so you can easily tell where the "father number" and "mother number" are for each child.
In this example, switching Chrom and Robin in either Morgan's or Lucina's block will make it so the girls are recognized by the game as sisters.
When you find the values you need to change, switch them (they'll turn red), and then press the save icon.
save.JPG


A bak (which stands for "backup", I guess) file of the same file you changed will be in the folder, you can delete it.
After you're done, go back to FEAST, press "Open Decompressed Folder", select the folder named 00000001_dec, then press "Save Compressed Folder". You'll get a folder named 00000001_cmp.
Copy the Chapter file you modded from this folder into the original one (C:\Users\User\AppData\Roaming\Citra\sdmc\Nintendo 3DS\00000000000000000000000000000000\00000000000000000000000000000000\title\00040000\0009f100\data\00000001) and overwrite it.
That's all! The game should recognize your children as siblings now! ^_^
 
Last edited by FriendlyHacker,

Noka

New Member
Newbie
Joined
Jun 5, 2020
Messages
3
Trophies
0
Age
25
XP
44
Country
India
hello there, i was wondering if there is a quick way to see if the support conversations are properly installed because i tried to use this last time and all the modified conversations didn't work. Sorry if this was already asked.

Oops sorry asked twice
 
Last edited by Noka,
  • Like
Reactions: FriendlyHacker

Noka

New Member
Newbie
Joined
Jun 5, 2020
Messages
3
Trophies
0
Age
25
XP
44
Country
India
Hey there, sorry if someone already asked this but I followed this instruction properly but the modified conversations don't occur. It shows that the conversations can occur but it just skips it. It doesn't even show up when I check it in the Records Hall. Help T.T
 

FriendlyHacker

Well-Known Member
OP
Newcomer
Joined
Oct 19, 2018
Messages
82
Trophies
0
Age
26
Location
127.0.0.1
XP
386
Country
Italy
Hey there, sorry if someone already asked this but I followed this instruction properly but the modified conversations don't occur. It shows that the conversations can occur but it just skips it. It doesn't even show up when I check it in the Records Hall. Help T.T

Hi there! ^_^
I'm not sure which game (Awakening or Fates) you mean, but unfortunately not all support options have support conversations, since the patch is still incomplete. Support options with no support conversation will level up, but the conversation will be skipped since the scene isn't coded in. There should still be many support options with support conversations, though. If none of the conversations works, then maybe the patch version you used is old.
Regarding the status of the patches, Unassuming Venusaur - the original creator of both hacks - has stopped working on them, letting someone else take the lead. The person who took up the project hasn't posted any news about it since november 2019, though. (If anyone has news, please share them!)
Anyway, I hope that answers your question. I'm sorry about that, I know it must be disappointing.

It really shouldn't be this complicated. If Yuzu can have mod support then I don't get why Citra doesn't

Hello! :)
As far as I know there isn't a way to apply mods using Citra alone. I guess the creators have their hands full trying to make more games work and improving the quality of the emulation, so mod support must be low on their list of priorities. Though they did add online and DLC support, and that's neat.
(I ramble at length inside the spoiler tag. Ignore me.)
Actually there are easier methods to do this, but I haven't tried them myself, so I can't include them (I personally believe it would be unfair and irresponsible, though you may disagree with me). I'd be happy if someone else wrote their own guide for doing this, I don't want to steal their instructions! If I remember correctly, Fishmalk suggested using .Net 3ds Toolkit, and it's supposed to be a piece of cake, but they never posted a guide or tutorial here, that's why some people end up using my needlessly complicated method instead (even when I suggest they follow Fishmalk's advice instead of mine). Maybe I should update this guide after all? Check that program and add that alternative method, credit Fishmalk and the person who created the toolkit...? I don't know!
 
Last edited by FriendlyHacker,

SilasLovebot

New Member
Newbie
Joined
Jun 6, 2020
Messages
2
Trophies
0
Age
25
XP
44
Country
United States
Hi, I had an error when rebuilding because I had the wrong Python installed. I've since uninstalled it and replaced it with the correct version, but I accidentally closed the batch file that you use to rebuild it. I'm unsure of how to rebuild the file now.
 
  • Like
Reactions: FriendlyHacker

FriendlyHacker

Well-Known Member
OP
Newcomer
Joined
Oct 19, 2018
Messages
82
Trophies
0
Age
26
Location
127.0.0.1
XP
386
Country
Italy
Hi, I had an error when rebuilding because I had the wrong Python installed. I've since uninstalled it and replaced it with the correct version, but I accidentally closed the batch file that you use to rebuild it. I'm unsure of how to rebuild the file now.

Hey there! :)
I know your pain! When I was testing this method at the very beginning, I also made that mistake once or twice! You should still have your modded romfs file, right? Keep that one and the .3ds file inside the extracted folder, and delete the rest. Extract the .3ds file again, replace the romfs and rebuild. The batch isn't very flexible in its instructions as far as I could tell, it wants to do its own thing, so when something disrupts the process, you have to start all over again. I'm sorry about that!
 

SilasLovebot

New Member
Newbie
Joined
Jun 6, 2020
Messages
2
Trophies
0
Age
25
XP
44
Country
United States
Hey there! :)
I know your pain! When I was testing this method at the very beginning, I also made that mistake once or twice! You should still have your modded romfs file, right? Keep that one and the .3ds file inside the extracted folder, and delete the rest. Extract the .3ds file again, replace the romfs and rebuild. The batch isn't very flexible in its instructions as far as I could tell, it wants to do its own thing, so when something disrupts the process, you have to start all over again. I'm sorry about that!
Thanks for the quick reply! When I try to do this it tells me it already exists and I need to check my files, and does not proceed with the extraction. I'm not sure if there is another problem or if I just misunderstood your instructions.

EDIT: I fixed that mistake, I simply removed the old file folder. However, I started rebuilding again this time with a different error: It says it had an error processing the RSF file. Not sure what that means, the RSF file is there.

EDIT 2: I saw earlier in this thread it might be a bad decryption. I'm going to try and fix that and see how it goes.
 
Last edited by SilasLovebot,

FriendlyHacker

Well-Known Member
OP
Newcomer
Joined
Oct 19, 2018
Messages
82
Trophies
0
Age
26
Location
127.0.0.1
XP
386
Country
Italy
Thanks for the quick reply! When I try to do this it tells me it already exists and I need to check my files, and does not proceed with the extraction. I'm not sure if there is another problem or if I just misunderstood your instructions.

EDIT: I fixed that mistake, I simply removed the old file folder. However, I started rebuilding again this time with a different error: It says it had an error processing the RSF file. Not sure what that means, the RSF file is there.

EDIT 2: I saw earlier in this thread it might be a bad decryption. I'm going to try and fix that and see how it goes.

Oh, I'm sorry! I worded that rather ambiguously. You're right, I meant you have to delete the extracted folder while only keeping the .3ds and romfs files. And you're also right about the error you got, it is a bad decryption problem. You should try decrypting your game again.
Good luck! And if you need help with anything, let me know! ^_^
 

macanchi

New Member
Newbie
Joined
Feb 11, 2021
Messages
2
Trophies
0
Age
25
XP
34
Country
United States
Howdy! So I downloaded the “all paralogues unlocked” patch with sibling support you recommend on this thread, but the text file says says it doesn’t go into the romf, instead into a “titles” folder in an sd card since the files are Title ID’s. Because I use Citra, I haven’t used my actual 3ds or an sd card for any of this.

I originally got a 3ds file with the gay hack from a friend of mine — and it’s worked great — but because they didn’t have the patch to unlock paralogues installed, I want to figure this out before I play again.

Is there anywhere I can find the “titles” folder or do I need to do/download something else entirely for playing on Citra?
 

justdancingsam

Member
Newcomer
Joined
May 4, 2018
Messages
11
Trophies
0
Age
24
XP
60
Country
United States
I'm trying to do this for replacing Honey Queen for Waluigi in Mario Kart 7, after doing this, it STILL shows Honey Queen, am I doing something wrong?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Musk sues Hyundai in 3... 2... 1...