okay, now my major problem is:
i need a script that makes a window in the bottem left corner of the screen that states what the value of a spesific variable is (i can fill in the variable name/number if someone else can make the script).
this script includes other things, but i need someone to take out the part that shows your location, and put in:
if your main hero has weapon #1 equiped: show the value of variable #26
if your main hero has weapon #2 equiped: show the value of variable #27
if your main hero has weapon #3 equiped: show the value of variable #28
if your main hero has weapon #4 equiped: show the value of variable #29
if your main hero has weapon #5 equiped: show the value of variable #30
if your main hero has weapon #6 equiped: show the value of variable #31
if your main hero has weapon #7 equiped: show the value of variable #32
if your main hero has weapon #8 equiped: show a line like this
-this is what i already have:
#==============================================================================
# Basic Hud v1.0
#------------------------------------------------------------------------------
# By Darklord
# Credits to Destined, IcedMetal57 for the update method, and AcedentProne for his bars
# Requested by x-blaze
#==============================================================================
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#=====================================
#Gradient Bars with customizable lengths, thicknesses, types and Colors
#By AcedentProne
#=====================================
def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(153,238,153,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
#--------------------------------------------------------------------------
# * Draw EXP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 24, 32, "Exp")
self.contents.font.color = normal_color
self.contents.draw_text(x + 10, y, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 100, y, 12, 32, "/", 1)
self.contents.draw_text(x + 112, y, 84, 32, actor.next_exp_s)
end
end
#============================================
# Window_HUDBars
# Originally by Destined, edited by Darklord and Icedmetal57
#============================================
class Window_HUDBars < Window_Base
def initialize
super(100, 365, 222, 115)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 100
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 16
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 640, 32, "HP:")
self.contents.draw_text(0, 19, 640, 32, "XP:")
#Show Map Name
map_infos = load_data("Data/MapInfos.rxdata")
name = map_infos[$game_map.map_id].name.to_s
self.contents.draw_text(0, 37, 640, 32, name.to_s)
self.contents.font.color = system_color
#endshowmapname
draw_normal_barz(36, 11, "horizontal", 150, 10, $game_party.actors[0].hp.to_i, $game_party.actors[0].maxhp.to_i, Color.new (225, 0, 0, 225))
draw_normal_barz(36, 30, "horizontal", 150, 10, $game_party.actors[0].exp_s.to_i, $game_party.actors[0].next_exp_s.to_i, Color.new (0,0,255,255))
self.contents.font.color = system_color
self.contents.draw_text(0, 55, 40, 32, "Ammo:")
self.contents.font.color = normal_color
self.contents.draw_text(40, 55, 340, 32, $game_party.gold.to_s)
end
end
#============================================
# Window_HUDPlayer
# Originally by Destined, edited by Darklord and Icedmetal57
#============================================
class Window_HUDPlayer < Window_Base
def initialize
super(0, 320, 100, 160) #360
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 100
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 16
self.contents.draw_text(12, 0, 80, 32, $game_party.actors[0].name.to_s)
draw_actor_class($game_party.actors[0], 12, 20)
draw_actor_graphic($game_party.actors[0], 33, 95)
draw_actor_level($game_party.actors[0], 2, 100)
end
end
#============================================
# Scene_Map
# Edits the scene Scene_Map
#============================================
class Scene_Map
def initialize_hud
@hud = Window_HUDBars.new
@hudp = Window_HUDPlayer.new
@player_hp = $game_party.actors[0].hp
@player_sp = $game_party.actors[0].sp
@player_exp = $game_party.actors[0].exp
@player_gold = $game_party.gold
@player_sprite = $game_party.actors[0].character_name
@player_level = $game_party.actors[0].level
end
def dispose
@hud.dispose
@hudp.dispose
end
alias old_main main
def main
initialize_hud
old_main
dispose
end
def hudrefresh
@hud.refresh
@hudp.refresh
end
alias old_update update
def update
hudrefresh if @player_hp != $game_party.actors[0].hp or @player_sp != $game_party.actors[0].sp or @player_exp != $game_party.actors[0].exp or @player_gold != $game_party.gold or @player_level != $game_party.actors[0].level
old_update
end
end
i cant really continue very much in making the game until i get this finished (edited)
thanks!