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

Locked
User avatar
pango
Posts: 3048
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

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

Post 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 1705 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 
Attachments
SAVE460.zip
(334.92 KiB) Downloaded 103 times
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 6522
Joined: Sun Mar 22, 2015 1:51 am

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

Post 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.

User avatar
pango
Posts: 3048
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

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

Post 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...
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 6522
Joined: Sun Mar 22, 2015 1:51 am

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

Post 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

Locked