Gw Temp

Menu

Tutorial - 'Lock Picking System' by ATARI

An item about RPGMaker 2000 posted on

Blurb

Want to create a THIEF style lock picking system? Now you can with this tutorial!

Body

Hi folks! It’s ATARI again! This time I’m going to talk about how to create a lock picking system in your RPG!

Things that you will need to know to use this tutorial:
1. Fork Options
2. Variables
3. Switches
4. Pictures
5. Labels

So what exactly do I mean when I say a lock picking system? Well, if you have ever played games like Splinter Cell or Thief, you might know what I am talking about. This is a totally different system than the lock picking system you find in most MMORPGs, which is stat based. This however, is based on actual work. Please note that this tutorial will not work in RM2K, and is designed for RM2K/3 and XP.



First of all, open up Rm2k/3 and create a new map. Make the map the smallest size and make the entire map a grass tile, and have a wall that extends three tiles down and stretches across the map horizontally. Next, create a new event on that wall at the very bottom. Make this event’s graphics look like a door, and make it a push key event that does nothing. Name the event, “Door1.”

Next, go into your database (F8) and create a new item. Name this item “Lockpick Set.” Make it’s price whatever you want, and it’s description whatever you want. Make it’s item type a “Accessory.” Don’t give the item an stats that it adds to your hero. Also, make sure that it is only avaliable on your main hero.The lockpick item will never be used unless there is something that you can specifically use it on. In this tutorial, we will be using the lock pick system that we will be later creating on the door event that you created a few moments ago.

Now, return back to your map and create a new push key event. Place this event right in front of the door event that you just created. In there, create a new fork condition that asks “IF [main hero] has item “Lockpick Set” equipped then,” below that, put in a show choices event. Make the first choice, “Pick Lock,” the second, “Attempt To Open The Door” and the third being, “Do Nothing.” The second and the third choices are very simple of course. With the second, just display a message that says, “This door is locked and you cannot open it.” Leave the third choice blank. Leave the end case to the show choice command blank, as well as the fork’s else case and the fork’s end case.

Now before you program the “pick lock” choice, you first have to go and create some new picture files to display when you are picking the lock. The pictures that I’ve created are based on the THIEF system, but you can create them however you want. I recommend you create them similar to the ones I’m using You will need to create ten pictuers in all. I will not display them all, so you will have to create the rest yourself. (Which is what I want you to do! A tutorial is for you to learn, not to be lazy) Look at the two pictures below before I give you instructions.




The lock that we are going to be picking is going to be a two layered lock, which is pretty normal for most locks. Basically you have to break both layers before the latch is broken up. For those of you who are clueless to how to do this, I will briefly explain how exactly this system works.

When you pick a lock, you move the two levers around trying to find a “hot-spot” that when you move the two picks against them, the layer will be unlatched. If you have ever played thief or splinter cell, you will be familiar with this. However, because the rpg maker system provides no mouse support, the system will be done in a way that you just press a number, and see if it works, as opposed to moving the mouse around to find it. You can’t do everything in rm2k3.

You will also want a cursor that indicates at what number you are choosing. Look at the pictures below for a simple way of doing this.




As you can see, the cursor in the middle indicates what number on the lock is currently trying to be penetrated. If it is sucessful on the first picture show, it will go to the second picture shown, with the first layer of the lock broken.

Here is a list of the ten pictures you need:
1. Both locks untouched
2. First Layer broken, second untouched
3-6. 1-4 on the first layer
7-10. 1-4 on the second layer

You can also add in a picture that is displayed when both locks are borken, but this is not necessary, as the picture will just be erased in this system, and a switch will go off that allows the hero to move through the door.

Now go back to that push key that was in front of the door, and go under the choice that calls for lock picking to be done. In here, insert a new switch. Name this switch “LockPicking.” Hit the apply button and then the okay button for this event. Now create a new parralell process event somewhere on the map. Make this event’s starting condition switch the newly created switch “LockPicking.” Name the event, “Lock Picking Event.”

In the “Lock Picking Event,” first, put in a new label event. For this tutorial, it will be label #1. Next, put in a show picture event that shows both locks untouched. Make the picture number any you want. As for positioning, you can do anywhere that you want, although the easiest place for you to put it would be in the lower right hand corner. The coordinates that you would use for placing something there would be: 280 and 200 (x,y). That is running the picture that I used with an 80% maginification though, so you might want to mess around. Or if you already know all about how that system works, rock on. After that, place a wait 0.1 seconds event.

Below your wait event, insert another show choice option. In here put the choices, “1, 2, 3, and 4.” I’m sure you can figure out what they represent. Now, for this first layer of the lock, we will choose “3” as the one that works on the lock. So under choice 1, 2, and 4, you will do the following: Erase the picture that you just created, and replace it with the appopriate picture for the what number has been chosen. Then wait for 3.0 seconds. Then display message, “It didn’t work” or something. After that, put in a wait 0.1 seconds event, erase the picture, and then put in a go back to label event, and return the first label. Under the 3 option, wait for 3.0 seconds, display a message that says, “It was sucessful” or something and then turn on the switch “LockPicking2” and turn off the switch “LockPicking.” Hit the apply button.

Now in this event, create a new page. Make this page a parallel process event as well. Make it’s starting condition switch, “LockPicking2.” Now in here, put in another label, (label 2) and then a wait 0.1 seconds event. Show the picture of the first layer of the lock broken, and the second layer untouched without any indicator. Put in the show choice option as you did in the other page, and then do the same thing as you did for the first layer for the ones that didn’t work, except you change the picture and the label number of course. For the second layer, we will choose the number 1.

For the number “1” event, do the wait event, the message, and then turn off the switch “LockPicking2” and turn on the switch “LockBroken1.” Now hit the ok button on this event and go to your door event. In the second page of this door event, make it’s graphics that of an open doorway, and make it’s passability below the hero. Make it’s starting condition switch “LockBroken1.” In the event commands for this event, make it teleport you to another map. You can make the switch be turned off if you want, but I would assume that ones a lock is broken, it stays broken unless somebody fixes it.

Anyways, that is all that there is to creating a lock picking sytem in your RPG! Remember that this is a basic enginge, and you can add your own flavor to it, or whatever.

Remember!
“Even the greatest gamers were n00bs.”
- ATARI