Hacking Discussion Regarding the Nekopara Volume 1 for the Switch

FoxofGrey

Well-Known Member
OP
Newcomer
Joined
Jul 1, 2016
Messages
92
Trophies
0
XP
396
Country
United States
So, yes, I've bought this game, so I haven't broke any laws regarding piracy. So, let's discuss real quick what I found.

It turns out that the full dump of this game (or visual novel as many would call it) is very different compared to the contents of the PC release, as I'll show you here:

wompwomp.PNG

This above is the Switch dump

nekopara.PNG

And this is the PC release

As you can tell, the two releases are completely different, in terms of how the files are structured. And, for those not in the know, a xp3 file is the usual VN file that has the assigned data to it, with the sig file being the signature for the xp3 file. The Switch uses, from what I assume, to be none of these elements. And yes, I did check the file headers of the bin files, two are psb (and that might not be true, as the header is different from an actual psb header), and a mdf header for the rest (which is also questionable since the mdf header is also completely different from that header). So, if, let's say, you wanted to patch the Switch version for the R18 content, you cannot do it with the current state.
-snip-
 
Last edited by Quantumcat, , Reason: Can't share these files here sorry - try a private discord server or similar

planetarian

Well-Known Member
Member
Joined
Aug 5, 2014
Messages
143
Trophies
0
Age
37
XP
384
Country
United States
a bit more info on this:

.xp3 is the proprietary archive format used by kirikiri, probably the most widely-used VN engine out there. Nekopara uses a variant of it called KiriKiriZ. Furthermore, nearly every modern krkr game uses some form of unique (but simple) encryption on its xp3 archives, but tools are available which can extract them despite that.
For example, the immediate contents of data.xp3:
upload_2018-7-9_12-58-28.png


The Switch version does indeed look like it has been repackaged to some degree. it looks like there are pairs of files, *_body.bin being the archives and *_info.psb.m perhaps containing metadata of some kind.
It's worth noting that .psb is the extension used by Nekopara's e-mote (the Live2d-ish animated emotive character engine) system for its character files, though as far as I am aware these files are simply packaged .tga texturemaps (containing all the individual 'pieces' of an animated character, laid out in a single image). At first glance I would not expect the .psb files to have anything to do with these .psb.m files, unless psb is really just a container format of some kind regardless of content.
 
  • Like
Reactions: FoxofGrey

FoxofGrey

Well-Known Member
OP
Newcomer
Joined
Jul 1, 2016
Messages
92
Trophies
0
XP
396
Country
United States
a bit more info on this:

.xp3 is the proprietary archive format used by kirikiri, probably the most widely-used VN engine out there. Nekopara uses a variant of it called KiriKiriZ. Furthermore, nearly every modern krkr game uses some form of unique (but simple) encryption on its xp3 archives, but tools are available which can extract them despite that.
For example, the immediate contents of data.xp3:
View attachment 135113

The Switch version does indeed look like it has been repackaged to some degree. it looks like there are pairs of files, *_body.bin being the archives and *_info.psb.m perhaps containing metadata of some kind.
It's worth noting that .psb is the extension used by Nekopara's e-mote (the Live2d-ish animated emotive character engine) system for its character files, though as far as I am aware these files are simply packaged .tga texturemaps (containing all the individual 'pieces' of an animated character, laid out in a single image). At first glance I would not expect the .psb files to have anything to do with these .psb.m files, unless psb is really just a container format of some kind regardless of content.
I found this on Live2D's website:
http://www.live2d.com/en/news/cubism_supports_switch

Might clue us in with more details regarding how games are compiled to work on the Switch.
 

MrComputerRevo

Well-Known Member
Newcomer
Joined
May 13, 2013
Messages
93
Trophies
0
Age
27
XP
1,068
Country
Ukraine
The engine the Switch version runs on is "Kaleido ADV Workshop" by M2. It is an absolute *paaaain* to work on, and is a combination of a Squirrel VM for system scripting and actually KiriKiri script format for the scenario scripts (though I'm not sure how much it is modified, but some old KiriKiri text extraction tools *do* work on these scripts). I've never messed with KiriKiri, so I don't know what it uses for image formats, but it *might* be similar? (M2 uses PSB container files for pretty much everything I suppose) There are tools to extract the *_body.bin and *_info.psb.m files, but you need an encryption key from the executable (isn't really a problem, since we have access to Switch executables) Anyway, unless someone is *really* keen for making this, I wouldn't expect it. Trust me, I know the pain of trying to port an 18+ patch to a completely different engine...
Well, this being on Switch makes things slightly simpler for reverse engineering as many Switch games for whatever reason include function symbols, and Nekopara is no exception.
 

FoxofGrey

Well-Known Member
OP
Newcomer
Joined
Jul 1, 2016
Messages
92
Trophies
0
XP
396
Country
United States
The engine the Switch version runs on is "Kaleido ADV Workshop" by M2. It is an absolute *paaaain* to work on, and is a combination of a Squirrel VM for system scripting and actually KiriKiri script format for the scenario scripts (though I'm not sure how much it is modified, but some old KiriKiri text extraction tools *do* work on these scripts). I've never messed with KiriKiri, so I don't know what it uses for image formats, but it *might* be similar? (M2 uses PSB container files for pretty much everything I suppose) There are tools to extract the *_body.bin and *_info.psb.m files, but you need an encryption key from the executable (isn't really a problem, since we have access to Switch executables) Anyway, unless someone is *really* keen for making this, I wouldn't expect it. Trust me, I know the pain of trying to port an 18+ patch to a completely different engine...
Well, this being on Switch makes things slightly simpler for reverse engineering as many Switch games for whatever reason include function symbols, and Nekopara is no exception.
-snip-
I'm interested to get the R18 patch running, just to see even if I can do it.
 
Last edited by Quantumcat, , Reason: Don't offer to send warez links here - elsewhere is better

MrComputerRevo

Well-Known Member
Newcomer
Joined
May 13, 2013
Messages
93
Trophies
0
Age
27
XP
1,068
Country
Ukraine
-snip- I'm interested to get the R18 patch running, just to see even if I can do it.
I have the game myself, but no, I'm not interested in doing the patch for it, sorry.

I can post an encryption key and link to the extractor tool (exm2lib), but not sure if that is against the rules. Well, if anyone wants to find the key, just search for a string "script/" in the executable. The key should be the string before that one.
 
Last edited by Quantumcat, , Reason: Edited quote
  • Like
Reactions: GizmoTheGreen

FoxofGrey

Well-Known Member
OP
Newcomer
Joined
Jul 1, 2016
Messages
92
Trophies
0
XP
396
Country
United States
I have the game myself, but no, I'm not interested in doing the patch for it, sorry.

I can post an encryption key and link to the extractor tool (exm2lib), but not sure if that is against the rules. Well, if anyone wants to find the key, just search for a string "script/" in the executable. The key should be the string before that one.
Just PM me then.
 

wwwklopar

Active Member
Newcomer
Joined
Oct 17, 2018
Messages
28
Trophies
0
Age
26
XP
363
Country
Russia
I have the game myself, but no, I'm not interested in doing the patch for it, sorry.

I can post an encryption key and link to the extractor tool (exm2lib), but not sure if that is against the rules. Well, if anyone wants to find the key, just search for a string "script/" in the executable. The key should be the string before that one.
Can you PM me too "GAME_SEED and key_len" for exm2lib? I wanna to do translation for this game.
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
I've just confirmed the key for Vol. 2 is in fact the exact same key as Vol. 1, for anyone interested.

The "easiest" way to get an extractor for this is to take exm2lib.exe and overwrite the key for Infinite Stratos since both have the exact same key length. Just beware that OP is serious when he says this engine is a pain in the ass.
 

whamer100

New Member
Newbie
Joined
Jul 14, 2018
Messages
2
Trophies
0
Age
54
XP
70
Country
United States
I've just confirmed the key for Vol. 2 is in fact the exact same key as Vol. 1, for anyone interested.

The "easiest" way to get an extractor for this is to take exm2lib.exe and overwrite the key for Infinite Stratos since both have the exact same key length. Just beware that OP is serious when he says this engine is a pain in the ass.
I've done my share of data mining yesterday, and ive already dumped all the files, also ive found that the .m part of the extension inside all the files doesnt mean anything (rename one of the fonts to just be .ttf from .ttf.m and its previewable in windows)

All that needs to be done now is a way to open the .psb files that are decrypted
 

Philippus229

New Member
Newbie
Joined
Mar 25, 2019
Messages
1
Trophies
0
XP
87
Country
Germany
Can someone please tell me where to get Kaleido ADV Workshop? I was searching for it for the past 2 hours but wasn't able to find anything, not even on the official M2 website. Then I saw that at least one person in this discussion seems to have it and just decided to ask.
 
Last edited by Philippus229,

uyjulian

Homebrewer
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,880
Country
United States
The 18+ content is localized in "adultsonly.xp3" XPK3 archive. There are NO PSB files contained in that archive, so you can just extract image sequences, images, and voice files from that archive. KrkrExtract will do the job for you quite easily. The scenario in "data.xp3" contains references to those resources, but the 18+ scenario contents may not be leftover in the Switch version.

If the PSB files from the Switch version cannot be converted to JSON with the existing PSB format tools, Ulysses Wu may be able to help you. Try sending an email to that person.
 
  • Like
Reactions: GarnetSunset

linuxares

The inadequate, autocratic beast!
Global Moderator
Joined
Aug 5, 2007
Messages
13,302
Trophies
2
XP
18,145
Country
Sweden
Why not just contact the devs of the game? They release the R18 patch outside steam. They can probably do the same for Nintendo. Or "leak it on some dark site" or such.
 

Chocola

GBAtemp Meowgular
Member
Joined
Sep 18, 2018
Messages
379
Trophies
0
Age
32
Location
Neko Paradise
XP
723
Country
Korea, South
Why not just contact the devs of the game? They release the R18 patch outside steam. They can probably do the same for Nintendo. Or "leak it on some dark site" or such.

I don't want the pervert patch, only translate it xD

PC and Switch versions use totally different engine.

The engine of Switch are Kaleido Workshop 2, unafortunally didn't find any documentation of it :(
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Firefox users be like "look at what they have to do to mimic a fraction of our power."