Help - Search - Members - Calendar
Full Version: [Eventing] Simple World Map And Location System
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion > RPG Maker VX Tutorials
Neku
This System Will Create An Easily Accessible Map Of your Area And Show Your Current Location using Simple Eventing Methods Along With
Some Basic Lines Of RGSS2, Best Of all It only Uses 1 Switch and 2 Common Events! (1 REALLY LONG common event and a fairly Short one)
WARNING This will involve adding to your Map Names To Work!

Firstly We'll Need to make a small modification to the Script 'Game_Map'

On Line 21 of the editor (under the other 'attr_reader' etc Just Paste in this Line:
CODE
attr_reader :name # gets the map name


Then around Line 40 under This Line:
CODE
@map = load_data(sprintf("Data/Map%03d.rvdata", @map_id))


Paste This Line Of Code:
CODE
@name = load_data("Data/MapInfos.rvdata")[@map_id].name


Ok Now we're Set!
Firstly We Need a Switch Called 'MAP' or something to that effect.
Now Create a Common Event with These Parameters:
Name: 'ViewMap' (just for reference)
Trigger: Autorun
Switch: (the Switch we Named 'Map')

Secondly Make Another Common Event and give it the following Parameters:
Name: 'Location'
Trigger: None
Switch: Blank

ok now lets Get to the Event Commands:
the Event 'ViewMap' should look Like So:


Now as you can see there are 2 picture Commands!
Now for your Map Images you need to Create a Simple Map and Import it into the 'Pictures' Section of your Project
You can do this By Pressing F10 in the editor and using the menu to do so..
These Pictures MUST BE the size of the screen ingame (544x416 pixels) or at least a bit smaller (you would have to center it if smaller)
Here's an Example From My Game "Eternities Call"





Also you will need Another Picture for Each Location you can visit that consists of an Indicator and nothing else..(making sure the Indicator is in the same place as the Location on the map}
For example:



This Indicates Eigera Castle' as your Current Location (the background is Transparent)


Now to display the Images you will need afew simple Command Lines in the 'Location'
Common Event Made earlier and another Tiny Addition...

Firstly Your Map needs to be shown.
My Map Is Just of the first Island so each Map in this area Must Hold
a 'Tag' to let the system know this, I chose the Tag '{E}' (this must be put at the End of each MapName That is in this area)
Ok with this at hand we goto the 'Location' Event and add the following:


Next to show the Location Indicator we need another Tag For each Map in that Location,
i'll use the example area of 'Vale Cottages' I used the tag: [VC]

So I simply added the Following Comand Lines:


Now all you have to do to Call The Map is Turn the Switch 'Map' On, Simple wink.gif

And here's that put into Play tongue.gif


There are afew Response Problems for Cancelling the Map but nothing too serious...enjoy :book:wink.gif

Feel free to ask me of any more details with this system, I will be happy to help :coffee:
Neku
bump )someone looking for this thread :\
SojaBird
you can also use my mapradar script posted in THIS TOPIC (compleetly different)
drebenk
@Vivi thanks for the reply of my PM and bumpping this topic.
So how do you make the map appear when you press the M key for example?
And by the way if I make my world map using this tehnique it'll only show my location according to the pics with the dot right? So this means that this is not a dynamic indication of the players position on the map.
Neku
to make it appear with the 'M' key as a trigger u would need the Script that allows full keyboard usage and Then just use this:

if Input.trigger?(Input::A_Z["M"])
$game_switches[mapswitch]
end

mapswitch being the ID of the switch u used for the map event wink.gif

and no its not dynamic but it wouldnt take much to make it dynamic...
just some variables and stuff, but i have no need for this as of yet..
drebenk
@Vivi thanks for answering my Q mate.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.