Help - Search - Members - Calendar
Full Version: Location in Menu(Simple Script)
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS2-Submissions
Dorkfr3sh
Intro:
a simple script that tells you your location in menu


CODE
#======================================================================
========
# Location Window by Dorkfr3sh - E-mail:shamar.sabree@yahoo.com
#------------------------------------------------------------------------------
# Adds a simple location window to the menu.
#------------------------------------------------------------------------------
# http://www.rpgrevolution.com/
#==============================================================================

############
# Scene_Menu #
############
class Scene_Menu
alias location_show_scn_mnu_start start
alias location_show_scn_mnu_terminate terminate
def start
location_show_scn_mnu_start
@mapname_window = Window_Mapname.new(0, 272)
end
def terminate
location_show_scn_mnu_terminate
@mapname_window.dispose
end
end
############
# Game_Map #
############
class Game_Map
attr_reader :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end
###############
# Window_Time #
###############
class Window_Mapname < Window_Base
def initialize(x, y)
super(x, y, 160, WLH + 64)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Destination:")
draw_icon(153, 100, 2)
self.contents.font.color = normal_color
self.contents.draw_text(4, 28, 120, 32, $game_map.mpname.to_s, 2)
end
end
rpgdude
dont wrk
power200
QUOTE (rpgdude @ Nov 1 2009, 05:28 PM) *
dont wrk

It works fine. You just need to remove the = signs on top. *sigh* I'll repost the 'working' version..even though it's easily fixable..
[Show/Hide] Script ._.
CODE
#======================================================================
# Location Window by Dorkfr3sh - E-mail:shamar.sabree@yahoo.com
#------------------------------------------------------------------------------
# Adds a simple location window to the menu.
#------------------------------------------------------------------------------
# http://www.rpgrevolution.com/
#==============================================================================

############
# Scene_Menu #
############
class Scene_Menu
alias location_show_scn_mnu_start start
alias location_show_scn_mnu_terminate terminate
def start
location_show_scn_mnu_start
@mapname_window = Window_Mapname.new(0, 272)
end
def terminate
location_show_scn_mnu_terminate
@mapname_window.dispose
end
end
############
# Game_Map #
############
class Game_Map
attr_reader :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end
###############
# Window_Time #
###############
class Window_Mapname < Window_Base
def initialize(x, y)
super(x, y, 160, WLH + 64)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Destination:")
draw_icon(153, 100, 2)
self.contents.font.color = normal_color
self.contents.draw_text(4, 28, 120, 32, $game_map.mpname.to_s, 2)
end
end
als
Greetings laugh.gif
umm... i'm newbie here mellow.gif
i'm still confused about this

i copy paste the code to my insert new script and i name it window_scene_location
after i paste it, i went to test it sleep.gif

and the error is :
Script 'Window_Location_Menu' line 13: NameError occurred.

undefined method 'start' for class 'Scene_Menu'


then, i delete the word 'start' after the 'alias location_show_scn_mnu_start' code
i got another error:
Script 'Window_Location_menu' line 14: SyntaxError occurred

it means the syntax 'alias'

please help me in this one, i'm not understand what error happen here ?
Odin
Hi,
the script ist just working fine.

QUOTE (als @ Nov 16 2009, 10:20 PM) *
Greetings laugh.gif
umm... i'm newbie here mellow.gif
i'm still confused about this

i copy paste the code to my insert new script and i name it window_scene_location
after i paste it, i went to test it sleep.gif

and the error is :
Script 'Window_Location_Menu' line 13: NameError occurred.

undefined method 'start' for class 'Scene_Menu'


then, i delete the word 'start' after the 'alias location_show_scn_mnu_start' code
i got another error:
Script 'Window_Location_menu' line 14: SyntaxError occurred

it means the syntax 'alias'

please help me in this one, i'm not understand what error happen here ?


@als

Is it possible that you copied the script above the original Scene_Menu script?
Because every custom script should be copied below the section "Materials". For example if a custom script just use methods from an original script.

I don't know how good you are as a scripter, but you shouldn't delete lines of a script if you don't understand what you do. ^^

I'm sorry for my english. I'm using the English I've learned at school. ^^

So soon,
Odin
power200
QUOTE (als @ Nov 16 2009, 09:20 PM) *
Greetings laugh.gif
umm... i'm newbie here mellow.gif
i'm still confused about this

i copy paste the code to my insert new script and i name it window_scene_location
after i paste it, i went to test it sleep.gif

and the error is :
Script 'Window_Location_Menu' line 13: NameError occurred.

undefined method 'start' for class 'Scene_Menu'


then, i delete the word 'start' after the 'alias location_show_scn_mnu_start' code
i got another error:
Script 'Window_Location_menu' line 14: SyntaxError occurred

it means the syntax 'alias'

please help me in this one, i'm not understand what error happen here ?

Did you take the one I posted? Because if you took the one from the top, you must remove the = signs on the second line. If you took the one I posted, post it above the 'insert here' thing at the bottom of the window where the names of the scripts are, put it above that, but below any scripts besides Main.
rpgdude
QUOTE (power200 @ Nov 17 2009, 06:49 AM) *
QUOTE (als @ Nov 16 2009, 09:20 PM) *
Greetings laugh.gif
umm... i'm newbie here mellow.gif
i'm still confused about this

i copy paste the code to my insert new script and i name it window_scene_location
after i paste it, i went to test it sleep.gif

and the error is :
Script 'Window_Location_Menu' line 13: NameError occurred.

undefined method 'start' for class 'Scene_Menu'


then, i delete the word 'start' after the 'alias location_show_scn_mnu_start' code
i got another error:
Script 'Window_Location_menu' line 14: SyntaxError occurred

it means the syntax 'alias'

please help me in this one, i'm not understand what error happen here ?

Did you take the one I posted? Because if you took the one from the top, you must remove the = signs on the second line. If you took the one I posted, post it above the 'insert here' thing at the bottom of the window where the names of the scripts are, put it above that, but below any scripts besides Main.




THIS SCROPT DOSN'T WORK AND I NEED IT BADLY!!!!!! FIX IT!!!!
Xzygon
You don't need it badly, the only thing a person needs badly is food and sleep O.o
Acting like that isn't going to help anyone help you confused.gif
Anyways, did you check the script that power posted?That should work.
If it doesn't, what other scripts are you using? It maybe incompatible with any other scripts.
power200
From what I can see, the thingy I posted seems to be fine. Must be 'is first script. I'll send him a PM with pics to help him install it-no, better yet. I'll send 'im a demo. And I doubt there's incompatability, it seems to do very little. (from what I can guess).

EDIT: For anyone who's too lazy to put the darn script in the game. Here!
bcnobel
Hmmm... Nice and simple...
Just the way I like it...

All these ppl nagging about the script not working etc... IT WORKS PROPERLY!!!
Just above your gold window in the menu is another window that shows the current map you're in..

Couldn't be moar easy, and ppl that did something wrong, f*ckd up themselves because they just dont get it...

Kinda makes me wanna cry T.T

Anyhow, I love this script, stole it, and will give u credit...
Runefreak
Neatio me boy, simple like a cracka' jog snicka bongdiddy. smile.gif Great job royster doyster.

... geek.gif

... teehee.gif xD LOL

Nice, perfect for my menu, time to do some personal editing...
Contemption
umm... I have the Kylock Time System and the Location window overlaps with the time window. Can some one tell me how to change this so it doesn't happen anymore. Greatly appreciated
Rabla
Is it possible to remove thelittle image in it?

Im sure its as simple as changing a line or two, but im still new working with scripts and i don't want to break it.
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.