Page 2 of 2

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Tue Jan 12, 2021 8:32 pm
by Tony Li
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.

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Wed Jan 13, 2021 3:26 pm
by niskander
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!

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Wed Jan 13, 2021 3:52 pm
by Tony Li
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.

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Wed Jan 13, 2021 8:36 pm
by Tony Li
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

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Tue Jan 19, 2021 4:45 am
by NotVeryProfessional
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:

Code: Select all

			Field.SetValue(actorData.fields, "Display Name", name);
			actorData.portrait = pic;
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.

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Tue Jan 19, 2021 8:16 am
by Tony Li
Hi,

The Dialogue System Extras page has a Discover Name Example (direct download) that contains a Lua function that updates the name immediately.

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Tue Jan 19, 2021 5:37 pm
by NotVeryProfessional
True, I forgot about that.

The magic line is simply:

Code: Select all

			DialogueLua.SetActorField(PlayerActor, "Display Name", newDisplayName);
instead of my setting the field.

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Tue Jan 19, 2021 6:02 pm
by Tony Li
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.)

Re: Problems with conversation actor/conversant being static and proposed solutions

Posted: Wed Jan 20, 2021 2:02 am
by NotVeryProfessional
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.