[SALE 50% OFF] Dialogue System for Unity - easy conversations, quests, and more!

Thank you very much for this. I will have to read up on the WYSIWYG system. Those video tutorials will help a lot too. Will the variables defined in the database values be saved also?

Oh it would be great if you could add a function to work with mysql. One we could enter our web link and it would save the data to our DB.

Oh forgot to ask. Would the variable be global that I add for currency? Like could I use it for pickups drops or just rewards for a kill?

Tony, many thanks for the quick reply to my PM. I’m still on UFPS 1.4.4, so that explains why I’m getting that message after importing UFPS support.

It already does, at least to the degree that it applies to the Dialogue System’s design goals. articy:draft and Chat Mapper both support all kinds of world data. articy handles data more generically, which has its advantages and disadvantages. Chat Mapper is designed more clearly toward NPC interaction, so you start with more structure, and the path to writing conversations is clearer.

The Dialogue System follows the Chat Mapper model (although articy support has been implemented and should be in the next release). The basic data entities are Actors, Items, Locations, Variables, and Conversations. But in Chat Mapper and the Dialogue System’s built-in editor, you can add new data fields to any of those entities, either directly in each entity or globally in templates. For example, the Ultimate FPS and Realistic FPS support scripts add data fields for inventory and character stats.

Please make sure you’re using the latest version of UFPS and 1.0.9a of the Dialogue System package for UFPS. (I sent you the download page directly.) It’s been tested with UFPS 1.4.5 and 1.4.6b. Delete the Third Party Support/UFPS folder before re-importing the 1.0.9a package. If that doesn’t do it, please let me know what versions of Unity and UFPS you’re using.

The demo scenes on the website are just there to demonstrate a little of what’s possible with the Dialogue System. Unfortunately, they use third party art assets so I can’t redistribute them. I’m sorry that wasn’t clear. I’ll update the website to clarify. If you have any questions about how anything in the demos was done, I’m happy to explain and provide the parts that I can legally redistribute such as the Chat Mapper projects.

No, you didn’t miss anything. I debated including a mention at all, since it’s really a pedantic point. Technically, what they patented is:

See: http://www.google.com/patents/US8082499

It isn’t so much the wheel shape as the idea that you have multiple choices, and the types of choices (good, evil, etc.) use roughly the same positions on the screen. That’s a very general idea that pretty much every game with conversations uses. I should probably just get rid of the note to prevent confusion or worry.

Thanks! If you have any other questions or requests for new features, just let me know!

There’s a video tutorial for the Unity GUI WYSIWYG system on the website. It’s not as full-featured as a dedicated GUI product like Daikon Forge or NGUI, but I think it gets the job done. :slight_smile: Drag one of the provided UI prefabs into a scene, expand it, and enable the GUIRoot object to see what they’re made of. They all follow the same basic format.

Yes, variables defined in the database get saved, with a few exceptions that will be documented in the 1.1.0 version of the Save/Load System manual page. The exceptions are mostly static data items, such as the link definitions between dialogue entries, which would be a waste to save and load.

I’ll add that to the ideas list. Thanks! In the meantime, you can do this with any third party product that lets you save to external data sources such as MySQL DBs. When you save in the Dialogue System, you get a savegame file in the form of a big string. You can do whatever you want with it: save it in PlayerPrefs, write it to a file on the local hard drive, or use something like UniSqlite to save it to a database.

In the Dialogue System’s Lua environment, it would be a variable in the global “Variable” table. For example, in the 1.1.0 release of the Realistic FPS Prefab integration example, there’s a variable named Zombie_Kills that tracks how many zombies the player has killed. Every time a zombie is killed, this Lua code gets run:

Variable["Zombie_Kills"] = Variable["Zombie_Kills"] + 1

It gets run during gameplay, independent from conversations.

Similarly, the 1.0.9 example has a quest where you need to get a shotgun for someone. When you pick up the shotgun, it runs this Lua code:

Variable["Has_Shotgun"] = true

That got replaced with a more full-featured inventory integration in 1.1.0, but it shows that you can save pretty much anything into the Lua environment for use by the Dialogue System or any other part of your gameplay. And all of these variables get saved when you use the Dialogue System save/load features.

Great I will look for 1.1.0. to come out.

Of course, fair enough - thanks for clarifying.

Wow, that patent is ridiculous! Yeah, I’d just remove your readme file. Again, thanks for clearing that up.

When does 1.1.0 come out anyway?
Opps found it sry.

I expect to put 1.1.0 on the website on Wednesday, and the Unity folks should have it on the Asset Store about 7 days later, give or take. I’ll post a notification on this thread when it’s available on the website.

Good deal. I am digging into this kit working with UFPS and your new update will be big for my game. Are the feature notes posted on your site?

Yes. I prefer using the fullscreen version rather than the one framed within the main website, so here are the links:

Version 1.1.0 includes a lot more documentation on gameplay integration.

The Roadmap changed significantly based on customer requests and includes many new features for UFPS and Realistic FPS Prefab, as well as the Unity GUI and Daikon Forge GUI systems.

The draft version of the UFPS integration notes for 1.1.0 is:

Gameplay Integration with Ultimate FPS (UFPS)

In Third Party Support, you’ll find example integrations with VisionPunk’s UFPS. (These require VisionPunk’s UFPS.)

The Shallow example uses Dialogue System features such as Set Enabled On Dialogue Event to switch between UFPS gameplay mode and dialogue mode.

The Deep example uses UFPS features to suspend UFPS gameplay and interact with an NPC to start a conversation, synchronizing UFPS data between UFPS and the Dialogue System.

On the Deep example’s AdvancedPlayer, these scripts were added:

  • FPFreeze Player: Freezes gameplay and shows the cursor during conversations. The Freeze() and Unfreeze() methods are also used by the example scene’s main menu.

  • FPPersistent Player Data: Records the player’s position, health, and inventory. When loading a game, this component uses UFPS methods to restore the position. Overrides the name to be “Player”, which is the name defined in the dialogue database. (Note: Script name changed in 1.1.0.)

  • FPSync Lua Player On Conversation: Synchronizes the player’s health and inventory in UFPS with the inventory in the Dialogue System’s Lua environment so conversations can check and manipulate it. (Note: Script name changed in 1.1.0.) This script uses FPPlayerLuaBridge.cs, which does the actual synchronization. You can use FPPlayerLuaBridge.cs separately from FPSync Lua Player On Conversation in your own scripts, too. It synchronizes:

  • The player’s health is in Actor[“Player”].Health.

  • The player’s weapons in Variable[“1Pistol”], Variable[“2Revolver”], etc. for all weapons defined in the player’s vp_SimpleInventory. If the value is 0, the player does not have the item. If the value is 1, the player has the item. If you set a value during a conversation, the change will be reflected in the UFPS player at the end of the conversation.

  • The player’s inventory (ammo) in Variable[“AmmoClip”], etc., for each type of ammo used by the player’s weapons. The value of this variable represents the quantity of the item that the player possesses. If you change it in a conversation, the player’s vp_SimpleInventory will be updated at the end of the conversation.

On the NPC, Private Hart, a child object named “AI” contains these components:

  • FPInteractable Dialogue: Derived from vp_Interactable, this component makes the NPC interactable within the UFPS framework. When the player interacts with the NPC, this component sends an OnUse message to the NPC. If the NPC has a Conversation Trigger configured to listen for OnUse, it will start a conversation.
  • Conversation Trigger: Starts the conversation when FPIteractable Dialogue sends an OnUse message to the NPC.
  • Set Enabled On Dialogue Event: Disables the FPInteractable Dialogue component during conversations.
  • Persistent Position Data: Records the NPC’s position for saving and loading games.

Sharing other data:

You may want to share additional data between UFPS and the Dialogue System. One way to do this is to put that information in the Dialogue System’s Lua environment using the Lua.Run() method. If you set a user variable using PixelCrushers.DialogueSystem.Lua.Run(), then dialogue entries can check and/or change the value.

This is just an FYI. dreamlarp let me know that the current versions of DFGUI and UFPS conflict with each other. The Dialogue System is compatible with both, but we can’t control whether DFGUI and UFPS play well with each other. I suspect they’ll fix the conflict soon, but if you’re in a hurry dreamlarp suggested using NGUI with UFPS.

They recently posted some updated scripts on the DFGUI site. I think it was how he was using reflection in two of his inspector scripts. The next version will have the fixes integrated but you can go update now if needed. I’m using UFPS with DFGUI fine after the fixes.

Great thank you. good to know. I bought and wanted to use these three together.

A customer asked for a tutorial on using the Dialogue System’s Unity GUI system for purposes outside of dialogue UIs, in particular with Ultimate FPS.

That tutorial is now on the Dialogue System tutorials page: Video Tutorials - Pixel Crushers

Direct YouTube link: http://youtu.be/klaMta6-Gl0

1416573--74327--$Screenshot.png

Version 1.1.0 has been submitted to the Asset Store and is available for immediate download on the Pixel Crushers website. For access to the customer download page, please PM me with your invoice number.

Support for articy:draft was postponed until 1.1.1 based on tester requests for a few additional features. I didn’t want to delay the release of 1.1.0 because it’s already packed with a lot of new features and content and a few bug fixes:

Version 1.1.0 Release Notes

General:

  • New: Added Quest Trigger and Set Quest State On Dialogue Event (see Triggers).
  • New: Added Allow Only One Instance checkbox to Dialogue Manager settings; if checked, it enforces singleton behavior.
  • New: Added Allow Alerts During Conversations checkbox to Dialogue Manager display settings.
  • Fixed: Lua.Run().AsInt/Float can now also convert string values if they represent valid numbers.
  • Fixed: Automatic monitoring of Variable[“Alert”] was disabled; now re-enabled.
  • Fixed: Improved the display of multiple alerts shown in rapid succession before the previous has fully faded.
  • Fixed: Parsing bug in dialogue entries containing multiple [lua()] tags.
    User Interfaces
  • New: Added Unity Dialogue UI “Circle”.
  • New: Added Unity Dialogue UI “Sci-fi” and accompanying quest log window.
  • New: (2D Toolkit) Added 2D Toolkit UI support for dialogue UIS and bark UIs.
  • New: (Daikon Forge) Added bark UI implementation for Daikon Forge GUI.
  • New: (Daikon Forge) Added Daikon Forge GUI Dialogue UI “Fantasy”.
  • New: Added option to auto-size Unity GUI labels and buttons to exactly fix their content.
  • Change: Refactored common code in dialogue UI systems into an abstract class. Updated Unity Dialogue UI system to use this; if you have a custom UI, you may need to relink the control properties on your Unity Dialogue UI component. The NGUI and Daikon Forge UI systems will be updated in the next release.
    Gameplay Integration
  • New: (Realistic FPS Integration) Added LuaOnDestroy to facilitate kill counts/quests.
  • Change: (Realistic FPS Integration) Replaced RemoveWeaponHandler with more flexible FPSLuaBridge, also tracks hit points, hunger, thirst, and weapons.
  • Change: (Realistic FPS Integration) Updated example scene with additional quests and conversations.
  • Change: (UFPS Integration) FPSyncLuaPlayerOnConversation replaces FPSyncLuaInventoryOnConversation, also tracks health, handles inventory more robustly.
  • Change: (UFPS Integration) FPPersistentPlayerData replaces FPPersistentPositionData, also saves and loads health and inventory.

As always, if you have any questions or feedback, please PM, email, or contact me on the website any time.

Thank you for the tutorial. Will MySQL support be in the next update?

Probably not in the very next update, but in a future update. The next update is going to focus on articy:draft support, since I’m behind schedule on releasing that. In the meantime, you could look into a third party solution like Combu. I haven’t used it, but it looks like it might meet your needs. Or, if you’re looking for a free solution and you don’t mind writing a little code, you could follow this tutorial: http://www.codeproject.com/Articles/43438/Connect-C-to-MySQL

Thank you but I am thinking more of cloud save since I have
BFS Google Play Game Services plugin.
http://forum.unity3d.com/threads/186087-BFS-Google-Play-Game-Services-Plugin

Reading through the google development docs and with him adding multiplayer soon this looks like the best option for the game I am making.
Once he does implement multiplayer you might want to look into making this kit support his like you did with many other plugins.

But having mysql support will add to your kit so later yes add this.

Thanks for pointing me to that plugin. I’ll add it to the roadmap for the Dialogue System!

Hi,

Does this have any integration with Mecanim?

Thanks,

Lee