[Release] OnionFS for NTR CFW - LayeredFS plugin fork that works with any game.

Discussion in '3DS - Homebrew Development and Emulators' started by PabloMK7, Dec 14, 2016.

  1. PabloMK7
    OP

    PabloMK7 Red Yoshi! ^ω^

    Member
    1,828
    1,137
    Feb 21, 2014
    Spain
    Yoshi's Island
    OnionFS - v1.4

    OnionFS is a fork of layeredfs plugin made by cell9 that redirects romfs and code access to the SD card, useful for game mods. It works with any game, even if there is an update patch installed. For romfs redirection, you only need to put in your SD card the modified files, not the whole romfs directory nor a romfs.bin/game.romfs file.

    Compatibility:

    All the games that work with layeredfs should be working with OnionFS.
    Since this uses NTR CFW to be loaded, it won't work with some games.
    This includes:
    • Super Smash Bros. (Won't work on N3DS, O3DS)
    SaltySD will work with that game, use it instead.

    Features:
    • Redirects romfs access. (optional)
    • Redirects code.bin. (optional)
    • Applies ips patches. (optional)
    • Should work with any game that already works with layeredfs.
    • Works even if there is an update patch installed, the update files will also be redirected.
    • Optional custom redirection path.
    Default redirection paths:
    • Extracted romfs (only modified files): "SD:/OnionFS/<titleID>/romfs/"
    • code.bin: "SD:/OnionFS/<titleID>/code.bin"
    • code.ips: "SD:/OnionFS/<titleID>/code.ips"
    Use 3dsdb to get the game TID.

    Changing SD redirection path:

    To change the redirection path, use the included python script:
    Code:
    OnionFS_pathchange.py <plg file path> <redirection path>
    
    For example: SD:/folder/subfolder/
    Code:
    OnionFS_pathchange.py OnionFS.plg folder/subfolder
    
    In the above example, the new paths would be SD:/folder/subfolder/romfs and SD:/folder/subfolder/code.bin

    Debug mode:

    If you are having issues, you can use OnionFS_debug.plg to output the plugin log to a file: SD:/OnionFS.log. The information given by the plugin may help you fixing what's wrong. It's not recommended to use the debug plugin for normal use as it may be slower.

    Installing:
    1. Download the OnionFS.plg and copy it to SD:/plugin/<titleID>.
    2. (Optional) Place only the modified files in their respective folders into SD:/OnionFS/<titleID>/romfs/.
    3. (Optional) Place your custom code.bin at SD:/OnionFS/<titleID>/code.bin.
    4. (Optional) Place the code.ips patch at SD:/OnionFS/<titleID>/code.ips.
    5. Install and boot NTR CFW (I recommend using BootNTR Selector).
    6. Enjoy. :)
    Credits:

    @cell9 for making NTR CFW and layeredfs plugin. :)
    @Nanquitas for helping me a lot. :)
    @Aurora Wright for the ips patching code. :)

     
    Last edited by PabloMK7, Mar 31, 2017
    rocknard, telon22, yanagi and 42 others like this.
  2. xtheman

    xtheman GBAtemp Guru

    Member
    5,847
    5,280
    Jan 28, 2016
    United States
    Oh man this is awesome!
    This is going to make romhacking even easier!
     
  3. RyDog

    RyDog Lazy Animal Crossing hacker

    Member
    1,609
    1,192
    Apr 26, 2015
    United States
    You're a lifesaver. Will test soon :)
     
    DarkRioru likes this.
  4. erman1337

    erman1337 GBAtemp Maniac

    Member
    1,211
    932
    Sep 27, 2015
    Belgium
    Brussels
    So with this you can change the game files without packaging the romfs right? Just like saltysd
     
  5. PabloMK7
    OP

    PabloMK7 Red Yoshi! ^ω^

    Member
    1,828
    1,137
    Feb 21, 2014
    Spain
    Yoshi's Island
    I've only been able to test this with a few games, could someone test with some other games and give me feedback?

    Yes, but remember that since this is a plugin, you need NTR CFW.
     
    Last edited by PabloMK7, Dec 14, 2016
    erman1337 likes this.
  6. proflayton123

    proflayton123 Undeclared Shitposter 2.1

    Member
    5,907
    2,235
    Jan 11, 2016
    Japan
    日本
    Awesome work! This will do good for devs:)
     
  7. hacksn5s4

    hacksn5s4 Banned

    Banned
    4,332
    450
    Aug 12, 2015
    i would not say any game on the old 3ds it won't work with smm sun and moon smash bros and monster hunter you can use salty sd on sun and moon and smash though
     
  8. RyDog

    RyDog Lazy Animal Crossing hacker

    Member
    1,609
    1,192
    Apr 26, 2015
    United States
    if your going to b making rom hacks i think its common knowldge know that ntr doesnt work on o3ds and never will u can use luma for romfs redirection if u use the latest commit

    yes, this was written in his version of English on purpose.
     
    Last edited by RyDog, Dec 15, 2016
    zeldaism, DarkFlare69 and Hoppy like this.
  9. PabloMK7
    OP

    PabloMK7 Red Yoshi! ^ω^

    Member
    1,828
    1,137
    Feb 21, 2014
    Spain
    Yoshi's Island
     
    Last edited by PabloMK7, Dec 15, 2016
  10. pikatsu

    pikatsu GBAtemp Advanced Fan

    Member
    745
    128
    Apr 16, 2014
    Argentina
    very nice
     
  11. Redferne

    Redferne GBAtemp Advanced Fan

    Member
    777
    260
    Oct 28, 2015
    This is great.
     
  12. Manurocker95

    Manurocker95 Game Dev & Pokémon Master

    Member
    689
    182
    May 29, 2016
    Spain
    Madrid
    He meant those games run on extended memory so you can't use NTR with them on Old3DS. No NTR, no patches...
     
    Last edited by Manurocker95, Dec 15, 2016
    PabloMK7 likes this.
  13. Giodude

    Giodude GBAtemp's official rock

    Member
    GBAtemp Patron
    Giodude is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    4,232
    1,307
    May 17, 2015
    United States
    New York
    This is amazing, makes my life so much easier. I don't have to dump all my games now just to make plugins
     
  14. HolyHobo

    HolyHobo That guy you see around but don't know

    Member
    179
    63
    Oct 2, 2016
    United States
    US
    Nice! Trying it out right now :P

    — Posts automatically merged - Please don't double post! —

    Tried it with smash bros.. didn't work :( any idea why?
     
  15. PabloMK7
    OP

    PabloMK7 Red Yoshi! ^ω^

    Member
    1,828
    1,137
    Feb 21, 2014
    Spain
    Yoshi's Island
    Smash bros will never work with it with an O3DS because it is an extended memory game and the console reboots before it being launched causing NTR CFW to be unloaded. I'll add that to the OP later.
     
    Last edited by PabloMK7, Dec 15, 2016
  16. HolyHobo

    HolyHobo That guy you see around but don't know

    Member
    179
    63
    Oct 2, 2016
    United States
    US
    Even with a new 3ds? I'm still able to access the NTRcfw menu within the game
     
    Last edited by HolyHobo, Dec 15, 2016
  17. Giodude

    Giodude GBAtemp's official rock

    Member
    GBAtemp Patron
    Giodude is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    4,232
    1,307
    May 17, 2015
    United States
    New York
    If you're gonna use smash mods with an o3ds, you're better off with saltysd
     
  18. HolyHobo

    HolyHobo That guy you see around but don't know

    Member
    179
    63
    Oct 2, 2016
    United States
    US
    I tried saltysd on my new 3ds with no luck
     
    Last edited by HolyHobo, Dec 15, 2016
  19. Giodude

    Giodude GBAtemp's official rock

    Member
    GBAtemp Patron
    Giodude is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    4,232
    1,307
    May 17, 2015
    United States
    New York
    Well maybe onionfs isn't working since the files are packed, but i see no reason why saltysd didn't. Maybe the file paths were wrong?
     
  20. HolyHobo

    HolyHobo That guy you see around but don't know

    Member
    179
    63
    Oct 2, 2016
    United States
    US
    I used the file paths in the mods I downloaded so I don't think it was the file paths... maybe I forgot to to run something before booting up smash or something along those lines