Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Subsonic_Noise on June 08, 2009, 04:09:46 pm

Title: [XP] Animated BlizzABS HUD (MOG) V0.9
Post by: Subsonic_Noise on June 08, 2009, 04:09:46 pm
Animated BlizzABS HUD (MOG)
Authors: Moghunter, Subsonic Noise, Blizzard
Version: 0.9
Type: BlizzABS HUD
Key Term: Blizz-ABS Plugin



Introduction
I edited the MOG HUD to assign a face for every animation sprite of BlizzABS, so your Hero looks angry when
he attacks etc.


Features
Own features:


Planned features:



Screenshots
Spoiler: ShowHide
(http://www.pictureupload.de/originals/pictures/080609220822_no_ani.jpg)

Spoiler: ShowHide
(http://www.pictureupload.de/originals/pictures/080609220849_ani.jpg)



Demo
http://www.megaupload.com/?d=TJTGNL83
It's basically my game, Dystopia, with everything taken out except a few maps, the ABS and my script.
Needs the RTP. It uses my custom controls because the standard BlizzABS controls suck.
(No offense, Blizzard^^) As Dystopia is a german game, I had to change everything back to english very quick, so please excuse the bad spelling etc.
IMPORTANT: In this demo, only attacking is animated. You can, of course, have animated faces for every animation in BlizzABS.
Control: ShowHide

   UP = Arrow Up
   LEFT = Arrow Left
   DOWN = Arrow Down
   RIGHT = Arrow Right
   PREVPAGE = Page Up
   NEXTPAGE = Page Down
   CONFIRM = D
   CANCEL = S
   ATTACK = Space
   DEFEND = Left Shift
   SELECT = Tab
   HUD = C
   HOTKEY = X
   MINIMAP = Y
   RUN = Right Ctrl
   SNEAK = Right Shift
   JUMP = Q

Direct Hotkeying is enabled.


Script

Spoiler: ShowHide

#_______________________________________________________________________________
# MOG XAS Hud V2.2      
# ENHANCEMENT V0.5
#_______________________________________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_______________________________________________________________________________
# Enhanced with animated faces feature for BlizzABS by Subsonic_Noise
# http://www.google.de
#_______________________________________________________________________________
# My Enhancement just assigns faces to BlizzABS animation sprite, which means
# you can't have animations for actions which have animation sprites disabled
# You can define sprites that don't need a face at Window_Base.animated.
# I'll make an add. condition for _hit because BlizzABS doesn't use Hit Sprites.
#
# Thanks to:
# Blizzard for helping me with this script and not getting annoyed
# Aqua for telling me how to define variables^^ Yeah I'm a N00b.
#_______________________________________________________________________________


module XAS_HUD
   #Position of the HUD
   WINDOW_STATUS_X = 0  
   WINDOW_STATUS_Y = 370
   #ID of the switch that disables the HUD
   DISABLE_STATUS_HUD_SWITCH = 5
 end


$mogscript = {} if $mogscript == nil
$mogscript["XAS_Hud"] = true
###############
# Window_Base #
###############
class Window_Base < Window  

 def animated
#Exceptions can be defined here
   case $game_player.current_sprite[0, 4]
      when ''     then return '_fc'
      when '_idl' then return '_fc'
      when '_itm' then return '_fc'
   end
#returns the current sprite for the draw_face method
   return $game_player.current_sprite[0, 4]
end
 
def draw_maphp2(actor, x, y)
   actor = $game_party.actors[0]    
   self.contents.font.size = 20  
   back = RPG::Cache.picture("BAR_Meter")    
   cw = back.width  
   ch = back.height
   src_rect = Rect.new(0, 0, cw, ch)    
   self.contents.blt(x + 65, y - ch + 30, back, src_rect)  
   meter = RPG::Cache.picture("HP_Meter")    
   cw = meter.width  * actor.hp / actor.maxhp
   ch = meter.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
   text = RPG::Cache.picture("HP_Tx")    
   cw = text.width  
   ch = text.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 35, y - ch + 30, text, src_rect)
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x + 111, y - 1, 48, 32, actor.hp.to_s, 2)
   lowhp = actor.maxhp * 20 / 100
   avhp = actor.maxhp * 50 / 100
   if actor.hp <= lowhp
   self.contents.font.color = Color.new(255,55,55,255)
   elsif actor.hp <= avhp
   self.contents.font.color = Color.new(255,255,55,255)
   else
   self.contents.font.color = Color.new(255,255,255,255)
   end
   self.contents.draw_text(x + 110, y - 2, 48, 32, actor.hp.to_s, 2)    
end  
def draw_mapsp2(actor, x, y)  
   self.contents.font.size = 20  
   back = RPG::Cache.picture("BAR_Meter")    
   cw = back.width  
   ch = back.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 65, y - ch + 30, back, src_rect)  
   meter = RPG::Cache.picture("SP_Meter")    
   cw = meter.width  * actor.sp / actor.maxsp
   ch = meter.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
   text = RPG::Cache.picture("SP_Tx")    
   cw = text.width  
   ch = text.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 40, y - ch + 30, text, src_rect)
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x + 111, y - 1, 48, 32, actor.sp.to_s, 2)    
   self.contents.font.color = Color.new(250,255,255,255)
   self.contents.draw_text(x + 110, y - 2, 48, 32, actor.sp.to_s, 2)    
end
def draw_mexp(actor, x, y)
   self.contents.font.size = 16  
   actor = $game_party.actors[0]
   if actor.next_exp != 0
   rate = actor.now_exp.to_f / actor.next_exp
   else
   rate = 1
   end
   bitmap = RPG::Cache.picture("Exp_Meter")
   if actor.level < 99
   cw = bitmap.width * rate
   else
   cw = bitmap.width
   end  
   ch = bitmap.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 40 , y - ch + 30, bitmap, src_rect)
   bitmap2 = RPG::Cache.picture("Exp_Back")
   cw = bitmap2.width
   ch = bitmap2.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 40 , y - ch + 30, bitmap2, src_rect)
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x + 55, y + 1, 84, 32, "Exp",0)
   self.contents.font.color = Color.new(255,255,255,255)
   self.contents.draw_text(x + 54, y, 84, 32, "Exp",0)
end
def nada
face = RPG::Cache.picture("")
end  
def draw_heroface(actor,x,y)
   face = RPG::Cache.picture(actor.name + animated) rescue nada
   cw = face.width
   ch = face.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x , y - ch, face, src_rect)    
end  
def draw_actor_statemap(actor, x, y, width = 100)
   self.contents.font.size = 16    
   text = make_battler_state_text(actor, width, true)
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x + 1, y + 1, width, 32, text)
   self.contents.font.color = Color.new(250,255,255,255)
   self.contents.draw_text(x, y, width, 32, text)
end
def draw_actor_levelmap(actor, x, y)
   self.contents.font.size = 20    
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x, y, 32, 32, "Lv")
   self.contents.font.color = Color.new(50,255,250,255)    
   self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv")
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x + 30, y, 24, 32, actor.level.to_s, 1)
   self.contents.font.color = Color.new(255,255,255,255)    
   self.contents.draw_text(x + 31, y + 1, 24, 32, actor.level.to_s, 1)    
end
end
##############
# Game_Actor #
##############
class Game_Actor < Game_Battler
def now_exp
   return @exp - @exp_list[@level]
end
def next_exp
   return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
   end
end
#####################
# Window_Status_Map #
#####################
class Window_HUD < Window_Base
def reset
   @old_hp = @actor.hp
   @old_sp = @actor.sp
   @old_level = @actor.level
   @old_state = @actor.states.to_s
   @old_exp = @actor.exp
   @old_face = $game_player.current_sprite[0, 4]
end
 
def initialize
   super(0, 0, 240, 120)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("")    
   self.contents.font.bold = true
   self.contents.font.name = "Georgia"
   self.opacity = 0
   @actor = $game_party.actors[0]
   if @actor != nil
   reset
   refresh
   end
 end  
 
def refresh
 self.contents.clear
   draw_maphp2(@actor, 35, 35)
   draw_mapsp2(@actor, - 40, 60)
   draw_heroface(@actor, 0, 70)
   draw_actor_statemap(@actor, 130, 60, 70)
   draw_actor_levelmap(@actor, 80, 10)  
   draw_mexp(@actor, 90, 10)
   reset
end
def update
  @actor = $game_party.actors[0]
  if @actor != nil  
  if @old_hp != @actor.hp or
     @old_sp != @actor.sp or
     @old_level != @actor.level or
     @old_state != @actor.states.to_s or
     @old_exp != @actor.exp or
     @old_face != $game_player.current_sprite[0, 4]
  refresh
  end
  end
end
end
###############
# Game_Player #
###############
class Game_Player2 < Game_Character
   attr_accessor :wref
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog11_main main
def main
   @sthero = Window_HUD.new
   @sthero.x = XAS_HUD::WINDOW_STATUS_X
   @sthero.y = XAS_HUD::WINDOW_STATUS_Y
   if $game_switches[XAS_HUD::DISABLE_STATUS_HUD_SWITCH] == false
   @sthero.visible = true  
   else
   @sthero.visible = false  
   end    
   mog11_main
   @sthero.dispose
end
alias mog11_update update
def update
   if $game_switches[XAS_HUD::DISABLE_STATUS_HUD_SWITCH] == false
   @sthero.visible = true  
   else
   @sthero.visible = false  
   end      
   @sthero.update
   mog11_update
end  
end  



Instructions
1. Download the demo
2. Copy the pictures in the pictures folder.
3. Copy the script in your game, below blizzABS.
4. Make a standard face for your hero(es). Name it (heroname)_fc . Faces should be 60x60 Pixel.
5. Make the animated faces and name them like the animation sprites, e.g. _run or _atk
6. Define the animation frames without an own face in the script.


Compatibility

Not tested with SDK. And I will not test it with SDK the next few years.
Compatible with all scripts I am using, I'll put them up here later.


Credits and Thanks




Author's Notes
Have fun. Peace and Happiness.
Title: Re: Animated MOG HUD for BlizzABS V0.5
Post by: Hellfire Dragon on June 08, 2009, 04:32:23 pm
That's pretty cool, good work.

Where did you get that tileset?
Title: Re: Animated MOG HUD for BlizzABS V0.5
Post by: Subsonic_Noise on June 08, 2009, 04:42:27 pm
found it. somewhere.
I'll upload it later^^ I think it was Creation Asylium.

Thanks for the comment, but to clear that up, I only made the animated feature,
the HUD itself is by Moghunter. But I suppose you knew that so, Thanks + level up^^

Title: Re: Animated MOG HUD for BlizzABS V0.5
Post by: Aqua on June 08, 2009, 04:46:10 pm
Looks good. :)

Make type "Blizz-ABS Hud" and fix the key term (There's a set list of them.  The one you used isn't on there) then it shoudl be DB-able
Title: Re: Animated MOG HUD for BlizzABS V0.5
Post by: Hellfire Dragon on June 08, 2009, 04:48:33 pm
Got an erorr, missing BAR_Meter

You have default graphics for this?
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Subsonic_Noise on June 08, 2009, 05:00:04 pm
WOW I totally forgot that >.> It needs the default graphics of the MOG HUD.
http://www.rmxp.org/forums/viewtopic.php?t=18933 (http://www.rmxp.org/forums/viewtopic.php?t=18933)
Just past the graphics from the hud in you pictures folder.

@Aqua: Thanks! I fixed that, but by downloadable, do you mean a demo or the script?
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Kagutsuchi on June 08, 2009, 05:16:58 pm
Awesome, I'm probably gonna ue this one for my game ^^
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Aqua on June 08, 2009, 05:46:23 pm
I never said downloadable... o.o

DB = Database
DB-able = Able to go into the Database
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Hellfire Dragon on June 09, 2009, 05:52:10 am
Quote from: Subsonic_Noise on June 08, 2009, 05:00:04 pm
WOW I totally forgot that >.> It needs the default graphics of the MOG HUD.
http://www.rmxp.org/forums/viewtopic.php?t=18933 (http://www.rmxp.org/forums/viewtopic.php?t=18933)
Just past the graphics from the hud in you pictures folder.

@Aqua: Thanks! I fixed that, but by downloadable, do you mean a demo or the script?


Quote from: RMXP.org
RMXP.ORG is temporarily offline!
Due to a hosting outage beyond our control we are currently moving RMXP.ORG to a temporary host. We expect to be online by Tuesday evening. Thank you for your continued support

- The management

Guess we'll have to wait
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Subsonic_Noise on June 10, 2009, 04:01:09 am
Quote from: Aqua on June 08, 2009, 05:46:23 pm
I never said downloadable... o.o

DB = Database
DB-able = Able to go into the Database

Oh OK. I guess it's DB-able now XD
Don't expect updates soon, I am working on it but I don't have Internet XP (I'm at school now...)
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Aqua on June 10, 2009, 11:32:29 am
I also suggest that you host the graphics yourself somewhere... lol
Oh and fix the typos... or I'll do that... XD
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: G_G on July 04, 2009, 10:46:16 am
Um blizz this hasnt been moved yet either
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: ManiacClown on July 04, 2009, 11:23:01 am
I love the mog graphics they are not "square" ...
The script is cool but would be nice if sow the party info to ...
Bye!
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Subsonic_Noise on July 04, 2009, 12:07:52 pm
Alright I put a demo up, so please play it and give feedback, I'm bored.^^
The Demo also contains the tileset for HD.
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: G_G on July 04, 2009, 12:14:31 pm
Whats an 11 mb Graphics.exe doing in the folder? And whats it for O_o?
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Subsonic_Noise on July 04, 2009, 12:16:42 pm
lol.
I have no idea. I'll delete it and reupload the demo.^^
EDIT: The new demo without a 11mb graphics.exe is up now. XD
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Blizzard on July 04, 2009, 12:29:00 pm
It extracts the graphics from the RTP.
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Subsonic_Noise on July 04, 2009, 12:30:11 pm
But it worked without it  :???:
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Blizzard on July 04, 2009, 12:30:55 pm
Because you don't need it. That file is usually located in the RTP installation folder.
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Subsonic_Noise on July 04, 2009, 12:33:05 pm
Quote from: Blizzard on July 04, 2009, 12:30:55 pm
Because you don't need it. That file is usually located in the RTP installation folder.

lol.
How the fuck did it get there? XDDDD

Whatever did someone test the demo?
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Rose Guardian on July 06, 2009, 02:07:54 pm
This is a good script but the attack button in the demo doesn't work for some reason.  I cannot attack.
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.5
Post by: Subsonic_Noise on July 06, 2009, 02:10:21 pm
Quote from: Rose Guardian on July 06, 2009, 02:07:54 pm
This is a good script but the attack button in the demo doesn't work for some reason.  I cannot attack.

You need to go to the shortcut menu, equip the ammo and press the hotkey. Your Weapon is a gun.^^
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.9
Post by: Futendra on April 05, 2012, 02:57:50 pm
Sorry for the necro post but I am wondering if anyone can re-upload the Demo? Since megaupload is taken down, the files are no longer available?
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.9
Post by: MarkHest on December 31, 2013, 06:51:19 pm
Necropost because I'm curious how this works. Anyone got a backup to the files to the health bars? Or have their own version of it so I know what dimensions are used to create the health bar.
I need the pixel height+width so I can create the bars and test it. I can't read the script either so I don't know where to find the dimensions.

Need some help.
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.9
Post by: KK20 on December 31, 2013, 07:14:25 pm
Nothing in the code says anything about files being a specific length or width. You just need to make sure your picture file names fit those in the code (which you can see by CTRL + F for Cache.picture).

You can probably use the same images from that thread you also posted in (http://forum.chaos-project.com/index.php/topic,10807.0.html).
Title: Re: [XP] Animated BlizzABS HUD (MOG) V0.9
Post by: Sin86 on January 13, 2018, 09:15:34 am
Again, I apologize for necro posting an old thread but anyone still have the images used for this hud that are required? The links are all dead including the demo link, which was from a site that got shut down years ago.