07th-mod / umineko-question

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disappearing text after automatic lines with Experimental Script + ADV + Japanese

drojf opened this issue · comments

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.

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).

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.

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'!!!!))^@/
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.

`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'!!!!))^@/
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