Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Official support thread for the Unity Dialogue Engine Advanced

Discussion in 'Assets and Asset Store' started by MrDude, Aug 4, 2013.

  1. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi all

    After the great success during the Summer Sale, a great many new people have joined the UDEA flock and with that many new people on board I'm sure there is bound to be a few teething problems so I figured I would post a one stop location to find answers to your questions.

    Right to start off with, one of you posed a question that I myself am a bit confused with. As you know, if you install my kit, the NGUI scene works off the bat but one person is having a bunch of errors in the NGUI scripts. Why the NGUI code will work in one project but not the other is a mystery to me.

    Here's an example:
    As you can see, now suddenly the UITiledSprite.cs script is suddenly no longer working... I am guessing the problem is that the files are placed in folders where they simply can't see each other and that is what is causing the problem. Since I've not had this issue come up before I think it's solution might take a while to find but we'll get this sorted eventually.

    I'm just curious, though, if anyone else has had this issue also. If so, did you figure it out? Am I correct in my assumption?

    I'll update this thread as I know more.
     
  2. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Turns out the error is in the upgrade from one version of NGUI to another. I tried importing my kit first then NGUI but no luck. So I tried installing NGUI first and when installing my kit I remove all scripts and DLLs belonging to the redistributable version that is included in my kit and voila!

    My project imported on top of NGUI with 0 errors and the demo scene still worked just fine :)

    So there you have it. If you already have NGUI in your project, do NOT install the NGUI scripts or DLLs from my kit (in the Assets//NGUI/ folder). Only keep the prefabs and text files and shaders and that stuff as well as the scripts in the Demos/NGUI folders :)
     
    Last edited: Aug 4, 2013
  3. nevilleshane

    nevilleshane

    Joined:
    Aug 19, 2013
    Posts:
    3
    Do you have any documentation on calling UDEA functions from my own GUI system? All of the documentation I could find was related to formatting the XML.
     
  4. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi nevilleshane

    Sure thing, mate. For some extra formatting options you can look in UDEA.cs for extra functions but everything I don't list below is just gravy.

    In order to create your own GUI system, the first thing you need to do is create a new class that subclasses the UDEA. See the included display. After that, you just need to create an OnGUI function to handle the actual display of your dialogue. If you want to do something fancy like 3D characters or speech bubbles or whatever, do so wherever and however you feel like. As long as you've subclassed the UDEA, you are good to go and just need to display the dialogue on screen however you feel like it.

    The only exception to the rule is if you want to create your own keyboard input to replace that which I include by default. By default the arrow keys navigate the choices and also, the enter key and the left mouse click continue the dialogue. If you are not happy with this then you just have to override the HandleInput function and you are good to go.

    So, a skeleton display would look like this:
    Code (csharp):
    1.  
    2. public class myDisplay : UDEA {
    3.     void OnGUI()
    4.     {
    5.     }
    6.  
    7.     //override public void HandleInput() {}
    8. }
    9.  
    That's it. Now you just need to flesh out the OnGUI function and you have your own custom display file.

    Following is a list of the stuff you can use in your GUI...

    Code (csharp):
    1. //globally accessible values
    2. CMLGameKeys   GameKeys        // All GameKeys
    3. eUDEAState    State        // check if ANY dialogue is active
    4. string        Language        // language to use with localisation (if used)
    5.    
    6. //public properties (i.e. access via code only)
    7. Texture2D WhoIsSpeakingAvatar   // fetch/load/generate avatar image for this turn
    8. Texture2D _currentAvatar        // the avatar to show after it was fetched/created
    9. bool HasEnded                   // is the current object's dialogue active or not?
    10. bool CurrentIsChoice            // is the current turn a choice turn or not?
    11. int CurrentOptionCount          // how many choices does this turn have?
    12. int Selection                   // index of selected choice
    13. string WhoIsSpeakingName        // name of actor speaking this turn
    14. cmlData CurrentLine             // raw access to current turn's details
    15. string     FormattedText        // the text to show on screen
    16.        
    17. //public variables (i.e access via inspector)
    18. string     FileName            // file that contains the dialogue
    19. bool     TypewriterMode        // display text gradually or not?
    20.  
    21.  
    22. //public methods
    23. OptionSelect(int val)         //manually specify a choice
    24. OptionPrevious()              //navigate choices backwards
    25. OptionNext()                  //navigate choices forward
    26. string CurrentOptions(int x)  // the text of the relevant choice
    27.  
    28.  
    29. //parse a dialogue script and speak the first turn
    30. StartDialogue ()
    31. StartDialogue (int atIndex)
    32. StartDialogue (string filename)
    33. StartDialogue (string filename, int atIndex)
    34.  
    35. //properly ends the dialogue immediately
    36. EndDialogue()
    37.  
    38. //progress through the dialogue
    39. int Speak ()
    40. int Speak (int id)
    41.  
    Normally you would set the filename in the inspector and then just call StartDialogue(0) (for instance) and just call Speak() to continue through to the end. That truly is all there is to it...

    So, let me write you a very basic skeleton display to use a base (if you don't want to use the included one as a base, that is):
    Code (csharp):
    1.  
    2. public class myDisplay : UDEA
    3. {
    4.     string prefix = string.Empty;
    5.     public int StartingIndex = 0;
    6.  
    7.     void OnGUI()
    8.     {
    9.         if (HasEnded) return;
    10.  
    11.         if (CurrentIsChoice)
    12.         {
    13.             for( int i = 0; i < CurrentOptionCount; i++)
    14.             {
    15.                 prefix = (i == Selection) ? "* " : "  ";
    16.                 if ( GUI.Button(new Rect(5,5 + (i*30), 450, 25), prefix + CurrentOptions(i) )
    17.                 {
    18.                     OptionSelect(i);
    19.                     Speak();
    20.                 }
    21.             }    
    22.         } else {
    23.             GUI.Box(new Rect(5,5,450,120), FormattedText);
    24.         }
    25.     }
    26.  
    27.     override public void HandleInput()
    28.     {
    29.         base.HandleInput();
    30.         if (Input.GetKeyDown("s")  HasEnded)
    31.             StartDialogue(StartingIndex);
    32.  
    33.         if (Input.GetKeyDown("escape")  !HasEnded)
    34.              EndDialogue();
    35.     }
    36. }
    37.  
    That's it. I haven't tested this, obviously, but it should work just like it is.

    In terms of creating your display, that is all you need to do for a functional GUI. From there you can flesh it out as you see fit. Then of course there is the other stuff relating to the keys and the events etc but that is more about using the UDEA with your game, not specifically your GUI so that will come in another post. Right now my finger is real sore from all the tapping. I think my iPad has a dent in it's screen by now :p

    I trust this is what you were looking for?
     
    Last edited: Aug 19, 2013
    twobob likes this.
  5. nevilleshane

    nevilleshane

    Joined:
    Aug 19, 2013
    Posts:
    3
    Thanks for the quick reply!

    I'm actually using EZGUI, but this points me in the right direction. I'll give this a try later in the day and get back to you if there are any questions.
     
  6. tonyel4

    tonyel4

    Joined:
    Jul 4, 2013
    Posts:
    10
    Hi!

    First of all great asset its working great with my game!
    I'm having some trouble using the save system you mention that the UDEA is capable of. Do you have any examples of how to use it?

    Thanks!
     
  7. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi Tony

    Thanks for the kind words, first of all. :)

    Right, the save system is actually really straight forward. As you go through your game you write whatever info you deem to be important to your gamekeys. So now the time comes to save. What now? The answer is simply to call the Save() function and you are done. It literally is that simple.

    When you create your gamekeys you can pass in the name of a file that can be found in a resources folder as a constructor parameter or you can just leave it blank and then pick from any of the 3 load methods to fetch your data from a folder, PlayerPrefs or Resources folder. I tried to give you choices so whatever you wanted to do, you could.

    So, for example, in a project I am currently working on I decided that I wanted to have easy access to my save game info during development so I wanted the data to be visible in my project so I can just double click on it and then edit my database in MonoDevelop. When building the game, though, I want to use PlayerPrefs to avoid any issues with paths and whatnot. So... how did I do this fancy save system? Like so...
    Code (csharp):
    1. static public void Save()
    2.     {
    3.     #if UNITY_EDITOR
    4.     database.SaveFile("Assets/Resources/"+database_name+".txt");
    5.     AssetDatabase.Refresh();
    6.     #else
    7.     database.Save(database_name);
    8.     #endif
    9.     }
    Unfortunately this project is protected under NDA so I cant tell you more about it but I can say that it is a huge undertaking with a very complex inventory and data structure and it all goes into a single CML file and THIS is the entire Save() function I use for this game.

    Loading is just as interesting. Here is an example of how you would tackle it. Simply create a new script for all your data and load it during your splash screens so it is always available.

    Code (csharp):
    1. public class myData : MonoBehaviour
    2.     static public myData Instance;
    3.     CMLGameKeys database;
    4.  
    5.     public string database_name = "GameData";
    6.     void Start()
    7.     {
    8.         DontDestroyOnLoad(gameObject);
    9.         Instance = this;
    10.  
    11.         database = new CMLGameKeys();
    12.         //optionally....
    13.         //UDEA.GameKeys = database;
    14.  
    15.         #if UNITY_EDITOR
    16.             //load from Resources folder
    17.             database.LoadFile(database_name);
    18.         #else
    19.             //load from PlayerPrefs
    20.             database.Load(database_name);
    21.         #endif
    22.        
    23.         //if the database is empty then this is the first time
    24.         //the game is being played so set some default values...
    25.         if (database.Count == 0) {
    26.             //I like to imbed my CML header at the start of my files
    27.             database.ImbedCMLData();
    28.  
    29.            //now, create some settings...
    30.             database.AddNode("Settings", "Volume=0.5;Tutorial=true");
    31.             database.Last.Set("SelectedPlayer", "Blaze");
    32.             database.Last.Set("PlayerPosition", "(0,0,0)");
    33.             database.Last.Set("PlayerRotation", "(0,0,0,0)");            
    34.  
    35.             //now create some game keys...
    36.             database.Add("Gold", 2000);
    37.             database.Add("Level", 1);
    38.             database.Add("HP", 100);
    39.             database.Add("MP", 5);
    40.             Save ();
    41.         }
    42.     }
    43.  
    44.     public Vector3 PlayerPosition {
    45.        get { return database.Vector("Settings","PlayerPosition")); }
    46.        set { database.Set("Settings", value.ToString(), "PlayerPosition");} }
    47. }
    48.  
    Doing what I did above will allow you to fetch the player's saved position by just saying
    Code (csharp):
    1. transform.position = myData.Instance.PlayerPosition;
    So, if you want to save the player's position along with everything else in the database, just set the value before you call Save. For instance, in your GUI you could have a button called "Save Game" that calls function "DoSaving()". This function would be written as such...
    Code (csharp):
    1. void DoSaving()
    2. {
    3.     GameObject player = GameObject.Find("Player");
    4.     myData.Instance.PlayerPosition = player.transform.position;
    5.     myData.Instance.Save();
    6. }
    There is obviously an infinite number of ways how you can use the save system but what it boils down to is this:
    Step 1. While playing the game, store anything you want to save into the database. (Since UDEA.GameKeys is already created FOR you, just use that instead of creating a duplicate. Alternatively, if rewriting all your code to use "UDEA.GameKeys" instead of "database" like above is going to become an issue for you, then simply set UDEA.GameKeys = database; in the Start function.

    Step 2. When you want to actually save your data, just call one of the available Save() functions in the UDEGameKeys: Save() or SaveFile()

    Done. :)
     
    Last edited: Sep 6, 2013
    twobob likes this.
  8. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I created a video showing how to get started with the UDEA. This starts with an empty project and shows everything from adding characters, creating dialogue scripts and all the way up to creating a player character to use with the UDEA and place a character in the scene to have a dialogue with.

    This video should be most useful for all people who are new to the UDEA. Enjoy.
    [video=youtube_share;DVa41H8X3_U]http://youtu.be/DVa41H8X3_U
     
  9. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,258
    Nice tutorial video.
    Du you speak realy that fast ;)
    Maybe you can make one with ngui as an action hud too?

    It is sad that is now only is for talking. As it was cml i remember there could be so much more done with it abd for that i would like to see also tutorials as examples :(
     
    Last edited: Sep 14, 2013
  10. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi Rand

    The Actions hud is the first product on the "Free products" page on my website: http://www.mybadstudios.com/?page_id=89

    As for the CML, that is a bit of a tricky one... I love CML. I honestly can't do any project without it. All my new kits come with it as a base or integral part because, as you say, it is very useful. Unfortunately, CML is a standard like XML or .INI files so giving examples of what the data looks like is not very impressive at all but showing what you can do with the data, well... billions of uses depending on how you want to use your data at any given point in time... Literally, I would have to make a demo showing how you use data. Hmmm... A bit.... generic/ vague, don't you think?

    Lol. Imagine me starting the video with: "Hi everyone. In today's video I will be showing you how to use booleans and integers. This is the first video in this tutorial series. Please come back next week when I will have released the second video entitled 'How to use floats and Rect'. And now, on to the tutorial..." :p

    One day, if I can figure out how best to do that I would certainly love to introduce people to CML yes, I just don't really know ho to showcase the power in a video, yet... :(
     
    Last edited: Sep 15, 2013
  11. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569

    Ahhhh…. Tricky, tricky…

    See, if you have keys collected elsewhere and you want to retain those but reset all that you got in THIS level, there is no way for me to know which data belongs to THIS level. See the problem? Somehow you will need to tell me what keys need to be set to what values but since they were set in the dialogue scripts that means finding them first then creating variables for each … and I'm not even going to go beyond that as this is already not acceptable.

    So, two options here:
    1. If the database contains nothing that you want to keep (unlikely) then you can just call UDEA.GameKeys.Clear() when the game starts and boom... Instant reset.

    2. If you want to retain some of the keys but not all AND be able to reset heir values, I think the simplest method would be to make a copy of the database and restore it afterwards. Have a look at this:

    Code (csharp):
    1. CML duplicate;
    2. void OnLevelStart()
    3. {
    4.     duplicate = new CML();
    5.     duplicate.Join(UDEA.GameKeys);
    6. }
    7.  
    8. void OnContinueToNext()
    9. {
    10.     duplicate.Clear();
    11. }
    12.  
    13. void OnReset()
    14. {
    15.     UDEA.GameKeys.Clear();
    16.     UDEA.GameKeys.Join(duplicate);
    17. }
    I think that should work just june. :)
     
  12. Kemp-Sparky

    Kemp-Sparky

    Joined:
    Jul 7, 2013
    Posts:
    64
    Hello, I was wondering if there were any tutorial videos explaining some of the more advanced features of UDEA?

    Such as using UDEA as a quest or inventory system, triggering custom scripts, or as a save game system.

    The videos in your youtube channel don't cover these topics very thoroughly.

    Thanks!
     
  13. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Unfortunately there are no videos for that no. Primarily because I don't consider them "advanced" features. I consider them rather "simple"... They are like Macs, they just work... no effort required on your end :p :D

    Once you understand how the GameKeys class works, you will understand why I say this....

    If you scan just 5 posts above yours you will see some info on the save system. Basically, the GameKeys class allows you to store int, floats, color, vector2, vector3, rects, quaternions, booleans and strings AND use them during runtime so if you simply use the GameKeys class to define and use your variables then all your game data is already in the database and saving your game is as simple as calling one line of code. Obviously this will have a performance impact so there are some steps you can follow to improve on that but still... a video to explain one line of code is serious overkill in my mind...

    Of course, if there is something that you simply CANNOT understand, you are more than welcome to drop me an email and I will personally show you how it works, what to do, how to do it and give you some samples to go with it... I have absolutely no problems with helping my customers. Feel free to ask away! :)

    In fact, one customer was asking about how to make a quest system so I took an hour or two (I forget how long now :p ) and I went and created an actual quest system that I now give away for free. Have a look here for the scripts. The UDEA makes life so easy when it comes to creating new things for it that this entire quest system literally only took an hour or two from conception to finished product and is so bloody simple that it doesn't even need a read me file :p

    Download, have a look and if you still feel stuck on anything, drop me an email... :)
     
  14. Mustafa Adil

    Mustafa Adil

    Joined:
    Dec 6, 2012
    Posts:
    21
    Hello everyone. Its been 2 days now and I'm still facing these problems, kindly guide me how to solve it
    • user provided line number with no dialogue to show: 1
    • Unable to start dialogue
     
  15. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi Mustafa

    The way this kit works is that when you start the dialogue, you tell it what line to start on, from there on you only call Speak(), not Speak(int) so it can decide for itself what line to speak next... If, however, you DO decide to call Speak(int) then the kit honours your request and goes to the line you told it to speak, ignoring it's own internal logic.

    Now, if you tell it to go to a line that does not exist... well... if it overrides its own logic and tries to speak a line you specifically requested only to find the line is not there, it will throw out an error saying it can't do that.

    An easy way to do this mistake is on a line that gets called repeatedly. Say for instance you have a single turn that has 9 lines of text but you only show 4 lines of text at a time, in this instance, the same line will be called 3 times before moving on so if you have an external variable that tells the kit what line to call and that variable calls the turn to be called for a 4th time, that will also throw out an error.

    Other situations are handled internally to avoid error messages like you experienced.

    Now, according to that message it is trying to call turn 1 but it cannot find turn 1 so let's just make sure there IS actually a turn 1, shall we? Open up your dialogue script and find the first <turn> node. Make sure that that line looks like this:
    Code (csharp):
    1. <turn>id=0
    Then make sure all other turns follow the same pattern but obviously they go id=1, id=2, id=3 etc etc etc... Make sure there is one with id=1 and then you will not have that issue any more :)

    If you are still struggling, contact me via email and send me your dialogue script and I will have a look and see what is up. Or, since you are online now, find me on Skype and I'll help you out right now. I'm gonna be around for the next few minutes so let's quickly get you sorted out :)

    Skype: mybadstudios

    Also, don't forget, there is a visual editor included in the project. Open up your script using that and then go to the Test tab. From there you can easily debug your script for validity by seeing how the UDEA would treat your script if it were to open it and start from the beginning...
     
    Last edited: Nov 8, 2014
  16. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hey guys

    I've been promising this for a long time now and it finally got approved...

    A while ago I released the MBSCore kit and told people that everyone who buys it will get $10 to $15 discount on my other kits, including the UDEA. Well, the UDEA Core is now live on the store:
    https://www.assetstore.unity3d.com/en/#!/content/33461

    If you already own the MBSCore product then feel free to get this at $10 less than the standalone version. Just install MBSCore with this version and you are good to go :)

    Just a head's up... UDEA 2 is around the corner... and you are not gonna believe the extra flexibility it offers you! :D Keep an eye out for it...

    In the mean time, enjoy UDEA Core
     
  17. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hey again

    Thought I'd drop by and just point out that the original UDE is currently available for free on the asset store, in case you missed the announcement. It is only temporary, though, so if you are curious about the UDEA but want to try before you buy, get the original UDE and try it out for yourself.

    Of course, the UDE Advanced wouldn't deserve the added "Advanced" if it wasn't a lot more powerful than the UDE so be aware of that little fact. It's a full dialogue engine with all the bells and whistles, the UDEA is simply far better... plain and simple.

    Speaking of better, I thought I'd drop in the current change log for the new UDEA 2.0 which is due to be released soon.
    EDIT:Okay, the changelog is a bit long... TLDR version:
    1. No more OnGUI prefabs included, UGUI all the way now
    2. Audio system added, including a barking system. I.e. characters can speak random audio at random times
    3. Created an entirely new keys system that changes the way you work with the kit. It is so much more user friendly than before!!!(Which makes the UDEA2 incompatible with UDEA projects, unfortunately)
    4. Now includes a Visual Novel prefab. Single drag and drop and you are ready to go.
    5. Made enabling OnGUI and visual systems compatibility as simple as a single click in the inspector
    6. Now returns both Texture2D and Sprites for the avatars
    7. You no longer need to specify if a turn is a choice or not. UDEA2 figures that out automatically
    8. Removed stuff that was not part of the UDEA: The shop and ActionsHUD
    9. Demo scenes showcasing multiple input methods: OnTriggerEnter, mouse click

    Code (csharp):
    1. V.2.0
    2. - Added a change log
    3. - Added AutoContinueOnClick boolean to UDEA. Enable to continue the dialogue with a left click
    4.     Disable to allow the UDEA to be used with NGUI/ UGUI / etc.
    5. - Added CurrentSprite property alongside CurrentAvatar property. You can now fetch a Sprite or a Texture2D
    6. - WhoIsSpeakingAvatar now first tries to load a Sprite and loads a Texture only if that fails
    7. - Removed the use of the ProcessKeys function to handle custom keys
    8. - Custom keys now directly calls any function you want. The first param of your key is the function name
    9.     For example, a custom key "ChangeVolume BGSource 0.4" will send the params "BGSource" and "0.4" to a
    10.     function called ChangeVolume
    11. - Custom keys can now have any number of parameters or none at all. If using parameters they will be passed
    12.     as a single cmlData object so be sure to create your functions like this: public void FuncX(cmlData data)
    13. - Custom key's parameters can now be prefixed with a descriptive name using the : seperator
    14.     Example: [keys] ChangeVolume WhichItem:BGSource Volume:0.4 FadeSpeed:0.15, KeyWithNoParams
    15.     Parameters without names are accessed in the order they are declared, ignoring named parameters before it
    16.     Paramteres with names are accessed by name and can be converted to it's relevant type
    17.     Example:    Using key "ChangeVolume BGSource, Volume: 0.4, 0.15" with function: FuncX(cmlData fields)
    18.                 string bgSource = fields.data[0]; <-- accessed via data array. First entry
    19.                 float volume = fields.Float("volume"); <-- accessed by name. Converted to type
    20.                 float fadespeed = float.Parse( fields.data[1] ); <-- second entry in data array. Value returned as string
    21. - Added UGUI display prefabs
    22. - Removed old OnGUI displays and prefabs
    23. - Now require that the dialogue be parented to a canvas, no longer simply run directly on random objects
    24. - Dialogue prefabs are now destroyed instead of disabled so there is now a difference in implementation
    25. - Removed "Parent" property from UDEA class as it was just a duplicate of the public "parent" variable
    26. - Removed redundant OpenFile and StartDialogue methods
    27. - Changed CurrentIsChoice function to look at nuber of redirect values, rather than implicit "choice" value
    28. - Removed the need to add "choice=true" in dialogue scripts. This is now completely redundant
    29. - Made the OnSpeakStart, OnSpeakEnd,OnTypewriterModeUpdate and OnSelectionChange events local events, not static
    30. - Removed the ActionsHUD product from the UDEA. The ActionsHUD is and alwyas was a stanalone product included
    31.     for demonstration purposes. It will always be available for free at  www.mybadstudios.com if you still want it
    32. - Fixed a bug with WhoIsSpeakingName if called after the dialogue contents were cleared
    33. - Added an Audio system to the UDEA. Just drag the audio prefab onto an object, add some clips to it and you
    34.     can now play audio right from your dialogue. Simply add the key "PlaySound track:trackname" where
    35.     trackname is the name of a track you added to the prefab. Alternatively you can also use "PlaySound index:x"
    36.     where x is the array index of a clip you added to the prefab.
    37.     You can also add in "loop:true" or "loop:false" if you want. i.e. "PlaySound track:help loop:false"
    38. - Added a barking system. Use the same audio system and add the sentences you want the character to speak
    39.     Simply tick the "random_barks" box and specify the min and max wait time between random barks. Primarily used
    40.     to make guards say random stuff, in the demo I use it to play random electrical beeps and crackles on the
    41.     damaged robot. Turn this barks system on or off during dialogues using "DisableRandomBarks" or "EnableRandomBarks"
    The UDEA2 has UGUI displays by default already making it a worthy upgrade even if only for that reason.
    As with the UDEA, the UDEA2 makes it super simple to create you own custom displays so to demonstrate it, here is the code for the main display file used in the screenshots below...:
    Code (csharp):
    1. public class DialogueDisplayMethod1 : DialogueDisplayBase {
    2.    
    3.     public Image
    4.         choice_avatar_image;
    5.  
    6.     override public void CheckForChoices(object source, UDEAEvent data)
    7.     {
    8.         choices_parent.SetActive(CurrentIsChoice);
    9.         plain_text_parent.SetActive(!CurrentIsChoice);
    10.         if (CurrentIsChoice)
    11.         {
    12.             choice_avatar_image.sprite = CurrentSprite;
    13.             for ( int i = 0; i < choices_text.Length; i++)
    14.             {
    15.                 choices_text[i].text = (i >= CurrentOptionCount) ? string.Empty : CurrentOptions(i);
    16.                 if (i == Selection)
    17.                     highlight_image.rectTransform.position = choices_text[i].rectTransform.position - new Vector3(20,0,0);
    18.             }
    19.         } else
    20.         {
    21.             actor_name_text.text = WhoIsSpeakingName;
    22.             avatar_image.sprite = CurrentSprite;
    23.             dialogue_text.text = FormattedText;
    24.         }
    25.     }
    26. }
    That's it. 30 lines of code for a custom display. Simply derive from the base class and update only what you need to. The rest of the work is done visually in UGUI.

    Next big thing to note that that all this time I have been telling people that adding audio to this system is so darn easy that I didn't even bother to include it in the kit. Instead I just showed those who asked me how to do so. Well, now the kit includes a dedicated audio prefab. Just drag it onto the object, add the clips that objects should be able to speak and you are done. Simply use the new key PlaySound to play it whenever you are ready. No more custom scripting required.

    In fact, I even updated the audio system to allow your characters to play random audio clips if you wanted to. Audio, not text. Guards bored on patrol, guys expressing their opinions while playing poker, princess saying cutesy things, whatever... Again, all without a single line of code from you.

    This brings me to probably the most important change of all... Those of you who have the UDEA will know that you can trigger external code by just adding a key and then having a function called ProcessKeys that deals with your keys, right? Well that entire system is now gone. In the UDEA2 you can now create your own functions in any script on your object and call them directly from your dialogue. The old limitation that you must have a key name and 2 parameters is no longer present. You can now have 0 to infinite params and you even have the option of assigning your parameters names...

    I'm sure that must have raised a few eye brows, huh? :D

    Anyway, more info as and when... Just wanted to drop by for an update.
    Oh, and of course, let's not forget the fact that the Vikings have finally been retired and the UDEA2 now has a new demo scene using models graciously provided by 3DForge... So here is some screenshots from the GUI created with the code posted above.

    Screen Shot 2015-04-20 at 1.54.55 AM.jpg
    Screen Shot 2015-04-20 at 1.55.55 AM.jpg
    Screen Shot 2015-05-04 at 12.26.45 PM.jpg
     
    Last edited: May 5, 2015
  18. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Another sneak peek at one of the new prefabs included in UDEA version 2.0
     
    Last edited: May 4, 2015
    Teila likes this.
  19. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    568
    I just bought this and was a bit disappointed to see it still used the OnGUI system. I Then read the forums here and saw you do have a new version for UGUI on the way in V2.0. Do you have an estimated time of when V 2.0 will be released ? just looking for a rough time a week,month, 2 months, etc..so i can plan accordingly. Also out of curiosity does this asset include your core kit ? Thanks
     
  20. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,728
    Fabulous! Is it really as easy as you say it is? :) I have two teens who are preparing their own visual novels and this looks perfect for them. Once we help them with the uGUI, is it really just drop and drag for the visual novel?

    At the current price, we will get it regardless. But the easier it is to use, the better it is for me since I can spend more time on my project and less helping them. :)
     
  21. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi Tella

    I only just started working on this recently so it still needs a lot of refining and documentation but yeah... I give you a prefab that is all setup and ready to go and then I let you do the rest via the dialogue script. The update I made to the keys system between the current version of the UDEA and the new one is making all of this possible. It would have been a pain to do otherwise... now it's simple as pie.

    Basically all you have to do is write your dialogue and when you need something special to happen like a character sliding in or the background changing or whatever, you just set a key. they key then calls your custom code and that way you can do anything you want and as part of making this a useful plugin I will be including some of that functionality for you already... like currently you can fade the background in from any solid color and fade it out to the same or fade out then fade in to a new image. You can also slide characters in and out. I'm not sure what else but I am thinking about what other features I can add.

    For now, though, I am including the script I used to create the above video so you can see for yourself how this system will work.
    Enjoy
     

    Attached Files:

    Last edited: May 4, 2015
  22. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi JBR

    The kit is ready now. I just need to round out the visual novel (as that was a late addition) then I just need to wait for Unity. As for the core kit, the UDEA does contain a part of the Core kit but it does not include the complete core kit, no. This is how all my standalone versions work. They contain what they need from the Core kit, nothing more.

    The core kit consists out of a state machine system, CML, a "please wait" spinner, an on screen text display system and more. The UDEA doesn't need any of that except for CML so CML is the only part of the core kit that is included in the UDEA. If CML gets updated to include new features, those new features will go into the Core kit, not into kits like these that already include the file and don't need the new features to continue to function...

    The standalone kits only have the core files they need to function and keep that version of the script. Core versions of my kits do NOT include any of the scripts from the Core kit but require that you install the Core separately. By doing so you are certain that all kits use the same Core files and that you always have the latest versions of those core files in your kit.

    You can always get the Core kit separately and install that into your project last, overwriting what is there with the newer files but if you buy core first then the rest of my kits then you save a lot of cash in the process.... I plan on releasing a Core version of the turn based battle system also when the UGUI conversion gets completed.... Just a little head's up. So I always suggest to people to get the core kit but very few listen to me.. which is good for my bank balance so I'm not complaining :p ;) At this current sale price, though, this time I can understand why :p

    I hope that answers your question:
    It contains part of the Core, not the entire core, no. Other kits contain what they need but again not the entire kit unless they need all of it.
     
  23. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    @Trella

    Just for you, mate... :)



    As you can see, just create your dialogue script, give it's name to my prefab, drop the prefab on a Canvas and hit play.

    The only restriction is that the dialogue files and the associated graphics must be located in a Resources folder. That's it. For organizational reasons I placed each character's graphics in their own folder so when I declared the image name in the script I added the folder to the name (i.e. avatar=Nicole/Nicole) but if you place the images directly under the Resources folder you can just say avatar=Nicole.

    Anyway, enjoy :)
     
    Last edited: May 4, 2015
  24. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,728
    Thanks, MrDude. :) It looks good. One daughter codes in Java and loved the video. So she will be doing her novel using your asset.

    I appreciate the video! :)
     
    eridani likes this.
  25. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    No problem :) Glad you (or rather she :p) likes it :)
     
  26. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Just bought because of the Visual Novel capabilities as well. Hope this functionality can be expanded over time!
     
  27. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Really? Amazing... the UDEA has been able to do visual novels since the start... I just didn't think people liked visual novels so I didn't bother to tell people so, figuring they would figure it out for themselves.

    Now that I was busy creating the UDEA2 I decided, purely as an after thought, aww heck, let me include a VN prefab for people to start playing around with. Since then I have been surprised by exactly what a big deal VN are and exactly how many people like it... I have to admit, it's not my thing so I was quite surprised to learn how many people do like it but I never thought that I would actually move copies of the UDEA just on the basis of showing people they can make VN with it...

    I guess it was a good idea then to make that prefab :D lol :D

    But in any event, if you don't want to wait around for the UDEA2 you can always use the version you got tonight and get started. the bad news is that the key system in the UDEA2 is not compatible with UDEA so all projects made with UDEA that use the custom keys, those projects will be broken and will require a few updates to make it compatible ... but with the UDEA that you have now, you can create a VN prefab of your own in a matter of hours. In fact, it took me longer to find the sample graphics than it took me to create the entire prefab and the sample script...

    Fortunately, I have realized my mistake and now know that people are quite interested in this so I will, over time, turn this single feature of the UDEA into a fully fledged game template. I am currently uploading a beta version for a beta tester to help me determine what features you guys might want. In time I might have to rebrand this product "Unity Dialogue Engine and Visual Novel kit" Oh god heavens... UDEVN... that just looks ugly :p lol
     
    Last edited: May 5, 2015
    eridani and boysenberry like this.
  28. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Well-made visual novel or storybook creator kits are an under-served market I think. There's only a couple such assets in the Asset Store and one of them just got pulled like a week ago.

    Not everyone wants to make a zombie shoot-em-up (although I admit the vast majority probably do lol). I'm not saying it's a huge market, but if you add "visual novel" or "story" in your title or description you'll probably get more sales.
     
    MrDude likes this.
  29. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,785
    So. Quick questions. Since the scan of this page did not reveal the answers.

    Does this use the new UI system.
    Is it - therefore - Unity 5 ready.

    P.S. I already bought it but am in the middle of something else.
     
  30. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    The UDEA2 will in deed use the new system,yes, and will REQUIRE Unity 5
     
    Last edited: May 5, 2015
  31. Magian

    Magian

    Joined:
    Nov 16, 2009
    Posts:
    89
    If I buy this version, what will the pricing be for UDEA2? Will there be a discount for owners of this version?

    Also, how much longer do you intend to tweak the Visual Novel add-in before submitting to Unity?
     
  32. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,785
    Happy days. I will wait.
    I currently use Inventory System which I will be sticking with as it has almost zero footprint whilst running.
    My core focus is on zero garbage since I must target all platforms, good and bad. So my vote is for "No pointless runtime-allocations" if we get a vote.

    much obliged. Looking forward to testing it.
     
  33. MangeyD

    MangeyD

    Joined:
    Mar 11, 2014
    Posts:
    73
    I must say that I am a little disappointed that I jumped into the UDEA last night now I come here and read that it is dead in the water with a new version coming!!

    I hope that this version will continue to get some love for those who decide not to also buy the new version... and that there is a good upgrade path. I saw that the UDE was free a couple of weeks back and grabbed it and thought that I should grab the advanced version on sale as it was fully featured and I assumed the one that would be continued to be developed.

    I am a past customer owning the turn based battle system and am likely to buy the Core kit... but I must say that I am disappointed that I will wish I had not purchased this item last night when UDEA2 is out and I will have to grapple with justifying buying that as well.... which I may not end up doing.

    Just some feedback from a customer who is interested in supporting you but wishes he had realised that he was buying into a discontinued product last night. I have just loaded the UDEA up to play with it and I am sure it will have some cool stuff in it but having UDE I could have easily waited for UDEA2.

    I hope this feedback is useful.
     
  34. MangeyD

    MangeyD

    Joined:
    Mar 11, 2014
    Posts:
    73
    I am finding a gap in your documentation for the UDEA. You say that there are countless ways to invoke a dialogue, which is great... and you show how to use the HUD....... but I have no idea how to do it in other ways and no guidelines for this.

    The HUD is not a good look for me as the controller I am using moves the camera with the mouse so to click the HUD requires looking away from the object/NPC.... what I would like to be able to do is use Keystrokes/Mouse Buttons to fire the dialogues OR have the HUD show a keyboard/mouse shortcut and use either the HUD or the shortcuts. Can you give me a short primer on the approach to using keyboard/mouse to fire the dialogues.... along with an idea on how to merge that with using the HUD as well

    Thanks for any help you can provide.
     
  35. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hi Mangey

    Sorry you feel a bit down about this whole UDEA2 business but don't worry, I'm not in the habit of being an ass towards my customers :) To be perfectly honest with you, the UDEA hasn't been updated in over a year since I couldn't think of anything else to add to it...when I finally got started again I went "Hold on... This means that all existing projects using the UDEA will now be broken, 100% guaranteed" so I had to decide between updating v 1.4 to 2 or making v2 a new product. If I make it an update then I'm sure there are going to be a lot of people who don't read the docs and then blame me for their projects now being broken... Yet if I release it as a separate product then none of my existing customers will GET any of the new features... I still haven't decided which way to go but if I go the separate product route then what I will do is give you an upgrade path that equals the product you already own. I.e. If you have the UDE you get $15 off or if you have the UDEA then you get $35 off wether you got it for free or on sale or whatever... I am known for my customer service so you really don't have to worry about me being an ass over this :). Feel free to email me if you want to discuss it further. Always happy to assist. :)

    Ahh, the ActionsHUD. That is a standalone product of mine which I give away for free on my website. I included that as one example of how to start a dialogue and since then so very many people have emailed me thinking that is THE way of starting a dialogue. It is for this reason that I have removed the ActionsHUD from the UDEA2 and created new demo scenes that show starting a dialogue via entering a trigger and starting a dialogue via clicking on an object in the scene. I want to avoid that confusion in future while also showing off what you asked: How does one do it?

    Basically, all you need is two things:
    1. Your object needs a component that is derived from UDEA (I.e. Drag one of the display prefabs onto it) with the dialogue script's filename field completed so it knows which script to use
    2. Call either StartDialogue() or StartDialogue(int starting_tiurn) on it. You can even do this via SendMessage.

    That's it. That simple.

    So yeah, any method you can think of to call StartDialogue, that is a means of kickstarting the entire thing. OnTriggerEnter, check if it's a player object and if so, StartDialogue(). Open a chest, just make your script reference the display script and call StartDialogue... Anywhere, any how, any circumstance, if you need to trigger a dialogue, take the object with the display script on it and just call that single function and it's done :)

    Hope that answers your questions.
     
  36. MangeyD

    MangeyD

    Joined:
    Mar 11, 2014
    Posts:
    73
    Thanks for the response, I am already seeing so much potential for this kit and it has me thinking about making my world far more fully interactive than it otherwise would have been.

    I appreciate that this is a very simple and flexible solution to use, however my understanding of where and how to implement the trigger is not all it should be so ultimately I would love to see a demo of a simple click to fire solution.... although having said that I am sure I will have it sorted soon enough.

    I understand your dilemma regarding the future of the product, however I just wanted to give my feedback... I am a firm believer of the importance of feedback... both good and bad and I hope that my comments can help you as I am sure I am not alone wondering if buying in to UDEA, even at the discounted price, was the right thing to do.

    Off to delve into my controller scripts to work out the best way/place to trigger dialogues.
     
  37. MangeyD

    MangeyD

    Joined:
    Mar 11, 2014
    Posts:
    73
    Ahhh you already have the code in your crPlayer script to assign keys to the ActionHud actions... so that is probably the best of all worlds for me and I will modify that... eventually I will work out how to trigger this without the HUD although I may do something clever with putting a tiny HUD up in the corner that is completely impractical to click on... just indicating when clickable/pressable options are available.
     
  38. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    No problems, mate. I love feedback.Only way I know what people want :)

    As for the fully interactive world, unfortunately I don't seem to have the demo laying around any more and the asset kit I used back then to create the demo with is causing all manner of weird behavior when I load the demo scene into anything from U4 onwards so I am not able to recreate the demo I used in the youTube video 3 years ago so I'm working on creating a new demo altogether. The thing with the other demo was it was a collaboration between me and the asset author. I used his models (which was a complete village) and then I make it interactive using the UDE (the original one) and then we both show off our products together and we each offer our respective customers a discount if they bought the other's kit.

    Anyway, I digress. The point I'm making is that I made every single thing in that scene interactive. Every tree, every section of wall. Every lamp post, every prop in every room everything with a collider had at least 1 thing you could do with it. I then added some characters and incorporated some quests:
    First, if you speak to the blacksmith's apprentice, he would just dismiss you but if you speak to the other guy he would give you a quest that involves the blacksmith's apprentice. He will agree to help you in exchange for a beer... but the bartender says you first need permission from the guy running the town and the guy running the town will only give you permission if you bring him enough cash so you first have to run around the village finding the crates with the cash in... Again, all of the characters had different things to say to you based on who you had interacted with already, some crates had collectables in it and EVERYTHING was interact-able...

    But most importantly of all, the entire thing took 8 hours of work. To do everything. Cause I cheated :p I took a shortcut. Allow me to explain. First I created a dialogue script called props.txt and I kept that open. Then I dropped the dialogue prefab on every PREFAB in his kit (not in the scene) and as I did so I added a description to the props file and gave the prefab the new turn number. Then I dropped the dialogue prefab onto the next prefab, added the description to props.txt and gave the turn number to the prefab. I went through every prefab in his kit and by the time I hit the bottom everything in the scene was able to have a unique description popup or be interact-able etc.

    Now, this meant that every single wall had the same description and so did every guard post and every lamp etc. In some cases (like the lamps) I let that slide but in other cases like the walls, I wanted some unique text there like the one the edge of town where the Orc said "Brilliant. A huge wall that ends in a large gap. Just brilliant" and anther wall that said something like "Yup, it's another wall, just like the last one" or something similar. For those I just found them in the scene, added the new text to props.txt and update the index in it's prefab. When that was done I started on the characters.

    And that was how I did it. An entire village with every single thing able to popup up a description, complete with quests and collectables in only 8 hours. Thought that bit of info might prove useful ;)

    Enjoy
     
  39. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    p.s. the actions hud is hardcoded to use j,i,l and k, respectively to trigger their actions in case you don't want to click on icons. If you want a quick start just take the ActionsHUD component on the player and make the display area 0,0,0,0 instead of 50,50,200,200 and then use the j,i,l and k keys.

    The way the HUD works is you tell it what the active and inactive images are then you tell it what region of the screen to occupy. I then scale the icons to fit the region you specified. If you set the region to 0,0,0,0 the icons are no longer visible. Simply assign it a 1 pixel JPG and the GUI is gone
     
    Last edited: May 6, 2015
  40. MangeyD

    MangeyD

    Joined:
    Mar 11, 2014
    Posts:
    73
    yes I have found the code for the HUD and changed the keys to suit and I am using quite a small visual for the HUD that doesn't expect you to click on it... but it does give a visual cue when actions are available... I was unable to use mouse clicks instead of custom buttons with this approach but I think that is because of the controller I am using.

    Also I may investigate locking the camera movement with the mouse whenever an interactive object gets focus so you can use the HUD and maybe unlock the camera movement again with a mouse right click... that way the mouse can move the camera but when an interactive object has the focus the mouse can be used for the HUD.... anyway I am all excited now and at least moving forward. I need to look at your tutorials again as I want to be able to collect and destroy some of the objects in my environment and I am obviously still missing something on how this works but I have managed to get some custom graphics and some basic interaction going with remapped keys through the HUD

    Thanks for your assistance with this.
     
  41. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    No problems, mate. :)

    Funny you should bring up the ActionsHUD now as I have gone and made a new version but I haven't told people about it, yet.

    I went and did exactly the opposite of what you want, though... While you are trying to HIDE it, I am adding more stuff to the screen :p

    I released the original Actions HUD some odd 3 or 4 years ago and said it would always be available for free on my website and I intend to keep that promise (In fact, I am thinking about putting it on the asset store so more people can discover it and use it) ...but I've made a new version now that I plan to sell and, boy, does that one ever kick the old one's ass! :D

    The new one allows you to add as many icons as you want, place/arrange/organize them via UGUI and supports both tapping on the button as well as holding it down. As an extra bit of flare, you can actually show the keyboard button that corresponds to the icon right alongside the icon also but what makes this version kick ass is the fact that, not only can you have as many icons as you want, you can actually configure them in the inspector:

    1. What keyboard button to scan for
    2. What function to call when it's pressed (so you are no longer forced to use the 4 predefined ones I made)
    3. Wether the button should function on tap or while held down.

    On the receiving end, you drop a prefab on the object you want to interact with and select the available icons from a drop down list. So much easier to use and with the ability to specify any function name it is so much more versatile and useful. I only made it a few months ago and very few people know of it (well, 3 in total) so this is basically the official announcement of it's existence :)

    This time around you don't need to scan through all my code to figure out what is going on and to modify the kit to suit your purposes. This time everything is done via prefabs and the ONLY thing you need to do in code is update a single enum field. This is the value that you will see in the "action_type" field so just modify this to whatever makes sense for your project and make sure there are enough values in the enum to match the number of icons you want to show. When you drop the prefab on the target object, you will get to then pick which icons function on that object by selecting the enum values from a drop down list. You will appreciate how easy that makes things when you see it yourself... But yeah, that is it. That;s the only piece of coding you need to do in this kit and to make it even easier I went and placed that enum in a file all on it's own so it's easier to find and modify. It's all about the ease of use now! :D

    Cool, huh? :D Also, thanks to how UGUI works, it also means you no longer need an Enabled and a Disabled version of each icon. You just need one now. As I said, this version kicks the old one's ass :D

    Hopefully it will be available on the store soon...
     
    Last edited: May 27, 2015
  42. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Last edited: May 7, 2015
    boysenberry likes this.
  43. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    So what do you guys think? Should I update the kit to a version that is 100% guaranteed to break all existing projects if you import the kit into an existing project, but you get it for free... or should I release it as a separate product and give you an incredible discount if you CHOOSE to upgrade to the next version? This way giving you the option to continue using the current working version until your project is done and THEN upgrading and getting the new features?

    My thought is this:
    The original UDE now costs $15 and the current version of the UDEA costs $35 so wether you got it at full price, on sale or for free, it doesn't matter, I will give you THAT much discount on the upgrade cost of the new UDEA which will be set to the original price of the UDEA, which was $50. Oh heck, let's make it $45. So that means it will cost you $10 to go from UDEA1 to UDEA2 IF you choose to upgrade to version 2.

    This way I avoid you seeing the "Update" button in the Asset Store window, clicking on it and then on "Install" and then going "Oh, shoot, was I supposed to read the release notes first? Oops!" Version 2 is a lot more user friendly, I will give you that... but it is 100% guaranteed to break existing projects using version 1. So send me your thoughts and tell me what you think... Make the upgrade optional or not?

    Here are the major changes summarized:
    1.Version 1 has an example Shop and item equip system. Version 2 has had this removed since it was unrelated to dialogues

    2. Version one comes with the ActionsHUD. A graphical tool to interface with your environment configured to work with the UDE in the demo scenes. This has been removed also as people seemed to think this is how you are supposed to start the dialogue systems and I received a lot of emails asking me how it could be done in other ways. So the ActionsHUD is gone but you can still download it from my website if you want it. Version 2 now has 2 demo scenes that demonstrate alternate methods of starting up the system

    3. The vikings demo has been replaced by a new demo scene
    4. NGUI and the NGUI demo scene have been removed from the kit
    5. All OnGUI displays have been removed and completely new ones have been made using UGUI
    6. ...including one that looks, acts and feels like a Visual Novel kit
    7. The new version uses a completely redesigned keys system for triggering custom code so all custom code you trigger in your project will need to be ripped out and redone but for new projects you are gonna love how well this new system works!
    8. Version two has an audio system that plays audio clips on command or allows you to play random barks

    9. Version one required that you place a display script on the object that you want to speak with and then just call StartDialogue() on the root of the object. This would then trigger that object's attached dialogue display to start up. Version two obviously can't do this because the dialogue has to play on the canvas. As such, instead of dropping the display script on the character or object, you now drop a dialogue starter prefab on it and tell the prefab what display system you want to use as well as giving it a reference to the canvas it should use. UDEA disables the display after use by simply quitting on the first line of OnGUI but the script remained on the object. UDEA2 destroys the display object when the dialogue ends so all custom functions are gone with it.

    10. The actual UDEA class has been updated slightly also. Some of the static events are now public instead, a new one has been added and the need to manually specify wether a turn is a choice or not has now been removed; meaning you can now write simpler scripts from here on out but it will still work with your old scripts. It doesn't break them, it just makes some of the stuff you do in it redundant. Also, one of the functions you needed to override to use the UDEA with kits like NGUI can now be avoided by ticking a field in the inspector.

    I think that is about it.... So those are the major changes between version 1 and version 2. As I said, the new features are worth it but it is 100% guaranteed to break all existing projects that use the UDEA so I ask you: what would you prefer? A mandatory upgrade for free that is guaranteed to break your projects or an optional $10 paid upgrade path?

    Those of you who own the UDE or the UDEA will always have access to it and can upgrade when you want to. Once the UDEA2 is released, both the other versions will be removed from the store and only the UDEA 2 will be available to new customers.

    Please feel free to send me your opinion via PM or via my website contact form.
    Thanks
     
    Last edited: May 11, 2015
    boysenberry likes this.
  44. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Well I picked up UDEA during the 24 hour sale for only like 5 bucks or so and I haven't used it in any project yet, and probably won't for a couple months or so. I don't think I would pay another 10 bucks just to upgrade something I haven't even used yet to a new version, but I guess you should definitely give priority to customers who paid full price of $35 and can't afford to have a broken project if you update the existing UDEA. Personally, 35 dollars would sting me a bit but I don't really mind eating the 5 dollars, consider it a donation lol.
     
    boysenberry and MrDude like this.
  45. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    @eridani
    Thanks for the feedback

    For now, though, use the kit you got. It's been well loved by many for a very long time. Once you are ready to upgrade it, contact me and let's see if there is a way I can help you out. Even if it's off the asset store direct download links to the latest version...

    Seriously, my goal here is to do the right thing by you, my customers, not to be an ass. Which is why I am asking for my customers to tell me what they want me to do. :) You got yourself a very decent and capable dialogue engine for $5. Trust me, once you start to use it you will find it is so much more than what you bargained for... Many customers do. So I recommend you start playing with it for a bit and see how it works, even if you don't need it yet. You might just be surprised and discover a need for it in your projects.. That is after all, why I included the shop system. To show people this kit is capable of much, much more than what is advertised if you only apply a bit of imagination. I mean who ever heard of a dialogue engine being an inventory and a shop system and a save game system?

    If you want to upgrade that kit to an even better one, it will cost you $10 more. If you can't afford that then contact me and we can work something out. Like I said, my goal is to do right by you so just speak to me and tell me what's up and we can take it from there :)
     
    eridani and boysenberry like this.
  46. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Okay well this is a bit of a downer but hey, what can you do?

    The ActionsHUD was rejected on the store because I included the graphic that shows the difference between the paid and free versions. As a result I have removed the graphic and now no longer say that other developers may freely include the free version in their own assets if they so choose...

    As such, that fact now becomes a secret and you fine folk are the only ones to know about it :) So... if you like the way the original ActionsHUD works and you think it might help you in a project you are creating for the asset store, you are welcome to download it from my website and include it in your own assets.

    Credit and possibly a link to my site would be nice but entirely optional. I hope it proves useful :)

    Enjoy.
     
  47. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
  48. rayfigs

    rayfigs

    Joined:
    Feb 8, 2009
    Posts:
    41
    Hi, is it possible to use animated sprites as actors? I have a sprite sheet with various characters and animations which I would like to use for my avatars is this possible?

    Animation aside would it be possible to have my sprite sheet and to reference a particular sprite in the sprite sheet?

    Thanks,
    Reinaldo
     
  49. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    That will require a bit of wangling, unfortunately... I tried accessing sprites inside a sheet but that turned out badly, unfortunately. I use resources.load to load the sprites and that, as you can imagine, doesn't work well...

    Fortunately, there is a very simple workaround but like I said it wold require a bit of wangling. Here is what you do:

    1. Find the prefab for the display you want to use
    2. Add an Animator component to the avatar Images
    3a. In the display script, create an array of type Animator[] in case you have each animation or each character's animations in a separate AnimationControler
    3b. If everything for all characters is in on large AnimationController, just add it directly to the Animator in step 2
    4. This is where the A comes into play between the UDE and the UDEA... This is a perfect example of how to add new functionality to the system :D

    What you would do now is open up your dialogue script itself and for each avatar defined under <Actors> you can either leave them alone or set them to load a 1 pixel tall sprite. That field is required by the system but you won't be using that any longer so just to save on some memory, set it to a 1 pixel image (or leave it be, it won't break anything).

    Now come the fun part.... :D
    At each <turn> node, add in:
    [animator] BillyControlller
    [clip] Wave
    ...for example, where BillyController is something in the Animator array you created in step 2 and clip is an animation in that controller.

    Now go back to the display script and in the OnSpeakEnd event where I currently assign the sprites to the Images, replace that code with a lookup through your array created in 3 above (if you used 3a.) doing something like this:
    (Assuming your array was called MyAnimations)
    Code (csharp):
    1. foreach(Animator a in MyAnimations)
    2.     if (a.name == CurrentLine.String("animator")
    3.     {
    4.         avatar_image.GetComponent<Animator>().RuntimeAnimationController = a;
    5.         a.Play( CurrentLine.String("clip") );
    6.     }
    7.  
    ...and that should do the trick. So basically, no, the UDEA doesn't support animated sprites out of the box but in a few minutes you can add that functionality :) The dialogue script allows you to add any fields you like and give them any values you like so basically, all I did here was add an array of AnimationControllers to the display script and in the dialogue I say which one of them to use. That's basically it. :)

    Hope this helps. If you do have any other questions, feel free to ask :)
     
    Last edited: Jun 2, 2015
  50. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Of course... that is the hard way. There is a much simpler way...

    For each actor under actors, just add an extra field giving the name of the animation controller.I.e.
    Code (csharp):
    1. <actors>
    2. <actor>name=Billy; avatar=blank; animator=BillyController
    This means you can now skip adding [animator] to every single turn in your dialogue. Now, when you get to the OnSpeakEnd event handler, simply do this:
    Actors[ WhoIsSpeakingID ].String("animator");
    ...instead of using
    CurrentLine.String("animator");

    There is a way to make it even easier still but I am not a big fan of this way... Since you are already adding in the AnimationControllers for each character directly into the prefab used by all characters, well... You COULD simply add all your game's actors to every dialogue file you make. Simply copy paste it from one script to the next. Now, when you add the AnimatorControllers to your array, just make sure to match their order with the order in which you defined the actors. This way you skip looping through the array and just access the controller directly using WhoIsSpeakingID... like so:
    Code (csharp):
    1. avatar_image.GetComponent<Animator>().RuntimeAnimationController = MyAnimations[WhoIsSpeakingID];
    2. avatar_image.GetComponent<Animator>().Play( CurrentLine.String("clip") );
    By doing this it means you don't have to add anything to the <actor> node and you can skip looping through your array... but it means that all dialogue scripts must now have all actors defined inside them and in the same order, always.

    You can see why I think that is a bad idea... It's just sloppy and if you ever want to add a new character you need to modify all scripts...

    The first method will work just fine but is a lot of extra typing
    The second method is by far the best method
    The third method has by far the least typing to do and wins the award for Most likely to make you pull your hair out" :p

    I would stick to method 2 :p
     
    Last edited: Jun 2, 2015