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...
Basic Understanding of Events
Understanding of Conditional Branches
Understanding of Variables
First of all create an event with a character graphic:
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 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