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

Locked
User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

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

Post 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

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

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

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

Kirill Smirnov
Posts: 2
Joined: Mon May 21, 2018 1:30 pm

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

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

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

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

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

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

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

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

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Post by Interkarma »

Thanks for confirming null handling Nystul. :) I'm going to add that variant as soon as I can.

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

Post 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

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

Re: quest A0C00Y11 - lastAssignedPlaceSymbol for _healer_ person resource null

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

Locked