School Days backlog/subtitle difference checker
From AstCd2, produced on my request for a spec document.
The aim is to have a script or program which can check the "backlog" lines in the School Days scripts against the corresponding "subtitle" lines and produce a list of instances where they differ.
- The "backlog" lines are the lines the player sees when he scrolls back through the backlog.
- The "subtitle" lines are the lines which are displayed as actual subtitles during play. Due to the limited space available, they are frequently split into several pieces.
At present, there are a number of differences between the backlog and subtitle lines due to inconsistent editing. We are aiming to fix this so we have matching content in both the backlog and subtitle lines.
How the scripts work
Each script is divided into a number of "blocks", with each block representing a line.
Layout of each block
<SCRRES no="text block number" type="16=backlog+sub, 17=sub only"> <STR>(if type 16, name; if type 17, sub)</STR> <STR(type 16)>backlog text</STR> <STR(type 16)>sub text</STR> <STR(type 16)>additional line for sub text</STR> </SCRRES>
- The first line of the block tells you the block number and the type of the block.
- A block can be type 16 (most common), in which case the block contains both a backlog element and a subtitle element.
- Alternatively, a block can be type 17 (rare), in which case the block only contains a subtitle line.
- The second line of the block is:
- if the line is type 16, the name of the character speaking; and
- if the line is type 17, subtitle text which is displayed on the screen.
The third line of the block is the backlog text for the line. This is always the full text of the line.
The fourth line of the block is the first line of the subtitle text. If the line is short and fits in the one line, this will be identical to the third line (backlog).
The fifth line of the block is the second line of the subtitle text. Where the line is long, it is broken up into two lines, and both the fourth and fifth lines are displayed on screen at once.
If the line is too long to fit in two subtitle lines, then the remainder is placed in a type 17 block which follows immediately after. From the player's perspective, the subtitle text in the type 17 block will be displayed after the first two subtitle lines from the preceding type 16 block are cleared.
<SCRRES no="26" type="16"> <STR>Taisuke</STR> <STR>Have you heard about that charm you can do using the camera?</STR> <STR>Have you heard about that</STR> <STR>charm you can do using that camera?</STR> </SCRRES>
In the above block, the full line is "Have you heard about that charm you can do using the camera?".
As this is too long to be contained in one subtitle line, it has been broken up over the following two subtitle lines.
However, note that in the subtitle lines, the text is "Have you heard about that charm you can do using that camera?" Differences like these need to be detected and evaluated.
<SCRRES no="1" type="16"> <STR>It was the start of second semester when I first noticed her taking the same train as me.</STR> <STR>It was the start of second semester</STR> </SCRRES> <SCRRES no="2" type="17"> <STR>when I noticed her taking the same train as me.</STR> </SCRRES>
Here is an example of a line which is broken across a type 16 block and a type 17 block.
Note that the word "first" is missing in the subtitle lines.
That's about it. Let me know if you run into any issues.