proudust / ddlc-mas-jp-patch

DDLC MOD Monika After Story Japanese Language Submod
https://steamcommunity.com/sharedfiles/filedetails/?id=1331592265
11 stars 0 forks source link

「……退屈」選択時にクラッシュ #66

Closed proudust closed 1 year ago

proudust commented 1 year ago

Steam ガイドより引用

3月26日 15時01分 今の自分の気分の項目から、「……退屈だ」を選ぶと会話中にクラッシュします。どうすればいいですか?

proudust commented 1 year ago

おそらく script-moods / mas_mood_bored のこと。 ざっと確認した感じでは翻訳に異常はなさそう。

proudust commented 1 year ago

以下の手順で再現を確認。

  1. 「話す」から「自分の今の気分」を選択
  2. 「……退屈」を選択
  3. 「いや、モニカに退屈しているわけじゃない……」を選択
再現時の traceback.txt ``` I'm sorry, but an uncaught exception occurred. While running game code: File "game/script-ch30.rpy", line 2141, in script call File "game/event-handler.rpy", line 3119, in script call File "game/script-moods.rpy", line 647, in script File "game/script-moods.rpy", line 657, in IndexError: list index out of range -- Full Traceback ------------------------------------------------------------ Full traceback: File "game/script-ch30.rpy", line 2141, in script call File "game/event-handler.rpy", line 3119, in script call File "game/script-moods.rpy", line 647, in script File "C:\Users\Proudust\Downloads\DDLC-1.1.1-pc\renpy\ast.py", line 814, in execute renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) File "C:\Users\Proudust\Downloads\DDLC-1.1.1-pc\renpy\python.py", line 1719, in py_exec_bytecode exec bytecode in globals, locals File "game/script-moods.rpy", line 657, in File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/random.py", line 275, in choice IndexError: list index out of range Windows-8-6.2.9200 Ren'Py 6.99.12.4.2187 Monika After Story 0.12.14 ```
proudust commented 1 year ago

MAS 本体のアンロック済みゲームを取得する処理が原因。 ゲームを取得する処理で renpy.substitute を使用しているが、これはデフォルトで文字列を翻訳してしまうため、表示に影響しない内部名まで翻訳されてしまっていた。 翻訳しないフラグを追加することで解決。

-             if renpy.substitute(ev.prompt).lower() == gamename:
+             if renpy.substitute(ev.prompt, translate=False).lower() == gamename:

https://github.com/proudust/ddlc-mas-jp-patch/blob/4d30921fe293e246ce2dd596cd840150f019a8bb/Monika After Story/game/zz_games.rpy#L55