The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Event Systems => Topic started by: Acolyte on August 17, 2011, 11:11:11 PM

Title: [VX] Camping Item with Map Scene
Post by: Acolyte on August 17, 2011, 11:11:11 PM
This is mostly just a slightly tweaked version of Yanfly's camping event in the YEZ demo, but I thought it might help some people out.

This allows you to have a tent item like in several final fantasys, but when used, it teleports you to a camping map based on the map you are currently on.
You can also have your party members show up on the map. If you want to get really complicated with it, you could set their dialogue to change with different story events using switches or variables, but this will focus mostly on the camping event itself.

First, you'll need four variables.(Three if you only want one camp area used for every map)
Name these variables "Camping Location", "Map ID", "Map X", and "Map Y".

On your first map,(I used a forest for my first map) make a parallel process event that sets variable "Camping Location" to 1. Set the rest of your maps as 2, 3 and so on.

Now, make a common event. Use a conditional branch with the condition that the "Camping Location" variable is set to 1. Underneath that, set the "Map ID" variable equal to the map ID, "Map X" equal to the player's map X location, and "Map Y" to the player's map Y. Then, use the transfer command to teleport the player to that map's camping location. Do the same thing for your other maps, changing the "Camping Location" variable to match the map that corresponds with your other camping maps. It should look something like this:
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FpvoHP.png&hash=2e2dc16505824d04926a0610100176baab9c0baa)
It may also be a good idea, if your maps aren't as plainly labeled, to note which variable number corresponds to each map by leaving a comment for each location.

In the items list, make a new item called "Tent". (Or you could call it bedroll or something if you don't want to use a tent graphic)

Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FjnX3a.png&hash=4fb1b8e28dc56955aca8aced26e8d93a72670344)

Set the scope to "none" and make it usable only from the menu. Then, underneath common event, select the camping common event you just made.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FSG7kv.png&hash=4fb9dbb1c8f616c4a17bbc53a2b30cbb4f235873)
I tinted my map a dark blue hue to simulate night time.

So, now we can get to our camp site, but how do we get back?

Simply create an event (I used a bed kept inside the tent) that teleports you with the designations set to the variables they correspond to. (Ie: Map ID=Map ID variable and so on)

Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fa5sb4.png&hash=8099af1951c7bb9c2e26516c9f9373c48ab4f948)

Here's what mine looks like:
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FXhZjK.png&hash=feb04847cf7e7acf78b58b557e77f4271a949021)

I added the inn tone and a fadeout to transition back into the regular map. I also made it heal the entire party, as that's usually the ultimate purpose of a tent.

So, there you go. You have a nice tent scene that changes based on the map you're on.

I made it so the party members and their corresponding beds only appear when they're in the party. To do this, just make each party member's event on the camping maps, and check the condition "Actor: 'insert actor here' exists" for the corresponding actors and beds.

Demo:http://www.mediafire.com/?7ir2xljai0538g9 (http://www.mediafire.com/?7ir2xljai0538g9)

Credit/Thanks:
Yanfly for the basic common event.
Mack and Hanzo Kimura for the tilesets used in the demo.