07th-mod / 07th-mod/umineko-question
Disappearing text after automatic lines with Experimental Script + ADV + Japanese
- 主要言語
- C#
- スター
- 98
- フォーク
- 10
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
# Problem
See video: https://1drv.ms/v/s!Ar-lAVeetlqhhMF0mMuol8wS7MkDAw?e=dQfAFK
It was reported that using Experimental Script + ADV + Japanese caused some text lines to disappear.
The example was an automatic line (one which does not end with a clickwait, followed by an effect (screen shake), followed by the actual clickwait.
```basic
advchar "16"
langjp:dwave_jp 0, kan_2e106:「…僕がお邪魔でしたら、いつでも言ってくだされば…。」@
advchar "-1"
langjp:dwave_jp 0, "voice\99\awase0005.ogg":((きゃーッ、うっそーー、僕ッコだぁあああーー!!!!))/
sl
advchar "16"
langen:dwave_eng 0, kan_2e106:^"...Please tell me at any time if I start getting in the way..."^@
advchar "-1"
langen:dwave_eng 0, "voice\99\awase0005.ogg":^((Kyaa, no waaay, he calls himself `boku'!!!!))^@/
se1 12
quakey 4,500
mov %disable_adv_clear, 1
langjp\
langen\
mov %disable_adv_clear, 0
advchar "04"
langjp:dwave_jp 0, jes_2e192:「あひィイイイイィ、じゃじゃ、邪魔なんかじゃないよ嘉音くん!!」@
advchar "-1"
langjp:dwave_jp 0, "voice\99\awase0006.ogg":(((きゃああぁッ、彼氏、クン付けだぁあああぁあぁ!!!)))/
sl
advchar "04"
langen:dwave_eng 0, jes_2e192:^"Ahiiiiiiiii, th-th-there's no way you'd get in the way, Kanon-kun!!"^@
advchar "-1"
```
After some investigation, the issue is that the `advchar` function is executed for both languages (when in this case it should only run for the language that is enabled). The only reason there are no bugs in English when using this mode, is that English lines are always after Japanese lines, so they can't have their text cleared unexpectedly as the English lines are emitted **after** the `advchar` functions intended for the Japanese lines.
While playing around, I also noticed that `textclear` only clears the text of the active language. For example, if you called `langjp`, then emitted some Japanese text, then called `langen`, then called `textclear`, it wouldn't clear the Japanese text because the previously emitted text does not match the current language.
The `advchar` function internally uses `textclear` so you could just set `langen`/`langjp` appropriately to make `advchar` to only work on the appropriate lines, but might be better to explicitly add a language check in the `advchar` function.
Note that other parts of the script don't interlace japanese and english, so don't have this issue (the intention is to deliberately have the advchar apply to both langauges).
```basic
advchar "10"
langjp:dwave_jp 0, but_2e560:「捨て台詞は敗者の特権だぜ。@:dwave_jp 0, but_2e561:好きに楽しめよ。」\
langen:dwave_eng 0, but_2e560:^"Parting remarks are a loser's privilege.^@:dwave_eng 0, but_2e561:^ Say as many as you like."^\
meta_ld r,$BEA_aseruA1,80
advchar "27"
langjp:dwave_jp 0, bea_2e1071:「……く…!@:dwave_jp 0, bea_2e1072: 妾の存在を否定し続ける以上、そなたはやがて追い詰められることになるぞ…。」\
langen:dwave_eng 0, bea_2e1071:^"...Nngg...!^@:dwave_eng 0, bea_2e1072:^ Since you continue to deny my existence, you will eventually be cornered..."^\
```
----
# Possible Fixes
## Inline advchar
The downside of this method is that the script would no longer easily merge against master because all the lines are different.
```basic
langjp:advchar "16":dwave_jp 0, kan_2e106:「…僕がお邪魔でしたら、いつでも言ってくだされば…。」@
langjp:advchar "-1":dwave_jp 0, "voice\99\awase0005.ogg":((きゃーッ、うっそーー、僕ッコだぁあああーー!!!!))/
sl
langen:advchar "16":dwave_eng 0, kan_2e106:^"...Please tell me at any time if I start getting in the way..."^@
langen:advchar "-1":dwave_eng 0, "voice\99\awase0005.ogg":^((Kyaa, no waaay, he calls himself `boku'!!!!))^@/
```
```basic
langjp:advchar "10":dwave_jp 0, but_2e560:「捨て台詞は敗者の特権だぜ。@:dwave_jp 0, but_2e561:好きに楽しめよ。」\
langen:advchar "10":dwave_eng 0, but_2e560:^"Parting remarks are a loser's privilege.^@:dwave_eng 0, but_2e561:^ Say as many as you like."^\
meta_ld r,$BEA_aseruA1,80
langjp:advchar "27":dwave_jp 0, bea_2e1071:「……く…!@:dwave_jp 0, bea_2e1072: 妾の存在を否定し続ける以上、そなたはやがて追い詰められることになるぞ…。」\
langen:advchar "27":dwave_eng 0, bea_2e1071:^"...Nngg...!^@:dwave_eng 0, bea_2e1072:^ Since you continue to deny my existence, you will eventually be cornered..."^\
````
## Prefixing `advchar` with the appropriate language
It may be possible to just make functions for each language, for example `adv_char_jp` and `adv_char_en`, and a `adv_char` which applies to both languages. But below I've just used the existing function, and prefixed it with `langen`/`langjp` as appropriate.
```basic
`langjp:advchar "16"`
langjp:dwave_jp 0, kan_2e106:「…僕がお邪魔でしたら、いつでも言ってくだされば…。」@
`langen:advchar "-1"`
langjp:dwave_jp 0, "voice\99\awase0005.ogg":((きゃーッ、うっそーー、僕ッコだぁあああーー!!!!))/
sl
langen:advchar "16"
langen:dwave_eng 0, kan_2e106:^"...Please tell me at any time if I start getting in the way..."^@
langen:advchar "-1"
langen:dwave_eng 0, "voice\99\awase0005.ogg":^((Kyaa, no waaay, he calls himself `boku'!!!!))^@/
```
````basic
langjp:advchar "10":langen:advchar "10"
langjp:dwave_jp 0, but_2e560:「捨て台詞は敗者の特権だぜ。@:dwave_jp 0, but_2e561:好きに楽しめよ。」\
langen:dwave_eng 0, but_2e560:^"Parting remarks are a loser's privilege.^@:dwave_eng 0, but_2e561:^ Say as many as you like."^\
meta_ld r,$BEA_aseruA1,80
langjp:advchar "27":langen:advchar "27"
langjp:dwave_jp 0, bea_2e1071:「……く…!@:dwave_jp 0, bea_2e1072: 妾の存在を否定し続ける以上、そなたはやがて追い詰められることになるぞ…。」\
langen:dwave_eng 0, bea_2e1071:^"...Nngg...!^@:dwave_eng 0, bea_2e1072:^ Since you continue to deny my existence, you will eventually be cornered..."^\
````
## Shuffling the order of lines so it works (make lines similar format to normal lines)
I thought this was too hard, but thinking about it it shouldn't be *that* bad. You would need to identify which lines have problems, then group all the jp and en lines together, with clickwaits separating each group.
An advantage would be you only need to modify the affected parts of the script. But those parts wouldn't maintain mergability with `master`
But I guess the difficulty is that you may miss some cases, or shuffling lines around somehow breaks something.
## Other solution which doesn't require modifying the whole script
I'm pretty sure this isn't possible, because you need to know in advance what the language of the text that is about to be displayed is, to determine whether the `advchar` function should run. But perhaps I'm overlooking something.
----
- [ ] Fix advchar not working correctly in japanese mode
- [ ] Fix `textclear` in script only applying to English and not Japanese language
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
コードベース内の advchar 関数と textclear ロジック(おそらくスクリプト処理やダイアログシステム内)を確認してください。言語切り替え(langjp/langen)がこれらの関数とどのように相互作用するかを理解します。修正には、advchar がアクティブな言語を尊重するか、言語ごとに呼び出されるようにすることが含まれます。提供されたスクリプトの例でテストし、テキストが消えなくなることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- game-dev
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100