Characters
Learn how to define, use, and customize characters in Pixi’VN ink scripts, including dialogue association, name replacement, renaming, and emotions.
Before to read this section, it is recommended to read how to create and use characters in Pixi’VN.
Use
Associate a character with a dialogue
You can associate a character with a dialogue in ink. To do this, you need to use the following syntax:
[character_id]
+ :
+ SPACE
+ [text]
character_id
: is the characterid
defined in JavaScript/TypeScript.:
: is the separator between the character and the text.text
: is the dialogue text.
=== start ===
mc: Hello, I'm Liam.
-> DONE
Use character name in dialogues text
You can use the character name in dialogues. To do this, you need to use the following syntax:
[
+ character_id
+ ]
[
and]
: are the delimiters to identify the character.character_id
: is the characterid
defined in JavaScript/TypeScript.
=== start ===
Hello, [mc].
-> DONE
To do this, you'll first need to implement the functionality to replace the id with the character's name. To do this, you can use one of the following methods:
Templates
In all templates, this implementation is already included.
Edit
You can edit a character's information in ink, For example, you can change the character's name. To do this, you need to use the following syntax:
#
+ SPACE
+ rename
+ SPACE
+ character_id
+ SPACE
+ new_name
#
: is the hashtag symbol to identify a hashtag script.rename
: is the command to rename a character.character_id
: is the characterid
defined in **JavaScript/TypeScriptnew_name
: is the new name for the character.
=== start ===
mc: Hello, I'm [mc].
# request input string
mc: My name is:
# rename mc {_input_value_}
mc: My name is [mc]
-> DONE
To do this, you'll first need to implement the functionality to rename the character. To do this, you can use one of the following methods:
Templates
In all templates, this implementation is already included.
Character emotions
You can use the Character Emotions in ink. To do this you just need to use a special ID composed of:
character_id
+ @
+ emotion
character_id
: is the characterid
defined in JavaScript/TypeScript.@
: is the separator between the character and the emotion.emotion
: is the emotion defined in JavaScript/TypeScript.
For example:
character_id
+ @
+ emotion
+ :
+ SPACE
+ text
=== start ===
mc@happy: Hi, I'm Liam. I'm very happy today.
-> DONE