New account registration is temporarily disabled.

[SCRIPTING]LOCATION BOX IN ALPHAWHELP'S SCRIPT

Posts

Pages: 1
kitten2021
Returning from RMVX Death
1093
OK, I am using AlphaWhelp's script for the Location Box to appear in my game's menu, but for the life of me, I can't figure out why the Location window is showing up twice:

http://rpgmaker.net/media/content/users/4763/locker/Unsolvable_Location_Box.png

The only one that's supposed to be there is the little one above the money window, the one below your heroes is not supposed to be there. I have gone through the script, when I found the box information in the script and removed it, it also removed the one above the gold window and I can't figure out why...

Can someone please give me a hand with this?

EDIT:
Forgot to mention, if you want to look at the script, let me know, I will place it up here. But only then... Sorry, I don't know how to do a HIDE thing yet...
Please paste the script. Hide tags are {hide}{/hide} (but with square brackets instead of swiggly ones)

Like so

woop woop
kitten2021
Returning from RMVX Death
1093
Like so?


AlphaWhelp
Created 5/28/09, 5:37 P.M.
Version 0.2a
Changes from 0.1a
Now ignores anything between and including the characters
=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.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
end
else
if ALPHAWHELP::ALWAYS_ON
@location_window = Window_Location.new(0, 272)
else
@location_window = Window_Location.new(0, 272) if $game_switches
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


Thanks, by the way. :3 (And LOVE your avatar) XD
Thanks :)

Also that's the wrong script. That script is doing the window in it's correct location: On the left of the screen. It's a Scene_Menu script script, but this one isn't it. Post the script you're using that's changing the part on the right. If you're not sure, post scripts that have 'class Scene_Menu' in them or move a script under the Main script (which excludes it from being used but it'll still be in the script editor) until you change the window on the right then post it here.
kitten2021
Returning from RMVX Death
1093
OK, I wasn't aware that this other script I had was actually doing this... I think I found it, but when I tried to place open/closing quotes ("") in this area to have it excluded it gave me a Syntax error when I ran the game to test it...

This window "problem" ranges from Line 76 - Line 97...


class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 360, 360)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
@column_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, actor.index * 115 +2, 2, 92 )
x = actor . index * 115 + WLH / 2
y = 96 + WLH / 2
draw_actor_name (actor, x - 10, y + 0)
draw_actor_class(actor, x - 10, y + 30)
draw_actor_level(actor, x - 10, y + 45)
draw_actor_state(actor, x - 10, y + 60)
if actor . index % 2 == 0
draw_actor_hp(actor, x - 10, y + 125, width - 270)
draw_actor_mp(actor, x - 10, y + 145, width - 270)
else
draw_actor_hp(actor, x - 10, y + 125, width - 270)
draw_actor_mp(actor, x - 10, y + 145, width - 270)
end
end
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # No cursor
self.cursor_rect.empty
elsif @index < @item_max # Normal
self.cursor_rect.set(@index * 115, 0, 96, 103)
elsif @index >= 100 # Self
self.cursor_rect.set( (@index - 100) * 96, 0, 96, 96)
else # All
self.cursor_rect.set(0, 0, 96, @item_max * 96)
end
end
end

#==============================================================================
# ** Window_Location
#==============================================================================

class Window_Lieu < Window_Base

def initialize(x, y)
super(x, y, 360, WLH+32)
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
@map_name = $maps.name
self.contents.font.color = system_color

self.contents.font.color = normal_color
self.contents.draw_text(-10, -3, 360, 32, @map_name, 1)
end
end

#==============================================================================
# ** Scene_Menu
#==============================================================================

class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@lieu_window = Window_Lieu.new(184, 360)
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(184, 0)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@lieu_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@lieu_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(184, )
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Skill, equipment, status
start_actor_selection
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
end
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # skill
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
$scene = Scene_Equip.new(@status_window.index)
when 3 # status
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
Comment out (put a # in front of lines) all lines that reference "@lieu_window". That's the location window at the bottom of the status window.
kitten2021
Returning from RMVX Death
1093
author=GreatRedSpirit
Comment out (put a # in front of lines) all lines that reference "@lieu_window". That's the location window at the bottom of the status window.

First off, thanks for all the help and patience, GRS. ^.^

I am now getting a SyntaxError at Line 239 (the last "End" in the script); even after doing as you said...

EDIT:
Never mind! I just figured out what I did wrong this time... I had also placed a # in front of everything from Line 63 - 74. The instant I removed those and did what you said to do, it now runs and works awesomely! :D

Thank you so very much, GRS... I appreciate it. :3

EDIT2:
Um... Can I ask you one last thing? I'm trying to move the gold window, is it really done in the "Window_Gold" script? I've tried changing things in there, but all I change is how wide it is or where the text shows up at. Can you point me to the right script and then I'll just play with it until I figure it out?
Glad to help!

To move the Gold Window look for this line:
@gold_window = Window_Gold.new(0, 360)

The two numbers are the X and Y position of the window. Change those to move the window itself.
kitten2021
Returning from RMVX Death
1093
author=GreatRedSpirit
To move the Gold Window look for this line:
@gold_window = Window_Gold.new(0, 360)

The two numbers are the X and Y position of the window. Change those to move the window itself.


Oooh, I was looking in the wrong script entirely... I know I've said it multiple times, but thank you again! :)
Pages: 1