RMVX : Steal from an NPC

Steal from an NPC tutorial

by Chris Ross
Edited by Leventhan
This step-by-step tutorial will explain how to make an interesting stealing
feature in RMVX, the event system is highly customizable and expendable.
A useful system for thief-themed games.
Step 1
So the first step is to go to Database > Common Event > Name one of them “Steal”
Then go to list of event commands and add a new variable called “Steal”, set a
random number between 1 – 10. What this means is that when the common event
steal is called a number between 1 and 10 will be chosen by the game.
Step 2
Once you have that done make a new map, it can be any size you want and add
an NPC to the map. Add a new event command to the npc.
Step 3
Call the common event “Steal” by pressing the call common event button.
Then add a conditional branch and set the variable steal to less then are equal to 5.
This means that if the player touches the NPC and hits the action button whether
the random number returned is less than or equal to 5. If the random number is
greater then 5 then the player has successfully stolen from the NPC.
However, if we leave the system this way the player can keep trying to steal from
the NPC which is no fun at all.
Step 4
So lets add a switch called “Steal Failed”, and set it ON under the conditional branch.
Make a new event page and set the switch “Steal Failed” to ON under the conditions
page. make a new event show text have it say something like ” I hate thieves, I
can’t  believe you tried to steal from me!” or something.
Step 5
That takes care of if the player fails at stealing from an NPC but what happens if
the player succeeds in stealing from the NPC?
Go back to the First event page, under the conditional branch you should see a
n “Else” branch that handles when the player got a random number higher than 5
and was able to steal from the NPC.
Step 6
So add the items to the player inventory which they stole, it could be gold,
items, weapons, armor, or even a skill! So now that we have stolen from
the NPC create a switch called “StealSuccess” and set it ON. Now make a
new event page and have the condition switch set “StealSuccess” is ON.
You can add a new event to the NPC and have them say whatever you want them to say.
And that’s the end of the tutorial!
Hope you learned something from the tutorial and I’m looking forward for more contributions!
Tutorial by Chris Ross

About this entry