Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
Marked

Enemy Encounters Tutorial

Recommended Posts

In this Tutorial, I will show you how to only encounter enemies on specific tiles on your map. This is exactly like how the encounters work on games like Pokemon.

 

First off all, open up the database in RPG Maker XP, and goto the tilesets tab. The last button on the very right side is called "Terrain Tag", click on that.

This will show "0"s over all of the tiles on that Tileset. By default every tile is assigned to 0, and you can change these value from 0-7. These numbers are to be used to identify tiles with variables.

 

For this tutorial, I will use the "Grassland" Tileset.

 

Open your database and goto the "Grassland" tileset. Click the "Terrain Tag" button. Here we want to change the value of the tiles we want to encounter enemies when the character is standing or walking through them. I'm going to set all the grass tiles to "7" as shown below.

enemyencounter01ka0.png

This is all we need to do in the Database, click OK.

 

Now place some of those tiles into your map. Goto your "Map Properties" and add some Troops. We are going to want the "Step Average" to be quite low. I'm going to set mine to 3.

enemyencounter02jk3.png

Now make an Event somewhere on your Map.

Set the "Trigger" to "Parallel Process"

Add a new "Control Variables" command. Here we can setup the Variable which will set the Terrain Tag the Player is currently on. So create a new Variable and name it "Set Terrain Tag".

In the Control Variables command window, have the "Operation" set on "Set", and the "Operand" set on "Character" >> "Player" >> "Terrain Tag", as shown below.

enemyencounter03ad7.png

Next, make a "Conditional Branch" command.

On the first tab, set it to "Variable", and make sure the Variable selected is the "Set Terrain Tag" Variable. In the next box, have it set to "Equal to", and a Constant of 7. This command basically checks if the variable "Set Terrain Tag" is 7, and the "Control Variables" command above sets this value to the value of the Tiles Terrain Tag value. So when the player is on the grass, the variable "Set Terrain Tag" is set to 7, and when on any other tile, it is set back to the default value, 0.

Inside the condition branch, under the first line, add the command "Change Encounter", and set this to "Enable". Inside the Condition Branch under "Else", add the command "Change Encounter", and set this to "Disable".

 

Now test play your game. Once the player walks into the grass, you should encounter enemies, but anywhere else you should have encounters.

 

Demo

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...