Quest autostarts, even doesn't meet conditions.

Announcements, support questions, and discussion for Quest Machine.
Post Reply
toficor
Posts: 13
Joined: Tue Apr 19, 2022 10:19 am

Quest autostarts, even doesn't meet conditions.

Post by toficor »

Hello it's me again :)

The problem is, as the topic said. I have quest setup like this:
questSetup.PNG
questSetup.PNG (64.71 KiB) Viewed 1366 times

When I change level (load level) for this I'm using this simply method:
code.PNG
code.PNG (10.68 KiB) Viewed 1366 times

In my opinion all thigs for autostart are setuped properly: like I have read in your previous post somewhere on this forum:
- quest is in quests database.
- quest is assigned in the quest journal.

This works properly when I'm not changing scenes but when I load and first condition is meet but second isn't, quest starts automaticly.

Something like this:

We have BrightnessPoints lower than 50.
bp.PNG
bp.PNG (38.01 KiB) Viewed 1366 times

But quest included in condition isn't even in the quest journal
journal.PNG
journal.PNG (41.74 KiB) Viewed 1366 times


And my auto quest is started.
journal.PNG
journal.PNG (41.74 KiB) Viewed 1366 times
auto.PNG
auto.PNG (28.9 KiB) Viewed 1366 times


Thanks in advance for help :)
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest autostarts, even doesn't meet conditions.

Post by Tony Li »

Hi,

Is there perhaps a condition on goBeforeTheJudge that would make it Successful when unloading the old scene prior to loading the new scene? This most often happens with kill quests and collection quests that watch for a GameObject (e.g., quest target) to be destroyed in order to increment a quest counter. GameObjects are also destroyed when unloading scenes prior during a scene change.

If that's not a likely cause, then can you send a reproduction project to tony (at) pixelcrushers.com? I'll be happy to take a look.

If you can't send a reproduction project, then we can try these steps:

1. Exit and restart Unity to start a fresh Editor.log file.

2. Tick the Quest Machine GameObject's Debug Settings > Debug checkbox.

3. In the Unity editor's play mode, reproduce the issue with as few steps as possible -- that is, don't do extra quests if possible, to keep the Editor.log as clean as we can.

4. Email me the Editor.log file.
toficor
Posts: 13
Joined: Tue Apr 19, 2022 10:19 am

Re: Quest autostarts, even doesn't meet conditions.

Post by toficor »

I have send to you Editor.log.

Succesful quest state is set by DialogueSystemTrigger -> OnConversationEnd like on the screen below.
conv.PNG
conv.PNG (47.16 KiB) Viewed 1341 times
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest autostarts, even doesn't meet conditions.

Post by Tony Li »

Hi,

Thanks for sending the Editor.log. Can you back up your project, then update Quest Machine and the Dialogue System to the latest versions, and confirm that the issue is still present? It may still be, but this way line numbers in the logs will match up with the latest versions.

Also, where is the goBeforeTheJudge quest assigned at design time? Is it something that should be in the player's Quest Journal > Quests list? Or in a quest giver's Quests list?

In the meantime, I'm looking into what might be a potential bug. I'll keep you updated on that.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest autostarts, even doesn't meet conditions.

Post by Tony Li »

I'm pretty sure this is a bug. I'll try to have a fix for you by tomorrow end of day.
toficor
Posts: 13
Joined: Tue Apr 19, 2022 10:19 am

Re: Quest autostarts, even doesn't meet conditions.

Post by toficor »

Hi, recently I've made an update for your package, and bug still occurs but I noticed something new. This bug only occur when Lua condition is met without the second one (Quest State condition), on other hand when Quest State condition is met without Lua one this bug doesn't occurs.

Best.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest autostarts, even doesn't meet conditions.

Post by Tony Li »

Hi,

Please back up your project. After you've confirmed that you have a good backup, import this patch:

QM_QuestConditionPatch_2022-08-16.unitypackage

It should fix the issue. If not, let me know.

(NOTE: Quest Machine was not saving the fact that some conditions were already set true. A small change needed to be made to the save format. This means old saved games (QM version 1.1.29 and older) cannot be read by the new format. To read old saved games, set QuestStateSerializer.version to 1.)
toficor
Posts: 13
Joined: Tue Apr 19, 2022 10:19 am

Re: Quest autostarts, even doesn't meet conditions.

Post by toficor »

It works! Thank you so much for your help :)
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest autostarts, even doesn't meet conditions.

Post by Tony Li »

Glad to help! Thanks for reporting this bug.
Post Reply