PDA

View Full Version : quick question about kirikiri


awwaw
2008-07-08, 17:09
Good day!

I am writing a game from scratch with the Kirikiri engine for a doujin project of mine, and would like to ask if there is anyway to compile it to run on machines that do not have East Asia languages support?

I've searched through this forum but only found threads that are about trying to run extracted projects compiled from the start with the Japanese language in mind. Just wondering... is there a way to compile it (from scratch, and not from an extracted project) so that it runs on non-Japanese machines?

I've also read about converting files to unicode and stuff. I've tried that but it still throws up an error about ANSI, according to one of my friends who is testing it.

Another friend of mine mentioned a Chinese patched version called KAGeXpress (I believe one of the members here is the driving force behind it?) and that friend claims is able to run on any machine, even the non-Chinese ones. I tried that too, but... it doesn't work on my machine!! XD

I am running Windows 2000 (yes, yes, I know, I know...) with Japanese as the default language. My locale is English (United States).

My project runs on my machine, but not on my friends' machines. They do not have East Asia language packs installed and so AppLoc doesn't work for them either. Not to mention the moment it throws up an error, it lowers their motivation to test it altogether... T.T

Any l33t haxx0rz or expert kiri user out there who can help with this problem? XD Thanks in advance!!

Asceai
2008-07-08, 17:37
The exact unicode encoding matters. For kirikiri, I believe you want UTF-16 with a byte-order mark. If it's not that, try UTF-16 LE without the BOM.

TimScampi
2008-07-08, 23:09
I think it's a source code limitation...
As the engine is open source, it would be possible to make an internationnal fork, translated in english, with non-japanese support etc.
But I don't think your problem is an encoding problem. On kirikiri, I've used UTF-8 to encode french caracters (é, è, à, ç, ...) but it asked me for the japanese locale anyway, even when all the system and scenario files are set tu Unicode, UTF-8 or whatever.
You need to find the place in, the source code of Kirikiri where it deals with system locale, maybe implement 1 byte-caracter support if it's not in already, and some other functions.
It would be very cool to have an internationnal fork of this, because the translations are shitty with the original versions. (Actually, when you apply Insani's word-wrap hack, text goes out of the dialog box in all games I tested it with... Not to mention the locale problem...)

Asceai
2008-07-08, 23:28
You don't want UTF-8, you want UTF-16. And Kirikiri handles it just fine. As far as I can tell there are no requirements for it.

Also what do you mean that translations are shitty with it? Look at True Remembrance for crying out loud - no requirement for Japanese locale, and it's certainly far from shitty.

Why the hell do you want to fork something that works just fine? And this talk about adding 1-byte character support makes me wonder if you even know what you're talking about - OF COURSE it has one-byte character support. It always did!

Insani's word-wrap hack is also fine; you probably didn't apply all parts of the patch or run the wordwrapping script properly. I used a modified form of it in my Devil on the G String translation and there's no wordwrapping problems.

Enerccio
2008-07-09, 03:32
wordwraping script is bad, because editing is mess then... rather make own wordwraping in kirikiri tjs scripts, its way better then wordwrapping insani script.

awwaw
2008-07-09, 06:41
The exact unicode encoding matters. For kirikiri, I believe you want UTF-16 with a byte-order mark. If it's not that, try UTF-16 LE without the BOM.

thanks for the reply!

what tool do you think i could use? the one i have is convertz. it informs me that everything is in UTF-16LE already. still can't run on friend's machine. any other tool i could try?

awwaw
2008-07-09, 06:45
I think it's a source code limitation...
[snip]
You need to find the place in, the source code of Kirikiri where it deals with system locale, maybe implement 1 byte-caracter support if it's not in already, and some other functions.

thank you for the reply!

i would love to mess around with the actual source code. unfortunately i am not l33t haxx0rz enough. XD i'm sure they do support 1-byte characters, but there must be something making the program throw up errors everytime the standard compilation is being run on a non-japanese locale. i'm sure there must be a way around it. if only we could figure out how...!!

awwaw
2008-07-09, 06:47
Look at True Remembrance for crying out loud - no requirement for Japanese locale...

this statement is interesting. how did the game manage to run without requiring the japanese locale? if you know, please do enlighten me! thank you so much!!

Enerccio
2008-07-09, 09:07
this statement is interesting. how did the game manage to run without requiring the japanese locale? if you know, please do enlighten me! thank you so much!!
kirikiri requires Japanese locale only when script is itself written in S-JIS, when its on Unicode UTF16LE, it doesn't need it (of course, for Japanese characters, you need fonts).

zalas
2008-07-09, 09:55
wordwraping script is bad, because editing is mess then... rather make own wordwraping in kirikiri tjs scripts, its way better then wordwrapping insani script.
What's stopping you from editing the pre-wordwrapped script and then just running a command to get everything compiled? I seriously doubt anyone's editing the post-wordwrapped script...

Enerccio
2008-07-09, 10:14
What's stopping you from editing the pre-wordwrapped script and then just running a command to get everything compiled? I seriously doubt anyone's editing the post-wordwrapped script...
it makes testing easier. You just need to run the game, but with insani script, you have to run trough it (every file) and then run the game

Asceai
2008-07-09, 11:30
it makes testing easier. You just need to run the game, but with insani script, you have to run trough it (every file) and then run the game

So? You're probably going to have a script for running the command to create the xp3 patch anyway.. just have the wordwrapping script calls there.

Enerccio
2008-07-09, 11:53
So? You're probably going to have a script for running the command to create the xp3 patch anyway.. just have the wordwrapping script calls there.
is there a need?
just put all in /data/scenario or something, I think it will run, and if no, extract everything in /data/ structure and it will run without any archiving.

Asceai
2008-07-09, 13:12
I prefer keeping things in patch state - same when working with reallive, really. Just because it works with my workflow better. I don't just deal with the straight .ks scripts anyway - I've got scripts to perform certain forms of processing on them first, so I might as well create the patch at the same time and make sure it's always in a patchable state.

Enerccio
2008-07-09, 14:04
well I guess so, everybody like it their way

awwaw
2008-07-09, 16:52
kirikiri requires Japanese locale only when script is itself written in S-JIS, when its on Unicode UTF16LE, it doesn't need it (of course, for Japanese characters, you need fonts).

i personally do not have a single word of japanese in my scripts. the .tjs files in the system folder, of course, contains japanese comments behind semi colons. so... do i remove every comment therein that is in japanese? (all my files are in already unicode 16-LE, according to convertz.)

ChocoEd
2008-07-09, 21:31
Yeah, it's not recommended to hand-edit the word-wrapped scripts... that's pretty tedious and error-prone. I just use a little shell script that processes everything and builds the patch in one step when doing editing and testing.

That being said, if you have a solution for doing word-wrapping purely in the TJS script, please publish it for other folks to use, since that would be a lot more elegant. I couldn't see a good way to do that, due to the way the rendering engine draws one character at a time... without hints about what the rest of the word will be, it's tough to make a line-break decision before you start drawing letters in the wrong place.

It's surely possible, just more script-hacking than I had the stomach for. ;-)

awwaw
2008-07-09, 22:01
That being said, if you have a solution for doing word-wrapping purely in the TJS script, please publish it for other folks to use, since that would be a lot more elegant.

why not use a fixed-width font so that it's easier to decide where to manually break to the next line?

ChocoEd
2008-07-10, 06:27
why not use a fixed-width font so that it's easier to decide where to manually break to the next line?

That actually wouldn't help the main problem. Say you have a fixed-width font where you can fit 80 characters. You're on character 75, have just finished a word, and the engine tells you that you should print "b" next. Do you want to draw that character on the current line or the next line?

Unless you have a hint about whether the next word is "be" or "bizarre" (which is what the word-wrapping script does), you can't make this decision before drawing the first character in possibly the wrong place. And if you do have those hints, it's easy to calculate the width of the word in a proportional font anyway.

awwaw
2008-07-10, 06:55
That actually wouldn't help the main problem. Say you have a fixed-width font where you can fit 80 characters. You're on character 75, have just finished a word, and the engine tells you that you should print "b" next. Do you want to draw that character on the current line or the next line?

Unless you have a hint about whether the next word is "be" or "bizarre" (which is what the word-wrapping script does), you can't make this decision before drawing the first character in possibly the wrong place. And if you do have those hints, it's easy to calculate the width of the word in a proportional font anyway.

ohm, okay. i meant manually break to a new line as in actually going into the .ks files and adding an [r] tag to every line you want to break, but i guess that is really too tedious. XD if there's a script that does the job, it will be best to use it, of course. (can you tell by my flailing that i'm not good this script hacking thing?)




so does anyone know how to make my doujin game run on non-japanese locale then? anybody...?

Enerccio
2008-07-10, 07:19
Yeah, it's not recommended to hand-edit the word-wrapped scripts... that's pretty tedious and error-prone. I just use a little shell script that processes everything and builds the patch in one step when doing editing and testing.

That being said, if you have a solution for doing word-wrapping purely in the TJS script, please publish it for other folks to use, since that would be a lot more elegant. I couldn't see a good way to do that, due to the way the rendering engine draws one character at a time... without hints about what the rest of the word will be, it's tough to make a line-break decision before you start drawing letters in the wrong place.

It's surely possible, just more script-hacking than I had the stomach for. ;-)
can't, not mine script, but my friends
but I have to say it works (with both nvl and adv style), and you don't have to write any manual linebreaks.

Enerccio
2008-07-10, 07:23
i personally do not have a single word of japanese in my scripts. the .tjs files in the system folder, of course, contains japanese comments behind semi colons. so... do i remove every comment therein that is in japanese? (all my files are in already unicode 16-LE, according to convertz.)
japanese characters are irrelevant, on the computers without fonts it would be boxes or ? or something. And it shouldn't matter in comments
well then I dunno, have you checked every tjs file?

awwaw
2008-07-10, 07:29
japanese characters are irrelevant, on the computers without fonts it would be boxes or ? or something. And it shouldn't matter in comments
well then I dunno, have you checked every tjs file?

to see if they are in unicode? i checked startup.tjs in the root folder of the game directory, the entire system folder, and the entire scenario folder. they are all in unicode. do i need to check all those "~このファイルは削除してかまいません~.txt" files too?

the problem is always solved if i can get my friend(s) to install east asia fonts and set their locale to japanese. does it have anything to do with that, i wonder?