Submit Your Article RPG RPG Revolution RPG Maker VX.com
 
RPG Maker
 

 Username:
 Password:
   Not a member? Register!



Home > Tutorials > RPG Maker XP > Chest Lock Picking

Chest Lock Picking


Lock picking Tutorial:
Includes regular lock picking and item conditional lock picking!
Quote:
Regular Lock Picking:

Make a new event:
Page 1

Set to Action Trigger
Set Direction fix
Apply Image


Text: A chest box appears before you.
Text: It's locked. Attempt to pick the lock?
Show Choices: Yes, No
When Yes:
Variables:[0001:Dexterity] = [Alexus]'s DEX
Variables:[0002:Intellegence] = [Alexus]'s INT
Variables:[0003:Lock Difficulty] = 40
Variables:[0004:Lock Picking Luck] = Rand No. (1...50)
Variables:[0001:Dexterity] += Variable[0002:Intellegence]
Variables:[0004:Lock Picking Luck] += Variable[0002:Dexterity]

Conditional Branch: Variable[0004:Lock Picking Luck] > [Lock Difficulty]
Text: You picked the lock!
Control Self Switch A

Else
Text: You failed to pick the lock.
Exit Event Processing

Branch End
When: [No]
Exit Event Processing

Page 2
Set Trigger to Control Switch A
Set Direction Fix
Set Action Trigger
Apply Image



Text: Open the Chest Box?
Show Choices: Yes, No
When Yes:
Set Move Route: This Event: Graphic change 2
Wait .2
Set Move Route: This Event: Graphic change 3
Wait .2
Set Move Route: This Event: Graphic change 4
Change Items: [Potion], + 1
Text: You obtained 1 potion!
Control Self Switch B
When: [No]
Exit Event Processing

Page 3
Set Trigger to Control Switch B
Set Direction Fix
Set Action Trigger
Apply Open Chest Image


Text: An empty Chest Box


This other tutorial looks like the regular tutorial, but you need to have an item to pick the lock.
The Item Could Also Affect your chances of opening the lock
Quote:
Item Lock Picking

Make a new event:
Page 1

Set to Action Trigger
Set Direction fix
Apply Image


Text: A chest box appears before you.
Text: It's locked. Attempt to pick the lock?
Show Choices: Yes, No
When Yes:
Text: Do you want to use a silver pick or a gold pick to pick the lock?
Show Choices: Silver, Gold
When [Silver Pick]:
Conditonal Branch:[Silver Pick] in Inventory
Text: You used silver pick to pick the lock
Change items:[Silver Pick], -1
Variables:[0001:Dexterity] = [Alexus]'s DEX
Variables:[0002:Intellegence] = [Alexus]'s INT
Variables:[0003:Lock Difficulty] = 40
Variables:[0004:Lock Picking Luck] = Rand No. (1...50)
Variables:[0001:Dexterity] += Variable[0002:Intellegence]
Variables:[0004:Luck Picking Luck] += Variable[0001: Dexterity]

Conditional Branch: Variable[0004:Lock Picking Luck] > [Lock Difficulty]
Text: You picked the lock!
Control Self Switch A

Else
Text: You failed to pick the lock.
Exit Event Processing

Branch End

Else:
Text: You do not have Silver in your Inventory
Exit Event Processing

Branch End

When:[Gold Pick]
Conditonal Branch:[Gold Pick] in Inventory
Text: You used silver pick to pick the lock
Change items:[Gold Pick], -1
Variables:[0001:Dexterity] = [Alexus]'s DEX
Variables:[0002:Intellegence] = [Alexus]'s INT
Variables:[0003:Lock Difficulty] = 20
Variables:[0004:Lock Picking Luck] = Rand No. (1...50)
Variables:[0001:Dexterity] += Variable[0002:Intellegence]
Variables:[0004:Lock Picking Luck] += Variable[0001: Dexterity]

Conditional Branch: Variable[0004:Lock Picking Luck] > [Lock Difficulty]
Text: You picked the lock!
Control Self Switch A

Else
Text: You failed to pick the lock.
Exit Event Processing

Branch End

Else:
Text: You do not have gold pick in your Inventory
Exit Event Processing

Branch End

Branch End
When: [No]
Exit Event Processing

Page 2
Set Trigger to Control Switch A
Set Direction Fix
Set Action Trigger
Apply Image



Text: Open the Chest Box?
Show Choices: Yes, No
When Yes:
Set Move Route: This Event: Graphic change 2
Wait .2
Set Move Route: This Event: Graphic change 3
Wait .2
Set Move Route: This Event: Graphic change 4
Change Items: [Potion], + 1
Text: You obtained 1 potion!
Control Self Switch B
When: [No]
Exit Event Processing

Page 3
Set Trigger to Control Switch B
Set Direction Fix
Set Action Trigger
Apply Open Chest Image


Text: An empty Chest Box


Instructions: For Both Systems, you can modify the lock difficulty and the luck randomizer. You can also change the item to be obtain.

Notes: You can further modify this system by adding more conditional branches. This should work with both XP and 2k3 but the code was written in Xp format. If you want to use it for 2k3, just get the basic concept of this tutorial and you should be able to use it.

Details
Tutorial: Chest Lock Picking
Date Listed: Thu, 03 Jul 2008 01:30:14 -0700
Author: jens009
Total Hits: 2033


Embed
Short URL:

HTML:

BB Code:



RPG RPG Revolution
RPG RPG Revolution is your #1 stop for game development and console RPG games, as well as those created by people like you. Link to us to support us, so we may grow to be better website community for you.

RPG RPG Revolution is an Privacy Policy and Legal