Dialogue Plugin

Submitted.

1 Like

awesome man, great plugin

I asked a question over a month ago but have to receive a response. I want to pre populate events and conditions from dialogue generated from google docs. If a copy a node and paste it into note pad I can see its formatting. If I copy and past an event or condition I can see its formatting as well. How do I insert pre created event data into the node code, so when I past it it comes with events already in place? Does this make sense? Some info on this would be appreciated.

If you noticed, copying and pasting node clears the event and condition fields so that might be an obstacle. Why that happens is explained in doc. Imo it’s possible but you’d have to write a parser for your data in c++ or editor tool script.

Sorry, I saw your question, but forgot to answer. The short answer is - I don’t know.
The events and conditions in the nodes are instances of their classes. What Unreal used to do out of the box before I disabled it, is that it serialized references to instances. So copy-pasting nodes resulted in two different nodes referencing the exact same condition. If you changed the condition’s variable on one node, it also changed on another. This was obviously an undesired behavior.

I tried serializing just the conditions’ fields, and then creating new instances with their values. But I couldn’t do it last time I tried.

I have a few new ideas on how it could be done. I’ll give it another go over the weekend and let you know.

you could create event/condition instance on paste and then copy properties from old one I guess, I did something like that to decouple the runtime dialogue from editor asset

Thank you. I appreciate the response.

Right now I have a utility widget that processes dialogue into a pasteable node format. Great time saver. I’d love to be able to generate conditions and events within my system. That would save me so much time. I have a very dialogue heavy game with a lot of emotes / actions / events tied into your system. If you could make this happen it would be a dream come true.

Is there a dirty way of having a modular condition?
In your example for the intimidate value, you had it set to 15 or 20.
What if I need a higher value later on or a completely different stat altogether.
Do I have to create a new condition each time for each value?
E.g.: intimidate 15, intimidate 20, 25, 30, 35…

Since the condition only looks at that boolean, I am trying to see if I can use a game instance driven calculation based on datatables however I am having a hard time figuring out how to make that determination.
Any tips would be welcome!

Also, can we use a %charname% for the actual name of the speaker? In my case, my PC has his own dialogues.

If I understood your question correctly, you want the check value, which resides on the node, to be dynamic. So, what determines the value? Write a logic for this on any blueprint actor, access this blueprint and use this value for comparison.
To access blueprints, you need to do it through “Considering Player”, which is a player controller.
So if you want to write this logic on your BP_PlayerController, a simple cast will suffice to access it. But if you write it on, say, BP_SomeActor, write a getter function on BP_PlayerController and use it to access your required actor. That is the only caveat.

These inline-variables can retrieve anything. To retrieve the NPC’s name, you just need to make sure you save the NPC into a variable at the start of the conversation, which you already do, if you feed your NPC into the appropriate pin when you spawn the Dialogue Widget. Since the function gets executed also on the Dialogue Widget, it’s just a matter of taking the NPC variable, casting it to something, like “BP_Human” or whatever general class you have, from which all your NPCs inherit and which has a “NpcName” variable, and return that.

After much thinking, I did this:
an enum for the stat name
a map for the enum + float
a datatable with that map for separate NPCs/events
and then in game, when a situation occurs, it checks the data table for the info needed.

the issue with the second, that I think I got covered, is that in cases of multi-dialogues between several NPCs including the main character, in the dialog plugin you cannot give different names to each dialogue piece.
This:

So what I did is that I have a dialog manager that uses dialog arrays and plays the arrays in order, destroying the widgets and rebuilding as neeed.

Hey there, any updates at this time?

I reread this a couple of times but I don’t think we were talking about the same thing.
In this screenshot, the name I want to change is the dialogue name itself on a per-node basis.
I tried using an array of texts but this is simply not a good solution in the long run. There is simply too much to look out for…

EDIT: After reviewing the latest documentation, I was able to achieve this. I would recommend adding this in the next build :slight_smile:

Steps:

  1. Do 7.8 of your documentation and add something called “NameOverride” as a text field.
  2. In your widget, in the construct, promote original speaker to variable, this will be the fallback.
  3. In the event where you change nodes as per the dialog, add a set text for the name and break the struct to use the override name instead. Use a check to make sure null values are ignored:

The result is this:


God I love C++! Thank you for the awesome documentation, your plugin rocks.
I had tried all the other ones in the marketplace and this is probably the best and user-friendliest one :slight_smile:

@CodeSpartan

Any updates on copying and pasting events and conditions? Really could use this functionality.

Is it possible to get this working with local multiplayer split screen? Currently it’s rendering over the whole screen.

The dialogue widget is just a widget. If you can make a widget do what you need it to do, you can make the dialogue widget do the same.

Hello,

Would like some advice on how best to approach preparing a Script for a VO Actor based on all that we’ve written using the Dialogue Plugin.

There’s no way (as far as I can tell) to export from the Plugin but if we export the text via the UE Localization Tool then there’s a few issues:

  1. It doesn’t distinguish between Player and NPC lines - for a VO reading we would need to clearly mark which lines were the NPC for the Actor.
  2. It’s not sorted in any way - because whole conversations may have a specific context and tone we can’t just have the Actor read all an NPCs lines totally at random. We would need a way to sort the export into conversations (in our case each conversation is already a unique Dialogue Plugin Asset in-engine).

We’re happy to implement custom solutions (we have C++ Programmers in the Team), am looking for advice and ideas on how best to approach this.

Thanks for a great Plugin, it’s a dream to use for Writers, just trying to figure out the technicalities of LOC and VO now that our script is almost done.

Of course there is. You can write a blutility that goes over the dialogue in any way you can think of and spits out any other format.
A dialogue asset is just a data asset with an array of texts (and some other stuff like which node is linked to which node, and whether it’s an npc or a pc text, etc).
Since it’s a programmer question and you have a programmer… why didn’t you ask the programmer? I feel bad for the guy :smiley: He’d have said the same thing.
In short, this is solvable in 1-2 hours.

1 Like

Right, I was referring to an early post in this thread where it was suggested this could be getting added:

Is there a plan to export import dialogue text into CSV/XML and/or offer Localization features?
Native UE4 localization is fully supported. I plan to add export/import if there’s a demand for it.

We have discussed it internally of course but if there was a ready-made solution available why would we make a custom one? Hence I wanted to check.
With the Localization Tool as I mentioned it does export the text but totally unsorted so it’s only possible to work with singe lines individually rather than lines bunched into their conversations for added context.

Hey, I think this might be a bug to raise. The first sound node does not reliably play on first interaction (or dialogue spawn) with the NPC.

I suspect it is due to the asset not being loaded into memory in-the time. If I talk again to the NPC, the sound plays reliably every time on first interaction (dialogue spawn).

Would you like me to raise a github issue with this?

I don’t have a github for this project.
Thanks for the report, I’ll look into it. It looks weird, because if your NPC has a hard pointer to a dialogue, and a dialogue has a hard pointer to the sound, the mere presence of the NPC in the level would mean the sound gets dragged into memory too, so there can’t be any loading delay issue or stutter.
Does the issue exist in cooked builds, too?