Hi,
I'm new with Dialog System and I wonder if there is a way to modify the of DialogueEntry class or editor class to add new field I haded in the dialogEntry Template.
Exemple :
I hadded a mood and moodTexture field to the DialogueEntry template
In the inspector, I can modify those new fields (Mood and MoodTextures) by expanding AllFields field but I would like to be able to have directly a field for mood and moodTexture just above actor field.
My goal is to change the actor texture according to the given moodTexture and display a text with the given mood. It would change multiple time during the same conversation.
Maybe there is already a way to do that without changing any script or inspectorScript.
Thanks,
Jaximus
Modify Dialogue Entry inspector to add new templates fields
Re: Modify Dialogue Entry inspector to add new templates fields
Hi,
In the Templates section, tick the Main checkbox for your Mood and MoodTexture fields.
The "Files" field type probably doesn't work the way you'd want it to. Instead, you may want to define a custom field type.
In the Templates section, tick the Main checkbox for your Mood and MoodTexture fields.
The "Files" field type probably doesn't work the way you'd want it to. Instead, you may want to define a custom field type.
Re: Modify Dialogue Entry inspector to add new templates fields
Hi,
Thanks, that was to quite easy
But it bring me to another problem, how to use localization with this new mood text field. Maybe I should try to find another way to do that, in a way that allow me to use the localization tools and export as .csv. Do you have an idea ?
I'm about to add a new linked dialogue entry with a new isMood attribut to true for each dialog entry that need a special mood. And then try to catch it while the conversation run.
What do you think about it ?
Best,
Jaximus
Thanks, that was to quite easy
But it bring me to another problem, how to use localization with this new mood text field. Maybe I should try to find another way to do that, in a way that allow me to use the localization tools and export as .csv. Do you have an idea ?
I'm about to add a new linked dialogue entry with a new isMood attribut to true for each dialog entry that need a special mood. And then try to catch it while the conversation run.
What do you think about it ?
Best,
Jaximus
Re: Modify Dialogue Entry inspector to add new templates fields
How would you intend to use localized versions of the Mood field? If it's only for internal use (e.g., to decide what animation to play), you probably don't need localized versions.
If you need to show the Mood to the player, you can create localized versions of your Mood field. Language codes are up to you, but I recommend standard codes such as "fr" for French, "es" for Spanish, etc. Just add the language code to the end, separated by a space:
You can get the localized version in C# code like this:
Code: Select all
// Get a reference to the current dialogue entry:
DialogueEntry entry = DialogueManager.currentConversationState.subtitle.dialogueEntry;
// Get the Mood text for the current language:
string moodText = Field.LookupLocalizedValue(entry.fields, "Mood");
Why not add "isMood" to the "Stressed?" node instead?
When the Dialogue System gets to the "Stressed?" node, it will make a list of all linked NPC nodes (gray nodes) and PC nodes (blue), rejecting any nodes that have Conditions that are false.
If the linked NPC node list has anything, the conversation will follow the first node in the list.
Otherwise, if the PC node list has anything, it will show it as a response menu or a PC subtitle.
In your screenshot above, the "Stressed?" node's NPC node list will always have "playful", so you're guaranteed that the conversation will show "Stressed?" and then "playful". It will never get to the "No! No at all!" node.
Re: Modify Dialogue Entry inspector to add new templates fields
Thank for the answer.
I'm going to try the version with Mood fr Mood es and it should be fine.
I'm going to try the version with Mood fr Mood es and it should be fine.