Simple Location Window
Version0.2a
AuthorAlphaWhelp
Release Date5/28
IntroductionThis was an idea I got from Moghunter's script to display the location name in pretty graphic on your screen every time you went to a new map. Although, as time went on, I became a little dissatisfied with his script and wrote one of my own that had the quirks that I wanted it to have. This script will add a location window to your basic menu scene. The information in the window is the name you give the map in the RMVX editor, however, to not exclude people who wish to use certain scripts that require you to add stuff like [TAGS] into your map, I made it so that anything between [ and ] is ignored and not put into the location window. Even if you aren't using any scripts that require you to add such a tag, you can use it to add mini map notes for yourself.
I have not encountered any scripts which require you to add tags other than the [] tag. However, if you have such a script, let me know what special characters it uses and I will add support for compatibility with that script as well. Adding additional special characters to ignore is pretty easy.
FeaturesAdd location window to menu scene
Option to turn the location window on and off with a switch
Automatically positions either directly underneath the menu options, or directly above the gold window.
ScriptCODE
=begin
This script will add a small location window to your basic menu scene.
This script will not put any part of your map name in the location window
that lies between a [ and ] . This is to help with compatibility with
other scripts that require you to add tags between the characters [ and ]
to make them work (such as several KGC scripts).
This is also handy if you want to add minor notes to your map names, all
you have to do is put them between a [ and ] they will be omitted from
the location window.
If you absolutely can't help but have a strange map name that you don't
want your player to see, in the below module are some configuration
options that will allow you to turn the location window on and off with a
game switch. By default, if your ALWAYS_ON value is set to true, then
you may ignore the configuration option below it--it won't have any
impact on your game.
AlphaWhelp
Created 5/28/09, 5:37 P.M.
Version 0.2a
Changes from 0.1a
Now ignores anything between and including the characters [ and ]
=end
module ALPHAWHELP
### START CONFIG ###
LOCATION_WINDOW_ON_TOP = false ## Set to false to have the window appear low
ALWAYS_ON = true ## Set to false to hide the window at points in your game
LOCATION_WINDOW_VISIBLE_SWITCH = 98 ## Switch number that determines when the
## Location window is visible if ALWAYS_ON
## is set to false
### END CONFIG ###
end
class Window_Location < Window_Base
def initialize(x, y)
super(x, y, 160, WLH + 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
$maps = load_data("Data/MapInfos.rvdata")
map_id = $game_map.map_id
mapname = $maps[map_id].name
mapname.gsub!(/\[.*\]/) {""}
self.contents.font.color = system_color
self.contents.draw_text(0, -4, 128, 32, "Location :")
self.contents.font.color = normal_color
self.contents.draw_text(0, -4 + WLH, 128, 32, mapname, 1)
end
end
class Scene_Menu < Scene_Base
alias add_location_name_start start
def start
if ALPHAWHELP::LOCATION_WINDOW_ON_TOP
if ALPHAWHELP::ALWAYS_ON
@location_window = Window_Location.new(0, 176)
else
@location_window = Window_Location.new(0, 176) if $game_switches[ALPHAWHELP::LOCATION_WINDOW_VISIBLE_SWITCH]
end
else
if ALPHAWHELP::ALWAYS_ON
@location_window = Window_Location.new(0, 272)
else
@location_window = Window_Location.new(0, 272) if $game_switches[ALPHAWHELP::LOCATION_WINDOW_VISIBLE_SWITCH]
end
end
add_location_name_start
end
alias dispose_location_window terminate
def terminate
if @location_window != nil
@location_window.dispose
@location_window = nil
end
dispose_location_window
end
end
CustomizationThere are 3 options within the script.
The option to set the window to be always on, or on only when a specified switch is on as well.
Display the location window in one of two locations, depending on how you like it
CompatibilityThis script should be compatible with other scripts which overhaul the menu system, but it may not look very pretty. The aesthetics of this script were made for the basic menu scene.
ScreenshotToo lazy, just use your imagination.
InstallationPlug-n-play
Be sure to configure it
FAQShould be really difficult to crash this script without deliberately trying to. If you are experiencing an error, send me a forum pm
Terms and ConditionsFree to use in any project
CreditsAlphaWhelp
This post has been edited by AlphaWhelp: May 29 2009, 09:16 AM