In my game you can choose between a variety of avatars for the main character and I wondered how it would be possible to make that in a dialogue where they talk, a different face appears depending on the avatar they have chosen. I hope I expressed my question right. Thank you in advance.
Changing the protag's dialogue face depending on their avatar
RPG Maker VXAce SupportA quick and dirty way would be to have a variable that you set depending on your character (ie, the first in the list is 1, the next option is 2, etc.) and then having a large string of conditional branches controlling the way messages look. It's tedious but it will work if you're not feeling like tracking down a script to do it.
You have two options for that:
1) using a script;
2) using script calls and writing messages using script calls.
These options are not exclusive, the first one might require you to use the second one. More informations about script calls can be found here. In this thread you can select "Show Message" spoiler and then copy/paste that code in your script call.
As you can see you have two lines for face and index. If you want those to be your player's avatar then you have to use this:
If you use those script calls insdead of your fName and fIndex you can have a different face every time based on which avatat is chosen.
Keep in mind that while writing text in your script call you have no formatting tools. You have to add new lines manually.
1) using a script;
2) using script calls and writing messages using script calls.
These options are not exclusive, the first one might require you to use the second one. More informations about script calls can be found here. In this thread you can select "Show Message" spoiler and then copy/paste that code in your script call.
As you can see you have two lines for face and index. If you want those to be your player's avatar then you have to use this:
Code:
$game_party.members[0].character_name #this is your character face's filename for 1st party member
$game_party.members[0].character_index #this is your face index
#if you wnat to use a different index remember that they are as follows
# 0 1 2 3
# 4 5 6 7
# That is how they are displayed in your file. Keep in mind that void spots still have an index.
# 0 - - -
# 4 - 6 -
# If you have only 3 faces in your file positioned like the example above their index will be like that.
If you use those script calls insdead of your fName and fIndex you can have a different face every time based on which avatat is chosen.
Keep in mind that while writing text in your script call you have no formatting tools. You have to add new lines manually.
I see, thank you both, I'll give your methods a try
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/changing-the-protags-dialogue-face-depending-on-their-avatar.96935/