Hello!
I'm new to the dialogue system and I was wondering if there was a way to change the name of an NPC that the player is talking to after they engage in dialogue? For example, the player may walk up to someone named "Stranger", and then in the dialogue, the NPC introduces themselves, and so now the player can see their name when looking at them.
Any help is appreciated. Thank you!
Change NPC Name During Dialogue
-
- Posts: 2
- Joined: Thu Apr 21, 2022 6:07 pm
Change NPC Name During Dialogue
Last edited by WizardMonke on Tue Apr 26, 2022 1:09 pm, edited 1 time in total.
Re: Change NPC Name During Dialogue
Hi,
Please see the "Discover Name" example package (direct download) on the Dialogue System Extras page.
Please see the "Discover Name" example package (direct download) on the Dialogue System Extras page.
-
- Posts: 2
- Joined: Thu Apr 21, 2022 6:07 pm
Re: Change NPC Name During Dialogue
This is exactly what I was looking for. Thank you!
Re: Change NPC Name During Dialogue
Glad to help!
Re: Change NPC Name During Dialogue
How can I localize this new Display Name?
Re: Change NPC Name During Dialogue
Hi,
Set the field "Display Name LN" where LN is the language, such as "Display Name zh" for Chinese, "Display Name es" for Spanish, etc.
Set the field "Display Name LN" where LN is the language, such as "Display Name zh" for Chinese, "Display Name es" for Spanish, etc.
Re: Change NPC Name During Dialogue
Sorry Tony, I should give more details for the question.
I'm asking about localizing new display name, changed in lua function:
Display Name localization can only localize "Stranger", but not "Mephistopheles".
Obviously this new name is not going through localization system... What is the best way to properly localize it?
I'm asking about localizing new display name, changed in lua function:
Code: Select all
ChangeActorName("Mephistopheles", "Mephistopheles")
Obviously this new name is not going through localization system... What is the best way to properly localize it?
Re: Change NPC Name During Dialogue
Hi,
You will need to set it for each language in this case, such as:
Use the ChangeActorName() function last, since it also updates the active conversation's UI.
You will need to set it for each language in this case, such as:
Code: Select all
Actor["Captain"].Display_Name_es = "El capitán";
Actor["Captain"].Display_Name_zh = "船長";
ChangeActorName("Captain", "The Captain")