Gw Temp

Menu

Tutorial - 'RM2K Arena' by Oni

An item about RPGMaker 2000 posted on

Blurb

A tutorial for newer RM2K users on making a basic Arena sidequest.

Body

Hello, and welcome to a beginner’s tutorial on making an Arena in your RM2K game, using the DBS and DMS! Arenas can be a great sidequest for any player, and are also great for rewarding the player with powerful weapons or spells. But lo, there are complications. Before we get to that, let’s establish what this Arena will be- a simple yet effective one, where the player is set up in a random match against one or more enemies, then receives an item for every enemy killed (We’ll call the items ‘Coins’, okay?). The player will then be able to trade in their collection of Coins for an item- naturally, better items cost more. Everything good so far? Let’s take a few small steps first.

Firstly, RM2K will NOT recognize a battle event if it’s start and fork conditions are set at all the monsters having 0 HP. So, using a variable to record the number of Coins collected would be difficult- the only option in using a variables is to use battle events and fork conditions to increase the number of Coins collected by the number you would win after the battle. But, there is a much easier method for this, albeit more limiting- items.

Open up the Items tab in your Database, and make a new item called ‘Arena Coin’. Make it a Common Good, with a properly matching description. Pricing is your choice- if you want to let the player sell the Coins at shops for quick cash, then go ahead and put an appropriate price. I prefer to just give the player more prizes to spend Coins on at the Arena, and set the price at 0 to prevent the sale of Coins. This will be your currency for the Arena you’re making. The upside of making an item for Coins is that the coding will be much simpler, and there will be less chance of you screwing up and having to hunt all over your events for an error. However, using an item instead of a variable limits the player to just 99 Coins and limits you to giving only 1 Coin per a defeated enemy, unless you take steps I will explain later :D. If you feel up to the task, use a variable instead- this tutorial will assume you chose to use items instead.

Now, make the area outside the Arena where the matches are set up and prizes are bought. Make sure in the final Arena version you’ve included a place to start up matches, a place to buy prizes with Coins, a tutorial on the Arena, and a spot to save the game, and the player will be happy. We’ll come back to actually writing most of this stuff later- for now, let’s make the Arena battles!

Open your Database again and make your monsters/enemies for the arena. Select their statistics, abilities, etc. When finished designing the enemy, select the Item drop-down menu and choose the Arena Coin item; also, make sure you set the Chance to Get to 100%. This means that you will receive 1 Coin per an enemy slain. Another option for adding the Coins is to do it during the battle- though this will have much the hassle of just using a variable, you will be able to add more Coins.

Now onto some real RM2K coding. Make an event that will give the player the option to take part in the Arena- something to set up the Arena battles! This MUST be an event, but it can be a human, computer, stone tablet, or anything you want. Now then, here is the coding to it- I will write it below, then explain every part of it to you.

<>Message: Care to fight in the arena, pal?
<>Show Choice:Yes/No
:[Yes] Case
<>Label 1#
<>Message: Getting a match set up...\! ...\! ...
<>Message: Alrighty, here you go!
<>Change Var: Var[0001:What Monster?] (Set)-Random(1 to [number of enemies/battles in the Arena])
<>If Var(0001:What Monster?) 1
<> Start Battle: [Choose the name of the Monster Party (containing the correct Arena monster/s) the player will fight for that battle]
:End Case

Okay, we’ll begin here. First you’ll see a hello from the guy running the Arena, then the player must choose whether to participate or not. Onto the Yes Case coding.

Label 1#

If you don’t understand labels, then they can best be described as a quick and easy way to cut down on coding by allowing you to jump around a single event page. Very useful! This Label will come into play later in this event.

More messages. Notice the ‘\!’ symbols I put in the first Message? Those will delay the message from continuing, because the player must press the ENTER key for the message to continue from that point. I prefer the ‘\!’ symbols to ‘\.’ and ‘\|’, but it is just a matter of preference. In any case, the messages are just there to make the Arena prettier.

<>Change Var: Var[0001:What Monster?] (Set)-Random(1 to [number of enemies/battles in the Arena])

As you can see with the next line, we will be using at least one variable. Name it something along the lines of ‘What Monster?’. Next, add the line of coding shown above- change the variable to a random number between 1 and the number of battles in the Arena (If you have 50 different battles in the arena, then the second number would be 50).

<>If Var(0001:What Monster?) 1
<> Start Battle: [Choose the name of the Monster Party (containing the correct Arena monster/s) the player will fight for that battle]

These lines say that, if the variable that was randomly assigned a number was 1, the game will start a battle with the selected Monster Party. Also, keep in mind that you can use variable ranges in the Fork conditions to make some battles more likely than others.

Now, repeat the above-mentioned Fork condition for all of the possible Arena battles, making sure to change the start condition each time. So... now we’ve made the events leading up to the start of an Arena battle, right? Let’s go further :D.

<>Label 2#
<>Change Var: Var[0001:What Monster?] (Set)-0
<>Message: Great job busting that freak up! What do you plan to do next?
<>Show Choice: Let’s fight some more!/We’re hurt pretty bad.../Let’s save our progress./I’m ready to quit.
:[Let’s fight some more!] Case
<>Goto Label 1#
<>
:[We’re hurt pretty bad...] Case
<>Play SE: Absorption2
<>Recover: [All Members] (Full Recovery)
<>Goto Label 2#
:[Let’s save our progress.] Case
<>Call Save Menu
<>Goto Label 2#
<>
:[I’m ready to quit.] Case
<>Message: Quitting so soon? Alright then, buh-bye!
<>
:End Case
<>
:[No] Case
<>
:End Case
<>

This may look complex to some, but it’s really easy and effective once you get the idea of it.

Label 2#

The second label is placed. As said before with number 1, the labels will come into play later.

<>Change Var: Var[0001:What Monster?] (Set)-0

Alright, this line probably isn’t needed, now that I think about it. But, I don’t like leaving a loaded gun sitting in this event- it would be wise to just disable it now, in case something is wrong with the script and the game checks for var 0001’s numeric value BEFORE having randomly changed it.

Another message to signify the event has ended, then a second choice asking the player to decide where to go next.

:[Let’s fight some more!] Case
<>Goto Label 1#
<>

This event will send the player all the way back to Label 1# and start another battle.

:[We’re hurt pretty bad...] Case
<>Play SE: Absorption2
<>Recover: [All Members] (Full Recovery)
<>Goto Label 2#

In this choice the party will be healed before being prompted to make a choice among the previous four a second time. The RTP sound effect called Absorption2 was used in the example, but if you’d like to use some other audio effect, just do so :P.

:[Let’s save our progress.] Case
<>Call Save Menu
<>Goto Label 2#
<>

This is very simple, as all it will do is call the standard save menu and then launch the four-answer question again.

:[I’m ready to quit.] Case
<>Message: Quitting so soon? Alright then, buh-bye!
<>

Notice the lack of a Label here! When the player selects this, the Arena manager will say goodbye and the player will be on their way to exiting the event.

:End Case
<>
:[No] Case
<>
:End Case
<>

Just some finishes to the code that don’t do anything, resulting from the forks and choices.

Alright now, your finalized code for this event should look a lot like this...

<>Message: Care to fight in the arena, pal?
<>Show Choice:Yes/No
:[Yes] Case
<>Label 1#
<>Message: Getting a match set up...\! ...\! ...
<>Message: Alrighty, here you go!
<>Change Var: Var[0001:What Monster?] (Set)-Random(1 to [number of enemies/battles in the Arena])
<>If Var(0001:What Monster?) 1
<> Start Battle: [Choose the name of the Monster Party (containing the correct Arena monster/s) the player will fight for that battle]
:End Case
<>Label 2#
<>Change Var: Var[0001:What Monster?] (Set)-0
<>Message: Great job busting that freak up! What do you plan to do next?
<>Show Choice: Let’s fight some more!/We’re hurt pretty bad.../Let’s save our progress./I’m ready to quit.
:[Let’s fight some more!] Case
<>Goto Label 1#
<>
:[We’re hurt pretty bad...] Case
<>Play SE: Absorption2
<>Recover: [All Members] (Full Recovery)
<>Goto Label 2#
:[Let’s save our progress.] Case
<>Call Save Menu
<>Goto Label 2#
<>
:[I’m ready to quit.] Case
<>Message: Quitting so soon? Alright then, buh-bye!
<>
:End Case
<>
:[No] Case
<>
:End Case
<>

Ready to move on? Let’s continue with the fun part, the PRIZES!

First, make sure your prizes are finished in the Items tab of the Database. When ready, make a new event in the pre-Arena area where the player can buy items. Make a new variable and name it something like Arena Coins Held. Now, let’s begin the coding :D!

<>Change Var: Var[0002:Arena Coins Held] (Set)-Arena Coin Hold Amount
<>Message: Would you like to exchange your Arena Coins for something nice?
<>Show Choice: Yes/No
:[Yes] Case
<>Message: Please select your prize.

The first line in this small bit will memorize the coins you hold with a variable. Why is this important? Because, using a variable you will be able to compare it to other numerical values. Handy :)! The messages will notify the player that he/she is buying something nice.

<>Show Choice:[item 1] - [item cost in Coins]/[item 2- item cost in Coins]/[item 3- item cost in Coins]/[item 4- item cost in Coins]/
:[[item 1] – [item cost in Coins]] Case
<>If Var(0002:Arena Coin Hold) [item 1 cost in coins](<)
<>Message: You haven’t got enough Arena Coins.
<>
:Else Case
<>Message: There you go, enjoy!
<>Chng Item Count:(Arena Coin) [item 1 cost in Coins] (Rem)
<>Chng Item Count:([item 1[) 1 (Add)

<>Show Choice:[item 1] - [item cost in Coins]/[item 2- item cost in Coins]/[item 3- item cost in Coins]/[item 4- item cost in Coins]

We can only show 4 items at a time, but in return we do it simply and quickly. Just type the name and the price for each item.

:[[item 1] – [item cost in Coins]] Case
<>If Var(0002:Arena Coin Hold) [item 1 cost in coins](<)
<>Message: You haven’t got enough Arena Coins.
<>

If the player selects Item 1, this fork condition will check to make sure the player has enough Arena Coins to buy the item, and if the player doesn’t, a message will appear telling the player so and ending the entire event. In the opposite case...

:Else Case
<>Message: There you go, enjoy!
<>Chng Item Count:(Arena Coin) [item 1 cost in Coins] (Rem)
<>Chng Item Count:([item 1[) 1 (Add)

A message from the event thanking the player to indicate the transaction was successful, then two Change Item Count events to deduct the spent Arena Coins and add the item purchased.

:[[item 1] – [item cost in Coins]] Case
<>If Var(0002:Arena Coin Hold) [item 1 cost in coins](<)
<>Message: You haven’t got enough Arena Coins.
<>
:Else Case
<>Message: There you go, enjoy!
<>Chng Item Count:(Arena Coin) [item 1 cost in Coins] (Rem)
<>Chng Item Count:([item 1[) 1 (Add)

Copy this exact approach for every item available, and you’ll be nearly finished with the arena! After doing so, you’re finished with this event. You’ve gotten the Arena battles and prizes done, so... what’s left? Just a few things. Make another event on the map somewhere that will allow the player to learn how the Arena works- I would prefer you allow the player to cancel or avoid the advice, but it’s your preference :). Finally, make sure the player is able to save the game somehow in the Arena hallway. Now, you’ve got the basic Arena finished!

Finishing Notes
Earlier I promised to explain how to allow the player to collect more than 99 Coins, as well as how to give more than one Coin per an enemy. Well, I’m going to see how this tutorial does in popularity first. If this tutorial is appreciated and demand is high, I’ll get into advanced Arena features in a separate tutorial. If you have questions, you can contact me on IRC, at #gamemaker on the Dynasty Network. Thanks :D!