Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [Eventing] Simple World Map And Location System, An Event/Script Hybrid
Neku
post Mar 10 2008, 02:10 PM
Post #1


lOvE iS nOiSe
Group Icon

Group: Revolutionary
Posts: 159
Type: Event Designer
RM Skill: Skilled




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:


__________________________
Go to the top of the page
 
+Quote Post
   
Neku
post May 16 2008, 04:03 PM
Post #2


lOvE iS nOiSe
Group Icon

Group: Revolutionary
Posts: 159
Type: Event Designer
RM Skill: Skilled




bump )someone looking for this thread :\


__________________________
Go to the top of the page
 
+Quote Post
   
SojaBird
post May 16 2008, 04:14 PM
Post #3


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




you can also use my mapradar script posted in THIS TOPIC (compleetly different)


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
drebenk
post May 16 2008, 04:47 PM
Post #4


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@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.

This post has been edited by drebenk: May 16 2008, 04:54 PM


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
Neku
post May 17 2008, 07:25 AM
Post #5


lOvE iS nOiSe
Group Icon

Group: Revolutionary
Posts: 159
Type: Event Designer
RM Skill: Skilled




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..


__________________________
Go to the top of the page
 
+Quote Post
   
drebenk
post May 17 2008, 04:20 PM
Post #6


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@Vivi thanks for answering my Q mate.


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 05:37 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker