RPG Maker MV

RPG Maker MV

88 ratings
MV Basics - Part 2
By tstki
This guide will help you get started making a game in "RPG Maker MV".
It was originally written for VX Ace, but has since been converted and rewritten.

See part 1 for the earlier chapters.
- https://steamproxy.net/sharedfiles/filedetails/?id=1602148622

More information / discussions can be found in our group:
- https://steamproxy.net/groups/GGPlayersHQ
4
   
Award
Favorite
Favorited
Unfavorite
7. Doors 2.0
Some fun with editing existing events and switches.
Let's add a grumpy character - how would you feel about random heroes just barging into your house all day? I sure wouldn't like it!

Find a house in your town and add a door (quick event creation -> door).
Now, we'll modify it by not having the player go to a new area, and some text shouted at you by the owner, as below.
* We copy the animation (move route), and reverse it.
* Add a switch to indicate you've tried to open the door once.
* Add a conditional based on the switch, to show the grumpy character yelling at you.
* Play the close sound.
* Remove the transition stuff.

Result:
@> Play SE: 'Open1', 80, 100 @> Set Move Route: This event (Wait) :: $> Turn Left :: $> Wait: 3 frame(s) :: $> Turn Right :: $> Wait: 3 frame(s) :: $> Turn Up :: $> Through ON @>Set Movement Route : Player (Skip, Wait) : 1 Step Forward @> Conditional Branch: Switch [0003: Grumpy Town 1] == ON @>Text: -, -, Normal, Bottom :: Back again?! I told you to go away! @> : Else @>Text: -, -, Normal, Bottom :: What are you doing here?! Go away! @> @> Control Switches: [0003: Grumpy Town 1] = ON @>Set Movement Route : Player (Skip, Wait) : Turn Down : 1 Step Forward @> Set Move Route: This event (Wait) :: $> Turn Right :: $> Wait: 3 frame(s) :: $> Turn Left :: $> Wait: 3 frame(s) :: $> Turn Down :: $> Through OFF @> Play SE: 'Close1', 80, 100 @>

See if you can re-create it for your own town.
8. Moving NPCs
Everyone just standing around like idiots makes the town look a bit "dead", so let's add some moving npcs. Dogs, cats, messengers running around, old people shuffling.

Go to the event layer (F6) and add a new event. Select a random person from the "people" graphics (or monsters, or actors, as you see fit). Next, you will have to look at the two sections: "Autonomous Movement" and "Priority". Set the "Type" to "Custom". This will unlock the "Route..." button, press it and add a simple path. Don't forget to enable/disable the walking animation, so it looks like the character is actually walking instead of gliding. For example:
$>Walking Animation ON $>Move Right $>Move Right $>Wait: 60 frame(s) $>Move Left $>Move Left $>Move Up $>Move Down $>Wait: 60 frame(s)
This will cause the NPC to move in a repeated L shaped pattern before returning to his original position.
Alternatively you can have them move left/right - as per example in the screenshot.

Next, the "priority" section. By default this is set to "Same as Characters". This means the player will block NPC movement, and vice versa. If the player is blocking the NPC's path, it will pause it's loop. If you set it's priority to be above, or below players, then movement will not be blocked either by the NPC, or by the player.

If you wish to make it look as though a NPC just walked into a house, you can set the: "Transparent ON / Transparent OFF" flags when you have them walk into a house door.
Note you can make monsters use this behavior just as easily, and have them react to "player touch" to initiate a battle.
9. Two way Bridges
Bridges are cool, but a bit tricky to make. If you tried creating a canyon, and spanning a straight bridge across it you'll notice a few problems.
* You probably can't walk "onto" the bridge if the tile on the edge of it is the cliff edge tile.
* If you didn't use the cliff edge tile, then you can probably walk "under" the bridge, and straight onto the cliff face where the bridge is attached.
* If you walk under the bridge, you'll walk onto it !

Worry not, as all these problems can be fixed, but it does take a bit of work to set up initially. Once it's up and running you can copy this technique to your heart's content across your entire RPG.

Take the image below as a guideline.


The colored dots won't appear in RPG Maker, they were added with paint.net as a reference. Each color represents an event, which can then be copy and pasted onto the dots with the same color. Let's start with the black, yellow and blue dots.
* Black: Create a new event, and set a graphic (Tileset-B at the bottom of the list has some good bridge elements). Set the priority of the event to be "Above Characters". Next is something you might not have done before. At the top of the edit event dialog we select the "New Event Page" button. This will create a new event page which we can then modify and set special conditions on. In this case we need to add a "switch". Create a new switch and call it "0004:bridge" (or other number if available). Lastly, on this new event page set the priority to be "Below Characters". That's it, just copy this event to create the base bridge.
* Yellow: In order to prevent the player from being able to walk off the sides of the bridge we need to block the sides when the player is on the bridge, and remove that barrier if the player wants to walk under the bridge. Create a new event, and set the priority "Below Characters". Next we add a new event page and on this we set the priority to be "Same as Characters". On this second page we also set the switch condition just like on the black event (0004:bridge)
* Blue: To prevent the player from walking onto the cliff from under the bridge we will create a blocking event that works much the same as the sides of the bridge - but in reverse. Create a new event and set it's priority to "Same as Characters", then like the yellow event we create a new event page and add a switch condition to "0004:bridge" and change the priority. In this case "Below Characters".

That takes care of the bridge itself, now all we need to do is ensure the switch gets turned on and off when the player walks near or away from the bridge. That is where the green and red events come into play.
* Green: Create a new event and add a new line to it's contents "Game progression -> Control Switches", set "Bridge = ON". Also important next, is to set the "Trigger" (found below the priority field) to "Player Touch".
* Red: Copy the green event you just created (you can ctrl+c, ctrl+v on just about anything you like). And edit the control switches line to "OFF". As an extra you can set a switch condition on this event that checks "0004:bridge is ON", but this is somewhat redundant.

Finally, copy and paste the events into the correct position to ensure the player always walks onto them. Then playtest your newly created bridge.
10. Pressure plates and movable objects
If you've played zelda, or lufia 2 (if you haven't, go do it right after you finish reading this guide), then you'll undoubtedly have encountered some "movable block puzzles". Wouldn't it be FUN to create some for your own RPG? There's so much you can do with puzzles like those, and they add a whole new dimension to the game to ensure the player is kept entertained. A break from the simple chores of monster slaying as one may call it.

There are a few ways to do this, but by far the simplest method is using a "parallel process". Keep in mind though, that these run parallel to the rest of the game while the player is in this map, and creating a lot of these on the same map may impact your game's performance. So, use in limited quantities, or small maps.

The first part, is to create the movable object. In this case I'm creating a barrel which we can then shove onto a switch.
Open your test project map and create a new event (F6 as usual), then set a graphic. A barrel, a block, a crate, anything goes.
Next, make sure the priority is "Same as Characters" so that you can't walk through the object, but have to push it. The trigger I would recommend setting to "Action Button", so that the player can't accidentally push an object he does not with to push, but instead has to press the space bar to force the movement. You can set "Player Touch" if you wish though. Also the "Speed" should be put to "Normal" (It will look better).

The last thing we need to set is in the event contents, add a new insert (tab 2, set movement route for "this event") and select "Move away from Player". Also set the following options:
* Repeat Movements - Off
* Skip If Cannot Move - On
* Wait for Completion - Off
Finally, give this event a name, "Box1" will do for now (You'll see why when we add the pressure plate below). Then playtest the block. You should be able to move it all over the place, and get stuck in a corner. With this you can already create some puzzles to unblock doors, but we want to add an extra dimension to the adventure. Pushbuttons, or perhaps better called pressure plates.


Add a new event near the box we just created and give it a proper graphic. (I added a switch button here)
Set the "Through" option to True. (e.g. ensure the checkbox is ON)
Set the priority to "Below Characters", to ensure you can walk over it.
Set the Trigger to "Parallel".
Next is the fun part, best explained with showing you the actual code contents I used. Note the screenshow below is slightly different, so as to show you an alternative. You can use fixed coordinates, or get the coordinates from the switch itself (better). Always use the event to set a switch so it doesn't keep triggering while the pot is on the switch.
@>Control Variables: [0001:Box1-X] = [Box1]'s Map X @>Control Variables: [0002:Box1-Y] = [Box1]'s Map Y @>Conditional Branch: Variable [0001:Box1-X] == 21 @>Conditional Branch: Variable [0001:Box1-Y] == 16 @>Conditional Branch: Switch [0006:Open secret door] == OFF @>Text: -, -, Normal, Bottom :: You hear a loud noise from inside the building. @Control Switches: [0006:Open secret door] = ON @> : Branch End @> : Else @Control Switches: [0006:Open secret door] = OFF @> : Branch End @> : Else @Control Switches: [0006:Open secret door] = OFF @> : Branch End @>

In this example the pressure plate will only respond to Box1, as you can see.
Alternatively, you can set it to react to the player. By removing the "OFF" parts, you will ensure the button stays active.
By adding a second event page, you can change the color or "pressed state" of the pressure plate. (Or button if you wish to call it so) The last chapter showed you how to do this.

* Control Variables: Can be found in tab 1. Event XY and the player XY can be found in the "Game Data" operand under character. Just scroll down from there.
Tip: It's a good idea to also add a sound to both the box movement, and the switch being pressed or released.
11. Saving and not saving
By default any new project you make in RPG Maker will allow the player to save anywhere by simply pressing the ESC button and selecting "Save" from the menu. How casual. Should you want to make your game more hardcore (or roguelike if you wish) then you can remove the save ability entirely. Or, like most RPGs you could move the save ability to specific areas or NPCs such as the Innkeeper.

Let's start by removing the player's ability to save anywhere.
In VX this used to be done in the script editor, but in MV you can simply go to the database -> system, and unselect "save" the player is now unable to save his game.

If that is too hardcore for you, and you wish to add the ability to save at specific locations then you can make the save option available by the following means. Let's go back to the Innkeeper we added earlier (See chapter 3) and edit that event. Under the "Facein Screen" line, insert a new "Text" stating something along the lines of "Do you wish to save?", followed by a "show choices" (tab 1) giving the player the option to select yes and no. Next we insert a new command. See Tab 3 and select "Open Save Screen".
Now the player will be able to save the game anytime he's used the innkeeper.

Innkeepers are cool n all, but they cost money.
If you wish to take it a step further, you could add "save points" at the front of dungeons, or even before big boss fights.
Now, I feel it would be weird to have a full fledged inn suddenly spring up in the middle of a demon invested dungeon (right?), so instead of that, we could add a "circle or protection" to certain points in a dungeon. Let's make it a fancy one that restores all health, resurrects all dead players, and allows you to save.

Create a new event somewhere in town (just as a test for now), and select a special floor tile (a green hexagram would do). Set the priority to "Below Characters" and the trigger to "Player Touch". Save and close the event by pressing OK. Now, go into the game database (F9) and select the "Common Events" tab.

Insert a name for event 001. "Query Save Screen", then add (or copy from the Innkeeper above) the following lines:
@>Text: -, -, Normal, Bottom :: Would you like to save? @> Show Choices: Yes, No : When [Yes] @> Open Save Screen @> : When [No] @> : Branch End @>
Save and close the game database screen and go back to the hexagram event we just created.
Insert the following two lines in the contents:
@>Recover All: Entire Party @>Call Common Event: [Query Save Screen]
Both of those can be found in tab 1. (Actor, and Flow Control)
I recommend also adding a nice sound and perhaps a screen flash (tab 2). And last but not least having the event animate by setting a "Move Route: This event" (just like the door from chapter 2)
12. Shooting fireballs
If you've played Lufia 2 (snes), then you will probably remember the player's ability to destroy bushes, or grappling hook. (we may get to those later) Let's look at a Zelda ability instead for now. Shooting fire or arrows, in order to solve puzzles. This ability is a bit buggy still so we'll have to edit this chapter with clarifications and improvements later. If you can figure out a solution to the issues listed, feel free to share them with the rest of us.

Problems to note before continuing:
* If you shoot and walk at the same time in different zones, you'll trigger a "transfer" - annoying bug.
* If you shoot in different zones, the fireball / arrow movement speed is lower than the one you've set in the main area.

Those issues aside, this is an interesting ability which will add a lot of fun puzzle abilities for your players.

We will need to create 3 events, 2 common events, 2 switches, 2 variables. This chapter should be considered as intermediate difficulty.
We'll create an event for the fireball itself (or arrow if you prefer).
An event for learning/unlocking the ability.
And an event to shoot at and do something. (so we can use it to solve puzzles)

Start by creating 3 events on the map, not much script/contents yet, just create an event and give it a name. Put them somewhere in the topleft, where the player won't walk over them.
* Shot: Priority below characters, Stepping animation, Through (disable the other 2 options), Frequency 5, Speed 2x faster.
* Target Practice: Priority same as characters, Trigger on Parallel Process.
* Learn Boulder(name doesn't matter though): Priority below characters, Trigger on player touch.

Common Events
Next up, the common events (we'll get back to the other events soon), and we need two events to make this work. Common events can be found in the database section.
* Name the first one "Use Check". This one is a bit complicated, but easy to understand in the end.
Set it to trigger on a "parallel", and the conditional switch (create new) on "Ability Active". Feel free to rename it later.

Create a conditional branch, then go to Tab 4 and set the check for "button cancel is pressed".
As below: (Note you'll probably need to create the 2 switches 7 and 8 mentioned below)
@> Conditional Branch: The X Button is Being Pressed @> Control Variables: [0003:Player-X] = Player's Map X @> Control Variables: [0004:Player-Y] = Player's Map Y @> Set Event Location: [Shot], Variable [0003][00004] @> Set Movement Route: [Shot] (Wait) : : Script : this._direction = $gamePlayer._direction @> Control Switches: [0007: Ability Active] = OFF @> Control Switches: [0008: Ability Used] = ON : Branch End @>
This is also your very firs introduction to scripting. Just one line but still, more on that later. You "can" make this work without using a script, but a conditional branch with: if player is facing left, turn left, if right, do right, repeat for all directions. is a LOT of code for something that can be fixed with a single line of script.

Conditional Branch can be found on tab 1. (Flow Control)
Control Variables can be found on tab 1. (Game Progression)
Set Event Location can be found on tab 2. (Movement)
Set Movement Route can be found on tab 2. (Movement)
Control Switches can be found on tab 1. (Game Progression)

What we're basically doing here, is check whether the player has pressed a specific button. If so, get the player's current XY map coordinates and store those for later use. Then move the [Shot] starting position and rotation accordingly. After that we set the "used" switch on, so that another event can pick up from there. (In theory this could be done in a single event, but it's cleaner this way.)

Save / Apply that common event and let's go on to the next one.
We'll name the second event "Use Function".
This event basically tells the game what needs to happen when the shot has been fired.
Set the trigger to "autorun", and the condition switch to "Ability used"
@> Set Movement Route: [Shot] (Skip, Wait) : : $> Graphic: '!Flame', 4 : : $> 1 Step Forward : : $> 1 Step Forward : : $> 1 Step Forward : : $> 1 Step Forward : : $> 1 Step Forward : : $> Graphic: (None) @> Set Event Location: [Shot], (000,000) @> Control Switches: [0008: Ability Used] = OFF @> Control Switches: [0007: Ability Active] = ON @>
This event will tell the fireball to "appear" and move 5 steps forward from it's starting point, then disappear, return to a set location, and reactivate the default switches.

Next up - making it all work together.

Go to the "Learn Fireball" event, and add the following contents:
@> Conditional Branch: Switch [0007: Ability Active] == OFF @> Text: -, -, Normal Bottom : : New ability learned! [Fireball] : : Press [PgDn] to shoot and activate torches. @> Control Switches: [007: Ability Active] = ON @> Control Switches: [008: Ability Used] = OFF @> : Branch End @>
This will tell the player he's learned a new ability and how to use it, and set the "initial state" of the relevant switches so that the other events can begin monitoring the A key. You should already have set the other settings for this event above.



The shot event needs no further changes either.

Lastly, we'll set up the torch to shoot a fireball at. (or basic camp fire)
Open the "Target Practice" event and add the following contents:
@> Control Variables: [005: Shot-X] = [Shot]'s Map X] @> Control Variables: [006: Shot-Y] = [Shot]'s Map Y] @> Conditional Branch: Variable [0005: Shot-X] == 31 @> Conditional Branch: Variable [0006: Shot-Y] == 26 @> Set Move Route: [Shot] (Wait) : : $> Graphic: (None) @> Set Event Location: [Shot], (000,000) @> Control Self Switch: A = ON @> : Branch End @> : Branch End @>
Apply those changes, and create a new event page for this event.
Change the graphic to a "campfire with fire" and in the conditions set a check for "self switch A is on".
Set "stepping animation" in the options, and disable the other 3 options.
Trigger should be a "Parallel Process", and priority the "same as characters".
Lastly, we add just two more lines in the contents. Note these are optional, and control the fire going out on it's own. Useful for time based puzzles
@> Wait: 120 frame(s) @> Control Self Switch: A =OFF
That's it.
If you now play test you should be able to shoot fireballs while walking around.
This is a great ability to give your player at a later stage in the game, to be used in unlocking switches on the other side of rivers, or through fences.

Note, there's still 2 bugs with this tutorial as mentioned above - if you can help out, please do so.

Some possible uses:
- A boulder summon spell to trigger remote switches.
- Fireball to light remote torches across water.
- Grappling hook which drags the player across gaps.
13. Weather effects and fogs
Rain, snow, fog, shadows and light will add atmosphere to your game - very important.
Rain and snow are ridiculously easy, so we'll start with those 2.

Create a new event, and make sure it's set to priority "below characters" and to trigger on "player touch".
Next, add in the contents from tab 2: Set Weather Effects.
Simply select Rain, Storm or Snow and you're done.
Just copy this event once and edit it for the other types.
Don't forget to add the "None" type so you can also disable the weather effect again later.

That concludes the easy part of weather.


Fog is a bit more complicated, though hardly something you need to be shy of. The default game installation does not come with any fogs so, at this point you should open google and type in "RPG Maker Fog", and download a few of the images from there (just don't actually use them in your game later, due to copyright stuff). You'll notice some of the cloudy blurry kinds - those will be good for proper fog. But, you'll also see some shadowy leaf kinds, those could be used in forests to simulate the leaves of trees overhead.

Once you've downloaded one, go to Tools -> Resource manager and select the folder: "Img/Pictures". You'll see this is empty initially. Just select it, and press Import, then target the fog image you just downloaded to attach it to your project.

To enable the fog, we will just need to create a single event (and one to "erase" it later, but I think you can figure that one out now).
Create another hexagram with priority below characters that triggers on player touch.
In the contents we set the following lines:
@> Show Picture: 1, 'fog1', Center (0,0), (500%,500%), 110, Normal @> Control Self Switch : A = ON @>
Meaning, image "1" with the graphic "fog1".
Originate from Center, 0,0.
Zoom to 500% X and Y, and blend it at 110 out of 255 opacity, Normal blend.

Next, add an extra event page to this, and check the "Self switch A is ON"
Disable the options, and trigger it on a parallel process.
Next we add 4 "move picture" lines which basically ensure the image slightly "moves" constantly while the fog is active. So the fog doesn't look too static (and thus boring). We move it right, down, left, and back up then repeat. In this example we've set the speed for each movement to 60 frames so you can easily see it move, but for your game you may want to put it to 600 or so.
@> Move picture: 1, Center (100,0), (500%, 500%), 110, Normal, @60, Wait @> Move picture: 1, Center (0,100), (500%, 500%), 110, Normal, @60, Wait @> Move picture: 1, Center (-100,0), (500%, 500%), 110, Normal, @60, Wait @> Move picture: 1, Center (0,-100), (500%, 500%), 110, Normal, @60, Wait @>
That's it, test it by stepping on the hexagram and marvel at the spooky atmosphere.

Forest leaves, dense fog, light fog, lens flare can all be done in a similar way.
Don't overdo it though.
7 Comments
AnIdiot68 14 Jul, 2021 @ 8:57pm 
Wonderful tutorial! however would you be so kind to explain how to switch the main actors. it is probably obvious, but I am indeed an idiot as the name suggests so it would help me a lot. Thank you!
tstki  [author] 3 Feb, 2020 @ 10:09am 
There's always room for improvement indeed,. but it's fairly flexible at least.
Mori Yamamoto 2 Feb, 2020 @ 9:31pm 
I figured it out. Its a bit convoluted though. At least i figured it out.(3 different file type serously why just why just to get 1 bgm with that done i only got 69 more to go)
tstki  [author] 2 Feb, 2020 @ 12:40am 
You should be able to find music in the database section. Much like replacing/adding graphics you can add music in the same way. Make sure you get licensed or "no copyright" music if you plan to go public with your project though ;)
Mori Yamamoto 1 Feb, 2020 @ 9:59pm 
Tstki do you know know how to add custom music? I am not a fan of the music that comes with the game software.
tstki  [author] 19 Jan, 2020 @ 8:27am 
All projects are simply a folder on your computer.
You can manually drag extra files in, then use the game's database to import / assign additional files to be used :)
See the fog part or lamp glow for example.
[NG]MrBaker_ZA 19 Jan, 2020 @ 5:59am 
Nice. Thanks for this! I really like the way you explained everything in such a way that you don't need to be a rocket scientist to understand. Have you got any guides or recommendations on how to get Downloaded Workshop content imported into a new project file?