Replace character name
Replace character name
In the same vein as the subtitle replace question, is there any easy way of replacing a speaking character name?
Based on past choices, a character can name either be visible or be just ??? and I'm not sure how to go about doing that
Thanks.
Based on past choices, a character can name either be visible or be just ??? and I'm not sure how to go about doing that
Thanks.
Re: Replace character name
Hi,
In the Dialogue Editor, inspect the actor. Tick Use Display Name. Set Display Name to "???".
When the player learns the character's name, use the Script field to set the actor's Display Name:
Actor["Name"].Display_Name = "Discovered Name"
The Dialogue System Extras page has an example: Discover Name Example. It adds a Lua function that sets the new display name and updates the UI immediately.
In the Dialogue Editor, inspect the actor. Tick Use Display Name. Set Display Name to "???".
When the player learns the character's name, use the Script field to set the actor's Display Name:
Actor["Name"].Display_Name = "Discovered Name"
The Dialogue System Extras page has an example: Discover Name Example. It adds a Lua function that sets the new display name and updates the UI immediately.
Re: Replace character name
I tried to do this a little differently and it didn't work. I set my actor's name to "Eva" because I want to be able to start any conversation and have her named correctly. Then in the intro conversation before you know her, I had a script on the first node that says:
The last line of that conversation has a script that says:
But these scripts don't seem to be having any effect that I can see. Her name remains "Eva" throughout the conversation:
Here's how I configured the actor:
Here's how I configured the node:
I am using a Dialogue Actor script and a modified version of the VN Dialogue UI, I don't know if that interferes with this.
Code: Select all
Actor["Eva"].Display_Name = "???"
Code: Select all
Actor["Eva"].Display_Name = "Eva"
Here's how I configured the actor:
Here's how I configured the node:
I am using a Dialogue Actor script and a modified version of the VN Dialogue UI, I don't know if that interferes with this.
Re: Replace character name
Are you by any chance using Dialogue System version 2.0.8? There was a bug in 2.0.8 with Display Name.
If not, then temporarily set the Dialogue Manager's Debug Level to Info. This will log when a Script field is run. Make sure that the Script fields on those nodes are actually being run.
If not, then temporarily set the Dialogue Manager's Debug Level to Info. This will log when a Script field is run. Make sure that the Script fields on those nodes are actually being run.
Re: Replace character name
I don't think so, but I don't know how to check for sure. I bought it May 12th and that version number sounds like it's from a very long time ago.
It seems like it's being run here:If not, then temporarily set the Dialogue Manager's Debug Level to Info. This will log when a Script field is run. Make sure that the Script fields on those nodes are actually being run.
I asked this in another thread, but is it normal to have duplicates in there like I seem to have? Let me know if there's something more I can show you to help.
BTW, the parts I've blacked out are naughty words, I'm not sure if you care, but I'm trying to keep the forum SFW.
Re: Replace character name
Thanks for redacting the naughty words. I personally don't mind, but it's probably better to omit them from a public forum.
For efficiency, when the conversation starts it caches the characters' names. If you were to stop and restart the conversation after setting the Display Name field in Lua, the cache would be updated so it would show the correct name.
The Dialogue System Extras page has a small script that adds a Lua function that sets Display Name and also updates the cache. Here's a direct download: Discover Name Example.
BTW, disregard the version 2.0.8 question. I forgot who I was replying to. Version 2.0.8 came out last October. If you ever need to check your current version number, you can view Plugins / Pixel Crushers / Dialogue System / _README.txt or menu item Tools > Pixel Crushers > Dialogue System > Welcome Window.
There's a reason why sequencer commands show twice in the Console window when you set Debug Level to Info. The first line shows the command as the sequencer's parser understands it. This appears as soon as the dialogue entry node's Sequence is sent to the sequencer. The second line shows the command at the time it's run, with special keywords such as 'speaker' replaced by their actual values.
For efficiency, when the conversation starts it caches the characters' names. If you were to stop and restart the conversation after setting the Display Name field in Lua, the cache would be updated so it would show the correct name.
The Dialogue System Extras page has a small script that adds a Lua function that sets Display Name and also updates the cache. Here's a direct download: Discover Name Example.
BTW, disregard the version 2.0.8 question. I forgot who I was replying to. Version 2.0.8 came out last October. If you ever need to check your current version number, you can view Plugins / Pixel Crushers / Dialogue System / _README.txt or menu item Tools > Pixel Crushers > Dialogue System > Welcome Window.
There's a reason why sequencer commands show twice in the Console window when you set Debug Level to Info. The first line shows the command as the sequencer's parser understands it. This appears as soon as the dialogue entry node's Sequence is sent to the sequencer. The second line shows the command at the time it's run, with special keywords such as 'speaker' replaced by their actual values.
Re: Replace character name
That script worked for me.
Is there a way to make this also apply to the "Usable (script)"?
Is there a way to make this also apply to the "Usable (script)"?
Re: Replace character name
That would be a good idea. I'll update the Usable script to check if the GameObject has a Dialogue Actor component. If the Usable script's Override Name is blank, it will use the display name of the Dialogue Actor's actor if possible. Otherwise it will use the GameObject name.
Re: Replace character name
It's a one line change. Here's a patch: DS_UsablePatch_2019-08-08.unitypackage