From: Ross C. <rc...@gm...> - 2009-11-29 04:24:30
|
I was playing the svn version of the game today and had a crash when talking to Bender. The trace showed a syntax error in the dialog file and with some grepping I manually uncovered what look like a couple of others (though they aren't in the Lua chunks so maybe the grammar is flexible). I was thinking that it might be reasonable to write a tool to statically check if these files are valid (including that the Lua code is syntactically vaild). Is there a need for that? -Ross Index: Bender.dialog =================================================================== --- Bender.dialog (revision 2110) +++ Bender.dialog (working copy) @@ -43,7 +43,7 @@ hide(9) show(12) end else - if (has_cookie("tux_has_joined_guard" and (not has_cookie("bender_congrats"))) then + if (has_cookie("tux_has_joined_guard") and (not has_cookie("bender_congrats"))) then npc_says(_"Congratulations on getting into the Red Guard! I voted for you and that was what got you in! I said we'd be buddies, didn't I? Want to stand guard at the gate with me? It gets boring with just that 614 to talk to. I could tell you all the secrets of the Red Guard.") add_cookie("bender_congrats") show(14) Index: Dixon.dialog =================================================================== --- Dixon.dialog (revision 2110) +++ Dixon.dialog (working copy) @@ -27,7 +27,7 @@ END OF AUTORS NOTES -Beginning of new chat dialog for character="XXXXX") +Beginning of new chat dialog for character="XXXXX" EveryTime LuaCode={ if (not has_cookie("met_dixon")) then Index: TutorialTom.dialog =================================================================== --- TutorialTom.dialog (revision 2110) +++ TutorialTom.dialog (working copy) @@ -275,7 +275,7 @@ } ---------------------------------------------------------------------- -Nr=22 Text=_"Tell me about health drinks.") +Nr=22 Text=_"Tell me about health drinks." LuaCode={ npc_says(_"Man has practiced medicine in one form or another for hundreds of years.") npc_says(_"Using some of the same nanotechnology that makes up your armor, we've perfected drinks that instantaneously restore your health.") @@ -389,7 +389,7 @@ } ---------------------------------------------------------------------- -Nr=29 Text=_"I'm ready to move on.") +Nr=29 Text=_"I'm ready to move on." LuaCode={ if (has_cookie("has_gun")) then npc_says(_"I'll bet you're itching to try that pistol out on some bots.") Index: Melfis.dialog =================================================================== --- Melfis.dialog (revision 2110) +++ Melfis.dialog (working copy) @@ -71,7 +71,7 @@ } ---------------------------------------------------------------------- -Nr=99 Text=_"I need to go now.") +Nr=99 Text=_"I need to go now." LuaCode={ npc_says(_" . . .") end_dialog() |