Modifying Quest Journal
Modifying Quest Journal
Hey Tony,
Now that I got Quest Machine working in my game, I wanted to expand the quest journal.
I'm trying to move the quest title out of the journal's Scroll Rect, and I'd like to add a spot where I can put the name of the quest giver on the UI.
looks like the quest journal script is a wrapper, so I'm not sure how to make that happen...
Now that I got Quest Machine working in my game, I wanted to expand the quest journal.
I'm trying to move the quest title out of the journal's Scroll Rect, and I'd like to add a spot where I can put the name of the quest giver on the UI.
looks like the quest journal script is a wrapper, so I'm not sure how to make that happen...
Re: Modifying Quest Journal
Hi,
Don't let the wrapper throw you. It's just a subclass of the real class. Right-click on the real class name and select Go To Definition:
I strongly recommend making your own subclass. Don't modify UnityUIQuestJournalUI directly. Otherwise you'll lose your modifications when you update Quest Machine. (A new update with some bug fixes is pending release on the Asset Store even as I write this.)
Don't let the wrapper throw you. It's just a subclass of the real class. Right-click on the real class name and select Go To Definition:
I strongly recommend making your own subclass. Don't modify UnityUIQuestJournalUI directly. Otherwise you'll lose your modifications when you update Quest Machine. (A new update with some bug fixes is pending release on the Asset Store even as I write this.)
Re: Modifying Quest Journal
perfect! Thanks again Tony!
Re: Modifying Quest Journal
Happy to help!
Re: Modifying Quest Journal
ok, so I created a complete copy of the UnityUIQuestJournalUI, and added it to the JournalUI instead of the original, but now the journal won't open.
looks like the QuestMachineConfiguration script is looking for IQuestJournalUI (which my new method inherits from), but I can't add the new Journal UI to it. Also, FWIW, I can't add the original script there either now.
looks like the QuestMachineConfiguration script is looking for IQuestJournalUI (which my new method inherits from), but I can't add the new Journal UI to it. Also, FWIW, I can't add the original script there either now.
Re: Modifying Quest Journal
wow! learn something new every day...
Re: Modifying Quest Journal
Well, this is an obscure one. It's really just a shortcoming of the Unity editor, and a workaround for it.
Re: Modifying Quest Journal
one more question....how do I increment a counter through script?
Re: Modifying Quest Journal
Hi,
Get the quest, get its counter, and increment it:
API References:
Get the quest, get its counter, and increment it:
Code: Select all
Quest quest = QuestMachine.GetQuestInstance("peskyRabbits");
QuestCounter counter = quest.GetCounter("numCarrots");
counter.currentValue++;