Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Aqua on June 29, 2008, 04:43:22 pm

Title: [XP] Aqua's Status Menu
Post by: Aqua on June 29, 2008, 04:43:22 pm
Aqua's Status Menu
Authors: Aqua
Version: 1.0
Type: Status Menu
Key Term: Menu Add-on



Introduction

This is my first script and it's... a Status Menu!!!  I tried to make it unique and informative, so hopefully, I achieved this.


Features




Screenshots

Spoiler: ShowHide
(http://img299.imageshack.us/img299/142/statusmenussws0.png)



Demo

http://www.sendspace.com/file/u4pr55 (http://www.sendspace.com/file/u4pr55)


Script

Put below defaults and menu scripts, above Main.
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#     Aqua's Status Menu v1.0
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
#
# Inside the battler folder, you'll need a 100x100 picture of an emblem of the
# class named (class)_class.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

#-------------------------------------------------------------------------------
# Class Getter
#-------------------------------------------------------------------------------
class Game_Actor < Game_Battler
 
   def class_file
      return $data_classes[@class_id].name.downcase + '_class'
   end
   
end

#-------------------------------------------------------------------------------
# Status Menu
#-------------------------------------------------------------------------------

class Window_Status < Window_Base
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #-----------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Refresh
  #-----------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_graphic(@actor, 32, 90)
    draw_actor_level(@actor, 4, 20)
    draw_actor_state(@actor, 100, 20)
    draw_actor_hp(@actor, 4, 90, 172)
    draw_actor_sp(@actor, 4, 120, 172)
    draw_actor_exp(@actor, 4, 150)
   
#-------------------------------------------------------------------------------     
#   Stats
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------   
# Bars   
#-------------------------------------------------------------------------------

w = 160
x = 4
y = 180
color1 = Color.new(0, 40, 80)
color2 = Color.new(0, 200, 255)
color3 = Color.new(0, 0, 0)

    actor = $data_actors[@actor.id]
    (2..5).each {|i|
    attribute = case i
    when 2 then @actor.str
    when 3 then @actor.dex
    when 4 then @actor.agi
    when 5 then @actor.int
    end
    extra = attribute - actor.parameters[i, @actor.level]
    base_max = actor.parameters[i, actor.final_level]
    rate = attribute.to_f / (base_max + extra)
    self.contents.gradient_bar(x, y+(i-2)*40, w, color1, color2, color3, rate)
   
    self.contents.draw_text(-40, 290+(i)*25, 200, 32, extra.to_s, 2)
}
#-------------------------------------------------------------------------------
    draw_actor_parameter(@actor, 4, 180, 3)
    draw_actor_parameter(@actor, 4, 220, 4)
    draw_actor_parameter(@actor, 4, 260, 5)
    draw_actor_parameter(@actor, 4, 300, 6)
   
#-------------------------------------------------------------------------------
#Added Stats
#-------------------------------------------------------------------------------
  self.contents.font.color = system_color
  self.contents.draw_text(4, 340, 150, 32, "STR Modifier")
  self.contents.draw_text(4, 365, 150, 32, "DEX Modifier")
  self.contents.draw_text(4, 390, 150, 32, "AGI Modifier")
  self.contents.draw_text(4, 415, 150, 32, "INT Modifier")
 
  self.contents.font.color = normal_color
#-------------------------------------------------------------------------------     
   

#-------------------------------------------------------------------------------
# Class
#-------------------------------------------------------------------------------
    draw_actor_class(@actor, 254, 0)

    #Draw Class Pic
    classpic = RPG::Cache.battler(@actor.class_file, 0) 
    self.contents.blt(240, 20, classpic, Rect.new(0, 0, classpic.width, classpic.height), 200)
    #-------------
   
#-------------------------------------------------------------------------------
# Atk, Pdef, Mdef
#-------------------------------------------------------------------------------
    draw_actor_parameter(@actor, 400, 20, 0)
    draw_actor_parameter(@actor, 400, 50, 1)
    draw_actor_parameter(@actor, 400, 80, 2)
   
#-------------------------------------------------------------------------------
#Draw Battler
#-------------------------------------------------------------------------------

  pic = RPG::Cache.battler(actor.battler_name, actor.battler_hue) 
  self.contents.blt(230, 200, pic, Rect.new(0, 0, pic.width, pic.height))
   
#-------------------------------------------------------------------------------
# Armor
#-------------------------------------------------------------------------------
    self.contents.font.color = system_color
    self.contents.draw_text(400, 160, 96, 32, "Equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 400 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 400 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 400 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 400 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 400 + 16, 400)
  end
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(400, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(400, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(400, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(400, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(400, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 400 + 24, 144)
    draw_item_name($data_armors[@actor.armor1_id], 400 + 24, 208)
    draw_item_name($data_armors[@actor.armor2_id], 400 + 24, 272)
    draw_item_name($data_armors[@actor.armor3_id], 400 + 24, 336)
    draw_item_name($data_armors[@actor.armor4_id], 400 + 24, 400)
  end
end



Instructions

Plug 'n Play!

Requires 100x100 class emblem pictures to be named (classnamehere)_class in the Battlers folder.
Requires Ton of Addons Bars!!!


Compatibility

Don't think there are any... unless you use two status menu scripts or something.



Credits and Thanks




Author's Notes

Hope you like it! :)
Title: Re: Aqua's Status Menu [XP]
Post by: Starrodkirby86 on June 29, 2008, 04:46:51 pm
Aqua, good stuff. One thing. You forgot to put what graphic folder the Class Emblem must be. Good job though...and you SOOOOOO wanted to put Hilda as she's the only one where you see the little underwear...Blah blah blah enter in---

Is this compatible with the SDK?
Is this compatible with any Custom Menu System I am to use...Such as StormTronics?
Title: Re: Aqua's Status Menu [XP]
Post by: Blizzard on June 29, 2008, 04:59:42 pm
It is fully compatible with STCMS if you put this script below STCMS. I can't see any reason why it shouldn't work with SDK as well.
Title: Re: Aqua's Status Menu [XP]
Post by: Aqua on June 29, 2008, 05:05:26 pm
Okay I editted the post... lol
Title: Re: Aqua's Status Menu [XP]
Post by: Hellfire Dragon on June 30, 2008, 03:41:17 pm
I like the look of this and the idea for emblems. I might use it ;) Nice job
Title: Re: Aqua's Status Menu [XP]
Post by: Aqua on June 30, 2008, 03:47:59 pm
Quote from: Hellfire Dragon on June 30, 2008, 03:41:17 pm
I like the look of this and the idea for emblems. I might use it ;) Nice job


Hehe thanks for the compliments :)  If you use it, I'd be happy XD
Title: Re: [XP] Aqua's Status Menu
Post by: Boba Fett Link on April 17, 2011, 01:40:51 pm
Hey, I am getting an error that says line 75: NoMethodError occurred. undefined method 'gradient_bar' for #<Bitmap:0x1ad1e28>   What happened, I made a bitmap of my class emblem, and inserted the name in the script. :???:
Title: Re: [XP] Aqua's Status Menu
Post by: ForeverZer0 on April 17, 2011, 02:37:00 pm
Reread the instructions. It requires Tons, with gradient bars being turned on.