Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> [Eventing] NPC Randomisation **UPDATED** Images fixed, Stopping your NPC from being boring and repetative
Jonnie19
post Jan 16 2012, 04:36 PM
Post #1


Are you trying to rise from your lullaby?
Group Icon

Group: Global Mod
Posts: 1,311
Type: Developer
RM Skill: Intermediate
Rev Points: 45




NPC Randomisation

Have you ever played a game, and have asked an NPC a question...and they say the same thing over and over again, well I have seen this so many times. So it's time to show you how to give your NPC's a chance to come to life abit more...

You Will Need...

  1. Basic Understanding of Events
  2. Understanding of Conditional Branches
  3. Understanding of Variables


First of all create an event with a character graphic:

Event Character


I am assuming you know what I'm talking about with this, so will not go into too much detail.

Then what you need to do is to create a Variable called Random:

Variable Creation Window


So once you've named it you need to make sure you have it on the "Set" Radio button, which is normally the default anyway so you can normally just leave it, however you are going to use a different operand known as Random.
this means that when you run the event, RPG Maker VX changes the variable to the number in between the two numbers you place in the two boxes. For this example we are going to have up to five random comments made by the NPC. So you need to fill in the two numbers,
to ensure that we keep in the proper format, I'm going to keep it from 0-4. This is purely something I do, dunno why but it most likely makes it easier for RPG Maker so that if you create an error with your Variable and it returns 0 you will still get a responce...so make sure that it is filled like so:

Setting the Variable


So, now it is time to complete the next step....

Now we are going to set up a number of conditional branches, which can be found on the first page of the event command window, now we have a number of options to choose, for this event we want to select the Variable Radio button, and then select the Random Variable we created and set earlier:

Conditional Branch Window Setup


One thing to note here, is to ensure that you deselect the Set handling when conditions do not apply, this is just purely to ensure smooth running of the event, and it makes it look tidier

Once you have done this your event should NOW look like this:
Half Way There Now...


Now comes the creative bit, and also the most simplest bit of the Eventing smile.gif All you need to do now, is to create your first piece of dialogue that you're NPC is going to say, however make sure that it is inside the first conditional branch like so:

First NPC Comment


How original, I know, but still this is an Eventing tutorial...not a writing one...so carry on

Once you have done this you need to follow the same steps again, however this time go up one number each time up to the last number that you set in the variable at the beginning of the event, for example if you've been following this tutorial it's 4.

Once done your even should look something like this:

Conditional Branches all setup


Now...your final step, is to input more lines for your other options, remember to try and make them as varied as possible... and THEN you are done...your event should look something like this:

The Finished Event



Now assuming that everything has gone to plan, you can now go into the game, and talk to your NPC, and every time you talk to them, it will provide you with a different response, of course due to the fact that the choice of variable is random, there are chances that you get the same response, the more different pieces of dialogue that you use. the more variety there is, and the less likely there is of repetition...So get creating interesting NPC's that aren't repeating the same lines....


Hope you enjoyed this tutorial as much as I did making it....and although simple, it's effective and makes the players experience slightly more original....Good luck and happy developing smile.gif


__________________________

Finished Projects:
Slenderman's Army:


Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
Jonnie19
post Jan 18 2012, 10:22 AM
Post #2


Are you trying to rise from your lullaby?
Group Icon

Group: Global Mod
Posts: 1,311
Type: Developer
RM Skill: Intermediate
Rev Points: 45




This tutorial is just a basic idea....but like Amerk has said, you can use this in combination with Switches, to create an even more diverse and more intricate Eventing system. All you need to do is to create different pages, with the switch condition being set to whatever switch you wish to set, then the first page will be just random discussions, then the second page could be made for when the first big event occurs, then you can continue in that format.

If others feel that a more complicated version would be helpful, let me know, and I will create an additional section, of extra's just to give some more options and ideas that you can use?

Commercial games, are in some respects the worst culprit for repetitious NPC's, most likely because they don't think that people are going to talk to the NPC's as much, however people do, I am terrible for this, and will go through the game talking to nearly everyone....purely so that I don't miss anything.

Another interesting thing you could do with this tutorial, is set up random awards, for talking to NPC's...for example adding an option to offer up a points system, similar to that on FFX-2 when you have spoken to the right people...etc

Like I said if people are interested in some more advance NPC additions then let me know, and I'll add some on smile.gif


__________________________

Finished Projects:
Slenderman's Army:


Go to the top of the page
 
+Quote Post
   
amerk
post Jan 18 2012, 11:55 AM
Post #3


Level 56
Group Icon

Group: Global Mod
Posts: 1,784
Type: None
RM Skill: Undisclosed
Rev Points: 15




QUOTE (Jonnie19 @ Jan 18 2012, 12:22 PM) *
Commercial games, are in some respects the worst culprit for repetitious NPC's, most likely because they don't think that people are going to talk to the NPC's as much, however people do, I am terrible for this, and will go through the game talking to nearly everyone....purely so that I don't miss anything.


I do exactly the same thing, not just for information but because I want the most out of any rpg I play. It makes the game come to life, for the most part. But when every NPC says "Hi," or "I moved her because I love blah", it gets really boring.

Good job, though. Your tutorials have always been easy to follow along with.


__________________________
Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 04:39 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker