Creating a quest on a quest board

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Reddred
Posts: 7
Joined: Tue Nov 24, 2020 5:33 pm

Creating a quest on a quest board

Post by Reddred »

So I am trying to create a simple quest that starts from a quest board. What I am trying to do is have the character walk up to the board and press the action button then a list of collectible quests (all with descriptions and the ability to accept or deny them). I cannot figure out for the life of me how to get the menu and quests to show up when the button is pressed. I also don't know if quest machine has what I need to make the menu I want to be pulled.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a quest on a quest board

Post by Tony Li »

Hi,

Yes, that's right up Quest Machine's alley.

Add a Quest Giver component to your quest board, and assign your quests to it.

Configure your interaction to call the Quest Giver component's QuestGiver.StartDialogueWithPlayer. This will show the quest list in Quest Machine's default UI.

You may want to customize a UI specifically for the quest board. To do this, duplicate the Quest Dialogue UI prefab. Customize its appearance. Then assign it to the Quest Giver component's Dialogue Content > Quest Dialogue UI field. (To assign it, see page 46 of the manual.)
Reddred
Posts: 7
Joined: Tue Nov 24, 2020 5:33 pm

Re: Creating a quest on a quest board

Post by Reddred »

Wow I was expecting a long wait for a response and got one right away thank you Tony you are amazing
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a quest on a quest board

Post by Tony Li »

Glad to help!
Reddred
Posts: 7
Joined: Tue Nov 24, 2020 5:33 pm

Re: Creating a quest on a quest board

Post by Reddred »

Hello, it's me again super noob with a super noob question. I didn't want to make a new thread because it's in the same ballpark of things. As per your last reply I set up the notice board correctly, it took so long to get to this point because I have revamped my game quite a lot, the issue is when I get to the part where I am supposed to make a duplicate UI and use that one instead, as the default UI doesn't really work for a notice board whenever I attempt to click and drag the new UI component, as the manual page 46 dictates, it doesn't work. I have no idea what I am doing wrong but it has to be something because everything else worked perfectly.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a quest on a quest board

Post by Tony Li »

Hi,

Are you dragging the heading of the Unity UI Quest Dialogue UI component into the field?

Are you using any third party editor tools such as Odin? I haven't actually checked if Odin has any issue with assigning components directly to fields. But in the worst case you could temporarily set the Inspector to Debug mode, drag the component heading into the field, and then switch the Inspector back to Normal mode.

If that doesn't help, would you please post a screenshot indicating what you're trying and what's not working?
Reddred
Posts: 7
Joined: Tue Nov 24, 2020 5:33 pm

Re: Creating a quest on a quest board

Post by Reddred »

Hey I actually got it to work sorry it took so long to respond back I took a break from it for quite some time because I was starting to get extremely frustrated with it and started opening my laptop like it was a chore so I knew I needed time off. When I opened it up today I figured why not let's try it again and record it that when when it doesn't work I'll have the video of what's going on because maybe I'm just simply doing the wrong thing but it worked (I think my unity just likes to mess with me)

now that the quest dialogue actually goes where it is supposed I am having a different issue. When I push the button nothing happens the UI doesn't pop up at all the age doesn't freeze or anything its like I didn't set it up at all. Unity console does give me an error but I have no idea what it means:

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.QuestMachine.UnityUIBaseUI.SetContents (System.String displayName, UnityEngine.Sprite image, System.Collections.Generic.List`1[T] contents) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest UIs/Unity UI/Unity UI Content Templates/UnityUIBaseUI.cs:139)
PixelCrushers.QuestMachine.UnityUIBaseUI.SetContents (PixelCrushers.QuestMachine.QuestParticipantTextInfo speaker, System.Collections.Generic.List`1[T] contents) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest UIs/Unity UI/Unity UI Content Templates/UnityUIBaseUI.cs:127)
PixelCrushers.QuestMachine.UnityUIQuestDialogueUI.ShowContents (PixelCrushers.QuestMachine.QuestParticipantTextInfo speaker, System.Collections.Generic.List`1[T] contents) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest UIs/Unity UI/Unity UI Quest Dialogue
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a quest on a quest board

Post by Tony Li »

Hi,

That error is probably the reason why the dialogue UI isn't appearing.

If possible, please update to the latest version of Quest Machine if you're not already using it.

The error suggests that the quest dialogue UI isn't initializing for some reason. Is your quest board perhaps pointed to a prefab instead of a scene GameObject?
Post Reply