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,

Casual-One

Member
Newcomer
Joined
Oct 27, 2019
Messages
5
Trophies
0
Age
21
XP
56
Country
Australia
Nope, I was just waiting. and it can't be not enough space since I was using a large Hard drive that was barely a third full.
If it helps I tried again today without implementing changes and it worked fine, so it may be a hiccup with the changes themselves, is that common?
Apparently it WAS a mistake involving the changes, and not this method. (I knew I forgot to compress some files!)
On that note, thanks FriendlyHacker!
 

DuyTran

New Member
Newbie
Joined
Nov 8, 2019
Messages
2
Trophies
0
Age
22
XP
34
Country
Vietnam
Hi can u help me out with this ?? Idk what's wrong T.T I already have installed the pythong 2.7. It keeps saying "IndexError: list index out of range The system cannot find the file specified"
 

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 can u help me out with this ?? Idk what's wrong T.T I already have installed the pythong 2.7. It keeps saying "IndexError: list index out of range The system cannot find the file specified"

"The system cannot find the file specified" is always there, you can ignore it. As for "IndexError: list index out of range" it is a Python problem. You need to check everything related to python. In particular, can you tell me whether you've ever installed a different version of python (such as any python 3.x)?
 

DuyTran

New Member
Newbie
Joined
Nov 8, 2019
Messages
2
Trophies
0
Age
22
XP
34
Country
Vietnam
"The system cannot find the file specified" is always there, you can ignore it. As for "IndexError: list index out of range" it is a Python problem. You need to check everything related to python. In particular, can you tell me whether you've ever installed a different version of python (such as any python 3.x)?

No unfortunately I've checked my pc and there's only python 2.7 installed :'(
 

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
No unfortunately I've checked my pc and there's only python 2.7 installed :'(

Hi! Sorry for the late reply!
Please check again everything that's related to Python, because that error only comes up - in our case - when there's a Python compatibility issue. I once installed Python 3.5 because I needed it, and the .py script didn't work after that, even after I had uninstalled Python 3.5. As far as I know, issues regarding the .3ds file, the unpacking/repacking processes, the hacks made etc. never cause this error. It's an inside error of Python, it's only related to how Python reads the .py script. Basically, Python is telling you the script isn't written correctly, but we know it actually is written properly for Python 2.7, but it isn't compatible with other versions, which can only mean you made some mistake during the installation. Are you sure you never installed any other Python version before?
 

foolishpigeon

New Member
Newbie
Joined
Jan 1, 2020
Messages
1
Trophies
0
Age
23
XP
32
Country
United States
Hi, I just found this and I have to say I’m overjoyed that I can install mods for Citra. Stupid question, but...will your save data be deleted if you do this? Is there a way to keep it? Thanks.
 

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 just found this and I have to say I’m overjoyed that I can install mods for Citra. Stupid question, but...will your save data be deleted if you do this? Is there a way to keep it? Thanks.

Hi there! I'm glad you're enthusiastic about modding your games! ^_^
To answer your question, no, your savedata is not deleted, but depending on what changes you make some things might get mixed up or messed up. If you install someone else's mod, be sure to check whether they say you need to start a new game or not. Also if you're worried about losing your savedata just make a backup of the Citra folder found in "C:\Users\User\AppData\Roaming\Citra", that's where your save files are located.
Hope this helps! :)
 

tachko

New Member
Newbie
Joined
Jan 7, 2020
Messages
1
Trophies
0
Age
23
XP
52
Country
Hungary
Hello! Thank you for the tutorial, though I'm having a problem in the command program. I tried to look up a solution as to not ask a question you have already answered before, but I just can't seem to find a solution.
My problem is when I try to type in the "3dstool -xvtf romfs romfs.bin --romfs-dir romfs" command, when I press enter it just says "3dstool is not recognized as an internal or external command, operable program or batchfile.".
What could I do to solve this? :(
 

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
Hello! Thank you for the tutorial, though I'm having a problem in the command program. I tried to look up a solution as to not ask a question you have already answered before, but I just can't seem to find a solution.
My problem is when I try to type in the "3dstool -xvtf romfs romfs.bin --romfs-dir romfs" command, when I press enter it just says "3dstool is not recognized as an internal or external command, operable program or batchfile.".
What could I do to solve this? :(

Hi! Sorry for the late reply!
I'm sorry you're having trouble! And don't worry about asking questions, I try to help anyone who needs support here, so don't be shy, ask away! ;)
About that message you get, did you follow each step correctly? If you get that message it means you're probably trying to run 3dstool.exe without first telling the system where to find the program.
You need to set the path where 3dstool.exe is located in the command prompt and then type or copy-paste that command.
Here are the step-by-step instructions.
- Open the command prompt, you'll see something like:

C:\Users\YourUsername>

- Type cd followed by the path where 3dstool is located on your pc, preferably between quotation marks (for instance let's pretend you put it in "C:\3dstool"):

C:\Users\YourUsername> cd "C:\3dstool"

- Hit Enter and you'll get:

C:\3dstool>

- Copy-paste the command and hit Enter:

C:\3dstool>3dstool -xvtf romfs romfs.bin --romfs-dir romfs

And the romfs.bin file you put in the folder will be extracted.
If it still doesn't work, please tell me what you do exactly so I can help you out. :)
 

girlfrand

New Member
Newbie
Joined
Jan 13, 2020
Messages
1
Trophies
0
Age
23
XP
53
Country
Canada
hi, thanks for this tutorial! unfortunately, i'm having a bit of trouble when it comes to 5.. it says the system cannot find the path specified when i type in the path :(

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

hi, thanks for this tutorial! unfortunately, i'm having a bit of trouble when it comes to step 5.. it says the system cannot find the path specified when i type in the path :(
 

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, thanks for this tutorial! unfortunately, i'm having a bit of trouble when it comes to 5.. it says the system cannot find the path specified when i type in the path :(

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

hi, thanks for this tutorial! unfortunately, i'm having a bit of trouble when it comes to step 5.. it says the system cannot find the path specified when i type in the path :(

Hi there! :)
If you get that error it means you're not writing the path correctly. Try copy-pasting it from the address bar to be sure and enclose it in quotation marks (if you're on Windows 10 pasting on the command prompt is done by right clicking).
Hope this helps! If you need any clarification or maybe screenshots, feel free to ask! ^_^
 

Clueless_Academic

New Member
Newbie
Joined
Jan 18, 2020
Messages
1
Trophies
0
Age
26
XP
34
Country
Philippines
Hi FriendlyHacker, I'm having a problem getting past step 2.
I've tried changing the Encoding to both UTF-8 w/ & w/o BOM, and in both cases the batch file just closes immediately.
Don't know if it's useful but other things I've noticed:
  • When using the latter option (UTF-8 w/o BOM), this shows up in the prompt. (image below)
  • The original name for the 3DS file I'm trying to install a mod to in question is "0244 - Fire Emblem - Awakening (Europe) (En,Fr,De,Es,It) Decrypted"
  • I'm using Windows 10 with a 64-bit operating system (I found this out only now. I was convinced prior I was running 32-bit)
  • I put everything required for this whole thing under one desktop folder (named TEST), so as to not have to backtrack everywhere for everything. All still in their respective folders of course...

    EDIT: I was able to do it through a different set of methods. Thank either way, finally able to ship my ships
 

Attachments

  • trying.PNG
    trying.PNG
    76.3 KB · Views: 192
Last edited by Clueless_Academic,
  • 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 FriendlyHacker, I'm having a problem getting past step 2.
I've tried changing the Encoding to both UTF-8 w/ & w/o BOM, and in both cases the batch file just closes immediately.
Don't know if it's useful but other things I've noticed:
  • When using the latter option (UTF-8 w/o BOM), this shows up in the prompt. (image below)
  • The original name for the 3DS file I'm trying to install a mod to in question is "0244 - Fire Emblem - Awakening (Europe) (En,Fr,De,Es,It) Decrypted"
  • I'm using Windows 10 with a 64-bit operating system (I found this out only now. I was convinced prior I was running 32-bit)
  • I put everything required for this whole thing under one desktop folder (named TEST), so as to not have to backtrack everywhere for everything. All still in their respective folders of course...

    EDIT: I was able to do it through a different set of methods. Thank either way, finally able to ship my ships

Hi, sorry I couldn't help! But I'm glad you managed to do what you wanted to! :)
And thumbs up for the ships, whichever they are! :yay:
 

batchii

New Member
Newbie
Joined
Mar 12, 2020
Messages
3
Trophies
0
Age
24
XP
38
Country
Philippines
Hey! idk if u would still reply to this but for some reason, even after changing the encoding to UTF-8, the batch file still closes when i drag and drop the .3ds file. is there any way i can fix this? my os is windows 7 btw. Thanks in advance!
 

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! idk if u would still reply to this but for some reason, even after changing the encoding to UTF-8, the batch file still closes when i drag and drop the .3ds file. is there any way i can fix this? my os is windows 7 btw. Thanks in advance!

Hi there! :)
I've read a bit on what could be the issue, and there's many possibilities. For now, can you tell me whether double-clicking the batch or running it as administrator opens a black window?

0.png


Like this?
 

batchii

New Member
Newbie
Joined
Mar 12, 2020
Messages
3
Trophies
0
Age
24
XP
38
Country
Philippines
Hi there! :)
I've read a bit on what could be the issue, and there's many possibilities. For now, can you tell me whether double-clicking the batch or running it as administrator opens a black window?

View attachment 199261

Like this?
Hi! Thanks for the reply! Yes, double clicking and running it as admin makes the batch file open. Same exact window popped up as the picture you showed.
 

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! Thanks for the reply! Yes, double clicking and running it as admin makes the batch file open. Same exact window popped up as the picture you showed.

The fact that you can run the batch without issue but not make it work means it's not windows's fault, but the script's. Did your problem occur before you changed the encoding? Did you change the encoding to UTF-8 without BOM and save the file?
 

batchii

New Member
Newbie
Joined
Mar 12, 2020
Messages
3
Trophies
0
Age
24
XP
38
Country
Philippines
The fact that you can run the batch without issue but not make it work means it's not windows's fault, but the script's. Did your problem occur before you changed the encoding? Did you change the encoding to UTF-8 without BOM and save the file?
Heya, sorry I'm a bit late, fell asleep. But to answer your question, yes, the problem occurred before I changed the encoding. I already changed the encoding to UTF-8 without BOM and saved, but it still wouldnt work :(
 

Camimi

New Member
Newbie
Joined
Mar 23, 2020
Messages
3
Trophies
0
Age
22
XP
46
Country
United States
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:
 
  • Like
Reactions: FriendlyHacker

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=pkYA4rALqEE