CHAPTER 5

image

Your First Dungeon

In the previous chapter, we fleshed out our small game, adding many features to it to make it feel more like an actual game and less like a disjointed mess. Our player now has an idea of what he or she should be doing. So, in this chapter, we will be tackling the task of populating the dungeon that we created (or, rather, copy-pasted) in the previous one. The first order of business is to determine how you want the enemies to appear.

Random or Static?

The heading poses a very important question without an easy answer.

Random

By default, RPG Maker VX Ace (RMVXA) has a random encounter system in place that allows the user to cause enemies to attack the player after a certain average of steps (determined by Steps Average).

Static

The alternative is to do as games such as Final Fantasy: Mystic Quest have done. That is, place enemy troops directly on the map. In RMVXA, you can do this much as you would any other event.

Really, it all depends on the type of game that you want. There’s nothing wrong with having a game in which every single enemy is placed on the map already (as is the case with Final Fantasy: Mystic Quest). In any case, even if you use a random encounter system, you’ll still want to place bosses accordingly.

Image Note  If you’re using the Lite version, you won’t have the event slot capacity to add all of the things listed below. In that case, just set up random encounters as normal, to save the slots for the treasure chests and other later dungeon content.

Creating Static Encounters

For the sake of completeness, let’s have both types of encounters within our dungeon. As we have not placed a static encounter before, let’s start with those. To place a static enemy, create an event, use an appropriate graphic, and find the Battle Processing event command. When you click it, you’ll get the menu displayed in Figure 5-1.

9781484207857_Fig05-01.jpg

Figure 5-1. The Battle Processing event command

  • The Troop section allows you to decide what encounter to place within the event. It defaults to Direct designation, which is the option I most frequently use. However, you can also use Designation with a variable, in which case the encounter you get is based on the troop ID in the Database. Or, you can just have Battle Processing act like a random encounter and roll on the encounters table in that map’s properties.
  • Can Escape can be toggled if you want to have an encounter that you can run away from. For most boss battles, I would leave this one off. For everything else, you can turn this on.
  • Continue Even When Loser is self-explanatory. This is good for those battles in which you want the player to lose to advance the plot or for an optional battle with a nonplayer character (NPC) that ostensibly wouldn’t kill the player if it wins (such as a sensei who trains the character).

The one trick with static encounters is that you must place them in spots that the player must pass through, or else they might as well not be there. If we take a look at the first floor of our dungeon, you’ll realize that there are only a few spots where this is true. So, let’s add a few more. Then, we can add Battle Processing events that look like so:

@>Battle Processing: Slime, Hill Orc
: If Win
   @>Control Self Switch: A =ON
   @>
: If Escape
   @>
: Branch End
@>

I have the troop we created in Chapter 3 here, but you can use any troop you prefer. As they are non-boss fights, we can toggle Can Escape. However, we do not want the players “cheating” the encounters, as it were. That is, we have to make sure that they defeat the encounter before being allowed to pass. So, we make it so that the encounter only disappears if self-switch A is turned on (via the use of a second blank event page with the appropriate conditional). I placed five events and circled them on the following screenshot. (See Figure 5-2).

9781484207857_Fig05-02.jpg

Figure 5-2. The five static encounters on the first floor of this dungeon

You can also see that I tweaked the terrain around some of those events, to make sure that the player had to interact with the encounters. Next, I will add five treasure chests to that floor as well. Can you guess where I’m going to place them? A good rule of game design is that the player should feel rewarded for going out of his/her way to explore a dungeon in its entirety. (See Figure 5-3).

9781484207857_Fig05-03.jpg

Figure 5-3. The first floor of the dungeon, now with added treasure chests!

I placed five treasure chests on the map (four of them are visible, while the fifth is a blank graphic placed atop the rock near the northern end of the floor). That hidden chest rewards players who interact with their surroundings. As we don’t want random encounters to appear on the first floor, we won’t use the Region tool. Instead, we’ll use it for the basement and declare the random encounters that we want the player to find in the Map properties. Drawing in all of those region tiles seems daunting, doesn’t it? I’m actually inclined to agree. There’s another way to set it, so that we have no random encounters on the first floor and then have them in the basement.

The Change Encounter Event Command

Given that I’ve covered a fair number of the event commands already, you have probably seen Change Encounter under the System Settings section of the event command list. This simple command defaults to Enable. If you set it to Disable, then you will encounter no enemies until it is set back to Enable, even if the map in question has listed encounters. In this particular dungeon, it’s as easy as setting up the Parallel Process transfer event as we have several times before and then just adding the Change Encounter command before the actual transition.

@>Control Variables: [0002:X] = Player's Map X
@>Control Variables: [0003:Y] = Player's Map Y
@>Conditional Branch: Variable [0002:X] == 15
   @>Conditional Branch: Variable [0003:Y] == 7
      @>Comment: This exit leads to the basement.
      @>Change Encounter: Enable
      @>Transfer Player:[005:Goblin CaveF1F] (061,041), Right
      @>
   : Branch End
   @>
: Branch End
@>Conditional Branch: Variable [0002:X] == 20
   @>Conditional Branch: Variable [0003:Y] == 45
      @>Comment: This exit leads to the world map.
      @>Change Encounter: Enable
      @>Transfer Player:[003:Field 3] (027,082), Left
      @>
   : Branch End
   @>
: Branch End
@>Conditional Branch: Variable [0002:X] == 60
   @>Conditional Branch: Variable [0003:Y] == 41
      @>Comment: This exit leads to the first floor.
      @>Change Encounter: Disable
      @>Transfer Player:[005:Goblin CaveF1F] (014,007), Left
      @>
   : Branch End
   @>
: Branch End
@>

Image Note  You’ll want to tweak the relevant world map transfer event to disable encounters when you enter this dungeon as well.

Once you’ve set up the transfer events, the static encounters, and the first floor treasure chests, we have only the following to do:

  1. Go to Map Properties and set up some random encounters for the player.
  2. Add a few chests to the basement. We’ll add three. That puts the event count at nine for those of you using Lite . . .
  3. . . . which allows us to use the tenth event for the boss of the dungeon.

Given that the toughest enemies in the parts of the world map that the player can currently access are Wisps, we will want to include some troops here that are somewhat tougher. Wisps should be the weakest troop in the encounters list. Take a look at Figure 5-4 to see my own.

9781484207857_Fig05-04.jpg

Figure 5-4. The encounter list for the Goblin Cave

The player has a 4/10 chance of encountering three Wisps, a 3/10 chance of encountering a pair of Large Snakes, a 2/10 chance of encountering three Scorpions, and a 1/10 chance of encountering a pair of Skeletons. The Skeletons are particularly stronger than the rest of the possible troops, so they have the lowest appearance chance. After that is said and done, we can add some treasure chests to the basement and the boss enemy event. See Figure 5-5 for a view of the basement floor with the added events.

9781484207857_Fig05-05.jpg

Figure 5-5. The basement floor of the dungeon

As you can see, we have two visible chests and an invisible chest on the upper-left corner. The player enters the map through the staircase on the lower-left corner and has to make his/her way up to the boss to the north of the southern treasure chest. Once the player speaks with the boss, he/she will be forced to fight them.

Our First Boss

A role-playing game (RPG) would be rather boring if all of the enemies had similar levels of power. That is one of the main reasons why bosses exist. As the name implies, a boss is the strongest enemy in a given area. If the area in question is plot-relevant, then the boss must usually be defeated, to progress in the game’s story. See Figure 5-6 for the relevant boss data.

9781484207857_Fig05-06.jpg

Figure 5-6. Gemini, the first boss of the game

Not pictured: I replaced monster #29 and renamed troop #29 to accommodate him. The conditionals for the second set of three boss skills are actually misleading. There’s a text bug in RMVXA that doesn’t display HP/MP conditionals correctly. While it reads HP 0% - 0%, it is actually set to HP 0% - 50% (meaning that the boss will add those skills to his pattern once he’s at half HP or lower). For the first 50% of his health, Gemini will use normal attacks, a weaker darkness spell, and a cloud that can poison its targets. Once he is hurt, he will use a stronger darkness spell, attack twice, and use a life draining spell as well. When defeated, he is guaranteed to drop a Spirit Staff and the Key Item I created back at Chapter 3. (See, I didn’t forget about it; now’s the perfect time to give it to the player, though). Read on to see the boss event itself in all of its glory.

@>Text: 'Evil', 3, Normal, Bottom
:     : It has been far too long...brother.
@>Text: 'Actor5', 6, Normal, Bottom
:     : Gemini?
@>Text: 'Evil', 3, Normal, Bottom
:     : Yes, my brother. I have heard of your
:     : companion. Eric, is it not? The hero of
:     : old. My dark master has requested this
:     : boy's head.
@>Text: 'Actor4', 0, Normal, Bottom
:     : I am not a boy, and you may not have it!
@>Text: 'Evil', 3, Normal, Bottom
:     : Heh, think you can surpass the power
:     : that has been granted to me? Prepare to
:     : suffer!
@>Change Battle BGM: 'Dungeon9', 100, 100
@>Battle Processing: Gemini
@>

Page 1 of the boss event has an Action Button trigger, so the player has to walk up to the boss before it will act. Note that we change the battle background music to something else before the fight. Feel free to replace the one I used with another of your choosing (Battle5 and Battle9 are my favorites, although the latter is more for a final boss fight against a particularly malevolent foe).

@>Change Battle BGM: 'Battle1', 100, 100
@>Text: 'Evil', 3, Normal, Bottom
:     : Impossible. So, this is the power that the chosen one
:     : holds...
@>Text: 'Actor5', 6, Normal, Bottom
:     : It is a power greater than either of us
:     : will ever be able to bear. Your time is
:     : done, brother.
@>Fadeout Screen
@>Control Self Switch: A =ON
@>Wait: 120 frame(s)
@>Fadein Screen

Page 2 is an Autorun trigger with a switch conditional (BossDefeated = ON). That particular switch, as you will see in a few pages, will be toggled when Gemini is defeated by the player and before he dies. The last page has a conditional of Self Switch A = ON and is otherwise completely blank with an Action Button trigger. Last, look below to see the troop event for our first boss.

  • Page 1 of 2
  • Condition: Enemy [1. Gemini]’s HP 50% or below
  • Span: Battle
    @>Text: 'Evil', 3, Normal, Bottom
    :     : The little brat and my misguided brother
    :     : show their teeth. Very well. Feel the
    :     : full extent of my power!
    @>Change Enemy State: Entire Troop, + [Immortal]
    @>
  • Page 2 of 2
  • Condition: Enemy [1. Gemini]’s HP 0% or below
  • Span: Battle
    @>Text: 'Evil', 3, Normal, Bottom
    :     : This is not over. My master will avenge
    :     : me!
    @>Text: 'Actor4', 0, Normal, Bottom
    :     : We will stop your master as well!
    @>Control Switches: [0004:BossDefeated] = ON
    @>Change Enemy State: Entire Troop, - [Immortal]
    @>

I cut the Span setting to save some space, but both of them share the same Battle span, so that they will only trigger once per battle. I use the Immortal state to great effect here, to make sure that the boss does not die before giving his final speech. We add the Immortal state before he reaches 0% HP and then take it away once he’s done speaking at 0% HP. We also make it so that the BossDefeated switch is turned on when he is defeated, which plays into the boss event mentioned on the previous pages.

That just about finishes our very first dungeon. Now, play-test the game and see if it is balanced or not. If you find that some of the enemies are too strong or too weak, feel free to increase or decrease their stats accordingly. Constant play-testing is most important when dealing with enemies, given that you may over- or underestimate their numbers. What seemed like a particularly difficult enemy troop on paper may be trivial for the player’s party by the time it reaches the relevant area.

You’ll want to add appropriate weapons and armor for Eric and Noah to become stronger. Among the chests of our first dungeon, I placed a Hard Leather, a Magic Staff, and a Battle Axe.

Additional Exercises

Here are some more exercises to make your dungeon a little more interactive.

  1. Create some interparty banter between Eric and Noah, if they are both present.

    We can cheat a little with this, given that Eric will always be in the party and given the layout of this dungeon’s basement floor. Thus, we only need conditionals to check for Noah’s presence and can use a single variable that is increased in value by 1 for each event triggered. This is one of those things that will make more sense if I just show you, so check the following code.

    @>Conditional Branch: Variable [0002:X] == 70
       @>Conditional Branch: Variable [0003:Y] >= 40
          @>Conditional Branch: Variable [0003:Y] <= 41
             @>Conditional Branch: [Noah] is In the Party
                @>Conditional Branch: Variable [0005:Dungeon1Talk] == 0
                @>Control Variables: [0005:Dungeon1Talk] += 1
                @>Text: 'Actor5', 6, Normal, Bottom
                :     : ...
                @>Text: 'Actor4', 0, Normal, Bottom
                :     : Are you well, Noah?
                @>Text: 'Actor5', 6, Normal, Bottom
                :     : I have a strange feeling at the pit of
                :     : my stomach.
                @>Text: 'Actor4', 0, Normal, Bottom
                :     : You haven't eaten for a while.
                @>Text: 'Actor5', 6, Normal, Bottom
                :     : Hah! No, it's not that. Let's move on.
                @>
              : Branch End
             @>
           : Branch End
         @>
       : Branch End
      @>
    : Branch End
    @>
    : Branch End

    This particular event triggers at the marked location shown in Figure 5-7.

    9781484207857_Fig05-07.jpg

    Figure 5-7. The location where the previously mentioned event will trigger

    There’s a whopping five conditional branches up there, but the first three are just location-checking, in the way we have usually done for our Parallel Process events so far. The fourth branch checks for Noah’s presence, while the fifth makes sure that the relevant variable is set to 0. If everything checks out, the variable value is increased by one, and we get a short conversation between our two party members.

    Image Note  An event, unless you use Jump Label, will always resolve from top to bottom, once it has been triggered. Thus, it doesn’t matter if you increase the value of the variable directly after the branches or at the end of the conversation, so long as you do so after the event is triggered and before the end of that event as a whole.

    You can add more of those conversations throughout the dungeon as the player gets closer and closer to the boss location. It’s a nice little way to add some atmosphere to what would otherwise be a rather unassuming affair.

  2. Expand the boss event so that the square it occupies becomes a one-way exit from the dungeon after its defeat.
    • My favorite graphics to use from RMVXA’s default set for this task are the hexagrams (!Hexagram) and crystals (!Crystal).
    • Add the graphic of your choosing; use the Action Button trigger for the last page of the boss event; and then add the following content (replace crystal with hexagram, if applicable).
      @>Text: -, -, Normal, Bottom
      :     : A strange crystal stands on the spot that Gemini
      :     : was slain. It appears that it will send you
      :     : back to this dungeon's entrance. Touch it?
      @>Show Choices: Yes, No
      : When [Yes]
         @>Text: -, -, Normal, Bottom
         :     : You feel yourself being whisked away!
         @>Transfer Player:[003:Field 3] (027,082), Left
         @>
      : When [No]
         @>Text: -, -, Normal, Bottom
         :     : You decide against touching the crystal.
         @>
      : Branch End
      @>

Summary

During the course of this chapter, we created our very first dungeon and populated it with treasure chests and enemy encounters, both of the static and random types. Additionally, we created our game’s first boss to oppose the player. In the next chapter, we will work on our game’s second dungeon, which will be somewhat more exciting than this one.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset