Good news! To provide faster support and grow the community, we'll be changing the forum to "Read Only" and turn to Discord instead for support.
Join here: https://discord.gg/zjNj5zZ

New feature suggestions

caldor
Posts: 9
Joined: Sun Apr 23, 2017 7:13 pm

New feature suggestions

Postby caldor » Mon Jul 31, 2017 12:49 am

I have been using Inventory Pro and Quest System Pro some more now, and its really beginning to get integrated into my game. Quests get updated during the game and dialogues have been added to several characters.

But sure is a lot of things that seems natural to do with this that requires custom nodes, custom rewards and other custom scripts.

Dialogues have variables, but I am not sure what to really use them for? Is it because they are not fully implemented yet?

One feature I was hoping for, was more dialogue edge conditions, the dialogue variables would be nice for this. "If this bool is true, then use this node" f.ex.

But that would be much more helpful if dialogues, and maybe quest rewards had more generic actions or effects that could be added to them. To make it as useful as possible what I would like is that there could be something similar to Unity's new UI system, where you get the choice to drag in a game object into the UI, like you can with UI buttons, and then the "on click" would use a certain method of a certain script on this game object, or just a method on the game object itself.

That does require some generic reflection type of code, and I figured this would be a problem to find the code needed... especially since we do not have access to the source code of Unity UI buttons. So I tried to dig up what seemed the most useful, and I found this:

http://answers.unity3d.com/questions/44 ... ethod.html

That should be the most advanced part needed for this. I have used reflection a bit before and like for things to be as generic as possible... at least to the extend that it makes sense. For now I obviously need some custom nodes and such, but if I figure out a way to do this, I will add it here so it might get added in one of the updates if I find a way to do this before you do.

Oh yeah, and another, probably a bit simpler feature, I am hoping for would be for the Inventory Pro integration. Right now in a dialogue or as a quest reward you can have the NPC give items to the player... but it would be nice if the NPC could also ask the player for an item. Right now you can do all of this by making it a quest and a task and such, but it just seems to be going the long way around for something you might not even want to make a quest or a task for. Just like if you could use those dialogue variables in dialogues as conditions and change them in the dialogue, it would really make it easier to make more dynamic dialogues that adapts to previous dialogues.

User avatar
kasper.olesen
Posts: 1
Joined: Sun Apr 23, 2017 7:11 pm

Re: New feature suggestions

Postby kasper.olesen » Mon Jul 31, 2017 5:09 am

As I am making a custom node, I notice they do not inherit from MonoBehaviour, which I guess makes it a lot more complicated to add the feature I am requesting, being able to make a list of public methods and scripts on a game object that is dropped on it.

Edit: Well I found you can still just use the "using Unity" lines... but the a dialogue is like a prefab and therefore cannot link to objects within the scene... so that complicates things. One way I can think of going around this, would be to prepare the Dialogue owner script for it somehow... but its a strange way of going between a static script and a dynamic script. But maybe the dialogue could be prepared for working with two arrays or something in the dialogue owner script. Should be possible, maybe I could make an attempt at this.

ramonmolossi
Posts: 7
Joined: Sat Sep 24, 2016 11:57 pm

Re: New feature suggestions

Postby ramonmolossi » Sat Aug 12, 2017 8:40 pm

I think variables are not implement yet.
It show be a variable replacement on texts, somthing like that:

"Hi, [player]", where player is a String variable.

But I don´t know if it is the intention.

About your feature request, i think QuestSystemPro does a really good job being extensible. But you are right, with just a bit of love it can stay awesome.

You can do a lot with action nodes instead of edge constraints. You should try that.

nathanj
Posts: 223
Joined: Sun Sep 25, 2016 5:38 am

Re: New feature suggestions

Postby nathanj » Sun Aug 13, 2017 11:07 pm

Oh yeah, and another, probably a bit simpler feature, I am hoping for would be for the Inventory Pro integration. Right now in a dialogue or as a quest reward you can have the NPC give items to the player... but it would be nice if the NPC could also ask the player for an item. Right now you can do all of this by making it a quest and a task and such, but it just seems to be going the long way around for something you might not even want to make a quest or a task for. Just like if you could use those dialogue variables in dialogues as conditions and change them in the dialogue, it would really make it easier to make more dynamic dialogues that adapts to previous dialogues.


I meant to post this a while ago but forgot, apologies. I was able to modify the GiveItemNode script enough to remove an item from the player's inventory.The only changes were adding:

Code: Select all

 protected RemoveItemNode()
            : base()
        {

        }


and replacing:

Code: Select all

foreach (var item in inventoryItems)
                {
                    var i = UnityEngine.Object.Instantiate<InventoryItemBase>(item.item);
                    i.currentStackSize = item.amount;
                    InventoryManager.AddItem(i);
                }


with:

Code: Select all

foreach (var item in inventoryItems)
                {
                    var i = UnityEngine.Object.Instantiate<InventoryItemBase>(item.item);
                    i.currentStackSize = item.amount;
                    InventoryManager.RemoveItem(i.ID, i.currentStackSize, false);
                }


It works but it's not exactly pretty.


Code: Select all

#if INVENTORY_PRO

using Devdog.General;
using Devdog.General.ThirdParty.UniLinq;
using Devdog.InventoryPro;
using Devdog.QuestSystemPro.Dialogue;

namespace Devdog.QuestSystemPro.Integration.InventoryPro
{
    [System.Serializable]
    [Category("Devdog/Inventory Pro")]
    public class RemoveItemNode : ActionNodeBase
    {
        /// <summary>
        /// The items the player receives when this node is executed.
        /// </summary>
        [ShowInNode]
        [HideGroup]
        public ItemAmountRow[] items;

        protected RemoveItemNode()
            : base()
        {

        }

        protected ItemAmountRow[] GetRows()
        {
            return items.Select(o => new ItemAmountRow(o.item, o.amount)).ToArray();
        }

        public override void OnExecute(IDialogueOwner dialogueOwner)
        {
            var inventoryItems = GetRows();
           
            if (InventoryManager.CanAddItems(inventoryItems))
            {
                foreach (var item in inventoryItems)
                {
                    var i = UnityEngine.Object.Instantiate<InventoryItemBase>(item.item);
                    i.currentStackSize = item.amount;
                    InventoryManager.RemoveItem(i.ID, i.currentStackSize, false);
                }

                Finish(true);
                return;
            }

            Failed(QuestManager.instance.languageDatabase.inventoryIsFull); //
        }
    }
}

#endif

nathanj
Posts: 223
Joined: Sun Sep 25, 2016 5:38 am

Re: New feature suggestions

Postby nathanj » Sun Aug 13, 2017 11:11 pm

With that said, I think a slightly larger bank of Action Nodes would be a great resource to have. I know Joris want's to keep the stock nodes to the core, which I can appreciate, but having a "vault" of other options would be a great help for everyone, I'm sure.

User avatar
jjahuijbregts
Site Admin
Posts: 2091
Joined: Wed Apr 22, 2015 7:25 pm
Contact:

Re: New feature suggestions

Postby jjahuijbregts » Thu Aug 17, 2017 1:39 pm

ramonmolossi wrote:I think variables are not implement yet.
It show be a variable replacement on texts, somthing like that:

"Hi, [player]", where player is a String variable.

But I don´t know if it is the intention.

About your feature request, i think QuestSystemPro does a really good job being extensible. But you are right, with just a bit of love it can stay awesome.

You can do a lot with action nodes instead of edge constraints. You should try that.


Variables can be displayed in dialogue text using the variable name between curly braces. For example, if you have a variable named PlayerName you can display it like "Hey {PlayerName}, how are you?". Even non-string values can be used, these will be converted using ToString().

User avatar
jjahuijbregts
Site Admin
Posts: 2091
Joined: Wed Apr 22, 2015 7:25 pm
Contact:

Re: New feature suggestions

Postby jjahuijbregts » Thu Aug 17, 2017 2:26 pm

nathanj wrote:With that said, I think a slightly larger bank of Action Nodes would be a great resource to have. I know Joris want's to keep the stock nodes to the core, which I can appreciate, but having a "vault" of other options would be a great help for everyone, I'm sure.


So long the actions and edge conditions are universally usable and not tied to a specific solution or game project / concept. Do you have any proposals for additional edge conditions or nodes?

nathanj
Posts: 223
Joined: Sun Sep 25, 2016 5:38 am

Re: New feature suggestions

Postby nathanj » Sun Aug 20, 2017 11:41 pm

Welcome back, Joris

My initial comment about the Vault idea was based off of @romonmollosi's comment "You can do a lot with action nodes instead of edge constraints. You should try that." I was kind of curious to see how others approach dialogue editing with QSP - I'm pretty sure that my methods are pretty pedestrian in that i rely primarily on PlayerDecisionNode and ChangeQuestStatusNode with edge conditions controlling the progress. It works great but I'm curious about other techniques for making my system more dynamic.

With that said:

Inventory Pro:
1. A single node to add or remove an item would be great.
2. Add or remove a player stat node.

Camera:
Is there any way to have the main camera zoom into the position of the dialogue camera's position? I know that this is not how the system is designed but I'm wondering if there's a way to achieve this.

General:
(We've discussed this on the Bitbucket site, so apologies for the redundancy) The ability to embed other nodes in a Container Node would greatly help in organizing the dialogue window. Double clicking on the container node would open that window.

Also, the Go To Node only works if I add a general Nodeafter it. Is it possible to edit the script so this isn't necessary? (Again, this was posted on Bitbucket, but I figured I just add everything to one post in the interest of brevity.

Anyways, just ideas. Good to have you back!

Nathan

User avatar
jjahuijbregts
Site Admin
Posts: 2091
Joined: Wed Apr 22, 2015 7:25 pm
Contact:

Re: New feature suggestions

Postby jjahuijbregts » Wed Aug 23, 2017 9:30 pm

nathanj wrote:Welcome back, Joris

My initial comment about the Vault idea was based off of @romonmollosi's comment "You can do a lot with action nodes instead of edge constraints. You should try that." I was kind of curious to see how others approach dialogue editing with QSP - I'm pretty sure that my methods are pretty pedestrian in that i rely primarily on PlayerDecisionNode and ChangeQuestStatusNode with edge conditions controlling the progress. It works great but I'm curious about other techniques for making my system more dynamic.

With that said:

Inventory Pro:
1. A single node to add or remove an item would be great.
2. Add or remove a player stat node.

Camera:
Is there any way to have the main camera zoom into the position of the dialogue camera's position? I know that this is not how the system is designed but I'm wondering if there's a way to achieve this.

General:
(We've discussed this on the Bitbucket site, so apologies for the redundancy) The ability to embed other nodes in a Container Node would greatly help in organizing the dialogue window. Double clicking on the container node would open that window.

Also, the Go To Node only works if I add a general Nodeafter it. Is it possible to edit the script so this isn't necessary? (Again, this was posted on Bitbucket, but I figured I just add everything to one post in the interest of brevity.

Anyways, just ideas. Good to have you back!

Nathan



I've added the following 2 nodes, which I think will be very useful for many people, and I'm looking into some other nodes as well for more camera control, extra inventory pro actions and editor improvements (grouping of nodes).

The SetVariable node allows you to set any variable that you created in this blueprint:
Image

Then, you can use the IfVariable edge condition:
Image

You can use the Equals, NotEquals, GreaterThan and LessThan operators to validate the values.

Note that you can also put the variable name between { curly braces } and it will be shown in the text. For example using {UserInput} will display the contents of the variable at that place in the node text. This only works for node text for now (Already possible in current version on the asset store, I just think most people are unaware of this feature).

nathanj
Posts: 223
Joined: Sun Sep 25, 2016 5:38 am

Re: New feature suggestions

Postby nathanj » Wed Aug 23, 2017 9:56 pm

This looks great! A much better implementation than I had suggested :) Can the Node handle positive and negative values?

Looking forward to the update!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest