Hi there!
Whether or not this'll be easy is completely unknown to me, and I've tried tinkering myself but have had no results.
I'm using Khas' Sapphire Action System [ABS] and the HUD that comes along with it, but I need my own one that's relatively minimal compared to the script's default.
What I'm looking for is one that resembles this -
What I don't need from that is all the equipment information at the bottom left.
I would like the red bar to represent the character's HP, and the green bar for MP. I'd also like a third bar underneath the green one with a blue colour to represent the value of a variable of my choosing. As for the circle with the number in it, that too would represent the value of a variable.
And, you guessed it, the bottom right box would also contain a variable.
I'm pretty sure this is the case anyway but I'd need to have this update automatically because I'm using an ABS. If it helps, here's the script for the HUD I'm already using.
I'd like to keep the magic display options from that script too.
If I need graphics then give me a shout. Otherwise, the numbers in the circle can just be system drawn alongside the ones in the box at the bottom right.
Whether or not this'll be easy is completely unknown to me, and I've tried tinkering myself but have had no results.
I'm using Khas' Sapphire Action System [ABS] and the HUD that comes along with it, but I need my own one that's relatively minimal compared to the script's default.
What I'm looking for is one that resembles this -
I would like the red bar to represent the character's HP, and the green bar for MP. I'd also like a third bar underneath the green one with a blue colour to represent the value of a variable of my choosing. As for the circle with the number in it, that too would represent the value of a variable.
And, you guessed it, the bottom right box would also contain a variable.
I'm pretty sure this is the case anyway but I'd need to have this update automatically because I'm using an ABS. If it helps, here's the script for the HUD I'm already using.
Code:
#-------------------------------------------------------------------------------
# * [ACE] SAS IV HUD
#-------------------------------------------------------------------------------
# * By Khas Arcthunder - arcthunder.site40.net
# * Version: 4.1 EN
# * Released on: 13/02/2012
#
#-------------------------------------------------------------------------------
# * Terms of Use
#-------------------------------------------------------------------------------
# When using any Khas script, you agree with the following terms:
# 1. You must give credit to Khas;
# 2. All Khas scripts are licensed under a Creative Commons license;
# 3. All Khas scripts are for non-commercial projects. If you need some script
# for your commercial project (I accept requests for this type of project),
# send an email to [email hidden] with your request;
# 4. All Khas scripts are for personal use, you can use or edit for your own
# project, but you are not allowed to post any modified version;
# 5. You can’t give credit to yourself for posting any Khas script;
# 6. If you want to share a Khas script, don’t post the script or the direct
# download link, please redirect the user to arcthunder.site40.net
# 7. You are not allowed to convert any of Khas scripts to another engine,
# such converting a RGSS3 script to RGSS2 or something of that nature.
#
# Check all the terms at http://arcthunder.site40.net/terms/
#
#-------------------------------------------------------------------------------
# * Features
#-------------------------------------------------------------------------------
# Optimized SAS IV HUD.
#
#-------------------------------------------------------------------------------
# * Configuration
#-------------------------------------------------------------------------------
module HUD_Core
Background_Name = "hud_bg"
Contents_Width = 544
Contents_Height = 80
Font_Size = 16
Font_Name = "Verdana"
Font_Color = Color.new(255,255,255)
Font_Bold = true
Font_Italic = false
No_Skill_Icon = 117
Health_X = 73
Health_Y = 40
Health_Width = 100
Health_Height = 4
Health_Color = Color.new(100,255,0)
Exp_X = 72
Exp_Y = 50
Exp_Width = 68
Exp_Height = 4
Exp_Color = Color.new(0,255,255)
Magic_X = 442
Magic_Y = 40
Magic_Width = 68
Magic_Height = 4
Magic_Color = Color.new(255,255,0)
Name_X = 76
Name_Y = 20
Spell_X = 444
Spell_Y = 20
Icon_X = 498
Icon_Y = 28
Level_X = 10
Level_Y = 60
Level_String = "Lv "
end
#-------------------------------------------------------------------------------
# * Register
#-------------------------------------------------------------------------------
if $khas_awesome.nil?
$khas_awesome = []
end
scripts = []
$khas_awesome.each { |script| scripts << script[0] }
unless scripts.include?("Sapphire Action System")
error = Sprite.new
error.bitmap = Bitmap.new(544,416)
error.bitmap.draw_text(0,208,544,32,"Please install the Sapphire Action System IV",1)
continue = Sprite.new
continue.bitmap = Bitmap.new(544,416)
continue.bitmap.font.color = Color.new(0,255,0)
continue.bitmap.font.size = error.bitmap.font.size - 3
continue.bitmap.draw_text(0,384,544,32,"Tecle ENTER para sair",1)
add = Math::PI/80; max = 2*Math::PI; angle = 0
loop do
Graphics.update; Input.update
angle += add; angle %= max
continue.opacity = 185 + 70* Math.cos(angle)
break if Input.trigger?(Input::C)
end
error.bitmap.dispose; continue.bitmap.dispose
error.bitmap = nil; continue.bitmap = nil
error.dispose; continue.dispose
error = nil; continue = nil
exit
end
$khas_awesome << ["SAS HUD",4.0]
#-------------------------------------------------------------------------------
# * Script
#-------------------------------------------------------------------------------
class Sapphire_Hud
include HUD_Core
def initialize
@contents = Sprite.new
@background = Sprite.new
@base = Sprite.new
@contents.bitmap = Bitmap.new(Contents_Width, Contents_Height)
@base.bitmap = Bitmap.new(Contents_Width, Contents_Height)
@background.bitmap = Cache.system(Background_Name)
@base.bitmap.font.bold = Font_Bold
@base.bitmap.font.italic = Font_Italic
@base.bitmap.font.size = Font_Size
@base.bitmap.font.color = Font_Color
@base.bitmap.font.name = Font_Name
@contents.z = 200
@background.z = 210
@base.z = 220
@locked = false
hide(true)
end
def refresh_bars([email protected])
return if @hidden
hp = ((current_hp)*Health_Width)/@actor.mhp
mp = (@actor.mp*Magic_Width)/@actor.mmp
exp = ((@[email hidden]_level_exp)*Exp_Width)/(@[email hidden]_level_exp)
@contents.bitmap.clear
@contents.bitmap.fill_rect(Health_X,Health_Y,hp,Health_Height,Health_Color)
@contents.bitmap.fill_rect(Magic_X+Magic_Width-mp,Magic_Y,mp,Magic_Height,Magic_Color)
@contents.bitmap.fill_rect(Exp_X,Exp_Y,exp,Exp_Height,Exp_Color)
end
def refresh_base
return if @hidden
@base.bitmap.clear
@actor = $game_party.members[0]
skill = $game_player.current_skill[0]
@base.bitmap.draw_text(Name_X, Name_Y,100,Font_Size+4,@actor.name)
@base.bitmap.draw_text(Level_X, Level_Y,64,Font_Size+4,[email hidden]_s,1)
temp = Cache.system("Iconset")
unless skill.nil?
@base.bitmap.draw_text(Spell_X,Spell_Y,68,Font_Size+4,skill.name)
@base.bitmap.blt(Icon_X,Icon_Y,temp,Rect.new(skill.icon_index%16*24,skill.icon_index/16*24,24,24))
else
@base.bitmap.blt(Icon_X,Icon_Y,temp,Rect.new(No_Skill_Icon%16*24,No_Skill_Icon/16*24,24,24))
end
temp.dispose
temp = nil
end
def hide(lock=false)
unless @background.nil?
@background.bitmap.dispose
@background.dispose
@background = nil
end
unless @base.nil?
@base.bitmap.dispose
@base.dispose
@base = nil
end
unless @contents.nil?
@contents.bitmap.dispose
@contents.dispose
@contents = nil
end
@hidden = true
@locked = lock unless @locked
end
def show(unlock=false)
@actor = $game_party.members[0]
return if @locked && !unlock
@contents = Sprite.new
@background = Sprite.new
@base = Sprite.new
@contents.bitmap = Bitmap.new(Contents_Width, Contents_Height)
@base.bitmap = Bitmap.new(Contents_Width, Contents_Height)
@background.bitmap = Cache.system(Background_Name)
@base.bitmap.font.bold = Font_Bold
@base.bitmap.font.italic = Font_Italic
@base.bitmap.font.size = Font_Size
@base.bitmap.font.color = Font_Color
@base.bitmap.font.name = Font_Name
@contents.z = 200
@background.z = 210
@base.z = 220
@hidden = false
refresh_base
refresh_bars
@locked = false
end
end
If I need graphics then give me a shout. Otherwise, the numbers in the circle can just be system drawn alongside the ones in the box at the bottom right.