Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Scenario scripts

DarkPulse edited this page Dec 29, 2018 · 7 revisions

Scenario scripts are treated as a special case for the translation loader, as they have to be injected into the game as the game loads.

To allow injection of the scripts into the game to replace the ones for the dialogue, they have to be in a certain file/folder structure to emulate how they're stored in-game.

This generally follows the format of scenario/{personality number}/00/ being the containing folder for that personality, and all the relevant scripts for that personality inside that folder.

An example .csv file would be located in scenario/c00/00/5.csv. Note that with game patches, there may be some extra events in other folders (specifically, most generics have a 12 and 13 folder), and the DLC Personalities only have a folder that's 14, 15, 16, or 17 depending on the personality. In general, the plugins will load the latest version of a file. Here's a little table that will hopefully help explain this.

Situation Result
Filename only used once File is current file to edit unless another patch updates
Filename use in multiple folders Latest folder/file takes precedence, ignore earlier file

Here's a list of what the personality numbers map to. Some characters have two different personality names - an internal name (used only in game code), as well as an external name (what the character maker/etc. shows). Both of these will be followed by the current translated name we are using, and then the ID number for that character/personality.

Note that personality c30 is included as part of Patch 0727, and c31-c33 are only included if you get the Additional Personalities Pack pay-for DLC.

Internal Name External Name Translation ID Number
セクシーお姉さま セクシー Sexy c00
お嬢様 お嬢様 Ojousama c01
タカビー 高飛車 Snobby c02
小悪魔っ子 後輩キャラ Kouhai c03
ミステリアス ミステリアス Mysterious c04
電波 電波 Weirdo c05
大和撫子 大和撫子 Yamato Nadeshiko c06
ボーイッシュ ボーイッシュ Tomboy c07
純粋無垢な子供 純真無垢 Pure c08
アホの子 単純 Simple c09
邪気眼 邪気眼 Delusional c10
母性的お姉さん 母性的 Motherly c11
姉御肌 姉御肌 Big Sisterly c12
コギャル ギャル Gyaru c13
不良少女 不良少女 Delinquent c14
野性的 野生的 Wild c15
意識高い系クール 意識高いクール Wannabe c16
ひねくれ ひねくれ Reluctant c17
不幸少女 不幸少女 Pessimist c18
文学少女 文学少女 Bookish c19
もじもじ モジモジ Timid c20
正統派ヒロイン 正統派ヒロイン Typical Schoolgirl c21
ミーハー ミーハー Trendy c22
オタク少女 オタク女子 Otaku c23
ヤンデレ ヤンデレ Yandere c24
ダルい系 ものぐさ Lazy c25
無口 無口 Quiet c26
意地っ張り 意地っ張り Stubborn c27
ロリババア のじゃっ子 Old-Fashioned c28
素直クール 素直クール Humble c29
??? 気さく Friendly c30
??? 勝ち気 Willful c31
??? 誠実 Honest c32
??? 艶やか Glamorous c33
??? 帰国子女 Returnee c34
??? 方言娘 Slangy c35
??? Sッ気 Sadistic c36
??? 無感情 Emotionless c37
N/A リナ・ロベール Lina Robert c-1
N/A 橋本麗奈 Hashimoto Reina c-2
N/A 櫻井野乃花 Sakurai Nonoka c-4
N/A 姫川舞 Himekawa Mai c-5
N/A 柊このみ Hiiragi Konomi c-8
N/A 結城桜 Yuuki Sakura c-9
N/A 水瀬亜依 Minase Ai c-10

Using commas and restricted characters

Since these are csv files, using a comma in text will break the script if not properly escaped for, and since the format we have decided for character escaping uses double quotes, things can also potentially break with those as well - important, since a lot of the game's dialogue consists of characters talking.

The following as a sort of quick primer for escaping. This does mean that you will have to deal with doubling up on those whenever a character is speaking, or whenever commas get used in a line for ANY reason. Double-check your work to ensure everything is correct.

Note that this example assumes you are viewing the CSV in a raw text editor (such as Notepad++). With Excel or LibreOffice, most of these commas will be gone if you have parsed the CSV properly, and you just need to make sure you are properly escaping quote marks and/or commas so that the CSV doesn't get mangled/misinterpreted.

Raw CSV Input Resulting In-Game Output
...,"test, test",... test, test
...,"test[new line]test",... test [new line] test
...,"""This is some sample dialogue.""",... "This is some sample dialogue."
...,"This is a character describing the scene.",... This is a character describing the scene.
...,"(This is a character thinking.)",... (This is a character thinking.)

In short, just surround your line with double quotes, then type the line normally within them, and things should be fine.

If you are using a pure text editor (such as Notepad++) a newline is entered simply by pressing Enter. If you are using Excel or LibreOffice, a newline can be entered by hitting Ctrl+Enter within the cell. Note that they should be used sparingly - generally only if text doesn't flow in a good way. The game otherwise generally auto-wraps dialogue.

Lastly, note that this only applies to the actual dialogue - while there are times you will need to edit the fifth column for a character's name, as those will never contain quote marks or commas, they can be safely edited without using extra quotes.


Figuring out what to ignore in the scripts

There is a lot of extra information in the script files that could get in your way by making it not clear as to what to translate.

Fortunately, the answer to "What do I touch" is easy: Every line that has the number 16 in the third column is textual content to be translated.

Simply put, if the third column does not have 16 in it, do not touch the line period, and if it does, only touch the dialogue (sixth column) and, if necessary, a character's name in the fifth column (unless it's a token - then don't touch the fifth column for that particular line). MESSING WITH ANYTHING ELSE WILL CAUSE UNPREDICTABLE RESULTS.

If you are using a program such as Excel or LibreOffice to edit the CSVs, you can hide all columns except for the third, fifth, and sixth to make this much less likely to happen.


Special tokens

There are special tokens that the game uses to insert the player's name, or another character's name. The mappings of each need to be confirmed - these are currently just direct translations of the Japanese tokens.

If you come across these in a line, do not mess with them. Anything else is plain text and can be safely translated.

Player tokens:

Token In-Game Display
[P] Unknown at Present
[P姓] Player's Last Name
[P名] Player's First Name
[P名前] Player's Full Name
[Pあだ名] Player's Nickname

Other character tokens:

Token In-Game Display
[H] Unknown at Present
[H姓] Other Character's Last Name
[H名] Other Character's First Name
[H名前] Other Character's Full Name
[Hあだ名] Other Character's Nickname

Getting slightly technical

If you are saving the file in a manual text editor, you need to save the .csv files as UTF-8 with BOM to be able to be loaded, and to protect against japanese/unicode characters being crunched. Excel/LibreOffice should handle this automatically.