Page 1 of 1

quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null [RESOLVED]

Posted: Mon May 21, 2018 4:43 pm
by Nystul
git user KirillSmirnov pointed out a bug with quest A0C00Y11:

pc is sent to remote town to find healer - when there healer can not be asked about in dialog - reason is that function Person.GetAssignedPlaceSymbol() returns null and thus talkmanager can not do the test if person is in same location as pc

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Posted: Mon May 21, 2018 6:30 pm
by Interkarma
I won't be near a pc for a few hours. It's expected and rational for Person.GetAssignedPlaceSymbol() to return null if the resource hasn't actually been assigned anywhere yet using "place npc". This possibility should always be accounted for when calling the method. Null is equally as valid a potential return value as any other (i.e. never assume NPC will be placed yet by script).

Have a look at script to see when "place npc" is being invoked.

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Posted: Mon May 21, 2018 9:21 pm
by Kirill Smirnov
I believe lastAssignedPlaceSymbol cannot be null since the _healer_ has been placed into house and I can interact with him (after I found him, of course). And the quest debugger properly detects __healer_ and invites me there.

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Posted: Mon May 21, 2018 10:00 pm
by Interkarma
If we're talking about A0C00Y11 - this quest never once uses "place npc" to assign any Person to any Place resource. This is why GetAssignedPlaceSymbol() returns null. You should still catch the null in talk manager however, as quests can call "place npc" at any time, not just at startup.

In this case I also need to add some more back-end support. The quest is using a variant of "create npc" that is not currently handled by DFU. I'll look at adding this soon.

Keep this quest out of circulation for now and I'll loop in and add some back-end help when I can to get this one working. :)

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Posted: Mon May 21, 2018 10:13 pm
by Nystul
Interkarma wrote: Mon May 21, 2018 10:00 pm The quest is using a variant of "create npc" that is not currently handled by DFU. I'll look at adding this soon.
yeah I think this is the issue. When looking at the quest code I was confused because I could not find any npc placement.

talkmanager will handle null in the way that it just won't show the npc name in the list - which is imho the desired behavior (don't allow to ask about persons that are not placed yet)

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Posted: Mon May 21, 2018 10:34 pm
by Interkarma
Thanks for confirming null handling Nystul. :) I'm going to add that variant as soon as I can.

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Posted: Tue May 22, 2018 12:39 am
by Jay_H
Just as a bit of history, when I went through the DF classic quests, I didn't touch commoner or noble ones, so you may be going through wild territory here. I didn't even know they were active :D

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Posted: Tue May 22, 2018 3:13 am
by Interkarma
It's definitely wild territory Jay. I was happy with just enough support for main quest and now the lid has been blown off and almost everything is up for play. I didn't think we'd be up to this point for around another 12 months, but all these awesome contributors just keep pushing things forwards.

I'm personally very happy with how well the DFU quest system stands up to running these quests at this time. I expected it to collapse into a heap but overall it's just bugs to fix and more action/condition support needed. The overall framework is handling things very well considering I never intended it to be so open at this stage.