diff --git a/5_build_story.py b/5_build_story.py
index c70135512..efb738ca6 100644
--- a/5_build_story.py
+++ b/5_build_story.py
@@ -105,13 +105,18 @@ def GetActorByStyle(lines, style):
return actor
def FindActorByController(actors, controllerId):
+ actor = None
if controllerId in actors:
- return actors[controllerId]
+ actor = actors[controllerId]
if "dot" + controllerId in actors:
- return actors["dot" + controllerId]
+ actor = actors["dot" + controllerId]
if "Dot" + controllerId in actors:
- return actors["Dot" + controllerId]
- raise ValueError(f"Controller not found: {controllerId}")
+ actor = actors["Dot" + controllerId]
+ if actor is None:
+ raise ValueError(f"Controller not found: {controllerId}")
+ if actor == "playerId":
+ actor = PlayerUnitIds[0]
+ return actor
FuncsInCommonPack = {}
@@ -162,6 +167,7 @@ def FindActorByController(actors, controllerId):
Texts[""] = ""
Texts["Narrator"] = "(ナレーション)"
+Texts["Select"] = "(選択肢)"
def BuildText(face, talkerNameTag, text, isMind):
text = text.replace("\r\n", "
").replace("\r", "
").replace("\n", "
")
@@ -227,6 +233,13 @@ def BuildText(face, talkerNameTag, text, isMind):
for line in lines:
if line.startswith("--"):
continue
+ if "::" in line or "function" in line:
+ f_out.write(f"""
+
View script in lua -