Working with SEENs
Reading and editing SEEN.TXT
In Cygwin, go to your game’s folder:
cd c:\Key\Kanon\
To extract the seens you then want to type
kprl -d -o seens -e utf8 seen.txt
What does all of that mean?
“kprl” runs the kprl command.
“-d” disassembles the bytecode
“-o” will set the output folder. The word you put after it will be the name of the folder the seens are stored in. We have named our folder “seens” for clarity.
“-e” will set the encoding of the text files, which can be easy to mess up. RLDev should default to utf-8, but we’ll put it in just to be safe.
The last thing you should type is the target file. We are extracting from SEEN.TXT, so type that.
If you want to learn more about the stuff mentioned above, a quick google of the terms will suffice. If you want to learn more commands then type “kprl --help” into your cmd.
After all of this you’ll end up with a folder full of scripts. With RealLive games you will always end up with two of three different types of text documents.
In older games you will be given .utf files and .ke files.
A .utf file is a resource file. There’ll be a bunch of numbers surrounded in <> and they will be followed by text. It honestly isn’t used for much.
A .ke file is the script. It’ll have the text, the sprite commands, the scene changes… everything.
In newer games you will end up with .utf files and .org files. These are much cleaner than the older .utf and .ke files.
A .utf file is still a resource file, but it is used a lot more than before. Instead of the resources being little things, all of the text in the game is set as a resource.
A .org file is the same as a .ke file without the in-game text. This is where you control the cgs, sprites, bgm, transitions, and even minigames.
We will explore all of these later, but for now just know that to create a seen file you need both a .utf document and either a .ke or a .org document.
So let’s say you change what a person says in the seen0001 file How do we get that new dialogue into the game?
If you closed cmd then you want to repeat the first step. Move to your game directory.
Getting the new script to work is as simple as this:
rlc -o SEEN0001 -d New_seens -e utf8 seen0001.ke (or .org)
This is almost identical to the kprl command we used previously, but things work a little differently.
“rlc” runs rlc.
“-o” is the name of the output file.
“-d” is the name of the output folder.
“-e” is the encoding.
And again it ends with the target file. We always target the file that controls the game - not the .utf file.
In your game directory you will now have a “New_seens” folder with a .txt file inside. Whenever that .txt file is alongside the reallive.exe you use to run the game, the custom script you created will be read!
Compiling a new SEEN.TXT
Let’s say you have a big folder of .ke or .org files ready to turn into seen files. How would you go from there to a single seen.txt file?
The command would be something like this:
for %a in (new_seens\*.ke) do rlc -e utf-8 -i c:\Key\Kanon\gameexe.ini %a
This basically means "for everything in the new seens folder ending in .ke (or .org) execute the rlc command. It also specifies encoding, and specifies a gameexe to be fail-safe. You can batch other commands in similar ways.
From there you’d do this:
kprl -a seen1.txt new_seens\*.txt
This uses the -a command, which puts stuff into an archive (think .zip/.rar files) and can also be used with the batch command feature above. It’ll add all .txt files into an archive named seen1.txt. You can then swap it with your original seen by renaming it to seen.txt.