Guest Access
Go to page : 1, 2, 3
||||||||||
||||||||||
||||||||||
profile
supercow
profile
whoa whoa this is just an idea
dont force yourself to exhaustion now , you already made so many cool script , bask in its glory for now (did i say it right? bask? it mean shower in it right? still need to refine my english)
dont force yourself to exhaustion now , you already made so many cool script , bask in its glory for now (did i say it right? bask? it mean shower in it right? still need to refine my english)
||||||||||
Show Signature
||||||||||
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
^,^
\_/
it's a great idea how could I resist,
hey your English is better than my Indonesian
^ update!
added yellow stamina bar and purple charge bar ! ^,^
\_/
it's a great idea how could I resist,
hey your English is better than my Indonesian
^ update!
added yellow stamina bar and purple charge bar ! ^,^
Administrator
Show Signature
C.O.R.N.
C.O.R.N.
C.O.R.N.
profile
BluE
profile
@GF some feedback:
No matter how hard I try to press the "Z" "B" (as in "X") by default opens up the stupid menu. I was just thinking that it'd be better for the Mini HUD's default open button to be something that isn't as vital.
Another cool thing would be something like you press "J" and it only shows the EXP bar or something.
Like supercow said, easier to configure than a power switch. And super awesome. ++++++++++++++++++++++++
No matter how hard I try to press the "Z" "B" (as in "X") by default opens up the stupid menu. I was just thinking that it'd be better for the Mini HUD's default open button to be something that isn't as vital.
Another cool thing would be something like you press "J" and it only shows the EXP bar or something.
Like supercow said, easier to configure than a power switch. And super awesome. ++++++++++++++++++++++++
C.O.R.N.
Show Signature
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
^yeah I disabled the menu to have an extra key to play with.
once I'm done with the module, you can easily set it up however you like.
I'll put a nice touch to the default settings, so now I think I'm finished with it
@supercow - how you like the stamina and charge bars?
once I'm done with the module, you can easily set it up however you like.
I'll put a nice touch to the default settings, so now I think I'm finished with it
@supercow - how you like the stamina and charge bars?
Administrator
Show Signature
||||||||||
||||||||||
||||||||||
profile
supercow
profile
i run out of words to say ,its pure AWESOME !!!!!
||||||||||
Show Signature
||||||||||
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
experimenting with the viewports under the Sprite class instead of the traditional window class for this mini HUD. this way there's no overflow (lag) when other scripts that use Window_Base are running.
here's what I have so far... the script doesn't update/refresh as I'm working on a conditional update method so I can keep the game running above 35fps.
any skilled in script are most welcome to lend a hand or share some pointers,
it appears the more RGSS you learn the more RGSS there is to learn.
edit: got a few pointers from wiggles about bitmap rects and
some good advice on refresh, update methods from Hackel.
got a new structure for how this script is called, now to get a baby smooth refresh, update method before I re-add the remaining features to this version.
here's what I have so far... the script doesn't update/refresh as I'm working on a conditional update method so I can keep the game running above 35fps.
- Spoiler:
- Code:
#===============================================================================
# XAS H_mini Sprite HUD v.1 by gameface101 2/11/2011 ==========================
#===============================================================================
module XAS_hmini_hud
HMHUD_DISWITCH = 5
HMHUD_OPCACITY = 255
HMHUD_Z = 1
#DRAW OPTIONS ==============================================================
DRAW_BARS = true # display script drawn gradient bars
DHP_X = 0#horizontal position
DHP_Y = 26#vertical position
DHP_WID = 40#bar width
DHP_HET = 4#bar hieght
DSP_X = 0#horizontal position
DSP_Y = 32#vertical position
DSP_WID = 40#bar width
DSP_HET = 4#bar hieght
#NAME OPTIONS ==============================================================
NAME = true# use name
NAME_SIZE = 12#font size
N_X = -60#horizontal position
N_Y = 24#vertical position
#NUMBER OPTIONS ============================================================
NUMBERS = true #use numbers for enemy HP, SP on/off
NUM_SIZE = 12
NUM_X = 24#
NUM_Y = 15#
end
#============================================================================
class Hero_Bars < Sprite
include XAS_hmini_hud
def initialize(viewport2)
super(viewport2)
@actor = $game_party.actors[0]
return if @actor == nil
self.bitmap = Bitmap.new(160, 60)
self.visible = true
self.opacity = HMHUD_OPCACITY
self.z = 100
refresh
#update
end
#--------------------------------------------------------------------------
def refresh
self.bitmap.clear
#=====================================================================[DRAW BARS
if DRAW_BARS == true
draw_hmini_hud_bar(DHP_X, DHP_Y, @actor.hp, @actor.maxhp,
width = DHP_WID, height = DHP_HET, bar_color = Color.new(255,0,0,255) ,
end_color = Color.new(100,0,0,255))
draw_hmini_hud_bar(DSP_X, DSP_Y, @actor.sp, @actor.maxsp,
width = DSP_WID, height = DSP_HET, bar_color = Color.new(100,0,255,255),
end_color = Color.new(50,0,100,255))
end
#=====================================================================[DRAW NAME
if NAME == true
bitmap.font = Font.new("Arial", NAME_SIZE)
bitmap.draw_hemming_text(N_X, N_Y, 160, 36, @actor.name, 1)
end
#=======================================================================[numbers
if NUMBERS == true
self.bitmap.font.size = NUM_SIZE
self.bitmap.font.color = Color.new(0,0,0,255)#black
self.bitmap.draw_hemming_text(NUM_X, NUM_Y , 28, 22, @actor.hp.to_s, 2)
lowhp = @actor.maxhp * 20 / 100
avhp = @actor.maxhp * 50 / 100
if @actor.hp <= lowhp
self.bitmap.font.color = Color.new(232,8,0,255)#red
elsif @actor.hp <= avhp
self.bitmap.font.color = Color.new(253,241,7,255)#yellow
else
self.bitmap.font.color = Color.new(96,224,82,255)#green
end
self.bitmap.draw_hemming_text(NUM_X, NUM_Y , 29, 23,@actor.hp.to_s, 2)
self.bitmap.font.size = 12
if @actor.maxsp > 0
self.bitmap.font.name = "Arial"
self.bitmap.font.color = Color.new(0,0,0,255)#black
self.bitmap.draw_hemming_text(NUM_X, NUM_Y , 28, 42, @actor.sp.to_s, 2)
lowsp = @actor.maxsp * 20 / 100
avsp = @actor.maxsp * 50 / 100
if @actor.sp <= lowsp
self.bitmap.font.color = Color.new(194,210,255,255)#light blue
elsif @actor.sp <= avsp
self.bitmap.font.color = Color.new(92,130,255,255)#medium blue
else
self.bitmap.font.color = Color.new(223,204,178,255)#pale
end
self.bitmap.draw_hemming_text(NUM_X , NUM_Y , 29, 43,@actor.sp.to_s, 2)
end
end
end#end refresh method
#--------------------------------------------------------------------------
def update
@actor = $game_party.actors[0]
return if @actor == nil
#refresh
visible_update
end
#--------------------------------------------------------------------------
# * Visible Update
#--------------------------------------------------------------------------
def visible_update
if $game_switches[HMHUD_DISWITCH] == true
self.visible = false
else
self.visible = true
end
end
#-------------------------------------------------------------------------------
def draw_hmini_hud_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255),
end_color = Color.new(255, 255, 60, 255))
for i in 0..height
self.bitmap.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
#-------------------------------------------------------------------------------
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.bitmap.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
#-------------------------------------------------------------------------------
for i in 1..( (min / max.to_f) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.bitmap.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end
end
#
#============================================================================
class Scene_Map
include XAS_hmini_hud
alias hminihud_main main
def main
@hmini_view = Viewport.new($game_player.screen_x / 64,
$game_player.screen_y / 64, 640, 480)
@hmini_view.z = HMHUD_Z
@hmini = Hero_Bars.new(@hmini_view)
hminihud_main
@hmini.dispose
@hmini = nil
@hmini_view.dispose
@hmini_view = nil
end
#--------------------------------------------------------------------------
alias hmini_update update
def update
@hmini.x = $game_player.screen_x - 24
@hmini.y = $game_player.screen_y - 24
hmini_update
@hmini.update
end
end
#------------------------------------------------------------------------------
any skilled in script are most welcome to lend a hand or share some pointers,
it appears the more RGSS you learn the more RGSS there is to learn.
edit: got a few pointers from wiggles about bitmap rects and
some good advice on refresh, update methods from Hackel.
got a new structure for how this script is called, now to get a baby smooth refresh, update method before I re-add the remaining features to this version.
- Spoiler:
- Code:
#===============================================================================
# XAS H_mini Sprite HUD v.2 by gameface101 2/11/2011 ==========================
#===============================================================================
module XAS_hmini_hud
HMHUD_DISWITCH = 5
HMHUD_OPCACITY = 255
HMHUD_Z = 1
#DRAW OPTIONS ==============================================================
DRAW_BARS = true # display script drawn gradient bars
DHP_X = 0#horizontal position
DHP_Y = 26#vertical position
DHP_WID = 40#bar width
DHP_HET = 4#bar hieght
DSP_X = 0#horizontal position
DSP_Y = 32#vertical position
DSP_WID = 40#bar width
DSP_HET = 4#bar hieght
#NAME OPTIONS ==============================================================
NAME = true# use name
NAME_SIZE = 12#font size
N_X = -60#horizontal position
N_Y = 25#vertical position
#NUMBER OPTIONS ============================================================
NUMBERS = true #use numbers for enemy HP, SP on/off
NUM_SIZE = 12
HNUM_X = 24#
HNUM_Y = 15#
SNUM_X = 24#
SNUM_Y = 15#
end
#============================================================================
class Hero_Bars < Sprite
include XAS_hmini_hud
def initialize(viewport3)
super(viewport3)
@actor = $game_party.actors[0]
return if @actor == nil#
self.bitmap = Bitmap.new(160, 60)
#self.visible = true
#self.opacity = HMHUD_OPCACITY
#self.z = 1
draw_the_name
draw_the_hp_bar
draw_the_sp_bar
draw_the_hp_number
draw_the_sp_number
visible_update
hud_pos_update
end
#=====================================================================[draw name
def draw_the_name
bitmap.font = Font.new("Arial", NAME_SIZE)
bitmap.draw_hemming_text(N_X, N_Y, 160, 36, @actor.name, 1)
end
#---------------------------------------------------------------[draw bar method
def draw_hmini_hud_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255),
end_color = Color.new(255, 255, 60, 255))
for i in 0..height
self.bitmap.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
#-------------------------------------------------------------------------------
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.bitmap.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
#-------------------------------------------------------------------------------
for i in 1..( (min / max.to_f) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.bitmap.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end
#===================================================================[draw hp bar
def draw_the_hp_bar
draw_hmini_hud_bar(DHP_X, DHP_Y, @actor.hp, @actor.maxhp,
width = DHP_WID, height = DHP_HET, bar_color = Color.new(255,0,0,255) ,
end_color = Color.new(100,0,0,255))
end
#===================================================================[draw sp bar
def draw_the_sp_bar
draw_hmini_hud_bar(DSP_X, DSP_Y, @actor.sp, @actor.maxsp,
width = DSP_WID, height = DSP_HET, bar_color = Color.new(100,0,255,255),
end_color = Color.new(50,0,100,255))
end
#================================================================[draw hp number
def draw_the_hp_number
bitmap.font.size = NUM_SIZE
bitmap.font.color = Color.new(0,0,0,255)#black
bitmap.draw_hemming_text(HNUM_X, HNUM_Y , 28, 22, @actor.hp.to_s, 2)
lowhp = @actor.maxhp * 20 / 100
avhp = @actor.maxhp * 50 / 100
if @actor.hp <= lowhp
bitmap.font.color = Color.new(232,8,0,255)#red
elsif @actor.hp <= avhp
bitmap.font.color = Color.new(253,241,7,255)#yellow
else
bitmap.font.color = Color.new(96,224,82,255)#green
end
bitmap.draw_hemming_text(HNUM_X, HNUM_Y , 29, 23,@actor.hp.to_s, 2)
bitmap.font.size = 12
end
#================================================================[draw sp number
def draw_the_sp_number
if @actor.maxsp > 0
bitmap.font.name = "Arial"
bitmap.font.color = Color.new(0,0,0,255)#black
bitmap.draw_hemming_text(SNUM_X, SNUM_Y , 28, 42, @actor.sp.to_s, 2)
lowsp = @actor.maxsp * 20 / 100
avsp = @actor.maxsp * 50 / 100
if @actor.sp <= lowsp
bitmap.font.color = Color.new(194,210,255,255)#light blue
elsif @actor.sp <= avsp
bitmap.font.color = Color.new(92,130,255,255)#medium blue
else
bitmap.font.color = Color.new(223,204,178,255)#pale
end
bitmap.draw_hemming_text(SNUM_X , SNUM_Y , 29, 43,@actor.sp.to_s, 2)
end
end
#=======================================================================[dispose
def dispose
@actor = $game_party.actors[0]
return if @actor == nil
self.bitmap.dispose
self.bitmap = nil
# self.bitmap.clear
end
#========================================================================[update
def update
@actor = $game_party.actors[0]
return if @actor == nil
hud_pos_update
visible_update
end
#================================================================[visible update
def visible_update
if $game_switches[HMHUD_DISWITCH] == true
self.visible = false
else
self.visible = true
end
end
#--------------------------------------------------------------------------
# * Hud Pos Update
#--------------------------------------------------------------------------
def hud_pos_update
self.x = $game_player.screen_x - 24
self.y = $game_player.screen_y - 24
end
end #end class
#===============================================================================
class Scene_Map
include XAS_hmini_hud
alias hminihud_main main
def main
@hmini_view = Viewport.new($game_player.screen_x / 64,
$game_player.screen_y / 64, 640, 480)
@hmini_view.z = HMHUD_Z
@hmini = Hero_Bars.new(@hmini_view)
hminihud_main
@hmini.dispose
@hmini = nil
@hmini_view.dispose
@hmini_view = nil
end
#-------------------------------------------------------------------------------
alias hmini_update update
def update
hmini_update
@hmini.update
end
end
#-------------------------------------------------------------------------------
Administrator
Show Signature
Active Member
Active Member
Active Member
profile
LiTTleDRAgo
profile
I'm trying to edit it, but I guess it's still lagg
I wonder why
-----removed-----
I wonder why
-----removed-----
Active Member
Show Signature
Administrator
Administrator
Administrator
profile
Drago! it runs perfectly now on a new XAS3.9.1 project WITH the Emini HUD.
like a priest, you blessed these scripts and performed an exorcism on the lag demon LOL!
Maybe your project has a conflicting script?
G@MeF@Ce
profile
Drago! it runs perfectly now on a new XAS3.9.1 project WITH the Emini HUD.
like a priest, you blessed these scripts and performed an exorcism on the lag demon LOL!
Maybe your project has a conflicting script?
Administrator
Show Signature
||||||||||
||||||||||
||||||||||
profile
supercow
profile
no lagg at all this is awesome
i even put >30 enemy in one map and only lag a tiny bit awesome
i even put >30 enemy in one map and only lag a tiny bit awesome
||||||||||
Show Signature
||||||||||
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
@supercow - I'm just as as you are
@Hackel, mr_wiggles, LiTTleDRAgo - thanks guys couldn't have done this with out you.
Original post updated with latest version!!!
@Hackel, mr_wiggles, LiTTleDRAgo - thanks guys couldn't have done this with out you.
Original post updated with latest version!!!
Administrator
Show Signature
Go to page : 1, 2, 3