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 17 2012, 11:18 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




There are many things that are added to projects, that are a waste of time, but it adds something abit more interesting for your players, I am trying to sort out these images, for some reason there is an error with albums online...


__________________________

Finished Projects:
Slenderman's Army:


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: 24th May 2013 - 06:53 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker