NPC Chat is a powerful prefab and chat box system that allows you to quickly configure events, dialogue, notifications and more in a few quick steps.
Simply add an NPC Chat object to your scene and assign the required inspector references (player transform, chat box to use, text, events and trigger settings).
Many options are available to customize how you can use NPC Chat for different purposes.
Chat Box Features:
• Unity UI – the box is made from standard Unity UI components, simply edit or duplicate as needed if you want to customize the layout or design in any way for various needs.
• Title and Dialogue Text – the basics of any dialogue system.
• Dynamic Buttons – chat conversations can use up to 6 pre-configured buttons using the familiar inspector UnityEvent from the NPC Chat object when configuring page dialogue.
• Render Texture Camera – allows for a speaker to be animated in a portrait window of the chat box.
• Lerp In/Out Settings – the box can animate in-to and out-of screen space when a conversation starts or stops.
NPC Chat Features:
• Optimized Inspector Workflow – a clean inspector layout that provides quick access to all the settings you need.
• Conversations and Pages – each NPC can have any number of conversations, each conversation can have any number of dialogue pages, each page can use any chat box.
• Chat Manager – assign a Chat Manager ScriptableObject to control which NPC should use which conversation index.
• NPC Chat Options – assign a NPC Chat Options ScriptableObject to control settings (start/stop triggers, input triggers, distance check, scrolling text, outline, single use, and more).
• Page Audio – assign an audio clip to be played for a conversation page.
• Page Buttons – chat conversations can use up to 6 pre-configured buttons using the familiar inspector UnityEvent. Set the button event and button text.
• On Chat Start/Stop Events – setup conversation start/stop callback events using the familiar inspector UnityEvent. Trigger whatever you want to happen!
• Outline – assign a mesh, skinned or sprite renderer to recieve outline effects based on NPC Chat states (distance, mouse over, active).
I was looking for a suitable forum to ask some questions about this asset but this seemed the most fitting I could find. If I’m in the wrong area or whatever, let me know and I wont repost here or I’ll keep my questions to the right area (still getting used to the site rules).
I’m using this asset, it works fine in the demo scene, and although I have a platform input based character control setup, I modified a separate prefab of my character to use the third person controller and camera so I could interact with the dialogue triggers.
In the demo scene, it works fine and my player will interact with the dialogue boxes, even before I removed the platform input setup for 3rd person it worked okay on some of them, but In my actual game my character refuses to interact with them. I tried modifying the 3rdpersonNPC script to be a platform input one, and added the extra functions and scripts to turn off when the dialogue was running but no joy. Any suggestions or just keep on tweaking?
Bought it, thanks! I’m working on a Unity 5 networking multiplayer setup. The player is being spawned using Network Manager, so is not in the scene initially. I have a test cylinder setup in the scene setup with NPC chat. I’m unable to get the NPC Chat Player Transform to work with the spawned player prefab (I do have it tagged as Player), partially. Once the spawned player approaches the NPC Chat zone, the distance to chat (where the sphere turns green) doesn’t work. The chat trigger does for the chat itself, however. Everything works fine when I switch the triggerer to something that’s in the scene initially. Do you have any suggestions on how to proceed with this spawned player/multiplayer issue?
I’m not really sure, but it sounds like it is player collision related on your player object. My first question would be does your player object that’s tagged player have a collider? A single collider on your player object with that tag is what initializes chat on collision. The network portion of your project should not make this function differently.
If you would like you can contact me by email for support and also through skype with screen share for help debugging.
Hi I’m new to unity and I’m looking at buying this pack but I needed to know first is this script able to work on a 2d box collider setup?
I have nearly completed a basic demo of my JRPG style game and just looking for a asset pack that I can just drop into my game for on collision text and cinematic text boxes.
This should work just fine for 2D, a minor adjustment might need to be made for for the collider trigger check in the code. If you decide to buy send me an email if it doesn’t work and I’ll update the package and send back to you a working 2D demo scene.
Hello, I need help. Even after watching the video “Creating Structured, Dynamic or Sequenced Dialogue” several times I can’t figure out how to create a structured dialogue. The termini (whats the difference between "conversation, dialogue and chat pages?) is such confusing and your mouse is jumping too nervous over the screen in the video. What I can do is displaying a chatbox with text and bottoms. When clicking a bottom action happens (calling a script function). So far so good. What I want to do is: After clicking a buttom, action should happen, but additional a different text and buttoms should appear depending which bottom was clicked. So there should be a structured dialogue, depending on the choice of the player. EDIT: Ok, figured it out. Important is that there a Bottom Element “NPC Chat” with the parameter “NPCChat.StartConversation” so that the next conversation is shown automatically. But it might be interesting for others to describe the whole way. (In a structured video ) NPC Chat is a great tool, but with lack of description.
Thanks for the feedback, it’s very helpful to hear. I’ll be focusing on NPC Chat updates very soon and plan to improve the editor and workflow to make configuring more complex dialogue easier and faster. If you need help at anytime you can email me for skype info and I will help you solve any problem you might face relating to using the asset.
Let me know if you need any help with anything. I’ll also redo the tutorials when I update the asset.
Hello,
I am a beginner.
I want to know NPC Chat can add scripted buttons with the dialogue with dialog Bubbles. the player will evaluate the message communicated by NPC by pressing a button “For” or “Against”.
Thank you
Yes, NPC Chat can have up to 5 buttons on each dialogue page that can call different public methods from your scripts. There’s a demo scene that let’s the player do this with a computer terminal to open/close the door and turn on/off the fan, as well as have a conversation with an NPC that has multiple outcomes based on the players answer.
Added example script to demo scene to demonstrate how a player controller can be stopped when dialogue starts using the standard assets 3rd person character controller.
Added “Disable On Chat” array to inspector this array can be used to disable assigned components on chat start and enable them on chat finish.
Added “On Chat Event()” to the inspector, use this to configure custom events when chat starts.
Added “On Stop Chat Event()” to the inspector, use this to configure custom events when chat stops.
With this release I feel the asset has matured to reach its potential; of course anything can always be better and I will continue to reiterate on my design to improve this asset based on more feedback and by adding any requested features, or implementing new design methods that make sense.
Added “Auto Find Player By Name” option to NPC Chat inspector. If a player is not assigned, NPC Chat will repeatedly search the scene for the named Transform.
Is there a way to enable buttons when text has finished completely displaying in the chat box?
So I want it disabled until the all text is displayed then I want the button to dynamically be enabled…
I need this to prevent user from pressing the button to soon.