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,

WaterTush

New Member
Newbie
Joined
Mar 31, 2019
Messages
1
Trophies
0
Age
25
XP
44
Country
United States
So I've renamed my .3ds file and installed python 2.7. When I dragged the .3ds file into the 3ds to cia thingy, the window closes and that's it. And yes, the file is decrypted. I'm not really good at this stuff so... I don't know what to do about it now.
 

sakurasaber

New Member
Newbie
Joined
Mar 31, 2019
Messages
1
Trophies
0
Age
20
Location
new york
Website
salemlover69.tumblr.com
XP
42
Country
United States
by any chance, could you make a video showing us how to do this? its really hard for me to follow along just by text so itd really be appreciated! i want to download the fe fates hack for lgbt marriages and such but everyone is fixating on solely using an actual 3ds to do that so im just. very confused. thank you!!
 

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
So I've renamed my .3ds file and installed python 2.7. When I dragged the .3ds file into the 3ds to cia thingy, the window closes and that's it. And yes, the file is decrypted. I'm not really good at this stuff so... I don't know what to do about it now.

by any chance, could you make a video showing us how to do this? its really hard for me to follow along just by text so itd really be appreciated! i want to download the fe fates hack for lgbt marriages and such but everyone is fixating on solely using an actual 3ds to do that so im just. very confused. thank you!!

I can try making a video, or if that doesn't work I'll post step-by-step screenshots with an example. I'm sorry you're having trouble, I'll try to make it more easy to follow! :)

Sorry for the delay, guys! I'm having trouble with the rsfgen.py script and I don't want to have to write a different version (espacially since I didn't write it myself) to make it work just because python is being finicky.
 
Last edited by FriendlyHacker,

takimei

Member
Newcomer
Joined
Apr 23, 2019
Messages
9
Trophies
0
Age
21
XP
53
Country
United States
hey! so im having the same problem as watertush, ive done everything but when i drag and drop the 3ds file onto the 3ds to cia tool, the window for the tool just closes and doesnt reopen at all. any idea on what im doing wrong? thanks for the guide btw!!
 

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! so im having the same problem as watertush, ive done everything but when i drag and drop the 3ds file onto the 3ds to cia tool, the window for the tool just closes and doesnt reopen at all. any idea on what im doing wrong? thanks for the guide btw!!

Hi! I'm sorry you're having an issue so early on in the process! I'll look into it and see if I can find out what's going on.
Can I ask what your OS is?
 

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
thank u very much!! :)

Does double clicking on the batch work? It should give you this:

0.png


Try running it as administrator, too.
If it doesn't work, could you please try to run it with the command prompt?
[In the folder where the .bat file is located, hold down the "shift" key and right click in the white space. Select "Open Command Window Here". Type in the name of the batch file and press enter.]
The command prompt should be able to open it (or if there's an error - which shouldn't be our case - tell you what's wrong).
 

takimei

Member
Newcomer
Joined
Apr 23, 2019
Messages
9
Trophies
0
Age
21
XP
53
Country
United States
Does double clicking on the batch work? It should give you this:

View attachment 164566

Try running it as administrator, too.
If it doesn't work, could you please try to run it with the command prompt?
[In the folder where the .bat file is located, hold down the "shift" key and right click in the white space. Select "Open Command Window Here". Type in the name of the batch file and press enter.]
The command prompt should be able to open it (or if there's an error - which shouldn't be our case - tell you what's wrong).

hey! so i did everything tho im not sure if i did the command window thing right? i went to the for_sd folder and typed in the name of the batch file (which btw i did in windows powershell since the command window option wasnt coming up for me) and i got an error saying that it couldnt be recognized.
just so i know im doing everything right, the name of the batch file is the name of the 3ds file right? because if not that might be why im getting an error ;;

edit: WAIT NVM IM DUMB obviously its not the 3ds file lmfao anyway i put in the name of the batch file (Make2.07) and it still didnt work ;;
EDIT 2.0: OKAY so i was able to run the batch file via the command window but... when i dragged and dropped the 3ds file it said that it couldnt be recognized. im sorry for the trouble aiojgreidg i dunno why its being so weird ;;
 
Last edited by takimei,

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! so i did everything tho im not sure if i did the command window thing right? i went to the for_sd folder and typed in the name of the batch file (which btw i did in windows powershell since the command window option wasnt coming up for me) and i got an error saying that it couldnt be recognized.
just so i know im doing everything right, the name of the batch file is the name of the 3ds file right? because if not that might be why im getting an error ;;

edit: WAIT NVM IM DUMB obviously its not the 3ds file lmfao anyway i put in the name of the batch file (Make2.07) and it still didnt work ;;
EDIT 2.0: OKAY so i was able to run the batch file via the command window but... when i dragged and dropped the 3ds file it said that it couldnt be recognized. im sorry for the trouble aiojgreidg i dunno why its being so weird ;;

I'm sorry I left like that (I went to sleep ^^; )
So, where exactly does the notice "it can't be recognized" show up? Inside the command prompt while it's running the batch file?
If you can please upload a screenshot.
Also I noticed you said you're in the for_sd folder, but that's not the folder where the batch is located

2.JPG


After looking around for a bit I've found another possible issue. 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.
 
Last edited by FriendlyHacker,

takimei

Member
Newcomer
Joined
Apr 23, 2019
Messages
9
Trophies
0
Age
21
XP
53
Country
United States
I'm sorry I left like that (I went to sleep ^^; )
So, where exactly does the notice "it can't be recognized" show up? Inside the command prompt while it's running the batch file?
If you can please upload a screenshot.
Also I noticed you said you're in the for_sd folder, but that's not the folder where the batch is located

View attachment 164603

After looking around for a bit I've found another possible issue. 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.

thats okay!!! i did the same haha
i followed what u said to do in the notepad++ and i was able to actually drag and drop the 3ds file without getting an error!! i was able to get to the very last step but then this happened:
rpBTxMc.png

it seems that i got the same error as robinthephoenix, but i checked and i did indeed download python 2.7. is there any other reason as to why im getting this error? thank you so much! :))
 

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
thats okay!!! i did the same haha
i followed what u said to do in the notepad++ and i was able to actually drag and drop the 3ds file without getting an error!! i was able to get to the very last step but then this happened:
rpBTxMc.png

it seems that i got the same error as robinthephoenix, but i checked and i did indeed download python 2.7. is there any other reason as to why im getting this error? thank you so much! :))

Hey there! I'm glad 3ds to cia worked for you! ^_^
As for the error you see now, it's definitely caused by python. So, you've installed Python 2.7, right? Did you add it to PATH?
 

takimei

Member
Newcomer
Joined
Apr 23, 2019
Messages
9
Trophies
0
Age
21
XP
53
Country
United States
Hey there! I'm glad 3ds to cia worked for you! ^_^
As for the error you see now, it's definitely caused by python. So, you've installed Python 2.7, right? Did you add it to PATH?
thank you so much for your help on that btw!!
yeah ive installed python 2.7 and ive made sure to add it to the path in environmental variable. i also made sure to check with the command prompt and everything showed up!
 
  • 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
thank you so much for your help on that btw!!
yeah ive installed python 2.7 and ive made sure to add it to the path in environmental variable. i also made sure to check with the command prompt and everything showed up!

You're welcome! :)
Alright, you did a great job there! I'm running out of ideas at this point ^ ^;
Anyway, could you please check which program is selected as the default to open rsfgen.py? (it's in the "tools" directory)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=FFe0CCeTDd8