Search Unity

[RELEASED] Dialogue System for Unity - easy conversations, quests, and more!

Discussion in 'Assets and Asset Store' started by TonyLi, Oct 12, 2013.

  1. thenamesace

    thenamesace

    Joined:
    Jan 25, 2014
    Posts:
    157
    Are you using s-inv version 1.21 its not on the asset store yet only v1.2 was only submitted last night
     
    TonyLi likes this.
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @godofwarfare115 - Make sure you're using S-Inventory 1.21 (ask SoumiDelRio if you need a copy) and import the RFPS SInventory Support package located inside Third Party Support/S-Inventory. If that doesn't fix the issue, try a clean import:

    1. Delete the S-Inventory and Dialogue System folders.
    2. Import S-Inventory and Dialogue System.
    3. Import Dialogue System/Third Party Support/S-Inventory Support.
    4. Import Dialogue System/Third Party Support/S-Inventory/RFPS S-Inventory Support.
     
  3. nosyrbllewe

    nosyrbllewe

    Joined:
    Oct 18, 2012
    Posts:
    182
    Is there not going to be any sale on the asset? The asset store version is still on 1.4.1 and you just recently submitted 1.4.3. Thanks.
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I didn't want to announce it until it was official, but v1.4.3 should be on sale as soon as it's posted on the Asset Store. Unity didn't allow a sale banner on the Asset Store image for v1.4.2, so I had to resubmit without the banner. But it will still be on sale, and the text description will reflect this. With luck it'll be posted in the next day or two!
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Ben Serviss just posted a good Gamasutra article: "Writing Interactive Fiction In Six Steps". He describes the process he used in Chat Mapper, but the same principles apply even if you don't use Chat Mapper. (The Dialogue System imports Chat Mapper, articy:draft, and Neverwinter Nights toolset.)
     
  6. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Any mobile demo? APK file?
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Shaun at Ten Tree Games reported a bug in S-Inventory consumables in Realistic FPS Prefab. It's fixed in this updated support package for v1.4.3. I also added beer and cake to the scene! :)
     
    thenamesace likes this.
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    The Dialogue System v1.4.3 is now officially on its New Year's Sale!

    Through January 18, you can get the Dialogue System at 55% off!​
     
    thenamesace likes this.
  10. Justinas_Ma

    Justinas_Ma

    Joined:
    May 8, 2014
    Posts:
    31
    Hey, 1.4.3 from asset store for some reason warns for "Complete project import"
     
  11. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    I'm having the impression that the "Complete project import" warning is always triggered after an asset download. Maybe UT did change something on there end.
     
  12. Justinas_Ma

    Justinas_Ma

    Joined:
    May 8, 2014
    Posts:
    31
    Yes, seems like it. My bad.
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I'll double check this with the Asset Store folks and get back to you all. The package doesn't include any ProjectSettings files, so it shouldn't report "complete project import". In any case, if the import window includes any ProjectSettings files (such as ProjectSettings/InputManager.asset), you can untick them to exclude them from import. Sorry about any confusion!
     
  14. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    This started happening after the asset store updated sometime during the day yesterday. Any asset you try to import will give that message. The ones I imported seemed to work ok though. Although, it would probably be best to backup your project prior to importing assets. At least until the store folks get things sorted.. :)
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
  16. MrSpanky

    MrSpanky

    Joined:
    Jan 18, 2015
    Posts:
    11
    Hey Ive been playing around a little bit with the RFPS S Iventory plugin and I can open up the iventory and see all the items it contains but I cant interact with em, regardless of where i click nothing happens. Can you point me in the right direction if I wanna for example drop an item from the inventory? Thanks love the asset really helps with learning ^^
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @MrSpanky - Are you using your own scene or the example scene in "Third Party Support/S-Inventory Support/RFPS S-Inventory Support/Example"?

    If the example scene doesn't work, please make sure you're using Dialogue System v1.4.3 and S-Inventory v1.21. Remember to import the latest "S-Inventory Support" and "RFPS S-Inventory Support' packages in v1.4.3. If it still doesn't work, let me know what version of Unity you're using. (BTW, to drop an item from the inventory window, double-click it. To consume it -- for example a medkit -- right-click and select Use.)

    If you're using your own scene, carefully set up your items as described in the Setup Items section of the manual. Usually, when you can't interact with an item in the game, it's because the tag isn't "Usable" or the layer isn't "Ragdolls/Pickups". If you can't interact with them in the inventory window, a hook-up is probably missing between the player's S-InventoryC# and the UI's InvCanvasC# . Carefully follow the instructions in the Setup UI section. Also double-check that your scene has an EventSystem (GameObject > UI > EventSystem).
     
  18. MrSpanky

    MrSpanky

    Joined:
    Jan 18, 2015
    Posts:
    11
    I was using my own scene but I now tried the example scene RFPS S-Iventory Example but with the same result. I can open up the Iventory (and see items I've picked up), Craft menu, Vendor, Chest etc but I can interact with it regardless of where I click nothing happens. It seems as it doesnt register my clicks. I tried redownloading both assets from the store this morning to make sure I had the latest versions but I still run into the same problem.

    Does the RFPS S-Inventory Example work flawlessly for you?

    I am using version 4.6.1f1 free

    also ill add that npc interaction works great its just the inventory part I cant get working.
     
    Last edited: Jan 18, 2015
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Okay, let's step through and identify where it stops working.
    • Does the S-Inventory example scene work?
      Scene: S-Inventory/Demo/SceneC
    • Does the Dialogue System's (non-RFPS) S-Inventory support example work?
      Scene: Dialogue System/Third Party Support/S-Inventory/Example/S-Inventory Example
    • Does the Dialogue System's Unity UI dialogue example work?
      Import Dialogue System/Scripts/Unity UI Support.unitypackage, then play:
      Scene: Dialogue System/Scripts/Supplemental/UI/Example/Example Scene
    The UnityUI Support stuff isn't required for S-Inventory + RFPS; it might just shed a little more light on the issue.
     
  20. MrSpanky

    MrSpanky

    Joined:
    Jan 18, 2015
    Posts:
    11
    So I made a new project with just S Inventory and Dialogue system.
    The S-Inventory demo is fine but when I tried to run the Third party Support / S Inventory / Example / S-Inventory Example it loads up the right scene (the night club looking one) but gives me these errors:

    "Assets/Dialogue System/Third Party Support/S-Inventory/RFPS S-Inventory/Scripts/FPSInventoryEvents.cs(3,36): error CS0234: The type or namespace name `RealisticFPSPrefab' does not exist in the namespace `PixelCrushers.DialogueSystem'. Are you missing an assembly reference?"

    "Assets/Dialogue System/Third Party Support/S-Inventory/RFPS S-Inventory/Scripts/SInventoryFPSBridge.cs(3,36): error CS0234: The type or namespace name `RealisticFPSPrefab' does not exist in the namespace `PixelCrushers.DialogueSystem'. Are you missing an assembly reference?"

    "Assets/Dialogue System/Third Party Support/S-Inventory/Scripts/SInventoryTreatAsConversation.cs(3,36): error CS0234: The type or namespace name `RealisticFPSPrefab' does not exist in the namespace `PixelCrushers.DialogueSystem'. Are you missing an assembly reference?"

    Seems strange since S Inventory + Dialogue example is independant of RFPS?

    Anyways so I imported RFPS again and installed the third party plugin, and now the night club scene works I can walk around and open the chests etc but I cant interact with the loot window or inventory.

    This one gave me an error tho saying

    "UnityException: Input Axis Horizontal is not setup.
    To change the input settings use: Edit -> Project Settings -> Input
    UnityEngine.EventSystems.StandaloneInputModule.ShouldActivateModule () (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/EventSystem/InputModules/StandaloneInputModule.cs:119)
    UnityEngine.EventSystems.EventSystem.Update () (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/EventSystem/EventSystem.c"

    is this my problem maybe?
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Yup, that's the problem. RFPS is a complete project asset. This means it overwrites Unity's default input settings. If another asset, such as S-Inventory, attempts to read one of the default inputs (Horizontal and Vertical in this case), input will "hang." In the next release, I'll document this in the RFPS Support and S-Inventory+RFPS Support manual pages. To fix it, select Edit > Project Settings > Input. Then add these entries:




    On top of that, I goofed (sorry) and packaged up the S-Inventory + RFPS support package wrong for v1.4.3. I included the RFPS files in the base S-Inventory support files. This is fixed in the upcoming v1.4.4, and in the interim 1.4.3a that's available on the Pixel Crushers download site.
     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Just a reminder - today's the last day of the New Year's Sale!

    A Dialogue System user asked about using a unique font only for a specific NPC in conversations. If you want to do the same using Unity GUI, import this package. It'll add a new folder named "Custom Actor GUIStyle"containing a new prefab, "Actor Style JRPG2 Dialogue UI". Assign this to your Dialogue Manager instead of the regular JRPG2. (There's a test scene if you want to see it in action. Play the scene and run up to Private Hart. His text will be in a strange red font.)

    If you inspect the prefab, you'll see that it has a new section, "Actor Styles". Add as many entries as you want. In each entry, specify the actor's name and GUI Style to use. You need to define this as a custom GUI Style in the GUI Skin "Custom JRPG2 Dialogue GUI Skin" that's in the same folder. You can use the same ActorStyleJRPG2DialogueUI script on any Unity GUI dialogue UI. The example just uses the JRPG2 prefab.
     
    Last edited: Jan 24, 2015
  23. MrSpanky

    MrSpanky

    Joined:
    Jan 18, 2015
    Posts:
    11
    Thanks for the support man, everything works great now <3
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Glad to hear! If any questions come up, or if you have feature requests, let me know!
     
  25. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    Hey TonyLi,

    Is it possible to change camera to the listener (player in this case (menu text) ) after the audio is finished?

    At this moment I'm using this sequence: AudioWait(audiofile); Camera(Medium Left); required Camera(Medium Left, listener)@{{end}}

    If the audio is longer than few seconds (actually longer than the time required subtitles to be read with the settings in 'subtitle settings') system changes camera to the listener in the middle of the audio without waiting for the audio end.

    I want the camera to be changed to the listener (player in this case and I'm using menu text for player) only after the audio is finished.

    Should I use something different than @{{end}} in this case?
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @sqallpl - Yes, use the @Message syntax. Try this:
    Code (sequencer):
    1. AudioWait(audiofile)->Message(Done); Camera(Medium Left); required Camera(Medium Left, listener)@Message(Done)
    Like you said, {{end}} is the duration specified by 'subtitle settings', which is based on the length of the subtitle text. It doesn't consider the duration of sequencer commands, since it's possible for sequencer commands to run for a variable amount of time. The "->Message(x)" tells the command to send a message x to the sequencer when it's done. The "@Message(x)" tells a command to run only after the sequencer receives a message x.
     
  27. MrSpanky

    MrSpanky

    Joined:
    Jan 18, 2015
    Posts:
    11
    Hi I ran into another problem while playing around with the rfps s inventory example.

    made an album here showing the problem http://imgur.com/a/93RIp

    So basically the problem is this, when you pick up the katana it goes into your arm but another copy goes into your inventory. When you remove the katana from ur arm you end up with 2 katanas in your inventory even though you only picked up one.

    However you can only interact with one, so for example it works to drop one of them but when you try to drop the other you get a error saying "The object type Transform has been destroyed but you are still trying to access it" (as seen in the third image) So it seems like the other one is just an unremovable icon?

    The weird thing is that the shotgun pickup works flawlessly and runs on the same scripts. Any clue as to why this is happening?
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I accidentally left an "SInventory Pickup" script on the Katana. Like the Shotgun, it should only have an "SInventory Weapon Pickup" script. Since the Katana has two pickup scripts, you get two copies in your inventory. This is fixed in the updated package that will be in today's v1.4.4 release.
     
  29. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384

    Thanks! Fast and valuable reply as always.
     
  30. MrSpanky

    MrSpanky

    Joined:
    Jan 18, 2015
    Posts:
    11
    Thanks best support ever :eek:
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Thanks!

    Version 1.4.4 was just released! It should be on the Asset Store in a few days, and you can download it immediately from the Pixel Crushers customer download site. (PM me your Asset Store invoice number if you need access.)

    Version 1.4.4
    Core
    • Added: Can now pause conversations and sequences (see How do I pause the Dialogue System?).
    • Added: Lua Code and Send Message actions to Quest Trigger.
    • Improved: Selector now also supports 2D.
    • Fixed: Bug in CSV export swapped Conditions and Script fields.
    • Fixed: BarkDialogueUI was playing sequences twice.
    • Unity UI:
      • When Auto Focus is ticked, the first response button is now auto-focused instead of the last.
      • UpdateLocalizedUILabels has an option to automatically save the player’s current language selection to PlayerPrefs and automatically use this setting when restarting the game.
      • In Unity 5, the scripts use AnimatorState.fullPathHash instead of the deprecated AnimatorState.nameHash; silences an “obsolete property name” warning.
    Third Party Support
    • Action-RPG Starter Kit support: Added Exit Program button to main menu.
    • S-Inventory + Realistic FPS Prefab support: Fixed consumables and a misconfigured katana pickup.
     
  32. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Hi Tony, is your procedural quest generator still being planned for an end of January release? I'm eagerly waiting to utilize it in my projects. Thanks so much!
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @eridani - Thanks for asking about it! I got more feedback than I expected on quest generation and the emotion-driven faction system, so I'm running a little behind schedule implementing all the ideas. Both assets are being developed in parallel because they use some common foundation code, but they'll be two separate products that won't depend on each other if you only want to use one. I'll send you a beta version by January 31!
     
  34. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    What is the emotion-driven faction system? Does it have anything to do with RFPS? Anyway, it's awesome you are doing so much stuff and I look forward to the beta test!
     
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @eridani - The emotion-driven faction system is like Mass Effect's relationship system except it's procedural instead of hard-coded. You define each NPC's personality traits, and tag actions with certain traits. When an NPC witnesses or hears about a player's action, he can judge it against those traits and update his like/dislike value and emotional state. So if you do a lot of dishonest actions, you might get the attention of the master of the Thieves Guild and receive a procedurally-generated quest.
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Mauricio Garcia at The Game Kitchen (makers of The Last Door) wrote a great article about integrating the Dialogue System: http://thegamekitchen.com/blog/?p=52

    If you enjoy a good story, you can play all the past episodes of The Last Door for free here and help support the development of the next episode: http://thelastdoor.com/
     
  37. Justinas_Ma

    Justinas_Ma

    Joined:
    May 8, 2014
    Posts:
    31
    Hey there i noticed a slight bug regarding the sequencer I think. I'm using optional before response menu continue button appearance with typewriter effect (and the continue button which skips typewriting first) also I am using AudioWait sequence in each line for VA delivery. If you have multiple lines by the same character in sequence and quickly skip through first line, the sequencer doesn't launch audio for the second line. If you don't manage to reproduce it, msg me, I'll send you a small project with the bug.
     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @Teshla - I'll try to reproduce this and get back to you. Do you have multiple dialogue entries (nodes) by the same character, one after the other? Or multiple AudioWait() commands within the same Sequence field for a single dialogue entry?
     
  39. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    So this sounds like it might play into what I have planned.. Or maybe not.. lol What I am hoping to do is have a faction system where races might default to a certain faction but then based on how the player plays and quests they do, they would actually have the ability to flip factions or become neutral to all. Basically going with a light and dark type system where light could be equivalent to good and dark to evil. I'd be interested in taking a look at that too Tony. Let me know if you need more testers for it. I'm still early in my development, but I could throw up a quick test project for testing.
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Thanks! I'll contact you when the beta is ready.
     
    BackwoodsGaming likes this.
  41. pwas

    pwas

    Joined:
    Jan 14, 2015
    Posts:
    11
    Hello,
    Asset is wonderful but I've one question for which I can't find answer in documentation (maybe I've missed that). Is it possible to display two avatars at the same moment (by default, the current conversant avatar is displayed only)?
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @pwas - Yes, using a small override to the dialogue UI. CarterG81 does this for Away Mission:



    You can get instructions starting on this post, and download the override package from this post.
     
  43. pwas

    pwas

    Joined:
    Jan 14, 2015
    Posts:
    11
    Super, thank you very much, I will take a look.
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @Teshla - sorry, that was indeed a timing bug. AudioWait() always cleans up after itself by stopping the audio source when it's done. The continue button fast forward started the next AudioWait(), and then the previous AudioWait() immediately stopped the audio source in the same frame. This is fixed in patch 1.4.4a, which is available on the Pixel Crushers download site.
     
  45. Pedro-Alaiagames

    Pedro-Alaiagames

    Joined:
    Apr 15, 2014
    Posts:
    28
    Hello!

    Its posible to call a function in a c# Script from sequence command line easily?

    Thanx.
     
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @Pedro Alaiagames - Yes, the easiest way is to use the SendMessage() sequencer command. It accepts a string parameter or no parameter. For example, say you add this script to a GameObject named Bomb:
    Code (csharp):
    1. public class BombBehaviour : MonoBehaviour {
    2.  
    3.     public void Explode() {
    4.         Destroy(gameObject);
    5.         Instantiate(Resources.Load("ExplosionEffect"));
    6.     }
    7. }
    Set your Sequence field like below to call BombBehaviour.Explode():
    Code (sequence):
    1. SendMessage(Explode,,Bomb)
    You can also create your own custom sequencer commands. It's a simple process: copy the template file, rename it, and add your custom code.
     
    Pedro-Alaiagames likes this.
  47. Pedro-Alaiagames

    Pedro-Alaiagames

    Joined:
    Apr 15, 2014
    Posts:
    28

    Is a good Idea registering a C# function in Lua enviroment to call C# code and trigger my code inthis way?
    Thank you very much
     
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Yes, that's a good idea, too. Then you can use it in the Script and Conditions fields.
     
    Pedro-Alaiagames likes this.
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Someone recently asked why a player script wasn't receiving OnConversationStart and OnConversationEnd messages. (See Script Messages for a complete list of messages.)

    Two things to keep in mind:

    1. Your method should use this signature:
    Code (csharp):
    1. void OnConversationStart(Transform actor) {...}
    2. Make sure the player GameObject is assigned as one of the participants (actor or conversant) in the conversation. The Dialogue System broadcasts OnConversationStart and OnConversationEnd to the Dialogue Manager GameObject and both participants. If you're using a Conversation Trigger set to OnUse or OnTriggerEnter and you leave the Actor field unassigned, the trigger will automatically set the actor to the GameObject that triggered it. If you're calling DialogueManager.StartConversation() in a script, use one of the forms that specifies an actor, such as StartConversation(string title, Transform actor, Transform conversant).
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    A patch (1.4.4b) is available on the Pixel Crushers customer download site. (PM me your Asset Store invoice number if you need access.) It contains:

    Patch 1.4.4b:
    • Fixed: AudioWait() timing issue with continue button fast forward.
    • Improved: UnityUIBarkUI now deactivates and reactivates UI elements to trigger OnEnable effects such as the typewriter effect.
    • articy:draft Converter: Now converts all properties in template feature lists, not just the first property.
    • plyGame: Added plyGameBridge sync checkboxes so you can choose what to sync to Lua (attributes, factions, skills, and/or items).