Dialogue Generation
A mix of code and natural language for grounded dialogue generation
Portions of the dialogue tree are transformed into a Lua script, enabling grounded dialogue generation via masked infilling.
HOLD TO PLAY ANIMATION
1dialogueOptions = {}
2if CheckPassiveSkill("suggestion") then
3 return {
4 speaker = "suggestion",
5 speech = "C'mon. Just a little. You're buddies.",
6 whenSpoken = function()
7 -- absolutely. you can chat, oi
8 SetVariableValue("seafort.deserter_sugg_you_are_buddies", true)
9 end,
10 }
11end
12...
13if Variable["seafort.deserter_i_am_also_communist"] then
14 -- you keep saying it
15 table.insert(dialogueOptions, <MASK>"You can tell a comrade. It won't be *that* usable." )16elseif Variable["seafort.deserter_sugg_you_are_buddies"] then
17 table.insert(dialogueOptions, "You can tell me, here. It won't be *that* usable.")
18end
19...
20return dialogueOptions
21<MASK> = "You know I'm a bit of a communist myself. You can trust me."