Homebrew RELEASE Kirikiri for Nintendo Switch / ニンテンドースイッチ用の吉里吉里

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,552
Trophies
1
Location
United States
Website
sites.google.com
XP
2,918
Country
United States
icon.jpg

A Kirikiri-compatible engine is now available for the Nintendo Switch. This engine can be used with KAG3, located here: https://github.com/krkrz/kag3
The project is located here: https://github.com/uyjulian/krkrs
Binaries are located here: https://github.com/uyjulian/krkrs/releases
 
Last edited by uyjulian,

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,552
Trophies
1
Location
United States
Website
sites.google.com
XP
2,918
Country
United States
If someone builds this and plays for a bit, let me know. Thanks for the post uyjulian....would you consider posting the binaries to your github?
I'll post binaries once I have an example ready to bundle, and after the TVPGetAppPath / ExePath bug gets fixed. It's a giant hackjob right now.
 
Last edited by uyjulian,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
icon.jpg

A Kirikiri-compatible engine is now available for the Nintendo Switch. This engine can be used with KAG3, located here: https://github.com/krkrz/kag3
The project is located here: https://github.com/uyjulian/krkrs

Neat. More VNs on my switch.

I didn't even know that mkrkr existed, so also thanks for that OP. I'll probably compile that for my Linux systems later.

Now that I think of it, are KAG2 games compatible with KAG3? Because come to think of it, those might not be playable on this... Hm.
 
Last edited by chaoskagami,

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,552
Trophies
1
Location
United States
Website
sites.google.com
XP
2,918
Country
United States
Neat. More VNs on my switch.

I didn't even know that mkrkr existed, so also thanks for that OP. I'll probably compile that for my Linux systems later.

Now that I think of it, are KAG2 games compatible with KAG3? Because come to think of it, those might not be playable on this... Hm.
Nekopara won't work without an emoteplayer, psbfile, and other M2-specific implementation.
KAG2 games should be more compatible when Krkr2Compat is used.
 
Last edited by uyjulian,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
Nekopara won't work without an emoteplayer, psbfile, and other M2-specific implementation.
KAG2 games should be more compatible when Krkr2Compat is used.

Ah, good. Didn't even know there was a backcompat library.

And it's unfortunate about the plugins; I'm guessing emoteplayer is in the more or less "never going to be implemented due to complexity" category, yeah?

(I edited my point to avoid confusing the poor saps that only read the first few posts and get excited.)
 
Last edited by chaoskagami,

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,552
Trophies
1
Location
United States
Website
sites.google.com
XP
2,918
Country
United States
Ah, good. Didn't even know there was a backcompat library.

And it's unfortunate about the plugins; I'm guessing emoteplayer is in the more or less "never going to be implemented due to complexity" category, yeah?
Correct. The plugins are produced by M2, the same company that made the engine for the Switch version of the game.
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
Correct. It's made by M2, the same company that made the engine for the Switch version of the game.

Huh. I didn't realize that was made by the same company...that explains a thing or two about the port, I suppose. You learn something new every day, I guess.

The sheer number of VNs this will allow to play, though, is still freaking great. I mean, it's probably about half of VNDB alone, albeit requiring some tweaks to the tjs files, possibly.
 
Last edited by chaoskagami,

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,552
Trophies
1
Location
United States
Website
sites.google.com
XP
2,918
Country
United States
Huh. I didn't realize that was made by the same company...that explains a thing or two about the port, I suppose. You learn something new every day, I guess.

The sheer number of VNs this will allow to play, though, is still freaking great. I mean, it's probably about half of VNDB alone, albeit requiring some tweaks to the tjs files, possibly.
Yes, it will require some tweaks to the script files. Currently, System.exePath and System.dataPath need to be replaced with absolute (TVP storage system formatted) or relative paths, since the functionality of those are broken. Also, it is recommended for the encoding of text files to be UTF-16 with BOM. That job can be done easily with the "iconv" command from GNU libiconv.
 
Last edited by uyjulian,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
Yes, it will require some tweaks to the script files. Currently, System.exePath and System.dataPath need to be replaced with absolute (TVP storage system formatted) or relative paths, since the functionality of those are broken. Also, it is recommended for the encoding of text files to be UTF-16 with BOM. That job can be done easily with the "iconv" command from GNU libiconv.

Noted. Relative paths sounds easier, since most games use relative paths internally. Does it produce logs if anything goes wrong? That'll make testing this all much easier.

When there's no BOM, does it default to one (UTF16LE?), or attempt to autodetect encoding? I mean, I have no problem with running everything through iconv; it's easy. I'm just curious as to what the default behavior is.

I probably won't have time to test this out within the next few days, but I'll certainly be experimenting in the week if possible (been getting haxchi set up on my WiiU, and I need to update devkitpro on my development machine before I can build this.)

EDIT: Come to think of it, this does support xp3 archives, right? Otherwise, Japanese filenames are going to be...uh...fun.
 
Last edited by chaoskagami,

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,552
Trophies
1
Location
United States
Website
sites.google.com
XP
2,918
Country
United States
Noted. Relative paths sounds easier, since most games use relative paths internally. Does it produce logs if anything goes wrong? That'll make testing this all much easier.

When there's no BOM, does it default to one (UTF16LE?), or attempt to autodetect encoding? I mean, I have no problem with running everything through iconv; it's easy. I'm just curious as to what the default behavior is.

I probably won't have time to test this out within the next few days, but I'll certainly be experimenting in the week if possible (been getting haxchi set up on my WiiU, and I need to update devkitpro on my development machine before I can build this.)

Logs are generated in krkr.console.log. The output can also be viewed via nxlink.

Here is the rule for encoding detection:
If the first bytes are 0xfe 0xfe, the file will be decoded/deobfuscated and the encoding detection will continue.
If the first bytes are 0xff 0xfe (UTF-16LE BOM), the file is loaded as UTF-16LE.
If the first bytes are 0xef 0xbb 0xbf (UTF-8 BOM), the file is loaded as UTF-8.
Otherwise, the encoding is set using the "-readencoding" command line option. If TVP_TEXT_READ_ANSI_MBCS is defined, the default value will be Shift_JIS. Otherwise, it will be UTF-8. Valid options are: "", "UTF-8", "Shift_JIS", "GBK". If the option is "", the decoding will be attempted in the following order: "Shift_JIS", "UTF-8", "GBK". If decoding fails, TJSNarrowToWideConversionError will be thrown.
 
Last edited by uyjulian,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
Logs are generated in krkr.console.log. The output can also be viewed via nxlink.

Here is the rule for encoding detection:
If the first bytes are 0xfe 0xfe, the file will be decoded/deobfuscated and the encoding detection will continue.
If the first bytes are 0xff 0xfe (UTF-16LE BOM), the file is loaded as UTF-16LE.
If the first bytes are 0xef 0xbb 0xbf (UTF-8 BOM), the file is loaded as UTF-8.
Otherwise, the encoding is set using the "-readencoding" command line option. If TVP_TEXT_READ_ANSI_MBCS is defined, the default value will be Shift_JIS. Otherwise, it will be UTF-8. Valid options are: "", "UTF-8", "Shift_JIS", "GBK". If the option is "", the decoding will be attempted in the following order: "Shift_JIS", "UTF-8", "GBK". If decoding fails, TJSNarrowToWideConversionError will be thrown.

Noted. Now I understand why you say to use the BOM; it leaves less room for encoding errors to occur.

I personally prefer UTF-8 to UTF-16, since it's more easily editable on Linux, so I'll probably start by attempting to use that first instead of UTF-16 to avoid extra iconv passes. Most console tools (sed, grep) choke on UTF-16 (my choice for batch fixing problems with VNs, since there's generally a lot of unneeded code duplication), so UTF-8 is generally easier to work with.

See, I'd have normally read through the codebase, but it's pretty huge. It's not exactly easy to figure out what is where, but that's game engines for you. Thanks for answering in such detail.
 

uyjulian

Homebrewer
OP
Member
Joined
Nov 26, 2012
Messages
2,552
Trophies
1
Location
United States
Website
sites.google.com
XP
2,918
Country
United States
Noted. Now I understand why you say to use the BOM; it leaves less room for encoding errors to occur.

I personally prefer UTF-8 to UTF-16, since it's more easily editable on Linux, so I'll probably start by attempting to use that first instead of UTF-16 to avoid extra iconv passes. Most console tools (sed, grep) choke on UTF-16 (my choice for batch fixing problems with VNs, since there's generally a lot of unneeded code duplication), so UTF-8 is generally easier to work with.

See, I'd have normally read through the codebase, but it's pretty huge. It's not exactly easy to figure out what is where, but that's game engines for you. Thanks for answering in such detail.
No problem. If you have any other problems or questions, feel free to ask.
 
  • Like
Reactions: chaoskagami

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
this is so old and today was the first comment lol

Uh, no. You might be thinking of Ren'Py or something else. This is new. It hasn't even been on github for more than six hours.

What is this exactly

It's a port of Kirikiri which is a rather popular engine for visual novels in Japan. There's about a 1/2 chance any given VN is implemented on Kirikiri - this allows to run a sizeable chunk of them on the switch (with some compatibility hacks applied, depending on the game.)
 
Last edited by chaoskagami,
  • Like
Reactions: Naked_Snake
D

Deleted User

Guest
Uh, no. You might be thinking of Ren'Py or something else. This is new. It hasn't even been on github for more than six hours.



It's a port of Kirikiri which is a rather popular engine for visual novels in Japan. There's about a 1/2 chance any given novel is implemented on Kirikiri - this allows to run a sizeable chunk on the switch (with some compatibility hacks applied, depending on the game.)
by uyjulian Jul 11, 2019 at 4:59 AM
 
General chit-chat
Help Users
    Julie_Pilgrim @ Julie_Pilgrim: although my mom forced me to shave most of it off