Page 1 of 1

Not always possible to ask commoners about work (0.10.12) [RESOLVED 0.11.4]

Posted: Tue Nov 26, 2019 4:25 am
by pango
It is not always possible to ask commoners about work, sometimes the prepared question text does not show up, and clicking OKAY button either does nothing, or an empty question is output into the conversation.
I guess it happens when no work is available, but still it should be possible to ask around as usual.
asking for work.jpg
asking for work.jpg (261.7 KiB) Viewed 1780 times
I just noticed exceptions in the log:

Code: Select all

KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.Int32,DaggerfallWorkshop.Game.TalkManager+NpcWorkEntry].get_Item (Int32 key) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.GetQuestorGender () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.GetMacroDataSource () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.Name (IMacroContextProvider mcp) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.GetValue (System.String symbolStr, IMacroContextProvider mcp, IMacroContextProvider mcp2) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.ExpandMacros (.Token[]& tokens, IMacroContextProvider mcp) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.ExpandRandomTextRecord (Int32 recordIndex) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.GetPCGreetingText (TalkTone talkTone) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.GetPCGreetingOrFollowUpText () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.GreetingOrFollowUpText (IMacroContextProvider mcp) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.GetValue (System.String symbolStr, IMacroContextProvider mcp, IMacroContextProvider mcp2) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.ExpandMacros (.Token[]& tokens, IMacroContextProvider mcp) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.ExpandRandomTextRecord (Int32 recordIndex) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.GetQuestionText (DaggerfallWorkshop.Game.ListItem listItem, TalkTone talkTone) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.DaggerfallTalkWindow.SetTalkCategoryWork () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.DaggerfallTalkWindow.ButtonCategoryWork_OnMouseClick (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent sender, Vector2 position) [0x00000] in <filename unknown>:0 
  at (wrapper delegate-invoke) DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent/OnMouseClickHandler:invoke_void__this___BaseScreenComponent_Vector2 (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent,UnityEngine.Vector2)
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.MouseClick (Vector2 clickPosition) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Button.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.UserInterfaceWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPopupWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.DaggerfallTalkWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.Update () [0x00000] in <filename unknown>:0 
 

KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.Int32,DaggerfallWorkshop.Game.TalkManager+NpcWorkEntry].get_Item (Int32 key) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.GetQuestorGender () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.GetMacroDataSource () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.PotentialQuestorLocation (IMacroContextProvider mcp) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.GetValue (System.String symbolStr, IMacroContextProvider mcp, IMacroContextProvider mcp2) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Utility.MacroHelper.ExpandMacros (.Token[]& tokens, IMacroContextProvider mcp) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.ExpandRandomTextRecord (Int32 recordIndex) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.TalkManager.GetAnswerText (DaggerfallWorkshop.Game.ListItem listItem) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.DaggerfallTalkWindow.ButtonOkay_OnMouseClick (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent sender, Vector2 position) [0x00000] in <filename unknown>:0 
  at (wrapper delegate-invoke) DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent/OnMouseClickHandler:invoke_void__this___BaseScreenComponent_Vector2 (DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent,UnityEngine.Vector2)
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.MouseClick (Vector2 clickPosition) [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.BaseScreenComponent.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Button.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.Panel.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.UserInterfaceWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallBaseWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterfaceWindows.DaggerfallPopupWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.UserInterface.DaggerfallTalkWindow.Update () [0x00000] in <filename unknown>:0 
  at DaggerfallWorkshop.Game.DaggerfallUI.Update () [0x00000] in <filename unknown>:0 

Re: Not always possible to ask commoners about work (0.10.12)

Posted: Tue Nov 26, 2019 4:39 am
by Interkarma
Thanks Pango. There weren't many changes merged for 0.10.12, so if confirmed as a regression then it shouldn't be hard to isolate the PR causing the problem. Moving to bug reports.

Re: Not always possible to ask commoners about work (0.10.12)

Posted: Tue Nov 26, 2019 7:08 am
by pango
It may very well have gone unnoticed or unreported for a while, given it's mostly cosmetic.
In fact I wonder if I didn't saw it happen in a stream before...

Re: Not always possible to ask commoners about work (0.10.12)

Posted: Sun May 09, 2021 10:33 pm
by Interkarma
Have resolved this one now. Exception was raised when trying for a questor gender against an empty quest list. Added a check for this and now it displays the "no work" messages as intended.

https://github.com/Interkarma/daggerfal ... 262b64fa07