13 March 2010

Chapter 6: Picking Locks - The Complete Chests Tutorial

Continuing with the Chest Tutorials, we will now create a locked chest that can be opened with a lockpick. Of course, factored into the equation is that there is the possibility the lockpick will break, but if the lock is successfully "picked" then the chest will open.

The first thing we need to do is create the lockpick. In the Items tab of the Database, make the lockpick a Common Item. This will be the "key" for the chest.

Next we need to create the chest itself, "Chest 6", using the basic chest template (from Part 1). However, we have to check whether the Hero has a lockpick first, otherwise the chest will remain locked.

This is created with a Branch Condition, thus:
<>Branch if lockpick Possessed
  <>
: Else Handler
  <>Message: The chest is locked!
  :         You don't have a lockpick!
  <>
: End
This will check to see if the Hero possesses a lockpick. If not, a message will pop up stating that fact.

Next, we'll set up the "Randomizer" variable to determine success or failure. In this case, set it to a random number between 1 and 3, creating additional Branch Conditions based on the random result.

If Randomizer is 1, this is where the chest opens and the event commands are placed here, calling the Random Contents Common Event and turning the "Chest 6" switch on. If Randomizer is 2, you fail to pick the lock. And if Randomizer is 3, the lockpick breaks, not forgetting to remove the lockpick from the inventory.

The completed routine is:
<>Branch if lockpick Possessed
  <>Variable Oper: [0001:Randomizer] Set, Rnd [1-3]
  <>Branch if Var [0001:Randomizer] is 1
    <>Play Sound: open1
    <>Message: You pick the lock and the chest opens!
    <>Move Event: This Event, Face Right
    <>Wait: 0.2 Sec
    <>Move Event: This Event, Face Up
    <>Wait: 0.2 Sec
    <>Move Event: This Event, Face Left
    <>Wait: 0.2 Sec
    <>Call Event: Random Contents
    <>Switch Operation: [0007:Chest 6 Opened] ON
    <>
  : End
  <>Branch if Var [0001:Randomizer] is 2
    <>Message: You fail to pick the lock!
    <>
  : End
  <>Branch if Var [0001:Randomizer] is 3
    <>Message: The lockpick breaks!
    <>Change Items: lockpick 1 Remove
    <>
  : End
: Else Handler
  <>Message: The chest is locked!
  :               You don't have a lockpick!
  <>
: End

Don't forget to set the Preconditions switch to "Chest 6 ON" on Page 2.

Next, of course, we need to create an NPC that will give you the lockpick. You can either place it in a shop or have the NPC gift it to you. For the purposes of this demo, we'll choose the latter, so set up the NPC event and in the Event Commands, check if a lockpick is already possessed. If so, he won't give another; if not, he'll give you another one.
<>Branch if lockpick Possessed
  <>Message: You already have a lockpick!
  <>
: Else Handler
  <>Message: Have a lockpick!
  <>
: End

Move Event

Direct Download It can be very time-consuming trying to figure out specific character movements, often meaning that you have to playtest and tweak until you have it just right. I've had many frustrating moments where the characters have moved slightly too far, putting the rest of the "scene" out of sync. Or where the cut scene has frozen because characters are trying to move but are walking into walls.

With this utility, which can be downloaded here, it takes some of the pain away. What it does is allow you to record the keystrokes from the directional keys, then either preview it as a graphical representation or as a "live" demonstration (playing back the recorded keystrokes) in RMXP itself.

Move Event for RMXP
As you can see from the snapshot above, you can also save the current movement commands and load them later for additional tweaking and testing.

Since using this utility, the amount of time taken for cutscenes where a lot of character and NPC movement is required has been slashed in half. It's very useful to be able to test that out before actually implementing it in the Command Events and then having to go back in to edit them manually.

If you're like me and have a lot of movement in your games, then this utility will assuredly help. It's one of those rare gems you stumble across that certainly help you out and you don't want to get rid of - even after there are no further updates.

Character Maker XP

Direct Download When it comes to designing character sets from scratch, I am stuck so rely on these kinds of utilities to help me out. Character Maker XP makes life much easier, as it will create character sets and sprites for you.

Although it is limited as far as the number of resources, you can still create some reasonably good custom character sets for RMXP, even with a small set of graphics available.

Character Maker XP

As you can see from the snapshot above, characters are highly customizable, with a virtual mannequin to model the clothes and extras to work with. You can then export your finished product to RMXP character sets and import them into your games. It also has a feature to edit the resources, but use with caution since it directly modifies the program's default graphics, with no way to undo the changes, except to reinstall it.

Its ease of use makes it a worthy addition to your games creation software, but there are slightly better ones out there, including online web editors.

Edit (18-Feb-2012): Previously downloadable from Megaupload and we all know what happened to them. Thanks to "Anonymous" for pointing this out. Anyway, download should be working now.

Face Maker

RMXP Unlimited What's a character set without a matching face? Well, with Face Maker, currently at version 3.1, you can design facesets for message boxes. It doesn't seem to have been updated in over a year, but it does its job and suffices quite well. It also does not come with a Help file - not that you need it though - it's fairly self-explanatory.

To download it, you'll have to become a member of the RMXP Unlimited forums, but it's definitely worth it in the end.

Face Maker 3.1

One of the things I really like about this program is that every aspect of the face is customizable, from the face to the additional accessories:

  • Face and neck
  • Eyes (including the pupils and eyebrows)
  • Mouth
  • Mustache (including beard)
  • Ears
  • Hair (including bangs)
  • Neck and head wear
  • And two sets of accessories (including helmet)

There are literally hundreds of possible combinations and quite a large range of resources to choose from.

Once you're done creating your masterpiece, you can save it for use in your games, with three sizes to choose from, depending on the RPG Maker used and the purpose of the faceset.

Overall, this is a very neat program, one which I've used on occasion too, primarily just for the fun of it.

Chapter 5: Trapped Chests - The Complete Chest Tutorial

Continuing the Chest Tutorials, we're now going to create a trapped chest, i.e. when you open it, it will trigger a random trap, which will cause damage or affect the player's status.

To begin, create a basic chest (as detailed in Part 1), we'll need to set up the randomized traps, then 4 additional Conditional Branches with the different traps triggered, including one where you avoid the trap.

The following routine is placed after the third Wait Command and before the rewards (called with the "Random Contents" Call Event we defined in Part 3).
<>Variable Oper: [0001:Randomizer] Set, Rnd [1-4]
<>Branch if Var [0001:Randomizer] is 1
  <>Show Battle Animation: Fire Breath, Hero (Wait)
  <>Message: You triggered a fire trap.
<>Change HP: Entire Party's HP 10 Remove
  <>
: End
<>Branch if Var [0001:Randomizer] is 2
  <>Show Battle Animation: Ice Breath, Hero (Wait)
  <>Message: You triggered an ice trap.
  <>Change HP: Entire Party's HP 10 Remove
  <>
: End
<>Branch if Var [0001:Randomizer] is 3
  <>Show Battle Animation: Poison Breath, Hero (Wait)
  <>Message: You triggered a poison trap.
  :         You've been poisoned!
  <>Change Cond: Entire Party Poison Inflict
  <>
: End
<>Branch if Var [0001:Randomizer] is 4
  <>Message: You avoided the trap.
  <>
: End

With that in place, the chest will open normally and you'll receive the goodies from within the chest after the trap has been triggered.
12 March 2010

Changes Are Afoot

Frequent visitors to this blog will see a major change, specifically the new layout. The template was created by the very talented Diane from Skin Corner (highly recommended to anyone looking for free Blogger templates).

After experimenting with LiveJournal and Wordpress for the repository of additional materials and resources, I found that they were extremely limited (and limiting). Blogger is the "original" and by far the most versatile, so the RPG Maker Times Companion (as it will be renamed) will be ported over here.

So, now that the projects that kept me busy last month and part of this month are done, and work has slowed, I can spend more time on updates. What I'm hoping for are more tutorials, windowskins, scriptlets and game reviews.

In the meantime, all of the posts on this blog are intact, but I still have the hideous task of bringing the entries (including the links) up-to-date. This shouldn't take too long. No doubt, there will be some overlooked links, etc. but I'll find them eventually!

The RPG Maker 2K3 Master blog will remain as it is (layout wise), but with RM2K3 related tutorials implemented there. This blog will then point to those tut's and how-to's.

In addition, any additional materials, resources, scripts, etc. will also be indexed on the forthcoming RPG Maker Times Companion blog to make things much easier to find.
11 March 2010

Chapter 4b: Combination Locks (Advanced) - The Complete Chest Tutorial

Following on from Part 4a, which created a single combination, this tutorial will prevent you from opening the chest unless you know the complete combination beforehand.

For the purposes of this tutorial, we'll create 4 additional events (Bush #1, Bush #2, Bush #3 and Bush #4) that can be searched for each part of the combination. These are dotted around the map so that when "searched", one part of the combination will show up.

We'll also need to create 4 variables (Num 1, Num 2, Num 3 and Num 4) to "store" the individual combination numbers, but this is primarily to avoid using switches when the number is obtained.

The combination for this tutorial will be 4321, with each part stored in the variable "Num Digits". If you attempt to open the chest without first knowing the entire combination of four numbers, you won't be able to open it.

Starting with the Bush #1 event, in the Event Commands, we're going to create a Conditional Branch to determine if the bush has already been searched. If so, display a message with the first number in the combination sequence; if not, set the first number (in this case set to 4) and add one to the number of digits. The complete code will look like this:
<>Branch if Var [0003:Num 1] is 0 Greater
  <>Message: The first number is: \V[3].
  <>
: Else Handler
  <>Variable Oper: [0003:Num 1] Set, 4
  <>Variable Oper: [0007:Num Digits] + , 1
  <>Message: The first number is: \V[3].
  <>
: End

Repeat that with Bush #2, changing "Num 1" to "Num 2", "\V[3]" to "\V[4]" and under the Else Handler change the "4" to a "3", thus:
<>Branch if Var [0004:Num 2] is 0 Greater
  <>Message: The first number is: \V[4].
  <>
: Else Handler
  <>Variable Oper: [0004:Num 2] Set, 3
  <>Variable Oper: [0007:Num Digits] + , 1
  <>Message: The first number is: \V[4].
  <>
: End

Repeat the process for Bush #3 and Bush #4, increasing the values accordingly.

After that, we need to create the chest. For this, we'll check to see if all the numbers needed for the combination lock are known. If not, a message will be displayed telling you that you don't know the full code. If so, check for the correct combination (in this case, 4321) and open the chest upon the correct combination being entered.

We'll be drawing on the previous tutorials - Part 1 (Basic Chests), Part 4a (Combination Locks) and Part 3 (Random Contents) to create the chest.

The complete routine will look like this:
<>Branch if Var [0007:Num Digits] is 4
  <>Input Number: 4 Digit, [0002:Combo]
  <>Branch if Var [0002:Combo] is 4321
    <>Play Sound: open1
    <>Move Event: This Event, Face Right
    <>Wait: 0.2 Sec
    <>Move Event: This Event, Face Up
    <>Wait: 0.2 Sec
    <>Move Event: This Event, Face Left
    <>Wait: 0.2 Sec
    <>Call Event: Random Contents
    <>Switch Operation: [0004:Chest 4b Opened] ON
    <>
  : Else Handler
    <>Message: The combination is incorrect.
    <>
  : End
  <>
: Else Handler
  <>Message: You don't have all the numbers yet.
  <>
: End

Chapter 4a: Combination Locks (Basic) - The Complete Chest Tutorial

Combination locks can be placed on some chests, which will only be opened if the correct combination is entered, otherwise will remain closed. In this two part tutorial, I'll demonstrate how this can be achieved.

The first, which sets up a basic 4-digit combination lock, we need to create another chest event, "Chest 4a". On Page 2, set the Preconditions Switch to "Chest 4a Opened".

On Page 1, we'll set up a variable and input option for the combination (in this case 1234), stored in "Combo", determine if the correct combination has been entered and, if so, provide random contents (detailed in Part 3). If not, the chest remains closed.

The complete code on Page 1 will look like this:
<>Input Number: 4 Digit, [0002:Combo]
<>Branch if Var [0002:Combo] is 1234
  <>Play Sound: open1
  <>Move Event: This Event, Face Right
  <>Wait: 0.2 Sec
  <>Move Event: This Event, Face Up
  <>Wait: 0.2 Sec
  <>Move Event: This Event, Face Left
  <>Wait: 0.2 Sec
  <>Call Event: Random Contents
  <>Switch Operation: [0001: Chest 4a Opened] ON
  <>
: Else Handler
  <>Message: The combination is incorrect.
  <>
: End

When you playtest the game, if you try and open the chest with any other combination than 1234, the combination will be incorrect. Trying 1234 will open the chest and give random items (from Part 3).
09 March 2010

Chapter 3: Random Contents - The Complete Chests Tutorial

Wouldn't it be better if the contents of chests were randomized, rather than fixed? This adds an element of surprise to the game, a sense of the unexpected.

To set up randomized items, we'll be using a Common Event, which can then be called from within the chest events.

So, let's create the Common Event (in the Database) first of all. Create a new Common Event, called "Random Contents", with the Trigger set to "Call" (the default).

In the Event Commands, we'll be generating a random number between 1 and 3, which will then correspond to the item given. To do this, we need to set up a variable (Randomizer or similar) and some Conditional Branches, each pointing to the random number generated.

For this tutorial, the goodies I've chosen are 5 Potions, 100 GP and 5 Antidotes.

This is how the finished code looks:
<>Variable Oper: [0001:Randomizer] Set, Rnd[1-3]
<>Branch if Var [0001:Randomizer] is 1
<>Message: 5 Potions found!
<>Change Items: Potion 5 Add
<>
: End
<>Branch if Var [0001:Randomizer] is 2
<>Message: 100 GP found!
<>Change Money: 100 Add
<>
: End
<>Branch if Var [0001:Randomizer] is 3
<>Message: 5 Antidotes found!
<>Change Items: Antidote 5 Add
<>
: End

To add more items, increase the end range of the variable Randomizer and add another corresponding Conditional Branch.

Using the map from the previous tutorials, create another chest on the map, named "Chest 3". You can copy the locked chest and paste it onto the map, deleting the Event Commands in Page 1, except "Play Sound" through to the third "Wait" command.

At the end, add the Call Event command to call the "Random Contents" Common Event we just created. Then turn the switch "Chest 3 Opened" to ON and change the Preconditions switch to "Chest 3 Opened" as well.

The completed code will look like this:

<>Play Sound: open1
<>Move Event: This Event, Face Right
<>Wait: 0.2 Sec
<>Move Event: This Event, Face Up
<>Wait: 0.2 Sec
<>Move Event: This Event, Face Left
<>Wait: 0.2 Sec
<>Call Event: Random Contents
<>Switch Operation: [0001: Chest 3 Opened] ON

With every chest you want random content, simply call the "Random Contents" event and turn turn on the corresponding switch in a similar fashion.
08 March 2010

Chapter 2: Locked Chests - The Complete Chests Tutorial

As a continuation of the Chest Tutorials - Part 1: Basic Chests, this tutorial details how to create a chest requiring a key to open.

First of all, we'll need to create the key to open the chests. In the "Item" tab of the Database, create the key as a "Common Item" type and description.

Now, let's lock "Chest 1" (from Part 1) by modifying the Event Commands slightly. Before adding any commands, press CTRL A (to select all) and CTRL X (to cut it).

Add a Conditional Branch (Tab 3), set to "Item" (second tab), "Party Possesses" and "Key", with the "Execute Custom Handler" option checked.

Under the Branch, paste (CTRL V) the previous commands. Then under the "Else Handler", create a message stating the chest is locked.

The complete script in Page 1 should look like this:
<>Branch if Key Possessed
<>Play Sound: open1
<>Move Event: This Event, Face Right
<>Wait: 0.2 Sec
<>Move Event: This Event, Face Up
<>Wait: 0.2 Sec
<>Move Event: This Event, Face Left
<>Wait: 0.2 Sec
<>Message: 5 Potions received!
<>Change Items: Potion 5 Add
<>Switch Operation: [0001: Chest 2 Opened] ON
<>
: Else Handler
<>Message: It's locked! You need a key to open it!
<>
: End

That's it for the chest. When you playtest now, you won't be able to open the chest without the key and you'll get the "It's locked!" message.

To obtain the key, we're going to set up another event, an NPC, who will give the key only once.

In the Event Commands of the NPC event, place the following:
<>Branch if Key Possessed
<>Message: Did you open the chest yet?
<>
: Else Handler
<>Message: Here's the key to that chest.
: Keep whatever you find inside.
<>Change Items: Key 1 Add
<>
: End

What this does is check first to see if the NPC has already given the key. If not, add the Key to the inventory; if so, don't give another key but display a message instead. And now the chest can be opened to obtain the Potions.

We can now move onto Chapter 3: Random Contents.
Related Posts with Thumbnails
Template Design "Perfect World" by SkinCorner