Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Angel Battle Status, Image Based Battle Status...
EvenAngels
post Jan 3 2010, 05:45 AM
Post #1


"The Cute, Homicidal Girl Named Alma Told Me To..."
Group Icon

Group: Revolutionary
Posts: 510
Type: Writer
RM Skill: Advanced




Angel Battle Status

Version 1.0
Author EvenAngels
Release Date 03/01/2010

Introduction
This script can about as a way for me to learn hope to draw bitmaps on screen. Originally my intention was to simply modify and edit STR's Battle Status script, but I eventually decided to write my own using the battle status section of Ziifee's Spin Battle System as a reference for the font size.

Features
* Use a custom graphic in place of the standard window for the Battle Status section.
* Works with Tankentai and default battle system.

Script

CODE
#==============================================================================
# ■ Angel Battle Status
#------------------------------------------------------------------------------
#  Script by: EvenAngels
#==============================================================================
#About:
# This script can about as a way for me to learn hope to draw bitmaps on screen.
# Originally my intention was to simply modify and edit STR's Battle Status
# script, but I eventually decided to write my own using Ziifee's as a reference.
# This script arranges the actor details, such as face, status, hp, mp and name,
# vertically. It will then place a HUD image of your choosing between the faces
# and the rest of the details.
#==============================================================================
#Intructions:
#   NAME_SIZE: The font size that the name will be written in
#   HUD_GRAPHIC: The name of the graphic used for the HUD. For best results
#                the graphic should be 384x94 pixels.
#==============================================================================
#Terms of Use: The script is free to use as long as I am credited. Any graphic
#              materials given with this script are not permitted for use, but
#              intended as a reference for creating your own.
#==============================================================================
# Credits:
#   Ziifee - I used his Spin Battle System to see how to set the name font size
#   EvenAngels - Me, since I wrote it and am rather proud of it, even if it
#                if it is simple. =P
#==============================================================================


NAME_SIZE = 14 # Font size for the name
HUD_GRAPHIC = "btlhud" # The name of the HUD graphic to be placed behind the faces

class Window_BattleStatus
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 416, 128)
    @column_max = 4
    refresh
    self.active = false
    self.opacity = 0
    
   def update_cursor              
    self.cursor_rect.empty
  end

  end
  #--------------------------------------------------------------------------
  # ● Draw Status HUD
  #--------------------------------------------------------------------------
  def draw_item(index)
    x = index * 96
    rect = Rect.new(x, 0, 96, 96)
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    actor = $game_party.members[index]
    
    #Draws the actor details and HUD. Only draws actor.name if NAME_LINE is "true"
    draw_actor_face(actor, x + 2, 4, 74)
    bitmap = Bitmap.new("Graphics/System/"+HUD_GRAPHIC)
    self.contents.blt(x, 2, bitmap, rect)
    draw_actor_state(actor, x + 72, WLH * 3)
    self.contents.font.color = hp_color(actor)
    size = NAME_SIZE
    self.contents.font.size = size
    self.contents.draw_text(x + 4, WLH * 1 + 22 - size, 80, WLH, actor.name)
    self.contents.font.size = 20
    draw_actor_hp(actor, x + 2, WLH * 2, 80)
    draw_actor_mp(actor, x + 2, WLH * 3, 70)
    
  end
end



Customization
NAME_SIZE - Here you can set the font size for the actors' names.
HUD_GRAPHIC - Here you can specific which HUD image which will be placed between the actor faces and the rest of the details. For best results, it should be 384x94 pixels.

Compatibility
Works perfectly fine with both the normal Tankentai and default battle system. For ATB scripts, some editting may be necessary to either the ATB script or this due to placement of the ATB bar.

Unlikely to be compatible with battle systems that change the Battle Status window.

Screenshot
[Show/Hide] Screens


Works fine with Tankentai. Notice the state icon at the bottom right.


Also works with the default battle system. Since the HUD is just a single graphic, you can easily edit it to remove overlapping info like Bennett's name in this shot.


DEMO
None, unless requested. It's fairly simple. tongue.gif

Installation
Place above main, and put your HUD image in the Graphics/System folder.

For a HUD image, the following size is optimal.

However, please note that this graphic is show for reference purposes, and I ask that you dont use it, but rather create or find your own. smile.gif

FAQ
None yet.

Terms and Conditions
The script is free to use as long as I am credited. Any graphic materials given with this script are not permitted for use, but intended as a reference for creating your own.

Credits
* Ziifee - I used his Spin Battle System to see how to set the name font size
* EvenAngels - Me, since I wrote it and am rather proud of it, even if it is simple. =P


__________________________
To avoid confusion... I'm a guy! xD


Current demo officially rated 8.5/10 by RRR's Reviewer; nighthawk282

Spoiled For Your Benefit, So You Better Look! xD

Supported Projects









Personality Stamps








Go to the top of the page
 
+Quote Post
   
wltr3565
post Jan 3 2010, 06:18 AM
Post #2


Laugh with Neuro
Group Icon

Group: Revolutionary
Posts: 184
Type: Event Designer
RM Skill: Intermediate




...! You overrid the initialize?! Seems str33 battle menu users can't use this stuff, except they knew where to put biggrin.gif. Overrides can be dangerous, dood.
One more thing, we must have the graphic in pairs, and in one file? Not one pair? The thing is if the fighters are less than 4...

You still have a lot of things to learn. Keep this up! Posting here won't hurt too!


__________________________
Come on, I really need to revive this site:
Script Haven: Go!!!
Aren't good at making sigs though T-T




My simple scripting tutorial:


[Show/Hide] Don't forget:

Laugh with Neuro
Go to the top of the page
 
+Quote Post
   
EvenAngels
post Jan 3 2010, 06:31 AM
Post #3


"The Cute, Homicidal Girl Named Alma Told Me To..."
Group Icon

Group: Revolutionary
Posts: 510
Type: Writer
RM Skill: Advanced




I know I have a lot to learn. happy.gif;; I'm still unsure of aliasing. And as for having less that 4 actors, that is an issue I'm currently working on resolving. smile.gif I'm still trying to work out how to get it to make one bitmap for each index like the faces and bars...

If I wanted to alias the initialize, what would be the best method?


__________________________
To avoid confusion... I'm a guy! xD


Current demo officially rated 8.5/10 by RRR's Reviewer; nighthawk282

Spoiled For Your Benefit, So You Better Look! xD

Supported Projects









Personality Stamps








Go to the top of the page
 
+Quote Post
   
wltr3565
post Jan 3 2010, 06:40 AM
Post #4


Laugh with Neuro
Group Icon

Group: Revolutionary
Posts: 184
Type: Event Designer
RM Skill: Intermediate




CODE
alias new_method old_method
def old_method
new_method
end

It's an example of aliasing (the most useless alias ever since it doesn't add anything for the aliased method tongue.gif)

Anyway, the 1-piece graphic problem, let it be. Some creative users can use it for something better smile.gif. Just add an option for drawing the HUD one by one.


__________________________
Come on, I really need to revive this site:
Script Haven: Go!!!
Aren't good at making sigs though T-T




My simple scripting tutorial:


[Show/Hide] Don't forget:

Laugh with Neuro
Go to the top of the page
 
+Quote Post
   
EvenAngels
post Jan 3 2010, 06:47 AM
Post #5


"The Cute, Homicidal Girl Named Alma Told Me To..."
Group Icon

Group: Revolutionary
Posts: 510
Type: Writer
RM Skill: Advanced




I looked at the STR33 battle status script and tried to do an alias like that:
CODE
  alias initialize_AnBS initialize
    def initialize
      initialize_AnBS
    super(0, 0, 416, 128)
    @column_max = 4
    refresh
    self.active = false
    self.opacity = 0
    
   def update_cursor              
    self.cursor_rect.empty
  end

However, it drew the hud in the wrong place with the normal window and then the RGSS Player crashed. XD

But if I do it like this it works fine, but I don't think it would actually be aliasing anything:
CODE
  alias initialize_AnBS initialize
    def initialize
      initialize_AnBS
    end
  
  def initialize
    super(0, 0, 416, 128)
    @column_max = 4
    refresh
    self.active = false
    self.opacity = 0
    
   def update_cursor              
    self.cursor_rect.empty
  end


__________________________
To avoid confusion... I'm a guy! xD


Current demo officially rated 8.5/10 by RRR's Reviewer; nighthawk282

Spoiled For Your Benefit, So You Better Look! xD

Supported Projects









Personality Stamps








Go to the top of the page
 
+Quote Post
   
wltr3565
post Jan 3 2010, 06:58 AM
Post #6


Laugh with Neuro
Group Icon

Group: Revolutionary
Posts: 184
Type: Event Designer
RM Skill: Intermediate




QUOTE (EvenAngels @ Jan 3 2010, 09:47 PM) *
I looked at the STR33 battle status script and tried to do an alias like that:
CODE
  alias initialize_AnBS initialize
    def initialize
      initialize_AnBS
    super(0, 0, 416, 128)
    @column_max = 4
    refresh
    self.active = false
    self.opacity = 0
    
   def update_cursor              
    self.cursor_rect.empty
  end

You forgot the end after the initialize. It should be like this:
CODE
alias initialize_AnBS initialize
    def initialize
      initialize_AnBS
    super(0, 0, 416, 128)
    @column_max = 4
    refresh
    self.active = false
    self.opacity = 0
end # this's what you forgot

And other things are fine. Great biggrin.gif. May I ask what's the update_cursor method for?


__________________________
Come on, I really need to revive this site:
Script Haven: Go!!!
Aren't good at making sigs though T-T




My simple scripting tutorial:


[Show/Hide] Don't forget:

Laugh with Neuro
Go to the top of the page
 
+Quote Post
   
EvenAngels
post Jan 3 2010, 07:04 AM
Post #7


"The Cute, Homicidal Girl Named Alma Told Me To..."
Group Icon

Group: Revolutionary
Posts: 510
Type: Writer
RM Skill: Advanced




Ah! *facepalm* That was dumb of me. tongue.gif Now I just have to make the windowskin transparent since it shows up again now. tongue.gif

And the update_cursor is to remove the cursor box from around the faces that show during the command selection.

EDIT: Just thought I'd say, if your HUD graphic doesn't have lines between each actor like mine, when you have less actors it will look fine. To show what I mine, here's a shot using the above image. Try to picture it without the top and bottom lines:



__________________________
To avoid confusion... I'm a guy! xD


Current demo officially rated 8.5/10 by RRR's Reviewer; nighthawk282

Spoiled For Your Benefit, So You Better Look! xD

Supported Projects









Personality Stamps








Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 20th June 2013 - 12:45 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker