Problems with conversation actor/conversant being static and proposed solutions
Re: Problems with conversation actor/conversant being static and proposed solutions
Hi,
Thanks for the details.
I'll fix that issue where it caches -1, which it shouldn't do.
Any idea how the conversation properties' Actor and Conversant didn't get set? Are you creating conversations in code? Did you manually set them to None? When you create a conversation by clicking the "+" button next to the conversation title dropdown in the Dialogue Editor's Conversations panel, it should at least assign default characters to the new conversation's Actor and Conversant fields.
Thanks for the details.
I'll fix that issue where it caches -1, which it shouldn't do.
Any idea how the conversation properties' Actor and Conversant didn't get set? Are you creating conversations in code? Did you manually set them to None? When you create a conversation by clicking the "+" button next to the conversation title dropdown in the Dialogue Editor's Conversations panel, it should at least assign default characters to the new conversation's Actor and Conversant fields.
Re: Problems with conversation actor/conversant being static and proposed solutions
I think I created a test conversation before the actors were created, and then I didn't care to update it cause I was counting on Dialogue Actor. It makes sense the way it works now... perhaps a quick mention in the docs would be helpful (something like "conversation actor/conversant still need to be set to static actors so that they can be reassigned correctly at runtime")
Thanks a lot for the support!
Thanks a lot for the support!
Re: Problems with conversation actor/conversant being static and proposed solutions
I'll make sure the Dialogue Editor shows a warning when editing a conversation whose actor and conversant aren't set. I'll try to get that into 2.2.15.
Later today, I'll post a patch here that doesn't cache id -1. Do a quick comparison with your own customizations before importing it to make sure it doesn't overwrite any other customizations you may have made.
Later today, I'll post a patch here that doesn't cache id -1. Do a quick comparison with your own customizations before importing it to make sure it doesn't overwrite any other customizations you may have made.
Re: Problems with conversation actor/conversant being static and proposed solutions
This patch has two changes:
1. ConversationModel does not cache actor ID -1.
2. If a conversation's actor or conversant is unassigned, it will show "Actor: unassigned" in red in the lower right of the node editor.
DS_ActorIDPatch_2021-01-13.unitypackage
1. ConversationModel does not cache actor ID -1.
2. If a conversation's actor or conversant is unassigned, it will show "Actor: unassigned" in red in the lower right of the node editor.
DS_ActorIDPatch_2021-01-13.unitypackage
-
- Posts: 150
- Joined: Mon Nov 23, 2020 6:35 am
Re: Problems with conversation actor/conversant being static and proposed solutions
I found this discussion while checking on a similar issue I am having. Maybe it sheds light on the same problem:
My game has a character creation step when starting a new game. The player picks a character name and portrait here. I write his choices into the database like this:
Which works (the database is updated), but doesn't show up until the NEXT play. Meaning that after character creation I get the portrait and name chosen the LAST time. If I press stop and play again in the Unity editor, then I get the portrait and name I have chosen. So clearly, somewhere during startup the actor data is cached and changes to the database are then not active until the next game.
If I set "Warm Up Conversation Controller" to OFF, the portrait is updated immediately, but the name still is not.
My game has a character creation step when starting a new game. The player picks a character name and portrait here. I write his choices into the database like this:
Code: Select all
Field.SetValue(actorData.fields, "Display Name", name);
actorData.portrait = pic;
If I set "Warm Up Conversation Controller" to OFF, the portrait is updated immediately, but the name still is not.
Re: Problems with conversation actor/conversant being static and proposed solutions
Hi,
The Dialogue System Extras page has a Discover Name Example (direct download) that contains a Lua function that updates the name immediately.
The Dialogue System Extras page has a Discover Name Example (direct download) that contains a Lua function that updates the name immediately.
-
- Posts: 150
- Joined: Mon Nov 23, 2020 6:35 am
Re: Problems with conversation actor/conversant being static and proposed solutions
True, I forgot about that.
The magic line is simply:
instead of my setting the field.
The magic line is simply:
Code: Select all
DialogueLua.SetActorField(PlayerActor, "Display Name", newDisplayName);
Re: Problems with conversation actor/conversant being static and proposed solutions
If a conversation is already running, you may need to update the current conversation model's cache, too. (See the code in the Lua function.)
-
- Posts: 150
- Joined: Mon Nov 23, 2020 6:35 am
Re: Problems with conversation actor/conversant being static and proposed solutions
Yes, understood that from the code. However, in my case this is set at the start of the game, during character creation, so I can be certain that no conversation is running.