[Tutorial] How to Avoid Using Conditional Branches by Using Event Pages

In this tutorial you’ll learn how to script changing NPC behavior over time. For example, having a particular character say one thing before you defeat a boss, and having them say something different afterward. You might be tempted to use Conditional Branches to do this, but you really shouldn’t, there’s an easier way. What we’re going to use is a variation of the system we used to prevent refilling chests.

Suppose you want to make a character say one thing before you fight a boss and a second thing afterward. The first page of the event would look like this:pages-tutorial-1

The second page of the event will look like this:RPG Maker VX Ace Screenshot

Notice in the top right corner under “Conditions” that this page will only activate if switch 001 is on. If the game has a choice between activating a page that has a condition and activating a page that does not have a condition, it will always activate the page that has a condition if it can. So, in this case, if switch 001 is off, it will execute page 1, and if switch 001 is off, it will execute page 2.

Now, suppose you wanted this person to have a third possible line of dialogue after you’ve beaten a later boss. To do that, you would make a third page that would look like this:RPG Maker VX Ace Screenshot

An important thing to remember about this is that, if there are two pages that each require one switch, and both switches are on, the game will run the page that requires the higher numbered switch. So, if page 2 requires switch 001, and page 3 requires switch 002, and both switches are on, then page 3, and only page 3, will be executed.

Now, suppose you wanted an NPC to simply vanish after a particular event had happened. You might be tempted like I was to use “Erase Event” to do this, but if you do, the event will be right back where it was when you return to the area. Instead, to make an event disappear, you make an event page that either has no contents or can’t be activated, and has no graphic associated with it.

To continue with the event we were talking about before, suppose you wanted this NPC to disappear after you defeated a later boss. Then, page 3 would look like this:RPG Maker VX Ace screenshot

Notice a few differences. First, since the event has no graphic, there will not appear to be anything on that square. Second, since I changed the trigger to “Event Touch”, it should not be triggered by anything. Finally, since the event has no contents, it should not do anything even if it were somehow triggered.

The last thing I’ll teach you is how to make an NPC teleport away right before your eyes. If we wanted this character to vanish when we talk to him after defeating the second boss, that would require two pages. Page 3 would look like this:RPG Maker VX Ace screenshot

Page 4 will look like this:RPG Maker VX Ace screenshot

This way, when you talk to the NPC after defeating the boss, they will say a line, an animation will play, and a switch will be flipped. As soon as that switch is flipped, page 4 will take over and the character will no longer be visible. This will cause the character to quietly disappear while the animation plays and be gone when it finishes.
This tutorial should give you enough information to make NPCs change their behavior or appearance without having to use conditional branches. Good luck with your games and have a nice day.


Science Viking


[Tutorial] How to make shopkeepers in RPG Maker 2003 and RPG Maker VX Ace

Note: This tutorial assumes that you know what events are and how to edit them, as well as how to make new maps and set up transitions between maps. If you don’t know how to do these things, I have a great tutorial to get you started on using RPG Maker here.

If you’re anything like me, your first attempt to make a shopkeeper in RPG maker went something like this. You created a small map to be the inside of the shop (using the interior tileset of course), made a shop counter, placed an NPC behind the counter and set them to have “Shop Processing” with whatever items you wanted them to sell. Your shop would look something like this:shopkeeper-tutorial-1

Then you run the game in playtest mode and tried to buy something from your shiny new shop, only for noting to happen. You check to make sure that the game is working, and everything works fine except for the shopkeeper. What happened?!

The answer, gentle reader, is that the shopkeeper is working fine, but you can’t get to them. By placing the counter in front of the shopkeeper, you placed an impassable tile between the player and the event they need to interact with. Does this mean it’s impossible to have a merchant behind a counter in RPG Maker? No. The trick to making it work is that the counter will actually be your shopkeeper. Click on the tile directly in front of your NPC.shopkeeper-tutorial-2

Right here. In the event editing screen give that tile shop processing with whatever items you want this merchant to sell, and make sure to set the event priority as “Same as Characters” and the the trigger as “Action Button”. You can leave the graphic blank so it will look exactly the same as the tile below it. When you’re done it will look like this:shopkeeper-tutorial-3

Notice the part I’ve circled in red. By default, the priority will be “Bellow Characters” which means you won’t be able to activate it unless you’re standing on top of it, but since it’s on an impassable tile, you can’t stand on top of it, so you won’t be able to interact with it.

If you follow all of these instructions, you should have the appearance of buying items from a merchant behind a counter. This is also how you create a merchant who has different lines if you talk to them from behind the counter. When they are on the other side of the counter from you, you are interacting with a different event then when the counter is between you and them. It also means that all this time you’ve been buying items from magic, item-selling counters and desks!


Science Viking

[Tutorial] Introduction to RPG Maker VX Ace

So, you just got a shiny new copy of RPG Maker VX Ace. You fired it up, opened a new project, looked at the page and thought “Wow, I have no idea what I’m looking at”. Well, you’ve come to the right place. In this tutorial I’ll walk you through how to create maps, how to set up area transitions between your maps, how to create NPCs, and how to put random encounters in an area. That should be enough to get you started on the road to making your own RPG. By the way, this tutorial does work mostly if you’re using RPG Maker 2003, but there will be a few places where you have to figure things out that I haven’t explained.

First start up the software, and click File–> New Project. It’ll ask you for a file name and game title. Just go with “Practice” for now. You can change it later. Your starting screen will look like this:vx-ace-intro-1

Before we do anything else, we need to make sure that our character doesn’t start the game standing in the ocean. We need to place some tiles. In order to do that, we need to switch into tile editing mode. To do that, click here:vx-ace-intro-2

If you click on the button I’ve circled in red, it will switch you into tile editing mode. Now just select a tile from the top-left corner and spread some of it around, like this:vx-ace-intro-3

Now that we have some land, let’s give our hero someone to talk to. To do that, we need to be in the event editing layer. Click here:vx-ace-intro-4

Now that you’re in the event layer, double click on a square that is on land other than the square where your hero is. A box will pop up that looks like this:vx-ace-intro-5

There’s a lot going on here, but we don’t need to worry about most of it right now. In the upper left corner, you can give your event a name. This isn’t a bad idea so you can keep track of what your event was supposed to do.

Now, we need to decide what our new NPC looks like. Double click on the tiled section under the word “Graphic” here:vx-ace-intro-6

A new window should open up that looks like this:vx-ace-intro-7

Choose a suitable appearance for your new NPC and click OK. You will go back to the menu you were using before.

Now the NPC has an appearance. You can choose under the panel labeled “Autonomous Movement” whether they will move or stand still. For now let’s leave that alone and instead give the character something to say. Double click on the first line under “Contents”vx-ace-intro-8

In the window that pops up, click on the first button in the upper left, labeled “Show Text”. You should see a window that looks like this:vx-ace-intro-9

Just type in what you want your NPC to say and click OK. When you get back to the original window, click OK again. Now, let’s playtest this, to make sure that everything worked. Click on the green play button here:vx-ace-intro-10

Create a new game and you can talk to your new NPC.

Once you’re done doing that we can move onto the next step. We’re going to make a dungeon. You should already be in the event layer, now just double click somewhere to place the entrance to your dungeon. Select a graphic appropriate for the entrance to a dungeon, like a cave entrance. Once you’ve done that you… actually can’t make the entrance yet, because you haven’t made the dungeon. You need to make a new map, and then you can create an entrance to it.

On the left side under the tile selector is a list of all the maps in your game. Right now there should be a folder labeled “Practice” and under that is “MAP001” which is the only map that exists right now. Right click on either of them (it doesn’t matter) and click “New Map”. That will bring up a window that looks like this:vx-ace-intro-11

In general, it is a good idea to change the name to something that you’ll remember. That will make it easier to find this map in the future. For now, just call it “Dungeon”. The next thing to do is change the tileset. Otherwise it will use the same tiles as the previous area, which is not right for a dungeon. For your tileset, select “004:Dungeon”. You should also increase the size of the map since the default is quite small.

The next thing to do is to choose the background for any battles that happen in this dungeon. Check the box labeled “Specify Battleback” and then click on the three dots under it. Choose a background that you think looks good.

The next step is to give your dungeon some music. Check the box labeled “Auto-Change BGM”, and select background music that you think is appropriate for a dungeon.

The last thing we need to do on this menu is to set up some random encounters. Double click on the top row of the “Encounters” window and select a troop. RPG Maker comes with some of these pre-made, which should be fine for this tutorial.

Once you’ve done all of these things, click OK. Now, place tiles on your dungeon the same way you did for the other map.

The last thing we need to do is make a way to travel from one map to the other. Go back to “MAP001” and select the dungeon entrance we were working on (remember, you need to be in the event layer to do this).

Under “Contents” go to the second tab, and the option at the top under “movement” will be “Transfer Player”. Select your dungeon and a map of the dungeon you made will appear. Just click on the tile you want, and that’s where the event will drop your character.

Click OK, and there’s one last thing you have to do. Look at the sections labeled “priority” and “trigger”vx-ace-intro-12

Priority can be “above characters”, “below character” or “same as characters”. The important thing to remember is that if the priority is “same as character” then you can’t walk through it, and it will be triggered by either walking up to it and using the action button (usually Z), or just by walking into it. If priority is set to “below character” then you can walk right through it.

“Trigger” refers to what needs to happen to trigger the event. The possible triggers we are going to pay attention to for this tutorial are “Action Button” and “Player Touch”. Setting the trigger to “Action Button” means that the player has to either stand next to the event while facing it (if it is the same priority as characters) or stand directly on top of it (if it is below characters) and press the action button to trigger the event. This is fine for NPCs and switches, but if the entrance to a dungeon is triggered by the action button and has a priority of “below characters” (which it has right now), then the player could walk over it without ever knowing it was there. The last thing you should do for this tutorial is to switch the trigger to “player touch”. That way your character will be transported into the dungeon whenever they walk over the entrance.

And, now you know enough to get started with RPG Maker VX Ace. Spend some time messing around and see what you can create. Tutorials are great, but you won’t really master the software without practice, so get to work.



Science Viking

[Tutorial] How to fix the refilling/infinite chest bug in RPGmaker


First of all, if you’re very new to using RPG Maker and want a quick introduction to using the software in general, you’ll want to check out my Introduction to RPG Maker VX Ace. Even if you are using RPG Maker 2003, it should be helpful.

In this article I’m going to explain how to fix a very common issue in RPGmaker. In this case, chests not staying empty after you open them. This issue is so common in fact that one of the Steam Trading Cards for RPGmaker VX Ace makes a joke about it (The “Unlimited Item Works” card if you’re curious).

The reason for this is that the only thing that the game remembers is the values associated with variables and switches. That means that, unless an event changes either a variable or a switch, that event will be repeated every time something triggers it.

In short, each chest needs to have a switch associated with it. The event governing the chest needs to do the following in order: Check if the chest has been opened, add the item to your inventory, show text telling you what was in the chest, and flip the switch from off to on.

This event should have two pages. The first page should look like this:


First notice that this page has no conditions, which means that by default, it will enact this page unless something tells it to enact the second page. Second, notice the contents window has three components: “Change Items [Potion] +5”, “Text: – – Normal, Bottom :Found 5 Potions”, and “Control Switches [0002:Chest 1] = ON”. This means that this page will add 5 potions to the player’s inventory, show text saying the player found 5 potions, and flip switch 0002, the switch associated with chest, into the ON position. Now we’re ready to deal with what happens when you come back to the chest a second time.

The second page of the event should look like this:chest-tutorial-2

Now, the first time interact with the chest, it will open and give you whatever item was inside it (in this case 5 potions), and the second time, the chest will look like it is already open, and you will see a message saying that it is empty. You can also leave the second page blank, so nothing will happen when the player interacts with it, but the second page has to exist, and has to exist so that the appearance of the chest will change and it will stop adding items to your inventory after it has been opened once.