Update quest log after acquired quest item
Update quest log after acquired quest item
Hello,
I have a quest that npc asking for something from the store. And my items are scriptable objects that only load in inventory or the shop. I figured out how to let get the item count in the conversation with custom Lua codes. But the quest log is not updating after I acquired quest item in the inventory. Is there a way let the system check the quest item in the inventory?
Thank you
I have a quest that npc asking for something from the store. And my items are scriptable objects that only load in inventory or the shop. I figured out how to let get the item count in the conversation with custom Lua codes. But the quest log is not updating after I acquired quest item in the inventory. Is there a way let the system check the quest item in the inventory?
Thank you
Re: Update quest log after acquired quest item
Hi,
After acquiring the item, call DialogueManager.SendUpdateTracker(). This will send an UpdateTracker() message to the relevant quest UIs (quest tracker HUD and quest log window).
After acquiring the item, call DialogueManager.SendUpdateTracker(). This will send an UpdateTracker() message to the relevant quest UIs (quest tracker HUD and quest log window).
Re: Update quest log after acquired quest item
Sorry, could you please be more specific, where do I call this method from?
Re: Update quest log after acquired quest item
You mentioned Lua, so I assume your quest description or a quest entry has some text like:
and you've registered your own inventory function GetItemCount(). If so, then when the player acquires or loses an item, call this in the same code that updates your inventory:
Code: Select all
[lua(GetItemCount("apple"))] / 3 Apples Picked
Code: Select all
PixelCrushers.DialogueSystem.DialogueManager.SendUpdateTracker();
Re: Update quest log after acquired quest item
Thank you its working now!
Re: Update quest log after acquired quest item
Glad to help!
Re: Update quest log after acquired quest item
Hello,
I have a new question. So there is a save system comes with the dialogue system can I use it as save and load system for game?
Does it save inventory and player and NPC stats etc? If so how do I make it save inventory or how to tell the system to save the data that needed to be saved?
Thank you
I have a new question. So there is a save system comes with the dialogue system can I use it as save and load system for game?
Does it save inventory and player and NPC stats etc? If so how do I make it save inventory or how to tell the system to save the data that needed to be saved?
Thank you
Re: Update quest log after acquired quest item
Hi,
It's a general purpose save system. See here for more info: Save System
It works by using "saver" components such as PositionSaver to save a GameObject's position, AnimatorSaver to save an animator state, ActiveSaver to save a GameObject's active/inactive state, etc.
You can also write your own savers: How To: Write Custom Savers
Many of the integrations also come with saver components, such as components to save Inventory Engine inventories, UIS inventories, etc.
It's a general purpose save system. See here for more info: Save System
It works by using "saver" components such as PositionSaver to save a GameObject's position, AnimatorSaver to save an animator state, ActiveSaver to save a GameObject's active/inactive state, etc.
You can also write your own savers: How To: Write Custom Savers
Many of the integrations also come with saver components, such as components to save Inventory Engine inventories, UIS inventories, etc.
Re: Update quest log after acquired quest item
So I have a main menu and I created a load panel with slots, and I attached Save System Methods to the slot button. And on Click I drag the save system methods component in and select SaveSystemMehtods.LoadFromSlot. set the slot index to 0. Then I created a save panel in main game, then attached the SaveSystemMehtods.SaveSlot, set the index to 0. However when I start the game, made some changes then save the game, and went back to the main menu to click on that load slot button. Nothing is happening. Do you know where am I doing wrong?
Thank you.
Thank you.
Re: Update quest log after acquired quest item
Hi,
That sounds correct so far. Make sure that in the Button's OnClick() UnityEvent you've assigned the SaveSystemMethods component that you've added to the button, not the SaveSystemMethods.cs script.
Are there any errors or warnings in the Console window?
BTW, there's also a free Menu Framework addon available on the Dialogue System Extras page.
That sounds correct so far. Make sure that in the Button's OnClick() UnityEvent you've assigned the SaveSystemMethods component that you've added to the button, not the SaveSystemMethods.cs script.
Are there any errors or warnings in the Console window?
BTW, there's also a free Menu Framework addon available on the Dialogue System Extras page.