07th-mod / 07th-mod/higurashi-assembly

Auto Mode gets stuck on blank line

オープン
#121 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
C#
スター
12
フォーク
12
PR マージ指標
30日以内にマージされた PR はありません

説明

## Problem

It was reported on discord

> When the second line from this screenshot plays, voice and text are not in sync: first the voice plays over an empty textbox, and then the text appears when she already stops talking.

I had a look, and this is the offending code.

```c
// だから一連の事件も、犯人は誰かってことよりも、事件の存在自体が、古い因習がまだ根深く残ってることの証拠だって思って面白がってるくらい...。@
ModPlayVoiceLS(4, 9, "ps3/s19/09/500900070", 256, TRUE);
if (GetGlobalFlag(GADVMode)) { OutputLine("鷹野", NULL, "Takano", NULL, Line_ContinueAfterTyping); }
if (GetGlobalFlag(GADVMode)) { OutputLine(NULL, "", NULL, "", Line_Continue); }
OutputLine(NULL, " だから一連の事件も、犯人は誰かってことよりも、事件の存在自体が、古い因習がまだ根深く残ってることの証拠だって思って面白がってるくらい…。」",
NULL, "So even for this string of incidents, it's not so much finding out who the culprit is, but enjoying thinking about how the old traditions displayed by the incidents themselves still seems to have some pretty deep roots around here...\"", GetGlobalFlag(GLinemodeSp));
if (GetGlobalFlag(GADVMode)) { ClearMessage(); } else { OutputLineAll(NULL, "\n\n", Line_ContinueAfterTyping); }
```

The line causing the issue is `if (GetGlobalFlag(GADVMode)) { OutputLine(NULL, "", NULL, "", Line_Continue); }` immediately following the `ModPlayVoiceLS(...)` command.

I guess auto mode assumes that the voice is associated with the immediate next line. This line is blank (ignoring the size tag), so it holds the blank line on screen until the voice ends. Once the voice ends, it shows the "correct" line, but at that point the voice has already stopped playing.

More instances: https://github.com/07th-mod/watanagashi/commit/d66fa0bd83d6dbd35e5daea3827af1a5b0c80bd2

## Fix

While I could try to move the `` command back in the script, fixing it in the engine would fix all instances of this bug across all chapters.

I think skipping "empty" lines in auto mode will fix it. However I need to figure out how the engine parses tags, so that it can ignore the tags on the line (maybe it's easy, I've just never looked at that part of the code before).

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

この問題は、ビジュアルノベルエンジンの自動モードロジックにあります。バグは、音声行の後にサイズタグ付きの空白のテキスト行が続く場合に発生します。エンジンが行とタグをどのように解析するか、特に自動モードのタイミングと音声同期の周辺を調べてください。修正には、タグ解析後に実質的に空になる行を無視するように、自動モードの行スキップロジックを変更することが必要でしょう。まず、自動モードの進行と音声再生を処理するコードを見つけることから始めてください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
game-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。