Dialogue System for Unity with plyGame

Announcements, support questions, and discussion for the Dialogue System.
davidsibya08
Posts: 57
Joined: Sun Feb 12, 2017 2:11 pm

Dialogue System for Unity with plyGame

Post by davidsibya08 »

Dear Sir Tony,

Good day! With the Menu Framework. Is it possible to save and load data integrated with plyGame? I mean, does the load and save of the Menu Framework saves and loads the whole game?

Our adviser suggested to use plyGame and he provided us plyGame. Now,I wanted to integrate plyGame and Dialogue System for Unity.

What I want to happen is:
1. Have a 3 slots for users (Load and Save which i don't know what to follow, the Menu Framework or plyGame itself)
2. BGM and SFX global effect ( something like when i edit the settings it will be applied to all scenes)
3. Player set-up (Such as HP, XP, Items and Rewards are in the plyGame while the Quest and Conversations are in the Dialogue for Unity)
4. NPC Set-Up (using plyGame with Dialogue System for Unity)
5. Mob Set-Up ( such as earning)
6. Persistence of all the stats like hp, xp, items, object, rewards, quest,etc. (Will the persistence of both asset will have no conflicts?)
7. Load and Save ( I really don't know what to follow or if I follow the plyGame tutorials, will it have no conflicts?)
8. All are in an Android Platform. :?: :?:

I already followed the Documentation process and already got the third party support of plyGame and I can see the plyGame example with Dialogue System for Unity. I think I just can't see all I want with a single example and with limited sources of tutorial. I can't get enough answers to that but I really am trying harder to succeed with it. :cry:
Even our adviser is not that knowledgeable of what I'm trying to convey. :( :(

Thank you so much sir Tony. I can only hope for your explanations and answers. Thank you.
User avatar
Tony Li
Posts: 20397
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System for Unity with plyGame

Post by Tony Li »

Hi David,

plyGame has its own menu framework, called "Screens". If you're using plyGame, I recommend that you use plyGame's Screens and save/load solution. Since your adviser recommended plyGame, he will be most familiar with it. This way, he will be able to help you better.

To tie in the Dialogue System, follow the steps under plyGame Support - Loading & Saving. (Briefly, just add a Persistable Dialogue Manager component to your Dialogue Manager GameObject.)

Then handle all of your persistence, saving, and loading through plyGame.
davidsibya08
Posts: 57
Joined: Sun Feb 12, 2017 2:11 pm

Re: Dialogue System for Unity with plyGame

Post by davidsibya08 »

Dear Sir Tony,

Thank you Sir Tony. But, it is sad to say that even our adviser is not that good in plyGame. It is still new to us so we feel a little bit lost for a moment
using the asset. We are struggling to make things work. And hoping for best that we could made some things work but at least for now we made it
work following some tutorials available on the internet.

The Load and Save of plyGame works exactly as wanted on us. Following the tutorials of the plyGame we were able to
make 3 slot that are functioning accordingly. It includes saving and loading all data.

1. The problem is when i already occupied 3 slots of the save and loading slots and then I load slot number 2, it loads perfectly fine but
the Quest and Quest state of the Dialogue System for unity is loading the latest data. And even if i restart/reset the game stat it does not
reset the data of the Quest. How should I fix that?

2. How can I reset the Quest if I am to create another slot or start a new game?

3. How to give XP and Item to the Player after completing the quest?

Thank you again and again Sir Tony
User avatar
Tony Li
Posts: 20397
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System for Unity with plyGame

Post by Tony Li »

Hi David,
davidsibya08 wrote:1. The problem is when i already occupied 3 slots of the save and loading slots and then I load slot number 2, it loads perfectly fine but
the Quest and Quest state of the Dialogue System for unity is loading the latest data. And even if i restart/reset the game stat it does not
reset the data of the Quest. How should I fix that?
Did you add a Persistable Dialogue Manager component to your Dialogue Manager?
davidsibya08 wrote:2. How can I reset the Quest if I am to create another slot or start a new game?
Use the Reset Dialogue Database plyBlock.
davidsibya08 wrote:3. How to give XP and Item to the Player after completing the quest?
If the player completes the quest inside a conversation, use the Script field to set the Dialogue System - plyGame variables. For example:
  • Dialogue Text: "Thanks! Here's a sword."
  • Script:

    Code: Select all

    ShowAlert("Gained 50 XP and a sword.");
    Actor["Player"].XP_Value = Actor["Player"].XP_Value =+ 50;
    Item["Sword"].Count = Item["Sword"].Count + 1;
davidsibya08
Posts: 57
Joined: Sun Feb 12, 2017 2:11 pm

Re: Dialogue System for Unity with plyGame

Post by davidsibya08 »

Dear Sir Tony,

Yes, I added the Persistence Dialogue Manager component to it. I'm still looking out for some options. But now, it works just fine.

Thank you very much Sir Tony! I'm still working out on some of the logical errors.
You just solved my problems.

Thank you sir. :)
User avatar
Tony Li
Posts: 20397
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System for Unity with plyGame

Post by Tony Li »

Happy to help! If you get stuck on anything else, just let me know.
davidsibya08
Posts: 57
Joined: Sun Feb 12, 2017 2:11 pm

Re: Dialogue System for Unity with plyGame

Post by davidsibya08 »

Sir Tony,

Sir what is this error? It happens when I assigned it on my Canvas Button On Click Event.
It doesn't show the Quest Log UI Window (I'm using the Generic Unity UI Quest Log Window).
But when I try to use a GUI like Necromancer Quest Log GUI it works on my button On Click Event but I wanted the Generic one
because it's much easier to understand and modify.

What should I do with that? All I wanted is to view my Quest.

Thank you Sir Tony. :)
User avatar
Tony Li
Posts: 20397
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System for Unity with plyGame

Post by Tony Li »

Hi,

Did you add the Generic Unity UI Quest Log Window to a Canvas? (BTW, the Dialogue Manager prefab in the Prefabs folder comes with a Canvas that contains a generic dialogue UI and quest log window.)

Is your button connected to the quest log window's Open method? (UnityUIQuestLogWindow.Open)
davidsibya08
Posts: 57
Joined: Sun Feb 12, 2017 2:11 pm

Re: Dialogue System for Unity with plyGame

Post by davidsibya08 »

Hello Sir Tony,

Yes sir, I am aware of the Prefab.

In the button, I already connected it with the quest log window's Open.

If you have some other options Sir, I am definitely gonna do that. :)

Additional questions Sir Tony, is it possible to add the name of the last Quest complete in the Button Slot?
Mine has a Slot Name, Date and Time only.

E.g.
'Slot 1'
May 6,2017 2:05AM
"Welcome to the Wild"
User avatar
Tony Li
Posts: 20397
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System for Unity with plyGame

Post by Tony Li »

Let's see if we can figure out what's going on. After you click the button, does the quest log window's child panel become active, and does the CanvasGroup alpha change from 0 to 1? Inspect the quest log window GameObject in the Hierarchy. Then in the Scene view press 'F' to focus on the quest log window. See if it's visible. Maybe it just got positioned offscreen.
davidsibya08 wrote:is it possible to add the name of the last Quest complete in the Button Slot?
Yes. Set the variable "CurrentStage". You can add a script to the Dialogue Manager to automatically do this:

SetCurrentStage.cs

Code: Select all

using UnityEngine;
using PixelCrushers.DialogueSystem;

public class SetCurrentStage : MonoBehaviour {

    void OnQuestStateChange(string title) {
        if (QuestLog.IsQuestDone(title)) DialogueLua.SetVariable("CurrentStage", title);
    }
}
Post Reply