HP/MP/ATB/OVERDRIVE Bars Slanted style for RTAB V.2

HP/MP/ATB/OVERDRIVE Bars Slanted style for RTAB
Version: 2

Introduction
This script not only includes the slanted gauge bars designed by Sephiroth Spawn himself, but includes ATB bars and OD bars for use in the RTAB (Real Time Active Battle) system and the OverDrive bar system designed for RTAB by KGC.

Features
  • Graphic bars (in the Sephiroth Spawn Style) for HP, SP, EXP, and Parameter values.
  • Additional ATB bar in the same style if used with the RTAB system.
  • Additional OD bar in the same style if used with the OverDrive script.

Sample Image
http://damalix92.free.fr/pit/screen.PNG[/img]

Script
[spoiler=HP/MP/ATB/OD Slanted Style Bar Script]
#===========================================================================
# *** HP/MP/ATB/Overdrive bar Slanted Style Compatible with RTAB ***
# *** Version 2
#---------------------------------------------------------------------------
# by Clive
# based on Cogwheel's Bars and Sephiroth Spawn's Slanted Bars.
#---------------------------------------------------------------------------
# ----- GREAT THANKS to DerVVulfman for solving the lag problem
#------This is a plug and play script so it should work without any problem!
#===========================================================================



#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Get the current EXP
  #--------------------------------------------------------------------------
  def now_exp
    return @exp - @exp_list[@level]
  end
  #--------------------------------------------------------------------------
  # * Get the next level's EXP
  #--------------------------------------------------------------------------
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
end


#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window 
  alias raz_bars_base_exp draw_actor_exp
  alias raz_bars_base_parameter draw_actor_parameter
  #==========================================================================
  # * Draw Slant Bar(by Sephiroth Spawn)
  #==========================================================================
  def draw_slant_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))
    # Draw Border
    for i in 0..height
      self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
    end
    # Draw Background
    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
    # Draws Bar
    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
  #==========================================================================
  # * Draw HP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #==========================================================================
  alias :draw_actor_hp_hpsp :draw_actor_hp
  def draw_actor_hp(actor, x, y, width = 144)
    # Calculate if there is draw space for MaxHP
    if width - 32 >= 108
      hp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      hp_x = x + width - 48
      flag = false
    end
    if $game_temp.in_battle
      bar_width = hp_x - x + 50
      else
      bar_width = hp_x - x + 100
    end
    # Draw HP
    draw_slant_bar(x, y + 12, actor.hp, actor.maxhp, bar_width, 6, bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
    # Draw MaxHP
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
      self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
    end
     draw_actor_hp_hpsp(actor, x, y, width)
   end
  #==========================================================================
  # * Draw SP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #==========================================================================
  alias :draw_actor_sp_hpsp :draw_actor_sp
  def draw_actor_sp(actor, x, y, width = 144)
    # Calculate if there is draw space for MaxHP
    if width - 32 >= 108
      sp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      sp_x = x + width - 48
      flag = false
    end
    if $game_temp.in_battle
      bar_width = sp_x - x + 50
      else
      bar_width = sp_x - x + 100
    end
    # Draw SP
    draw_slant_bar(x, y + 12, actor.sp, actor.maxsp, bar_width, 6, bar_color = Color.new(0, 0, 155, 255), end_color = Color.new(255, 255, 255, 255))
    # Draw "SP" text string
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
    # Draw MaxSP
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
      self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
    end
  end
  #==========================================================================
  # * Draw EXP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #==========================================================================
  def draw_actor_exp(actor, x, y)
    if actor.level == 99
      draw_slant_bar(x, y + 18, 1, 1, 190, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(0, 255, 0, 255))
    else
      draw_slant_bar(x, y + 18, actor.now_exp, actor.next_exp, 190, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(255, 255, 255, 255))
    end
    raz_bars_base_exp(actor, x, y)
  end
  #==========================================================================
  # * Draw Parameter
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     type  : parameter type (0-6)
  #==========================================================================
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      para_color1 = Color.new(100,0,0)
      para_color2 = Color.new(255,0,0)
      para_begin = actor.atk
    when 1
      para_color1 = Color.new(100,100,0)
      para_color2 = Color.new(255,255,0)
      para_begin = actor.pdef
    when 2
      para_color1 = Color.new(100,0,100)
      para_color2 = Color.new(255,0,255)
      para_begin = actor.mdef
    when 3
      para_color1 = Color.new(50,0,100)
      para_color2 = Color.new(50,0,255)
      para_begin = actor.str
    when 4
      para_color1 = Color.new(0,100,0)
      para_color2 = Color.new(0,255,0)
      para_begin = actor.dex
    when 5
      para_color1 = Color.new(50,0,50)
      para_color2 = Color.new(255,0,255)
      para_begin = actor.agi
    when 6
      para_color1 = Color.new(0,100,100)
      para_color2 = Color.new(0,255,255)
      para_begin = actor.int
    end
    draw_slant_bar(x, y + 18, para_begin, 999, 155, 4, bar_color = para_color1,
      end_color = para_color2)
    raz_bars_base_parameter(actor, x, y, type)
  end
  #=========================================================================
  # * Draw Actor ATG
  #     actor : Actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #=========================================================================
  def draw_actor_atg(actor, x, y, width = 144, height = 5)
    if @at_gauge == nil
      # plus_x:     revised x-coordinate
      # rate_x:     revised X-coordinate as (%)
      # plus_y:     revised y-coordinate
      # plus_width: revised width
      # rate_width: revised width as (%)
      # height:     Vertical width
      # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
      # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
      # align3: Gauge type 0:Left justify 1: Right justify
      @plus_x = 0
      @rate_x = 0
      @plus_y = 16
      @plus_width = 0
      @rate_width = 100
      @width = @plus_width + width * @rate_width / 100
      @height = 5
      @align1 = 0
      @align2 = 1
      @align3 = 0
      # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
      # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
      grade1 = 1
      grade2 = 0
      # Color setting. color1: Outermost framework, color2: Medium framework
      # color3: Empty framework dark color, color4: Empty framework light/write color
      color1 = Color.new(0, 0, 0)
      color2 = Color.new(255, 255, 192)
      color3 = Color.new(0, 0, 0, 192)
      color4 = Color.new(0, 0, 64, 192)
      # Color setting of gauge
      # Usually color setting of the time
      color5 = Color.new(0, 64, 80)
      color6 = Color.new(255, 255, 255)#(0, 128, 160)
      # When gauge is MAX, color setting
      color7 = Color.new(80, 0, 0)
      color8 = Color.new(255, 255,255) #(240,0,0)
      # Color setting at time of cooperation skill use
      color9 = Color.new(80, 64, 32)
      color10 = Color.new(255, 255, 255) #(240, 192, 96)
      # Color setting at time of skill permanent residence
      color11 = Color.new(80, 0, 64)
      color12 = Color.new(255,255, 255) #(240, 0, 192)
      # Drawing of gauge
      gauge_rect_at(@width, @height, @align3, color1, color2, color3, color4,
          color5, color6, color7, color8, color9, color10, color11, color12,
          grade1, grade2)
    end
    # Variable at substituting the width of the gauge which is drawn
    if actor.rtp == 0
      at = (width + @plus_width) * actor.atp * @rate_width / 10000
    else
      at = (width + @plus_width) * actor.rt * @rate_width / actor.rtp / 100
    end
    # AT Width Check
    if at > width
      at = width
    end
    # Revision such as the left stuffing central posture of gauge
    case @align1
    when 1
      x += (@rect_width - width) / 2
    when 2
      x += @rect_width - width
    end
    case @align2
    when 1
      y -= @height / 2
    when 2
      y -= @height
    end
    # Draw Border
    for i in 0..height
      self.contents.fill_rect(x + 1.5 + i, y + 12 + height - i, width - 2 , 3,
        Color.new(50, 50, 50, 255))
    end
    # Draw Background
    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 + 1.5 + i, y + 12 + height - i, width - 3, 3,
        Color.new(r, b, g, a))
    end
    # Rect_X control
    if @align3 == 0
      rect_x = 0
    else
      x += @width - at - 1
      rect_x = @width - at - 1
    end
    # Color setting of gauge
    if at == width
    #Gauge drawing at the time of MAX
      for i in 0..height
        self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y -i +
        @plus_y, @at_gauge, Rect.new(rect_x, @height * 2, at, @height))
      end
    else
      if actor.rtp == 0
        for i in 0..height
          # Usually gauge drawing of the time
          self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y- i +
            @plus_y, @at_gauge,Rect.new(rect_x, @height, at, @height))
        end
      else
        if actor.spell == true
          for i in 0..height
            #Gauge drawing at time of cooperation skill use
            self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y - i +
              @plus_y, @at_gauge, Rect.new(rect_x, @height * 3, at, @height))
          end
        else
          for i in 0..height             
            # Gauge drawing at time of skill permanent residence
            self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y - i +
              @plus_y, @at_gauge, Rect.new(rect_x, @height * 4, at, @height))
          end
        end
      end
    end
  end
end

#==============================================================================
# ** Window_BattleStatus
#==============================================================================

class Window_BattleStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Draw Overdrive Meter
  #--------------------------------------------------------------------------
  def draw_actor_od(actor, x, y, width = 144)
   rate = actor.overdrive.to_f / KGC::OD_GAUGE_MAX
    plus_x = 0
    rate_x = 0
    plus_y = 15
    plus_width = 0
    rate_width = 100
    height = 7
    od = (width + plus_width) * actor.overdrive * rate_width / 100 /
    KGC::OD_GAUGE_MAX
    # Drawing of gauge
    if actor.overdrive == KGC::OD_GAUGE_MAX
      # Draw Silver Blue Bar
      draw_slant_bar(x + plus_x + width * rate_x / 100, y + plus_y, od, width,
        width, height, od_color1 = Color.new(0,80,200,192),
        od_color2 = Color.new(255,255,255,192))
    else
      # Draw Green Bar
      draw_slant_bar(x + plus_x + width * rate_x / 100, y + plus_y, od, width,
        width, height, od_color1 = Color.new(31, 128, 0, 128),
        od_color2 = Color.new(255, 255, 191))
    end
  end
end
[/spoiler]
Expand to see the code.


Instructions
This script is very simple to use. Just by inserting it, you get bars for your HP, MP and the like statistics. If you're using the RTAB system, place this script underneath the RTAB scripts to replace the ATB bar with the newer one. And if you're using KGC_Overdrive (either versions 1 or 2), this script must be placed BELOW the KGC_Overdrive script so the bars replace the ones made by the OverDrive script.

FAQ
In order to work with this script, the BattleStatus Modification, Overdrive v2 and Overdrive Ringer scripts had been edited to fix the lag issue that plagued the system.

Compatibility
It works with the RMXP system in general, but it may conflict with 'bar' drawing scripts that are built into other systems, like custom menus. The ATB and OD bars are additional features that work with the RTAB and OverDrive system, but RTAB and the OverDrive script are not necessary for this script to function.

Credits and Thanks
Thanks to Cogwheel and Sephiroth Spawn, and especially DerVVulfman for solving the lag problem. It works smoothly on my 1.6 Ghz^^.
Alright, Ive already got an error >_< I replaced this w/ the slant bar I was using exactly at the same place and yet right when I try to goto my menu I get this error.

Error Spoiler
?????'Slant Bars'? 152 ??? No Method Error????
undefined method 'now_exp' for #<game_actor:0x78a42c0>
Expand to see the code.


Any idea why I get this? Ill look to see if I can fix it...I was just wondering. I also tried replacing the exp part of the old script with this one but I get some other errors doing that as well..
Although it works with me, You're right I just checked on the RTAB demo and I got your error. Let me see if I can fix this.
Ok I fixed it^^,I'm going to edit the code!

EDIT: Script fixed, it should work now, at least on the RTAB demo it does when I go in the menu.

EDIT2: I edited the script again. I just made a small change to the colors of the bars for the incantation and cooperative bars, that's all.

EDIT3: For the professional scripters, is there a code to make things flashing? I was wondering because if possible I would like to implement it so that when the ATB bar/Overdrive bar is full, it's flashing.
The overdrive bar lags like hell when it pass over around 60%...
Please check that.
Good script, like how they look.
Yeah, it does lag when the overdrive gets around 50%. As soon as you find a way to avoid that, then you should be good to go. Nice job.
Yeah I'm still checking the lag problem. I noticed that when you decrease the height of the overdrive bar,the lag seems to decrease also
I wonder if you were able to fix the lag problem? Id really love to have this for my RTAB system...
Decrease the bar height for Overdrive
It still lags when it gets to the end of the overdrive...plus the lowest height it goes to is "5". It disappears after that. Knowing how to do a border or have a back like the HP/SP/EXP bars to define where it actually is would be nice to know too. Ive tried myself but got nowhere with it.
I love how small and unobtrusive everything is. That's part of this script, right? In addition to the bars? Or is that the new RTAB layout?
But yeah once the lagging is taken care of it'll be good stuff.
Thats actually just a configured layout edited by Clive which does look very nice. Im just wondering if anyone has an idea on what causes the lag...so I can try and configure it myself. I have no idea how to go about it...
Hey Guys, sorry I was kinda busy with the start of college. Well I edited the script so that we can have the borders and background for the ATB Bar now.
As for the lagging, I'm not on it yet^^. I may check the problem during the week-end if I have time.
However, I think that someone will have to rewrite the whole script to erase the lagging and my skills @ scripting are not good enough for that.
Ahh ok. I guess I could take a crack at it. Im not good at scripting either but hell, what better way to learn? Its because of the overdrive bar, so looking at that portion could probably be the lie of the problem.

BUT if people have already accomplished of killing the lag and have nice pretty borders then be my guest and post it. :P
The lag is coused by all those pixels that it has to draw. Draing anything take time, and the more of it, the longer it takes.
Most games mask it will a winded "battle transition". That's something we should start considering, perhaps?
[QUOTE=MeisMe]The lag is coused by all those pixels that it has to draw. Draing anything take time, and the more of it, the longer it takes.[/QUOTE]

Even so...it could be fixed to stop the lag. At first the cogwheel bars caused lag because of taht problem I believe, but Sephy's draw slant bar did not have any lag issues whatsoever. There should be a way to decrease the lag...and I think it could be something very simple. Then again, I could be wrong. Also, when I tried to decrease the height of the overdrive bar to lower than 5 the bar just disappeared altogether. I dont know why.
alot of ppl like rmxp dnt they
Eh? What kinda spam? That doesnt pertain to this topic or help whatsoever. I guess so...this is kinda RMXP.org. Anyways, Ive tried changing up somethings, but I cant get the overdrive to get smaller...also could you explain how to put a border so I can make it for the overdrive too?

EDIT: Well I got the border, and Ive almost got it down. I still get alittle lag though whenever I try and make it work so its tough. Especially since I suck at scripting. :P
This might be a weird answer but here goes:

When I used this script in my game, it doesnt lag..

No I dont have a fast computer

Yes I modified most of the scripts

No I don't know how mine is not lagging

Its probably something in my scripts that's making it not to lag
I can't really give out which one it is but I'm sure I'll find it sometime..
Well I hope you'll find soon^^. It may save me some time and help a lot of people here:)
Hello everybody, I think I have identified the source of lagging (well not sure sure though^^), now I am trying to solve it.
Moreover I noticed there are so much useless codes for the overdrive bar!
I made a light version and it still works (so far).
Anyway need to go back on it^^'

By the way for the scripters, can you tell me what is "self.contents.blt", what it does and how to use it?

@Jens009: did you find the script that erase the lagging?
Well, frankly I noticed taht just the regular overdrive without it being slanted lags when you have 4 people and they are all halfway full. With this being said, I hope you found a source to reduce the lag overall then this would be truly awesome.
I added the script to my game but nothing changes can someone make a demo of this<.<
As soon as all the lag is fixed with it, Ill be glad to post a demo.
Well I know how to fix this problem make a script name it anti lag
#======================================
# ÃÆ €™Ãƒâ€šÃ‚ ¢ÃƒÆ’ ¢ÃƒÂ¢Ã¢ ‚¬Å¡Ã‚ ¬ÃƒÂ¢Ã¢ €šÂ¬Ã… €œÃƒÆ’â ‚¬Å¡Ãƒâ€šÃ‚ ¦nbsp; Anti Event Lag Script
#======================================
# ÃÆ €™Ãƒâ€šÃ‚ £ÃƒÆ’ ¢ÃƒÂ¢Ã¢ €šÂ¬Ã… ¡Ãƒâ€šÃ‚ ¬ÃƒÆ’ ¢ÃƒÂ¢Ã¢ €šÂ¬Ã… ¡Ãƒâ€šÃ‚ ¬By: Near Fantastica
# Ãâ ‚¬Å¡Ãƒâ€šÃ‚ ¦nbsp; Date: 12.06.05
# Ãâ ‚¬Å¡Ãƒâ€šÃ‚ ¦nbsp; Version: 3
#======================================

#======================================
# ÃÆ €™Ãƒâ€šÃ‚ ¢ÃƒÆ’ ¢ÃƒÂ¢Ã¢ ‚¬Å¡Ã‚ ¬ÃƒÂ¢Ã¢ €šÂ¬Ã… €œÃƒÆ’â ‚¬Å¡Ãƒâ€šÃ‚ ¦nbsp; Game_Map
#======================================

class Game_Map
  #--------------------------------------------------------------------------
  def in_range?(object)
  screne_x = $game_map.display_x
  screne_x -= 256
  screne_y = $game_map.display_y
  screne_y -= 256
  screne_width = $game_map.display_x
  screne_width += 2816
  screne_height = $game_map.display_y
  screne_height += 2176
  return false if object.real_x <= screne_x
  return false if object.real_x >= screne_width
  return false if object.real_y <= screne_y
  return false if object.real_y >= screne_height
  return true
  end
#--------------------------------------------------------------------------
  def update
  if $game_map.need_refresh
  refresh
  end
  if @scroll_rest > 0
  distance = 2 ** @scroll_speed
case @scroll_direction
  when 2
  scroll_down(distance)
  when 4
  scroll_left(distance)
  when 6 
  scroll_right(distance)
  when 8 
  scroll_up(distance)
  end
@scroll_rest -= distance
  end
for event in @events.values
  if in_range?(event) or event.trigger == 3 or event.trigger == 4
  event.update
  end
  end
  for common_event in @common_events.values
common_event.update
  end
  @fog_ox -= @fog_sx / 8.0
  @fog_oy -= @fog_sy / 8.0
  if @fog_tone_duration >= 1
  d = @fog_tone_duration
  target = @fog_tone_target
  @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
  @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
  @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
@fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
@fog_tone_duration -= 1
  end
  if @fog_opacity_duration >= 1
  d = @fog_opacity_duration
  @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
  @fog_opacity_duration -= 1
  end
  end
end

#======================================
# ÃÆ €™Ãƒâ€šÃ‚ ¢ÃƒÆ’ ¢ÃƒÂ¢Ã¢ ‚¬Å¡Ã‚ ¬ÃƒÂ¢Ã¢ €šÂ¬Ã… €œÃƒÆ’â ‚¬Å¡Ãƒâ€šÃ‚ ¦nbsp; Spriteset_Map
#======================================

class Spriteset_Map
#--------------------------------------------------------------------------
def in_range?(object)
     screne_x = $game_map.display_x
  screne_x -= 256
  screne_y = $game_map.display_y
  screne_y -= 256
  screne_width = $game_map.display_x
  screne_width += 2816
  screne_height = $game_map.display_y
  screne_height += 2176
  return false if object.real_x <= screne_x
  return false if object.real_x >= screne_width
  return false if object.real_y <= screne_y
  return false if object.real_y >= screne_height
  return true
  end
  #--------------------------------------------------------------------------
  def update
  if @panorama_name != $game_map.panorama_name or
@panorama_hue != $game_map.panorama_hue
  @panorama_name = $game_map.panorama_name
  @panorama_hue = $game_map.panorama_hue
  if @panorama.bitmap != nil
  @panorama.bitmap.dispose
  @panorama.bitmap = nil
  end
  if @panorama_name != ""
  @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
end
  Graphics.frame_reset
end
  if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
  @fog_name = $game_map.fog_name
@fog_hue = $game_map.fog_hue
if @fog.bitmap != nil
  @fog.bitmap.dispose
  @fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
  end
  Graphics.frame_reset
  end
;  @tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
  @tilemap.update
  @panorama.ox = $game_map.display_x / 8
  @panorama.oy = $game_map.display_y / 8
@fog.zoom_x = $game_map.fog_zoom / 100.0
  @fog.zoom_y = $game_map.fog_zoom / 100.0
@fog.opacity = $game_map.fog_opacity
  @fog.blend_type = $game_map.fog_blend_type
  @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
  @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
  @fog.tone = $game_map.fog_tone
  i=0
for sprite in @character_sprites
  if sprite.character.is_a?(Game_Event)
  if in_range?(sprite.character) or sprite.character.trigger == 3 or sprite.character.trigger == 4
  sprite.update
  i+=1
  end
  else
  sprite.update
  i+=1
  end
  end
#p i
  @weather.type = $game_screen.weather_type
  @weather.max = $game_screen.weather_max
@weather.ox = $game_map.display_x / 4
@weather.oy = $game_map.display_y / 4
@weather.update
  for sprite in @picture_sprites
  sprite.update
  end
  @timer_sprite.update
  @viewport1.tone = $game_screen.tone
  @viewport1.ox = $game_screen.shake
   @viewport3.color = $game_screen.flash_color
   @viewport1.update
  @viewport3.update
  end
end
Expand to see the code.
Umm that doesnt fix script lag...as I already have that integrated into my game. It deals with the way the overdrive bar is written as well as how the overdrive script is written.
Hmm if anyone made a demo of this i'll try and fix the lag but I can't do that now if I don't have the demo oh ya does the demo look EXACTLY like the screenshot shown?
Nope the screenshot is from my game^^. But try to check the order of the script. This script should be placed UNDER the RTAB script and ABOVE the overdrive script.
Hey. Long time no see, eh?

Works on my demo fairly quickly. And I'm talking no lag even using the Animated Battlers script too. I don't have the lag on it that I did with a previous version of your bars.

But... one thing.

When you use the Overdrive skill, the OD bar does not get used up. It stays filled. Possibly due to the fact that you didn't draw an empty OD background. You'll need to correct that to show the OD bar getting used up.

Other than that... I like it.
[QUOTE=DerVVulfman]Hey. Long time no see, eh?

Works on my demo fairly quickly. And I'm talking no lag even using the Animated Battlers script too. I don't have the lag on it that I did with a previous version of your bars.

But... one thing.

When you use the Overdrive skill, the OD bar does not get used up. It stays filled. Possibly due to the fact that you didn't draw an empty OD background. You'll need to correct that to show the OD bar getting used up.

Other than that... I like it.[/QUOTE]

Exactly my point, I have no lag, its probably because of the RTAB add ons

The overdrive issue? Hmm I coded mine differently without drawing an empty background as you have stated.. I just use actor.overdrive and Overdrive max for the gauge..

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=7915