Home > Tutorials > Game Development > More interesting NPCs
More interesting NPCs
Inspired to be reposted by a help post by Jaide. Here are some general things you can do to make your NPCs far more interesting then the little old guy who yells "Welcome to Corneria!"
Linear Talk NPCs
These are NPCs that say several different things in a set order. Use the Self Switches to get up to 5 sayings, or even throw in some global switches to get more. For example:
Alternatively, you can turn OFF all the local switches at the end of the last page, and start the whole conversation over, like so:
Or you can turn OFF all but A, and start the conversation from Page 2, etc.
Random Talk NPCs
These are NPCs that have more than one thing to say, and say one of them at random when you talk to them. For example:
Lead Specific NPCs
These are NPCs who say something different depending on who your lead (showing) party member is. For example:
Will say something different if your lead party member is Aluxes, Gloria, or Basil than he will if your party member is anyone else. For easy copy and pasting, here's the code for the Conditional Branch:
$game_party.actors.name == "name"
Replacing name with the name of the hero. If you're using hero name input, you could alternatively use:
$game_party.actors.id == i
Replacing i with the id of the hero (from the database).
These are NPCs that say something different depending on the type of weather. For example:
Will say something different for no weather, rain, snow, and storms. Note that in my weather script, you have more options than those 4, the numbers for those are in the comments at the beginning of the script.
These are NPCs who are actually up-to-date on world events, or, more specifically, what the party has been doing. For example:
Where switches 0001: Village Burned and 0002: Emperor Defeated are switches that you turned on when those events happened, presumably.
This is an NPC that responds differently based on how much money the party has. For example:
Use your imagination with this one, you can do this with any variable. That means you can make an event-based reputation system, if you like.
This is an NPC that asks you a question, then thereafter says or does something different depending on your response. For example:
Feel free to make this as deep as you like, using global switches each choice could lead to a new choice.
An NPC that may say or do something different if you have a certain item.
Really, you can do basically the same thing with any option in Conditional Branch. Take a look at the options yourself!
Feel free to combine NPC types, for example, a random talking wordly-wise NPC:
More interesting NPCs