Homebrew COMPLETED PyNX - Game Redirector

Should I add NPDM editing to this?

  • Yes

  • No


Results are only viewable after voting.

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
Need help... I modified the donor titles and tids in .py file:

DONOR_TITLES = ['Dragon Quest Builder', 'Stardew Valley', 'Mario Rabbid Kingdom']
DONOR_TIDS = ['010008900705C000', '0100E65002BB8000', '010067300059A000']


Received the following in error.txt:

ERROR from MoveCurrentlyUsedToGame at time.struct_time(tm_year=2018, tm_mon=6, tm_mday=19, tm_hour=1, tm_min=38, tm_sec=30, tm_wday=1, tm_yday=170, tm_isdst=0)
====CONFIGURATION========
Splatoon2
010008900705C000
=====DONOR SETTINGS======


I also updated the config.ini with those 3 TIDS to none

----------

More details;
I used the software 'XCI2TitleConverter' and the game works when i put it directly into atmospher/titles/ folder

I have the following structure:
\\switch\games\Splatoon2\atmosphere\titles\010008900705C000\exefs\<8 files here>
\\switch\games\Splatoon2\atmosphere\titles\010008900705C000\romfs.bin

I ran PyNX > selected the .py > selected Donor as Dragon Quest Builder > selected title as Splatoon2 > clicked Swap Titles
 
Last edited by HoTsHoTz79,

ChainedHope

Active Member
OP
Newcomer
Joined
Dec 12, 2017
Messages
41
Trophies
0
Age
29
XP
195
Country
United States
Need help... I modified the donor titles and tids in .py file:

*snip... those information boxes are annoying*

I also updated the config.ini with those 3 TIDS to none

The issue is because your .ini doesnt know what games are currently in /atmosphere/titles.
The error you have is it trying to move files from /atmosphere/titles into /switch/games to preserve files. If these folders are empty just delete them, if they arent then manually move the files. My script trys to never erase/overwrite files that its not intending to do [mainly so I don't get flak from people about my stuff erasing their 16gb game].

V1.0.3 has a menu option to put all the files back into their original folders which should help with errors like this later. Just started working on npdm editing so the new version will be up when its been tested.
 
Last edited by ChainedHope,

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
The issue is because your .ini doesnt know what games are currently in /atmosphere/titles.
The error you have is it trying to move files from /atmosphere/titles into /switch/games to preserve files. If these folders are empty just delete them, if they arent then manually move the files. My script trys to never erase/overwrite files that its not intending to do [mainly so I don't get flak from people about my stuff erasing their 16gb game].

V1.0.3 has a menu option to put all the files back into their original folders which should help with errors like this later. Just started working on npdm editing so the new version will be up when its been tested.

So from root atmosphere folder i have this fodler only which came from the SDFiles zip

\\atmosphere\titles\010000000000100D

am i supposed to delete that folder too? sorry, im not fully understanding
 

ChainedHope

Active Member
OP
Newcomer
Joined
Dec 12, 2017
Messages
41
Trophies
0
Age
29
XP
195
Country
United States
So from root atmosphere folder i have this fodler only which came from the SDFiles zip

\\atmosphere\titles\010000000000100D

am i supposed to delete that folder too? sorry, im not fully understanding

No you shouldn't need to delete that folder.
Remove your config.ini and let the script remake it. It makes it based off what are in those arrays, so as long as those are right it will make it right.
The only other thing I can think of is your games file structure. It is the same as my post on the last page correct? /switch/games/{game name}/atmosphere/titles/{donor to replace id}/{RomFs and ExeFs dirs}
 

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
No you shouldn't need to delete that folder.
Remove your config.ini and let the script remake it. It makes it based off what are in those arrays, so as long as those are right it will make it right.
The only other thing I can think of is your games file structure. It is the same as my post on the last page correct? /switch/games/{game name}/atmosphere/titles/{donor to replace id}/{RomFs and ExeFs dirs}

deleted the config.ini file and retried.. config still shows =None for all 3
Selected Donor as Dragon Quest Builder
Selected Title as Splatoon2
Swap Files
Error: See screenshot
2018061822130200-DB1426D1DFD034027CECDE9C2DD914B8.jpg

error.txt = ERROR from MoveCurrentlyUsedToGame

Here is screenshot of my file structure;
Untitled.png
 
Last edited by HoTsHoTz79,

mikerm

Member
Newcomer
Joined
Jun 18, 2018
Messages
8
Trophies
0
Age
30
XP
107
Country
Brazil
the structure is wrong. It has to be switch/games/splatoon2(or whatever you want to write)/and then what you have, atmosphere etc
Also that donor ID, isn't it mario odyssey? Is that going to work at all choosing dragon quest builders?
 
Last edited by mikerm,

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
the structure is wrong. It has to be switch/games/splatoon2(or whatever you want to write)/and then what you have, atmosphere etc

but isn't that what i have? i dont see what the difference is :wtf:

Supposed to be:
/switch/games/{game name}/atmosphere/titles/{donor to replace id}/{RomFs and ExeFs dirs}

I have:
\\switch\games\Splatoon2\atmosphere\titles\010008900705C000\ romfs.bin and exefs dir
(where 010008900705C000 is the Donor, Dragon Quest Builder)
 

ChainedHope

Active Member
OP
Newcomer
Joined
Dec 12, 2017
Messages
41
Trophies
0
Age
29
XP
195
Country
United States
deleted the config.ini file and retried.. config still shows =None for all 3
Selected Donor as Dragon Quest Builder
Selected Title as Splatoon2
Swap Files
Error: See screenshot
View attachment 132166

error.txt = ERROR from MoveCurrentlyUsedToGame

Here is screenshot of my file structure;
View attachment 132167

Lmao well the stacktrace is totally me. I fixed that early this morning but it was after I uploaded. I'm uploading my current version. Still working out some issues with the config.ini (idk why I'm having so much trouble with it for... just small things keep popping up after extended use).
"MovingCurrentlyUsedGames" only happens when it fails to move a folder from /atmosphere/titles/{TID} -> /switch/games/{Game Name}/atmosphere/titles/{TID}
 
Last edited by ChainedHope,

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
Lmao well the stacktrace is totally me. I fixed that early this morning but it was after I uploaded. I'm uploading my current version. Still working out some issues with the config.ini (idk why I'm having so much trouble with it for... just small things keep popping up after extended use).
"MovingCurrentlyUsedGames" only happens when it fails to move a folder from /atmosphere/titles/{TID} -> /switch/games/{Game Name}/atmosphere/titles/{TID}

whew ok.. so it wasn't me.. i was going blind going over and over figuring where i went wrong lol

alright waiting on new update.. tnx
 

Zumoly

GBATemp Analyst
Member
Joined
Apr 27, 2018
Messages
1,817
Trophies
0
Location
Yorosso
XP
3,101
Country
Mali
Hi OP!
Neat idea there!
If I may add to the suggestion:
Built in keyboard for renaming purposes (maybe directly access the titles folder for convenience?)
And Yes! Native NPDM editor is a much needed feature on the Switch itself!
 

ChainedHope

Active Member
OP
Newcomer
Joined
Dec 12, 2017
Messages
41
Trophies
0
Age
29
XP
195
Country
United States
whew ok.. so it wasn't me.. i was going blind going over and over figuring where i went wrong lol

alright waiting on new update.. tnx

I pushed it. The file system changed a bit in this one.

/switch/games/{Game Name}/RomFs
/switch/games/{Game Name}/ExeFs.

Do note that it currently only works with RomFs as a folder. If you want to use a .bin file then open the script in notepad++ (or something thats not regular notepad) and replace anything that says '/RomFs/' with '/RomFs.bin'. That should work.
The change was needed to add NPDM editing (you can know edit it on the switch before throwing it in a donor)

I have only done limited testing with NPDM editing. I've successfully swapped M+R:KB into 3 different games using it. But haven't tried anything else... so YMMV. If anything breaks use the 'Put things back' option in the menu.

Hi OP!
Neat idea there!
If I may add to the suggestion:
Built in keyboard for renaming purposes (maybe directly access the titles folder for convenience?)
And Yes! Native NPDM editor is a much needed feature on the Switch itself!

NPDM editing works right now in v1.0.3 :P
The config file is starting to kill me tho, might drop it and make it 'Use at your own risk, might delete everything' warning at the beginning...
 
Last edited by ChainedHope,

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
I pushed it. The file system changed a bit in this one.

/switch/games/{Game Name}/RomFs
/switch/games/{Game Name}/ExeFs.

Do note that it currently only works with RomFs as a folder. If you want to use a .bin file then open the script in notepad++ (or something thats not regular notepad) and replace anything that says '/RomFs/' with '/RomFs.bin'. That should work.
The change was needed to add NPDM editing (you can know edit it on the switch before throwing it in a donor)

I have only done limited testing with NPDM editing. I've successfully swapped M+R:KB into 3 different games using it. But haven't tried anything else... so YMMV. If anything breaks use the 'Put things back' option in the menu.



NPDM editing works right now in v1.0.3 :P
The config file is starting to kill me tho, might drop it and make it 'Use at your own risk, might delete everything' warning at the beginning...

Awesome, it works

so now my Donor is set to Splatoon 2... what happens when i click "Put Game Back"?
 

ChainedHope

Active Member
OP
Newcomer
Joined
Dec 12, 2017
Messages
41
Trophies
0
Age
29
XP
195
Country
United States
Awesome, it works

so now my Donor is set to Splatoon 2... what happens when i click "Put Game Back"?

Glad to hear it, if you hit any more snags just leave a message. 99% of the time it is going to be your config.ini. So test using 'Put Games Back' first and then deleting the config if you happen into any weird issues.
Put Games Back will drop your games back into their original folders in /switch/games. Might make it restore the npdm backup later, but right now thats just there in case my editing fails.

Actually debating a 'PANIC' option that puts games back, deletes folders, restores backup files that I create along the way, removes the config.ini and makes a new one. That would probably fix 99% of any errors lol.
 
Last edited by ChainedHope,

Zumoly

GBATemp Analyst
Member
Joined
Apr 27, 2018
Messages
1,817
Trophies
0
Location
Yorosso
XP
3,101
Country
Mali
Here's another suggestion:
PyNX Renamer: Basically renames a folder and allows npdm editing out of the box. The benefit being no need to move large stuff anymore.
 

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
Glad to hear it, if you hit any more snags just leave a message. 99% of the time it is going to be your config.ini. So test using 'Put Games Back' and deleting the config first.
Put Games Back will drop your games back into their original folders in /switch/games. Might make it restore the npdm backup later, but right now thats just there in case my editing fails.

Actually debating a 'PANIC' option that puts games back, deletes folders, restores backup files that I create along the way, removes the config.ini and makes a new one. That would probably fix 99% of any errors lol.

Hmm... Put Games Back (PGB) button didn't work

I first deleted the config.ini
Ran .py and clicked on PGB

went into usb dir and saw the donor title still inside atmosphere/titles and Splatoon 2 still empty
 

ChainedHope

Active Member
OP
Newcomer
Joined
Dec 12, 2017
Messages
41
Trophies
0
Age
29
XP
195
Country
United States
Here's another suggestion:
PyNX Renamer: Basically renames a folder and allows npdm editing out of the box. The benefit being no need to move large stuff anymore.

Moving files is renaming. When you move a file, you are essentially renaming it and making the os change how it links to it. It doesn't physically move in the memory (NAND).
That is what this does, but it adds a storage space for you to temporary keep your games that you aren't using (/switch/games).
The only thing its missing is being able to rename/edit names on the switch, but I didnt see a keyboard option in PyNX and I am not writing my own soooo... manually edit the py script for additional things.

Hmm... Put Games Back (PGB) button didn't work

I first deleted the config.ini
Ran .py and clicked on PGB

went into usb dir and saw the donor title still inside atmosphere/titles and Splatoon 2 still empty
oof... The PGB option actually uses the config.ini to know where to put the files... thats the only way it knows how to.
From my testing, config.ini will normally fail after multiple moves but since only 1 directory will have the files, the move will end up finding where its supposed to be stored and putting it there even if its defined multiple times in the file. This does cause issues for moving games to the donors, but not when moving to the original places. So using PGB and then deleting config.ini is the actual way to reset things. Sorry about that lol.

I realize the way I wrote that a few posts ago was misleading. I've changed it so no one else does the same.
 
Last edited by ChainedHope,

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
Moving files is renaming. When you move a file, you are essentially renaming it and making the os change how it links to it. It doesn't physically move in the memory (NAND).
That is what this does, but it adds a storage space for you to temporary keep your games that you aren't using (/switch/games).
The only thing its missing is being able to rename/edit names on the switch, but I didnt see a keyboard option in PyNX and I am not writing my own soooo... manually edit the py script for additional things.


oof... The PGB option actually uses the config.ini to know where to put the files... thats the only way it knows how to.
From my testing, config.ini will normally fail after multiple moves but since only 1 directory will have the files, the move will end up finding where its supposed to be stored and putting it there even if its defined multiple times in the file. This does cause issues for moving games to the donors, but not when moving to the original places. So using PGB and then deleting config.ini is the actual way to reset things. Sorry about that lol.

I realize the way I wrote that a few posts ago was misleading. I've changed it so no one else does the same.

Ok so I manually updated the config.ini back to how it was before I deleted it

Ran the .py and clicked thg PGB button... it worked but only for the exefs folder

I had replaced 4 instances of /romfs/ to /romfs.bin... maybe thats why it didn't copy the .bin

Can confirm the root //atmosphere/titles/<donor title> is gone
 

ChainedHope

Active Member
OP
Newcomer
Joined
Dec 12, 2017
Messages
41
Trophies
0
Age
29
XP
195
Country
United States
Ok so I manually updated the config.ini back to how it was before I deleted it

Ran the .py and clicked thg PGB button... it worked but only for the exefs folder

I had replaced 4 instances of /romfs/ to /romfs.bin... maybe thats why it didn't copy the .bin

Can confirm the root //atmosphere/titles/<donor title> is gone
There are 6 '/RomFs/ locations in the file. You probably missed line 143. (in "def move_currently_used_back_to_games_folder(self):")
 
Last edited by ChainedHope,

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
There are 6 '/RomFs/ locations in the file. You probably missed line 143. (in "def move_currently_used_back_to_games_folder(self):")

found this @ line 139:
shutil.move(self.get_path() + '/RomFs', self.get_currently_used_by_path() + '/RomFs')

I did replace all with /RomFs/
above line was /RomFs ... missing the / at the end... so i just renamed those 2 with .bin at the end

gonna try this again
 

Site & Scene News

Popular threads in this forum

Recent Content

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