Jaximus wrote: ↑Tue Apr 26, 2022 6:08 amBut 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 ?
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:

- mood1.png (9.42 KiB) Viewed 741 times
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");
If the language is set to "fr", the code above will return the value of "Heureux".
Jaximus wrote: ↑Tue Apr 26, 2022 6:08 amI'm about to add a new linked dialogue entry with a new isMood attribute 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 ?
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.