RageLeague Posted April 21, 2021 Share Posted April 21, 2021 I was excited when I see story specific sleep dialog with smith. Depending on whether theorux and mullifee is killed or not, his sleep dialog changes. I thought there's a new event going on, but apparently the implementation is just this: function ConvoUtil.DoSleep(cxt, post_dialog, post_fn) -- ... --this is not great, but it's really late in the project, so... local extra_tags = {} if cxt.player:GetContentID() == "SMITH" then local theroux = TheGame:GetGameState():GetAgentOrMemento( "THEROUX" ) local mullifee = TheGame:GetGameState():GetAgentOrMemento( "MULLIFEE" ) if theroux then if theroux:IsAlive() then table.insert(extra_tags, "theroux_alive") elseif theroux:IsDead() then table.insert(extra_tags, "theroux_dead") end end if mullifee then if mullifee:IsAlive() then table.insert(extra_tags, "mullifee_alive") elseif mullifee:IsDead() then table.insert(extra_tags, "mullifee_dead") end end end cxt:Quip(nil, "go_to_sleep", cxt.player:GetContentID(), loc.format("day{1}", TheGame:GetGameState():GetActProgress() or 1), table.unpack(extra_tags)) -- ... end Suffice to say, it's very disappointing. Make it like a broadcastable event or something and let the main quest of day 3 listen to that event or something. Insert that event broadcaster in Encounter:LookupQuip or something. Or do something like this, which is what I did for my mod: local old_fn = Agent.FillOutQuipTags function Agent:FillOutQuipTags(tags) old_fn(self, tags) if TheGame:GetGameState() then for id, quest in TheGame:GetGameState():ActiveQuests() do if quest:GetQuestDef().fill_out_quip_tags then quest:DefFn("fill_out_quip_tags", tags, self) end end end end But instead of appending to Agent.FillOutQuipTags, insert it in Encounter:LookupQuip. I can't do that because it's not a good idea for mods to replace existing functions completely, but for the base game it is way easier to directly modify the source code. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.