(Solved) Name based special dialogue

Ryukaiba60

Villager
Member
Joined
Dec 28, 2017
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVXA
I want to make lines of dialogue that only appear when the player has chosen a specific name. For example, an npc is talking and they normally have lines A, B, and C that they say when the player has any given name, but when the player is named Tom their dialogue changes to A, B, and D, or E, F, and G. I know Toby Fox did it with Undertale (though it was only during the naming process) and ConcernedApe did it with Stardew Valley (but it was just a certain line that can be repeated). I assume this can be done with other event types as well.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
Just for the sake of clarity, this reads as if the player must choose a name from a pre-defined list, or else you would have no way of knowing whether the actor is named Tom or Henrietta.

One way of doing this (though it would entail a fair bit of work) would be to use the 'Show Choices' command, with each possible name listed as a potential choice. In each section if the player chooses that particular name, a switch is turned on - obviously a different switch for each name. For the sake of this example we will say switches 21, 22 and 23.

In the event for a dialoge NPC, you would have a series of nested conditionals.
Is switch 21 ON?
If yes - A, B, C
Else: (then a new conditional)
Is switch 22 ON?
If yes - D, E, F
Else: D, F, G
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
Additionally, you might want to search tsukihimes blog for her Ace scripts.
She has a script for conditional choices that would solve your problem without conditional branches.
 

Ryukaiba60

Villager
Member
Joined
Dec 28, 2017
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Would it necessarily have to be a set list of choices though? In Undertale, which is the best example that I know of, the player has the option of any combination of letters for their name. For most names you get the standard response of "Is this name correct?", but there are certain names that, when used, have different responses, e.g. Sans is "nope." and Chara is "The true name." So I was thinking along the lines of that. The player can input any name they want, but certain names, chosen beforehand, receive their own special dialogue. So basically a 'if name is X, Y, or Z, then special dialogue happens, else regular dialogue' kind of thing.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
How realistic is the expectation that players will just happen upon the one 'true' name out of the many, many thousands that they could pick? It seems that you are setting out to do quite a bit of extra work for almost zero reward. Either that or expecting the player to be a bit of a mind reader or play Guidedangit. Will you be giving any clues about which is the 'true' name? If there is a 'true' name, isn't that just a backdoor way you, the dev, have for deciding the name anyway?
 

Ryukaiba60

Villager
Member
Joined
Dec 28, 2017
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVXA
I mostly want to leave some easter eggs for people with specific names. For example, my first name is Jonathan, a very common name, and I want to leave little messages for those with that name, or poke fun at people fro using silly names. There is also someone specific I will have play it and I want things for him to find.
 

Hyppocritamus

Warper
Member
Joined
May 29, 2016
Messages
1
Reaction score
0
First Language
English
Primarily Uses
why not just set a name to a variable, and set the player name to the same variable. If the two variables are equal, have special dialogue trees.
 

Ryukaiba60

Villager
Member
Joined
Dec 28, 2017
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Ok, but how do I do that? The only experience I had with coding was about five or six years ago for a semester in high school using C++. We didn't do a lot with it, but even then I've probably forgotten everything I did know.
 
Joined
Jan 9, 2018
Messages
1
Reaction score
2
First Language
English
Primarily Uses
RMVXA
I think I might have a better solution. I'm pretty sure you want a naming system where the player is allowed to input any name they want, but if they input a specific name like, "Dummy", they get a different response. I actually learned how to do this recently!

First, go into the Event Commands and find Name Input Processing. Input the actor who's getting named, either your main character, or even someone else, and give your player as many available characters as you see fit, as long as it's as many or more than the name you already gave them.

Now that you've done that, go to Event Commands again and find Conditional Branch. Go to the Second tab and input the actor who's name is getting changed or given. Now go to Name and input the name that will change the dialogue, ex. 'Dummy". Make sure you keep in mind any spaces and capitalization's will have to be replicated exactly for the name to be recognized. For example, if someone typed "dummy" and you put in "Dummy' with a capital "D" it wouldn't work. Now, if you want the character to receive the chosen name, just go to Event Commands again, find Change Actor Name, and select the actor whos name is getting and change it!

Now, just type in whatever dialog you want to happen when the chosen name is invoked! In the Else area, put in whatever dialog would have occurred if they had been given any other name. I like to use this for jokes like if people try to put profanity as the characters name, but you can use this for a whole bunch of cool ideas and puzzles.

I hope this helped, good luck on whatever you're working on!
 

Ryukaiba60

Villager
Member
Joined
Dec 28, 2017
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMVXA
That is exactly what I wanted. Thanks.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top