Hi,
When you get to that point at runtime, please inspect the QuestJournal GameObject, inspect the Place3SolarPanels quest in the Quest Editor, and click on blank canvas space to view the main quest properties. Confirm that the quest counter's value is 3 and that you don't accidentally have a second quest counter with the same name.
Would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com? (That link points to the Dialogue System documentation, but the recommended steps are the same for Quest Machine.)
If not, could you send me a copy of the quest asset?
I've finished work for the night, but I'll check back first thing in the morning.
How to load a quest asset? (Properly??)
-
- Posts: 8
- Joined: Thu Oct 15, 2020 5:40 pm
Re: How to load a quest asset? (Properly??)
Thank you very much Tony for the continued excellent service.
TL;DR - Still stuck, sending you a quest now, and figuring out how to do a slimmed down project as per instructions...
Updates:
1) I verified during run-time that there is only 1 counter, and during run-time I watched it count up to 3, and fail to transition to success.
2) I started a all-new project and just imported Quest Machine. I used the Quest Editor (not the wizard) and created a simple Get 5 coins quest, that uses the same counter name and messages in the Demo. I placed it in the player's journal from the start. This WORKED as expected. Collected the 5 coins and the quest finished. This means that my unity, or pixel crusher installs are not the problem...
3) Back to my project, previously I saved out the drop rover quest as an asset (the one that does complete, but was made using quest builder and scripts). Instead of adding the quest builder hand scripted one to the journal. I used this saved asset version, and this one ALSO DOES NOT transition to success.
4) I created a brand new quest in the quest editor, but this time, all I did is start with a clean new quest. PlaceFirstRover and used your Wizard and created that simple quest in a snap. Tragically consistent, this one also does not transition to success, but otherwise works. (I Was worried that perhaps drawing the node connections was failing... so I tried the wizard.)
So it seems like sending messages and incrementing counters works no matter how I make the quests: scripts, manually, or wizard. Almost as if it is silently eating some message somewhere...
But the condition transitioning to success and setting the overall mission to successful is only working with the quest builder, hand-built scripts.
Other things that I can think of:
I am using assembly definitions, but I have QuestMachine and Pixel Crushers references in my main project.
I clicked and added 2D Physics (and TextMeshPro) after I got started using QM.
(The working hand written quest is this crude stuff:
TL;DR - Still stuck, sending you a quest now, and figuring out how to do a slimmed down project as per instructions...
Updates:
1) I verified during run-time that there is only 1 counter, and during run-time I watched it count up to 3, and fail to transition to success.
2) I started a all-new project and just imported Quest Machine. I used the Quest Editor (not the wizard) and created a simple Get 5 coins quest, that uses the same counter name and messages in the Demo. I placed it in the player's journal from the start. This WORKED as expected. Collected the 5 coins and the quest finished. This means that my unity, or pixel crusher installs are not the problem...
3) Back to my project, previously I saved out the drop rover quest as an asset (the one that does complete, but was made using quest builder and scripts). Instead of adding the quest builder hand scripted one to the journal. I used this saved asset version, and this one ALSO DOES NOT transition to success.
4) I created a brand new quest in the quest editor, but this time, all I did is start with a clean new quest. PlaceFirstRover and used your Wizard and created that simple quest in a snap. Tragically consistent, this one also does not transition to success, but otherwise works. (I Was worried that perhaps drawing the node connections was failing... so I tried the wizard.)
So it seems like sending messages and incrementing counters works no matter how I make the quests: scripts, manually, or wizard. Almost as if it is silently eating some message somewhere...
But the condition transitioning to success and setting the overall mission to successful is only working with the quest builder, hand-built scripts.
Other things that I can think of:
I am using assembly definitions, but I have QuestMachine and Pixel Crushers references in my main project.
I clicked and added 2D Physics (and TextMeshPro) after I got started using QM.
(The working hand written quest is this crude stuff:
Code: Select all
var questBuilder = new QuestBuilder("Drop3Rovers", "Drop3Rovers", "Place Rovers");
questBuilder.quest.isTrackable = true;
questBuilder.quest.showInTrackHUD = true;
questBuilder.AddContents(questBuilder.quest.GetStateInfo(QuestState.Active).GetContentList(QuestContentCategory.Dialogue), questBuilder.CreateTitleContent());
questBuilder.AddContents(questBuilder.quest.GetStateInfo(QuestState.Active).GetContentList(QuestContentCategory.Journal), questBuilder.CreateTitleContent());
StringField sf = new StringField("RoversPlaced");
var qc = questBuilder.AddCounter(sf, 0, 0, 3, false, QuestCounterUpdateMode.Messages);
var qcme = new QuestCounterMessageEvent(null, new StringField("Place"), new StringField("Rover"), QuestCounterMessageEvent.Operation.ModifyByLiteralValue, 1);
qc.messageEventList.Add(qcme);
var conditionNode = questBuilder.AddConditionNode(questBuilder.GetStartNode(), "Condition", "Place Rovers",
ConditionCountMode.All);
questBuilder.AddCounterCondition(conditionNode, sf, CounterValueConditionMode.AtLeast, 3);
questBuilder.AddContents(questBuilder.quest.GetStateInfo(QuestState.Active).GetContentList(QuestContentCategory.HUD), questBuilder.CreateTitleContent());
questBuilder.AddContents(conditionNode.GetStateInfo(QuestNodeState.Active).GetContentList(QuestContentCategory.HUD), questBuilder.CreateBodyContent("{#RoversPlaced} / {>#RoversPlaced} Rovers Placed"));
questBuilder.AddContents(conditionNode.GetStateInfo(QuestNodeState.Active).GetContentList(QuestContentCategory.Journal), questBuilder.CreateBodyContent("{#RoversPlaced} / {>#RoversPlaced} Rovers Placed"));
questBuilder.AddContents(questBuilder.quest.GetStateInfo(QuestState.Successful).GetContentList(QuestContentCategory.Journal), questBuilder.CreateTitleContent());
questBuilder.AddSuccessNode(conditionNode);
var quest = questBuilder.ToQuest();
quest.SetState(QuestState.Active);
var questGiver = questManager.GetComponent<QuestGiver>();
questGiver.AddQuest(quest);
Re: How to load a quest asset? (Properly??)
Hi Erik,
Thanks for sending the email. I replied to it.
Thanks for sending the email. I replied to it.
-
- Posts: 8
- Joined: Thu Oct 15, 2020 5:40 pm
Re: How to load a quest asset? (Properly??)
For thread closure...
TONY is awesome.
Seriously, great, great customer service!
Warmest cheers,
-Erik
TONY is awesome.
Seriously, great, great customer service!
Warmest cheers,
-Erik
Re: How to load a quest asset? (Properly??)
(To briefly recap the issue for future readers: The quest asset's Is Instance checkbox was ticked, and the quest asset's main state and node states weren't at the initial values. Unticking Is Instance, setting the quest state to WaitingToStart, and setting the node states to Inactive got it working.)