started implementation of talk window

Discuss coding questions, pull requests, and implementation details.
User avatar
Interkarma
Posts: 2123
Joined: Sun Mar 22, 2015 1:51 am

Re: started implementation of talk window

Postby Interkarma » Sat Nov 18, 2017 12:32 am

It's possible to ID the specific NPC who granted quest, which is used as part of hand-in process. This is done like so:

Code: Select all

QuestMachine.Instance.IsNPCDataEqual(person.QuestorData, lastNPCClicked.Data)


Where first variable is the quest person you want to check second variable is LastNPCClicked data from QuestMachine. Check code of QuestMachine.IsNPCDataEqual() to see how the StaticNPC data and Quest Person data are matched. It's matched using a position hash, local mapID, nameSeed, and buildingKey. A match on all these values should guarantee you're talking to any specific StaticNPC.

There's more I probably need to do around this for your needs. The Questor setup is very loose at the moment, it's something I was going to delve into more when conversations started in 0.5 - something you're pulling together much faster than expected. Due to how rough things are on my end, I don't expect good results in its current state. :)

If you go ahead with those dialogs, please let me know how you go and what troubles you run into. I'll do what I can to help when possible.
User avatar
Nystul
Posts: 889
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Postby Nystul » Mon Nov 20, 2017 2:54 pm

ok thanks! will take a look ;)
User avatar
Nystul
Posts: 889
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Postby Nystul » Tue Nov 21, 2017 9:16 am

hi interkarma,
got a question because things are not working as expected...

i did a fighters guild quest (M0B00Y15) but any non-story quest seems to behave the same
I successfully slained the mobs and the questor is thanking me for fullfilling the quest. But the questComplete flag still stays at value "false" - only questSuccess flag is "true".
What is the questComplete flag used for then?
Because how to check if quest failed then? questSuccess will be "false" until quest is finished, so will be questComplete.

What I would have expected:
quest running and not complete: questComplete = false, questSuccess = false
quest finished but failed: questComplete = true, questSuccess = false
quest finished and success: questComplete = true, questSuccess = true

can you please also shed some light on how quest completion/ending/tombstoning is intended to work?
not sure if everything is working as intended (I think I spotted some differences for story vs non-story quests some time ago)
especially I think you already planned the system for letting a quest stay active some time after it has been completed so that post quest rumors etc. can show up in conversations.

I still looking for the right point where the "final" quest destruction happens to also remove rumor/questor entries from talk window. I thought it would be Quest.EndQuest() but for the mentioned quest above it immediately fires when clicking the questor to hand in the quest...
User avatar
Interkarma
Posts: 2123
Joined: Sun Mar 22, 2015 1:51 am

Re: started implementation of talk window

Postby Interkarma » Tue Nov 21, 2017 9:49 am

IsQuestComplete is an internal property to track ending state prior to tombstone. No need to use it on your end.

Use QuestTombstoned to determine if quest execution is completed, but data is still sitting on quest machine. Once tombstone period elapses, quest data will be unloaded from quest machine. If not tombstoned then quest is still actively running.

QuestSuccess is raised when "give pc" action is called. Even "give pc nothing" will raise this flag. This indicates some kind of success condition or reward was granted as part of quest.

Keep in mind the quest system is still in progress. The primary focus of 0.4 was main quest execution. Conversation system wasn't even planned until 0.5, so some of the groundwork you might need isn't necessarily where you need it to be. Will do what I can to help when possible though. Just keep me up to date where you come unstuck and I'll get there. :)
User avatar
Nystul
Posts: 889
Joined: Mon Mar 23, 2015 8:31 am

Re: started implementation of talk window

Postby Nystul » Wed Nov 22, 2017 9:52 am

ok that works ;)

thanks :)

questor greeting messages after post quest success or failure are now working.
User avatar
Interkarma
Posts: 2123
Joined: Sun Mar 22, 2015 1:51 am

Re: started implementation of talk window

Postby Interkarma » Wed Nov 22, 2017 11:29 am

Well done! Very happy to hear you were able to work with it. Looking forward to playing with it soon. :)

Return to “Developer Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests