Gw Temp


Tutorial - 'Interactivity System, Part 1' by jordyce

An item about RPGMaker 2000 posted on


Jordyce begins a series of new tutorials for RM2K on raising interactivity in your games. In this tutorial, learn how to control NPC speech using switches, variables, and fork branching.


Tutorial written by Jordyce -
Website -


This is a tutorial that I'll be releasing in parts, because it will be so exspansive. Basically this will be a tutorial to add life-like features to a game, or interactivity. I'll be showing you how to make people talk properly, have emotions, make the world evolving and changing. Things like advanced Day/Night systems which allow for weather, day/year system, and even seasons that effect chance of a certain effect happening. However today we'll be talking about events that take importance in a game, NPC speech, and how to improve them.


Before we start, you need to know the following RM2k commands:
This interactiviy tutorial wasn't made for n00bs, although it won't use every command, knowing them straight off will be the only way to use this tutorial. Sorry to the newbies trying to make a good game - You'll just have to learn some more. :)
But for this one:
-Switches (Not just knowing them, but you should have plenty to use!)
-Fork Conditions
-Basic Math


This tutorial won't be my normal style of steps, you just read and learn.

Now first go to the variable section and create a variable named Random Variable. I'll call this RV for now, as it will be refered to the most.
Now lets do some simple math which you should look at and understand (Unless you don't know any Year 1 maths). So lets just say:
5 towns.
10 NPCs per town. (50 NPCs total.)
Good. But this isn't the maths part yet. Let's say there is 8 NPCs I want to be normal. These will be known as NPC-A. But the other 2 will want some branching, and we'll name these NPC-B. Now 8*5=40, and 2*5=10. Then 40*2=80 and 10*2=20. This gives us our percents. 80% that are NPC-A, and 20% that are NPC-B.
Keep those percents in your head, you'll need them later.

Great, now back to some coding:
For NPC-A we'll still want branching, thus the Random Variable comes back. On the NPC event have no text, just make a variable that randomises itself. The amounts it can randomise mean different text. Between 3 to 5 different things to say would be good.
Now, make a fork condition, no else case needed on the Random Variable asking if the Random Variable is at certain number.
In these forks make the random text. You can add forks in forks to branch it even more, or make questions, but it dosen't matter.
You need as many forks as their is the amount you set between with the Random Variable and set to the correct random variables also. And make sure to set the Random Variable to 0 at the end.
Once your done, add everthing else to the NPC and your done. And for a reason you'll find out later, will say that this NPC used 1 switch.

For NPC-B, everything will be the same, but let's say they reveal more as the game progresses, and you make them change speech because of an item or something - and it all takes around 3 switches.
Back to math! 80 percent used 1 switch, and 20 percent used 3.
Ahem, 1*8=8 and 3*2=6. Then multiply: 8*5=40 and 6*5=30. Add them together: 40+30, and the answer is? 70! This means around 70 switches for every NPC in your game! Of course, this changes by the game, but the outcome here isn't to bad.

To make the game a bit more interesting, lets say this is a current scene:
-Alex: "We must defeat the demon king, before he kills Brian!"
-Carol: "Yes, and if Brian dies, the whole world is next."
Let's repeat NPC-A's coding. Make Random Variable randomise and make forks over the text. Like:
-Fork Condition: (If Random Variable is 1)
-Alex: "The demon king must die. Either that, or Brian!"
-Else Case:
-Alex: "We must defeat the demon king, before he kills Brian!"
-Carol: "Yes, and if Brian dies, the whole world is next."
See, that was easy!

That's all for today. I'll try and write a part every week or so, so the next installment of the Interactivity System is coming soon.



None today. I wonder why not? Oh well.



The people who asked questions - Hey wait! There were none!

If you have any comments, questions etc... please e-mail them to me:

See you in my next tutorial which will be for *shock!* Effective Use of Graphics!
And in Part 2 of the Interactivity Tut: What Surronds Us - How to make those towns more interesting and add cool stuff like sneaking in the shadows, making sounds and other stuff that a... 'Treasure Hunter' would like to do.