[XP] Aqua's Status Menu

Started by Aqua, June 29, 2008, 04:43:22 pm

Previous topic - Next topic

Aqua

June 29, 2008, 04:43:22 pm Last Edit: February 21, 2009, 05:51:49 am by Blizzard
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


  • Shows all the basic info.
  • Shows bars for stat points, ie STR.
  • Shows stat modifiers from weapons and armors.
  • Shows Class Emblem.
  • Shows Battler.



Screenshots

Spoiler: ShowHide



Demo

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


  • Aqua
  • Blizzard for letting me bother him about how to do some features.



Author's Notes

Hope you like it! :)

Starrodkirby86

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?

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Blizzard

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.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

Okay I editted the post... lol

Hellfire Dragon

I like the look of this and the idea for emblems. I might use it ;) Nice job

Aqua

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

Boba Fett Link

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. :???:
This post will self-destruct in 30 seconds.

ForeverZer0

Reread the instructions. It requires Tons, with gradient bars being turned on.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.