Home
Sitemap
Site News
Downloads
FAQ
Contact
• Basic Tutorials •
Maps
The Database
Events
Graphic Resources
• More Advanced Tutorials •
Maps
Events
The Database
Event Systems
• RGSS •
Script Fixes
Script Systems
• Other •
Using RMXP
Mini Tutorials
Miscellaneous
• Reference •
Reference

In this tutorial you will learn...

• How Non-Playable Characters are made
• The different things they can do

Now that we've learnt how to make basic events and link maps together, we need to learn another important technique: making Non-Playable characters, or NPCs. I'm going to show you how to make a simple character that walks around at random and says something when you speak to them.

So, make a map, or use one that you've created beforehand. Create a new event, and choose a graphic. Give them something to say; for example: 'Good morning, sir. I hope that you have a nice day.' I know that it's cheesy, but it'll do for a demonstration. Enter this like so...



Now, head over to the never-used-before Autonomous Movement section. Where it says type, click on the drop-down menu and select custom. Now, the button below saying 'Move Route' will become available. Click on it. You will see a box like this...



This is where you fit the move route into your event. Use the buttons to choose where your event is going to move to. It's useful to be able to see the screen where your event will be moving so that you can follow the route with your finger and make sure that you don't get blocked and that you reach the beginning of your loop again (I always follow it with my finger!). When you've got a move route worked out, press OK and return to the event editing box.

Now, head down to the other two drop down menus. One is Speed, and the other is Frequency. I usually have speed three in the speed box, because this is just slower than the player (the player is speed four). Frequency is used to determine how often the event makes a move; if the frequency is set to low, then the event will spend most of it's time sitting still and only move occasionally. If the Frequency is set to high, the event is moving more or less all the time. I normally have Frequency four.

I have set the box as follows...



Now, press OK and test out your event in-game. The character should walk around, following the move route that you specified, and should say the message that you gave them when you interact with them. It should be working well.

If it doesn't work at first, don't worry; move routes are extremely prone to not working - I have to go through my cutscenes with move routes in hundreds of times before I get them just right! Keep experimenting and making little adjustments, and hopefully it should sort out any bugs that you have in your system.

Now, let's be a little adventurous and play around with the idea of conditional branches and NPCs. Open up your NPC's event page, and delete the text there. Now insert a conditional branch. Have a look on pages two, three and four for different options of what to base the NPC's reaction on. For example, let's play around with the idea of gold. Here's the option we'll be changing...



Okay - let's say that if the player has under 100 gold, we'll make the NPC say something different. In the boxes, put 100 gold or less, and press OK. You will be left with a conditional branch with two branches: one with 100 or less gold, and one with 101 or more gold. Follow?

Now let's enter the text...



Get the idea? Have a play around and see what you can make NPCs say under different conditions. Just one more thing before I finish this tutorial: if you're testing out systems like this, you'll need placeholder events to change the conditions for you. For example, for the event that I've just made, I'll need to make a temporary event that changes my gold by 101, so that I can test if the event works. See a screenshot...



The black horse changes my gold by -100, and the other one changes my gold +100. Now I can change the amount of gold and talk to my NPC to check that the conditional branch is doing its job. Obviously I'll delete these placeholder events when I make the real game!

And that concludes my tutorial on NPCs. My next tutorial is on how to change the name of the main character using events, and how to display their name in message boxes.

:: << Previous Tutorial ::      :: Home ::      :: Next Tutorial >> ::

RPG Maker XP © 2005 Enterbrain Inc.           © 2004 Xiph. Org Foundation           Ruby © 1993 - 2003 Yukihiro Matsumoto
This site, including images and textual content, were created by and belong to me.
© 2006 - 2011 All rights reserved.

This website and tutorials have all been written in my free time (what there is of it!), and hosting can be rather costly, so any donations are very gratefully received - no matter how small - even if you can spare 50p I would be grateful!