Homebrew ROM Hack Applying IPS patch to CIA file

TheMhanzLord

Member
OP
Newcomer
Joined
Sep 4, 2022
Messages
6
Trophies
0
Age
30
Location
Rome
XP
52
Country
Italy
Hi, I wanted to apply some mods for Fire Emblem Fates and resorted to the HackingTools9DS. All the mods went it smoothly (tested) replacing the files I needed to, but one of the mods is an IPS patch. I can't verify whether the patch worked easily and I wanted to know what's the best way to apply an IPS patch to a CIA file? Do I use Lunar IPS selecting the rebuilt CIA or do I need to patch some extracted file before rebuilding?

tl;dr how do I apply an IPS patch on a CIA file? Directily on the CIA or on an unextracted file?
 

spitzeqc

Member
Newcomer
Joined
Apr 18, 2022
Messages
22
Trophies
0
Location
Earth
XP
109
Country
United States
Luma has the ability to apply patches to (most) games on the fly. This post does a good job of explaining how to apply patches to games luma can support, but to summarize
  1. On your sd card, go to '/luma/titles' and create a folder with the game's title id (if it does not already exist)
  2. Drag patch files into your 'title id' folder
  3. Enable game patching in luma (restart console and hold select while booting, there should be an option for game patching)
An example of this can be seen with kaeru gallery (flipnote studio 3d server replacement), and may be useful for seeing what a sample patch looks like
 

TheMhanzLord

Member
OP
Newcomer
Joined
Sep 4, 2022
Messages
6
Trophies
0
Age
30
Location
Rome
XP
52
Country
Italy
Luma has the ability to apply patches to (most) games on the fly. This post does a good job of explaining how to apply patches to games luma can support, but to summarize
  1. On your sd card, go to '/luma/titles' and create a folder with the game's title id (if it does not already exist)
  2. Drag patch files into your 'title id' folder
  3. Enable game patching in luma (restart console and hold select while booting, there should be an option for game patching)
Initially I used this method for each mod I intended to use (basically all replacing/adjusting already existing files), but the game had some input lag because of this. It might not be the case with JUST the IPS patch though.
Merging resolved that lag though, so do you know any other method to apply an IPS patch? I swear I searched a lot but it's always about rom hacks for ds each thread I found.

Also, I tried patching the whole CIA with IPS patch and it just doesn't install using FBI.
 
Last edited by TheMhanzLord,

spitzeqc

Member
Newcomer
Joined
Apr 18, 2022
Messages
22
Trophies
0
Location
Earth
XP
109
Country
United States
If you patch the rest of the cia, but then use the ips with luma's patching, does it work?

It looks like the way patching works is it first looks on the sd card for the file to replace, and if found the file is replaced. So if you are replacing a lot of files, there will likely be a bit of slowdown. I would need to look into it a bit more, but I assume the IPS patches for luma work in a similar way (if it is needed, load the original code then apply the patch directly in memory). If this is the case, there is bound to be a solution for turning it into a cia, its just a matter of if it is user friendly or not.

My gut instinct is that applying the IPS to the proper extracted file should cause it to work, but I have not tested this
 

TheMhanzLord

Member
OP
Newcomer
Joined
Sep 4, 2022
Messages
6
Trophies
0
Age
30
Location
Rome
XP
52
Country
Italy
If you patch the rest of the cia, but then use the ips with luma's patching, does it work?

It looks like the way patching works is it first looks on the sd card for the file to replace, and if found the file is replaced. So if you are replacing a lot of files, there will likely be a bit of slowdown. I would need to look into it a bit more, but I assume the IPS patches for luma work in a similar way (if it is needed, load the original code then apply the patch directly in memory). If this is the case, there is bound to be a solution for turning it into a cia, its just a matter of if it is user friendly or not.

My gut instinct is that applying the IPS to the proper extracted file should cause it to work, but I have not tested this
I didn't try the first option you mentioned but patched the GameData.bin extracted file, since a similiar patch that got surpassed by the one I'm using did have this as instruction. I'll see if the patch worked and I'll tell you, otherwise I'll try the luma method but I assume as it is the standard method it works for sure.
The game did get installed with no problems this way, I'll update later.

Found a post (gbatemp.net/threads/use-luma-game-patches-on-citra.505375/page-2) that said to de-compress the GameData.bin, patch it and then compress it again. I didn't do it though
 
Last edited by TheMhanzLord,

Fredwort

New Member
Newbie
Joined
Mar 5, 2023
Messages
2
Trophies
0
Age
23
XP
4
Country
United States
Yo wondering if you ever figured this out? New to all this but just went down the same rabbit hole for Fire Emblem awakening about to open game to see if the performance is better with Luma still applying that ips patch
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
2,945
Trophies
1
XP
3,499
Country
Canada
It makes no sense to apply an IPS directly to a .cia.

Any mod that is somehow packaged in the form of an IPS probably should come with instructions on how to apply it.
 

Fredwort

New Member
Newbie
Joined
Mar 5, 2023
Messages
2
Trophies
0
Age
23
XP
4
Country
United States
It makes no sense to apply an IPS directly to a .cia.

Any mod that is somehow packaged in the form of an IPS probably should come with instructions on how to apply it.
Thanks for the info I am new to this I don't really understand the way the files interact with each other. The IPS file for the mod I used assumed that I would be using luma, so the only instruction is to put it in the corresponding folder. Currently had an issue installing my edited CIA due to my SD card so I won't have my answer til later
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
  • K3N1 @ K3N1:
    Your favorite activity
  • BentlyMods @ BentlyMods:
    My fav actvity is:

    mario-dancing.gif
  • Psionic Roshambo @ Psionic Roshambo:
    Do the Mario lol
  • K3N1 @ K3N1:
    🍑
  • K3N1 @ K3N1:
    Whoever developed Bramble was smoking that good shit fucking gnomes
    K3N1 @ K3N1: Whoever developed Bramble was smoking that good shit fucking gnomes