Skip to content

NansPellicari/UE4-DialogueSystem

Repository files navigation

UE4 Dialogue System (WIP)

Presentation

This plugin offers nodes to use in Behavior Trees. With them we don't need a new dedicated interface to use in Unreal Engine's Editor, you can add your dialogues next to other basics AI actions. Plus, it works with the Gameplay Ability System and provides a basic Dialogue ability you can tweak.

⚠️ This is still a Work In Progress plugin. For now, docs and some very useful features missing to use it in a production games, like serialization of the Dialogues History (see below) to allow saving data across levels or make a savegame, but keep in touch!

Buy Me A Coffee
I've decided to make all the code I developed for my games free to use and open source.
I am a true believer in the mindset that sharing and collaborating makes the world a better place.
The thing is: I'm fulltime dedicated to my project and these open source plugins, for coding I need a looooot of coffee, so please, help me to get my drug 😝 !!

1. Requirements

1.1. UE4 Plugins

2. Features

2.1. Behavior Tree's nodes

Node Node Type Usefull for/when
Prepare Dialogue Service ⚠️ Mandatory: It should be set directly on the first node after the Root node. It prepares 3 mains features:
- Instantiate a service which communicates with PlayerDialogueComponent to manage dialogue points and instantiate Dialogue ability
- Instantiate a service which manages difficulty for each dialogue
- Prepare IDialogueHUD to display Dialogue UI and save previous displayed UI
Clear Dialogue Service ⚠️ Mandatory: it should be used right before leaving the Behavior Tree. It removes dialogue UI and clear services. In case the BT aborts, the AIDialogueComponent do the same cleans.
Check UI Display Decorator This just checks if the UI you asked is currently displayed.
Check Dialogue Results Decorator You should probably never use it, but it exposes the full search API. All other "Check" BT Decorators bellow are just most intuitive interfaces but use exactly the same API underneath.
Check Earned Points Decorator Will search and compare all points earned (unmitigated) by categories in the current Dialogue session.
Check Points In Step Decorator Will search and compare points earned (unmitigated) in a specific step (Dialogue block).
Check Response Position Decorator Will search and compare the response position which has been chosen in a specific step (Dialogue block)
Create UI Task Will call the IDialogueHUD method DisplayUIPanel()
Note To Player Task ⚠️ This task required to override AMessageableHUD (from the NansUMGExtent plugin) in your HUD class, see HUD implementation example
Talk To Player Task This will use a dedicated panel of the current dialogue UI to prompt a NPC message.
Button Sequence Task Offers you an interface to configure the ButtonSequence Dialogue's UI, more details in the UIs sections.
Simple Responses Task Offers you an interface to configure the SimpleResponses Dialogue's UI, more details in the UIs sections.
Wheel Responses Task Offers you an interface to configure the WheelResponses Dialogue's UI, more details in the UIs sections.

2.2. Components

2.2.1. AIDialogueComponent

This is a really basics component for now (more will comes for it), its purpose is to clean up the Behavior Tree its NPC owns when a dialogue aborts.

see AIDialogueComponent.h

2.2.2. PlayerDialogueComponent

Its purpose is to save all the Dialogue results, communicate with the Dialogue Ability and make some searches in the last Dialogue results.

see PlayerDialogueComponent.h

2.3. Dialogue History

ℹ️ WIP

More detailed docs

2.4. UI

ℹ️ WIP

More detailed docs

2.5. Dialogue Ability

ℹ️ Soon

3. Plugin Parameters

Take a look at the dedicated chapter in the Make It Works page.

Make it works

Look at the Make It Works page

4. Contributing and Supporting

I've decided to make all the code I developed for my games free to use and open source.
I am a true believer in the mindset that sharing and collaborating makes the world a better place.
I'll be very glad if you decided to help me to follow my dream.

How? With
Donating
Because I'm an independant developer/creator and for now I don't have
any income, I need money to support my daily needs (coffeeeeee).
Buy Me A Coffee
Contributing
You are very welcome if you want to contribute. I explain here in details what
is the most comfortable way to me you can contribute.
CONTRIBUTING.md