LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

Administrator
Administrator
#1 default RMXP = Mini Character HUD for ABS's
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
Here's a another really cool script for those who are into
ABS's or Action Battle Systems...like me ^,^

This script basically draws a mini HUD
around the player and doesn't require any graphic files!
I found this script at a Portuguese site which is filled with
talented programmers.
[You must be registered and logged in to see this link.]

I simply translated it and added the green experience bar.

and credits to Dodoop for the original version...
I'm hoping he will continue to improve on this script,
if not I certainly will...

enjoy!

[You must be registered and logged in to see this link.]

Spoiler:
Code:
################################################################################
# Mini Character HUD
# Version 1.1
# HP/SP/XP
# translated
# by Gameface101
#
# Original
# Dod Mini Hud
# by:dodoop
# version:1.0
#
#
# This script creates a window HUD below the Actor for HP,SP,and now XP.
# script will draw the bars, no images required.
# need to work on making it disappear when player is transferred
# then reappear again.
#
#########################################################[ module
module Gameface102
#
  EMINI_HUD_MODERNIZE = 4 #frame rate
#
  EMINI_HUD_OPACITY = 0 #window skin

  EMINI_HUD_OPACITY_2 = 150 #see through
end
#########################################################[ class
class EMini_Hud < Window_Base

  def initialize
      super($game_player.screen_x-35,$game_player.screen_y-15,70,70)
      self.contents = Bitmap.new(width - 32, height - 32)
      refresh
    end
##########################################################[ refresh   
  def refresh
    self.contents.clear
    self.opacity = Gameface102::EMINI_HUD_OPACITY
    self.contents_opacity = Gameface102::EMINI_HUD_OPACITY_2
    actor = $game_party.actors[0]
    draw_emini_hud_bar(0,0,actor.hp,actor.maxhp,width=30,height=5,bar_color = Color.new(255,0,0,255),end_color = Color.new(100,0,0,255))
    draw_emini_hud_bar(0,8,actor.sp,actor.maxsp,width=30,height=5,bar_color = Color.new(0,0,255,255),end_color = Color.new(0,0,100,255))
    draw_emini_hud_bar(0,16,actor.now_exp,actor.next_exp,width=30,height=5,bar_color = Color.new(0,255,0,255),end_color = Color.new(0,100,0,255))
end
end
##########################################################[ scene map alias
class Scene_Map
  alias emini_hud_main main
  def main
    @EMini_hud = EMini_Hud.new
    emini_hud_main
    @EMini_hud.dispose
  end
#######################################################################[ update 
  alias emini_hud_update update
  def update
    emini_hud_update

    if Gameface102::EMINI_HUD_MODERNIZE == 0
    @EMini_hud.update if @EMini_hud.visible = true
    @EMini_hud.refresh if @EMini_hud.visible = true
    elsif Gameface102::EMINI_HUD_MODERNIZE == 1
    @EMini_hud.update if @EMini_hud.visible = true if Graphics.frame_count % 10 == 0
    @EMini_hud.refresh if @EMini_hud.visible = true if Graphics.frame_count % 10 == 0
    elsif Gameface102::EMINI_HUD_MODERNIZE == 2
    @EMini_hud.update if @EMini_hud.visible = true if Graphics.frame_count % 20 == 0
    @EMini_hud.refresh if @EMini_hud.visible = true if Graphics.frame_count % 20 == 0
    elsif Gameface102::EMINI_HUD_MODERNIZE == 3
    @EMini_hud.update if @EMini_hud.visible = true if Graphics.frame_count % 30 == 0
    @EMini_hud.refresh if @EMini_hud.visible = true if Graphics.frame_count % 30 == 0
    elsif Gameface102::EMINI_HUD_MODERNIZE == 4
    @EMini_hud.update if @EMini_hud.visible = true if Graphics.frame_count % 40 == 0
    @EMini_hud.refresh if @EMini_hud.visible = true if Graphics.frame_count % 40 == 0
    elsif Gameface102::EMINI_HUD_MODERNIZE == 5
    @EMini_hud.update if @EMini_hud.visible = true if Graphics.frame_count % 50 == 0
    @EMini_hud.refresh if @EMini_hud.visible = true if Graphics.frame_count % 50 == 0
    else
    @EMini_hud.update if @EMini_hud.visible = true if Graphics.frame_count % 50 == 0
    @EMini_hud.refresh if @EMini_hud.visible = true if Graphics.frame_count % 50 == 0
    end
    @EMini_hud.x = $game_player.screen_x-35 #location
    @EMini_hud.y = $game_player.screen_y-15 #location

 
end
end
################################################################[ window class
class Window_Base < Window
  def draw_emini_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.contents.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.contents.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.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
      end
    end
  end
end
##############################################[ definitions for experiance bar
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
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Global Moderator
Global Moderator
#2 default Re: RMXP = Mini Character HUD for ABS's
Loading

swoop

swoop
Global Moderator
Global Moderator
Global Moderator
profile
ooooo the posibilities
Global Moderator
Show Signature
Global Moderator
http://creatureofopinions.blogspot.com/

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled