[SOLVED]Word Wrapping Message Boxes by KilloZapit & Venka's Bestiary Compability

Killozapit's Word Wrapping
Venka's Bestiary v1.8

I'm not sure when the problem started, since they used to work fine together, but now when I try to view an entry in the bestiary, I get the following bug:
Capture.PNG


If it matters, I'm using "Windbuchen Regular" as a font (the one included in the Pixel Myth Germania DLC). Script positioning does not seem to change anything. Anyone have any idea how to fix it?

The referred line in the bug is:
Code:
   if pos[:x] + get_next_word_size(c, text) > contents.width - @right_margin
        process_new_line(text, pos)

Any help is welcome, it's for my Broken Reality RPG: https://lord-rutsah.itch.io/broken-reality-rpg

I've moved this thread to Script Support. Thank you.

I'm guessing that @right_margin is not being initialized (i.e. has a value of nil) to DEFAULT_RIGHT_MARGIN when the window is initialized:
Code:
class Window_Base < Window
  include KZIsAwesome::WordWrap

  alias_method :initialize_kz_window_base, :initialize
  def initialize(x, y, width, height)
    initialize_kz_window_base(x, y, width, height)
    @wordwrap = DEFAULT_WORDWRAP
    @convert_newlines = DEFAULT_WHITESPACE
    @collapse_whitespace = DEFAULT_COLLAPSE
    @right_margin = DEFAULT_RIGHT_MARGIN
    @lastc = "\n"
  end
What other scripts are you using in your project, namely anything that contains class Window_Base? Theory is that you have some other script placed below "Word Wrapping" that has rewritten Window_Base#initialize rather than aliasing it.
Scripts below Kilozappit's word wrapping with class Window_Base:

Suspect 1
: Slightly modified Mog's Menu Cursor https://forums.rpgmakerweb.com/index.php?threads/minor-help-with-mog-menu-cursor-v1-9.111568/

Suspect 2: A small transparency script which I can't remember where I got it from.
Spoiler: Code
Code:
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This is a super class of all windows within the game.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    self.windowskin = Cache.system("Window")
    self.back_opacity = 255
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end

end

Scripts above Kilozappit's word wrapping with class Window_Base:

Suspect 1:
Mog's Scene File A Save (v 1.03)
Spoiler: Code
Code:
#==============================================================================
# +++ MOG - Scene File A (V1.3) +++
#==============================================================================
# By Moghunter
# https://atelierrgss.wordpress.com/
#==============================================================================
# Tela de salvar e carregar animado versão A.
#==============================================================================
# Serão necessários as seguintes imagens na pasta Graphics/System
#
# Save_Number.png
# Save_Background.png
# Save_Character_Floor.png
# Save_Layout01.png
# Save_Layout02.png
# Save_Window01.png
# Save_Window02.png
#
#==============================================================================
#
#==============================================================================
# ● Histórico (Version History)
#==============================================================================
# v 1.3 - Melhor codificação.
# v 1.1 - Melhoria no sistema de dispose de imagens.
#==============================================================================
module MOG_SCENE_FILE
  #Quantidade de slots de saves.
  FILES_MAX = 9
end

#==============================================================================
# ■ Game Temp
#==============================================================================
class Game_Temp

  attr_accessor :scene_save
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  alias mog_scene_file_initialize initialize
  def initialize
      mog_scene_file_initialize
      @scene_save = false
  end

end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window

  #--------------------------------------------------------------------------
  # ● draw_picture_number(x,y,value,file_name,align, space, frame_max ,frame_index)  
  #--------------------------------------------------------------------------
  # X - Posição na horizontal
  # Y - Posição na vertical
  # VALUE - Valor Numérico
  # FILE_NAME - Nome do arquivo
  # ALIGN - Centralizar 0 - Esquerda 1- Centro 2 - Direita
  # SPACE - Espaço entre os números.
  # FRAME_MAX - Quantidade de quadros(Linhas) que a imagem vai ter.
  # FRAME_INDEX - Definição do quadro a ser utilizado.
  #--------------------------------------------------------------------------
  def draw_picture_number(x,y,value, file_name,align = 0, space = 0, frame_max = 1,frame_index = 0)  
      number_image = Cache.system(file_name)
      frame_max = 1 if frame_max < 1
      frame_index = frame_max -1 if frame_index > frame_max -1
      align = 2 if align > 2
      cw = number_image.width / 10
      ch = number_image.height / frame_max
      h = ch * frame_index
      number = value.abs.to_s.split(//)
      case align
         when 0
            plus_x = (-cw + space) * number.size
         when 1
            plus_x = (-cw + space) * number.size
            plus_x /= 2
         when 2
            plus_x = 0
      end
      for r in 0..number.size - 1    
          number_abs = number[r].to_i
          number_rect = Rect.new(cw * number_abs, h, cw, ch)
          self.contents.blt(plus_x + x + ((cw - space) * r), y , number_image, number_rect)    
      end
      number_image.dispose
  end

  #--------------------------------------------------------------------------
  # ● Draw Help Layout
  #--------------------------------------------------------------------------
  def draw_face_save(name,x,y,type)
      if type == 0
         image_name = name + "_0"
      elsif type == 1
         image_name = name + "_1"      
      else
         image_name = name + "_2"
      end
      image = Cache.face(image_name)
      cw = image.width
      ch = image.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x , y , image, src_rect)
      image.dispose
  end
 
  #--------------------------------------------------------------------------
  # ● draw_parameter_layout
  #--------------------------------------------------------------------------
  def draw_parameter_layout(x,y)
      image = Cache.system("Save_Window01")
      cw = image.width
      ch = image.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x , y , image, src_rect)  
      image.dispose
  end

  #--------------------------------------------------------------------------
  # ● draw_parameter_layout2
  #--------------------------------------------------------------------------
  def draw_parameter_layout2(x,y,type)
      if type == 0
         image = Cache.system("Save_Window02")
      else
         image = Cache.system("Save_Window03")
      end
      cw = image.width
      ch = image.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x , y , image, src_rect)  
      image.dispose
  end    

  #--------------------------------------------------------------------------
  # ● draw_character_floor
  #--------------------------------------------------------------------------
  def draw_character_floor(x,y)
      image = Cache.system("Save_Character_Floor")
      cw = image.width
      ch = image.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x , y , image, src_rect)
      image.dispose
  end

end
 
#==============================================================================
# ■ DataManager
#==============================================================================
module DataManager

  #--------------------------------------------------------------------------
  # ● Make Save Header
  #--------------------------------------------------------------------------
  def self.make_save_header
      header = {}
      header[:characters] = $game_party.characters_for_savefile
      header[:playtime_s] = $game_system.playtime_s
      header[:playtime] = $game_system.playtime
      header[:map_name] = $game_map.display_name
      header[:members] = $game_party.members
      header
  end
end

#==============================================================================
# ■ Window_SaveFile
#==============================================================================
class Window_SaveFile_A < Window_Base
  attr_reader   :filename            
  attr_reader   :file_exist            
  attr_reader   :time_stamp          
  attr_reader   :selected              
  attr_reader   :file_index

  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
      super(0, 0,720, 140)
      self.opacity = 0
      @file_index = file_index
      @filename = filename
      load_gamedata
      refresh
      @selected = false
  end

  #--------------------------------------------------------------------------
  # ● load_gamedata
  #--------------------------------------------------------------------------
  def load_gamedata
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
       header = DataManager.load_header(@file_index)
       if header == nil
          @file_exist = false
          return
       end
       @characters = header[:characters]
       @total_sec = header[:playtime]
       @mapname = header[:map_name]
       @members = header[:members]
    end
  end

  #--------------------------------------------------------------------------
  # ● Refresh
  #--------------------------------------------------------------------------
  def refresh
      self.contents.clear
      self.contents.font.color = normal_color
      xp = 96
      ex = 60
      if @file_exist
         if @total_sec == nil
            draw_parameter_layout2(0,50,0)
            draw_parameter_layout(-10 + xp,0)
            value = @file_index + 1
            draw_picture_number(13 + xp, 32,value, "Save_Number_01",1,0,3,0)        
            self.contents.draw_text(140, 50, 450, 32, "Error! - Please, dont't use your old Save Files...", 0)
            return
        end
        draw_parameter_layout2(0,50,0)
        draw_parameter_layout(-10 + xp,0)
        value = @file_index + 1
        draw_picture_number(13 + xp, 32,value, "Save_Number_01",1,0,3,0)
        draw_party_characters(180 + xp, 75,ex)
        draw_playtime(495, 20, contents.width - 4, 2)
        draw_map_location( 400 + xp,64)
        draw_level(185 + xp,85,ex)
        draw_face_save(40 + xp,0)
      else
        draw_parameter_layout2(0,50,1)
        draw_parameter_layout(-10 + xp,0)
        value = @file_index + 1
        draw_picture_number(13 + xp, 32,value, "Save_Number_01",1,0,3,0)    
         self.contents.draw_text(260, 50, 120, 32, "No Data", 1)
      end
    end
 
  #--------------------------------------------------------------------------
  # ● draw_face
  #--------------------------------------------------------------------------
  def draw_face_save(x,y)
     draw_actor_face(@members[0], x, y)
  end

  #--------------------------------------------------------------------------
  # ● draw_level
  #--------------------------------------------------------------------------
  def draw_level(x,y,ex)
      self.contents.font.color = normal_color
      for i in [email hidden]
        break if i > 3
        level = @members[i].level
        draw_picture_number(x + (ex  * i) , y ,level, "Save_Number_01",1,0,3,1)
      end    
  end

  #--------------------------------------------------------------------------
  # ● draw_map_location
  #--------------------------------------------------------------------------
  def draw_map_location(x,y)
      self.contents.font.bold = true
      self.contents.font.name = "Georgia"
      self.contents.font.size = 20
      self.contents.font.italic = true
      self.contents.draw_text(x, y, 125, 32, @mapname.to_s, 0)
  end
  #--------------------------------------------------------------------------
  # ● draw_party_characters
  #--------------------------------------------------------------------------
  def draw_party_characters(x, y,ex)
      for i in [email hidden]
        break if i > 3
        name = @characters[i][0]
        index = @characters[i][1]
        draw_character_floor(- 35 + x + i * ex,y - 20)  
        draw_character(name, index, x + i * ex, y)
      end
  end

  #--------------------------------------------------------------------------
  # ● draw_playtime
  #--------------------------------------------------------------------------
  def draw_playtime(x, y, width, align)
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      draw_picture_number(x + 18 * 0, y ,0, "Save_Number_01",0,0,3,0) if hour < 10
      draw_picture_number(x + 18 * 1, y ,hour, "Save_Number_01",0,0,3,0)
      draw_picture_number(x + 18 * 3, y ,0, "Save_Number_01",0,0,3,0) if min < 10
      draw_picture_number(x + 18 * 4, y ,min, "Save_Number_01",0,0,3,0)
      draw_picture_number(x + 18 * 6, y ,0, "Save_Number_01",0,0,3,0) if sec < 10
      draw_picture_number(x + 18 * 7, y ,sec , "Save_Number_01",0,0,3,0)  
  end

  #--------------------------------------------------------------------------
  # ● selected
  #--------------------------------------------------------------------------
  def selected=(selected)
      @selected = selected
  end
end

#==============================================================================
# ■ Scene Save
#==============================================================================
class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  def initialize
      $game_temp.scene_save = true
      super
  end
end
#==============================================================================
# ■ Scene Load
#==============================================================================
class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  def initialize
      $game_temp.scene_save = false
      super
  end
end

#==============================================================================
# ■ Scene_File
#==============================================================================
class Scene_File
  include MOG_SCENE_FILE


  #--------------------------------------------------------------------------
  # ● initialize
  #--------------------------------------------------------------------------
  def initialize
      @saving = $game_temp.scene_save
      @file_max = FILES_MAX
      @file_max = 1 if FILES_MAX < 1
      execute_dispose
      create_layout
      create_savefile_windows
      @index = DataManager.last_savefile_index
      @check_prev_index = true
      @savefile_windows[@index].selected = true
  end

#--------------------------------------------------------------------------
# ● Main
#--------------------------------------------------------------------------      
def main
     Graphics.transition
     execute_loop
     execute_dispose
end

#--------------------------------------------------------------------------
# ● Execute Loop
#--------------------------------------------------------------------------        
def execute_loop
     loop do
          Graphics.update
          Input.update
          update
          if SceneManager.scene != self
              break
          end
     end
end

  #--------------------------------------------------------------------------
  # ● Create_background
  #--------------------------------------------------------------------------
  def create_layout
      @background = Plane.new
      @background.bitmap = Cache.system("Save_Background")
      @background.z = 0
      @layout_01 = Sprite.new
      @layout_01.bitmap = Cache.system("Save_Layout01")
      @layout_01.z = 1  
      @layout_01.blend_type = 1
      image = Cache.system("Save_Layout02")
      @bitmap = Bitmap.new(image.width,image.height)
      cw = image.width
      ch = image.height / 2
      if @saving
         h = 0
      else
         h = ch
      end
      src_rect = Rect.new(0, h, cw, ch)
      @bitmap.blt(0,0, image, src_rect)  
      @layout_02 = Sprite.new
      @layout_02.bitmap = @bitmap
      @layout_02.z = 3
      @layout_02.y = 370
      image.dispose
  end

  #--------------------------------------------------------------------------
  # ● Execute Dispose
  #--------------------------------------------------------------------------
  def execute_dispose
      return if @background == nil
      Graphics.freeze
      @background.bitmap.dispose
      @background.dispose
      @background = nil
      @layout_01.bitmap.dispose
      @layout_01.dispose  
      @layout_02.bitmap.dispose
      @layout_02.dispose
      @bitmap.dispose
      dispose_item_windows
  end

  #--------------------------------------------------------------------------
  # ● Frame Update
  #--------------------------------------------------------------------------
  def update
      update_savefile_windows
      update_savefile_selection
      check_start_index
  end

  #--------------------------------------------------------------------------
  # ● check_start_index
  #--------------------------------------------------------------------------
  def check_start_index
      return if @check_prev_index == false
      @check_prev_index = false
      check_active_window
  end
 
  #--------------------------------------------------------------------------
  # ● check_active_window
  #--------------------------------------------------------------------------
  def check_active_window
      @index = 0 if @index == nil
      for i in 0...@file_max
        @pw = @index - 1
        @pw = 0 if @pw > @file_max - 1
        @pw = @file_max- 1 if @pw < 0    
        @aw = @index
        @nw = @index + 1
        @nw = 0 if @nw > @file_max - 1
        @nw = @file_max - 1  if @nw < 0
        case @savefile_windows[i].file_index
           when @pw,@nw
                @savefile_windows[i].visible = true
                @savefile_windows[i].contents_opacity = 80
           when @aw
                @savefile_windows[i].visible = true
                @savefile_windows[i].contents_opacity = 255
           else
                @savefile_windows[i].visible = false
        end
      end      
  end
 
  #--------------------------------------------------------------------------
  # ● Create Save File Window
  #--------------------------------------------------------------------------
  def create_savefile_windows
    @pw_pos = [-160,32]
    @aw_pos = [-96,160]
    @nw_pos = [-32,288]  
    @savefile_windows = []
    for i in 0...@file_max
        @savefile_windows[i] = Window_SaveFile_A.new(i, DataManager.make_filename(i))
        @savefile_windows[i].z = 2
        @savefile_windows[i].visible = false
        @savefile_windows[i].x = 400
    end
    check_active_window
    @item_max = @file_max
  end

  #--------------------------------------------------------------------------
  # ● Dispose of Save File Window
  #--------------------------------------------------------------------------
  def dispose_item_windows
      for window in @savefile_windows
          window.dispose
      end
  end

  #--------------------------------------------------------------------------
  # ● Update Save File Window
  #--------------------------------------------------------------------------
  def update_savefile_windows
      update_slide_window
      for window in @savefile_windows
        window.update
      end
  end

  #--------------------------------------------------------------------------
  # ● update_slide_window
  #--------------------------------------------------------------------------
  def update_slide_window
      @background.ox += 1
      slide_window_x(@pw,@pw_pos[0])
      slide_window_x(@aw,@aw_pos[0])
      slide_window_x(@nw,@nw_pos[0])
      slide_window_y(@pw,@pw_pos[1])
      slide_window_y(@aw,@aw_pos[1])
      slide_window_y(@nw,@nw_pos[1])
  end
 
  #--------------------------------------------------------------------------
  # ● slide_window_x
  #--------------------------------------------------------------------------
  def slide_window_x(i,x_pos)
      if @savefile_windows[i].x < x_pos
         @savefile_windows[i].x += 15
         @savefile_windows[i].x = x_pos if @savefile_windows[i].x > x_pos
      end
      if @savefile_windows[i].x > x_pos
         @savefile_windows[i].x -= 15
         @savefile_windows[i].x = x_pos if @savefile_windows[i].x < x_pos    
       end          
  end
 
  #--------------------------------------------------------------------------
  # ● slide_window_y
  #--------------------------------------------------------------------------
  def slide_window_y(i,y_pos)
      if @savefile_windows[i].y < y_pos
         @savefile_windows[i].y += 15
         @savefile_windows[i].y = y_pos if @savefile_windows[i].y > y_pos
      end
      if @savefile_windows[i].y > y_pos
         @savefile_windows[i].y -= 15
         @savefile_windows[i].y = y_pos if @savefile_windows[i].y < y_pos    
       end          
  end
 
  #--------------------------------------------------------------------------
  # ● reset_position
  #--------------------------------------------------------------------------  
  def reset_position(diretion)
      check_active_window  
      case diretion
         when 0
            @savefile_windows[@pw].y = -64
            @savefile_windows[@pw].x = 0
         when 1
            @savefile_windows[@nw].y = 440
            @savefile_windows[@nw].x = 0
      end    
  end
 
  #--------------------------------------------------------------------------
  # ● Update Save File Selection
  #--------------------------------------------------------------------------
  def update_savefile_selection
      if Input.trigger?(Input::C)
         on_savefile_ok
      elsif Input.trigger?(Input::B)
         Sound.play_cancel
         return_scene
      else
        last_index = @index
        if Input.trigger?(Input::DOWN)
           execute_index(1)
           if @file_max > 2
              reset_position(1)
           else
              reset_position(0)
           end
        end
        if Input.trigger?(Input::UP)
           execute_index(-1)
           reset_position(0)
        end
        if @index != last_index
           Sound.play_cursor
           @savefile_windows[last_index].selected = false
           @savefile_windows[@index].selected = true
        end  
      end
  end

  #--------------------------------------------------------------------------
  # ● Execute Index
  #--------------------------------------------------------------------------
  def execute_index(value)
      @index += value
      @index = @index >= @file_max ? 0 : @index < 0 ? (@file_max - 1) : @index
  end

end

$mog_rgss3_scene_file = true

Suspect 2: Enemy HUD by Pacman (v 1.3)
Spoiler: Code
Code:
#===============================================================================
#
# Enemy HUD (1.3)
# 15/4/2012
# By Pacman (ported to VXA from a VX script also by Pacman)
# This script displays enemy stats (HP, MP, TP, stat icons) in the battle screen
# whilst selecting which enemy to target. It also includes special tags to
# prevent any of these stats from being drawn. And yes, enemies do have TP.
# To have the HP, MP, TP (more info later), name or stat icons not drawn, use
# the following words in the enemy's notebox:
# unknown hp
# unknown mp
# unknown tp
# unknown name
# unknown stat
# These are case insensetive (i.e., you may use any case for them) and you can
# use underscores (_) or nothing instead of spaces.
# By default, enemies' TP gauges are not drawn. If you want it to be drawn,
# you can use the tag:
# display tp
# in the enemy's notebox. This is also case insensetive.
#
# New in 1.1, you can make the numbers of the enemy's gauges hidden. This would
# be specifically useful for boss battles. To do this, use either one of these:
# \boss
# hide numbers
#
# New in 1.2, you can make use of MA's Monster Catalogue by placing the tag:
# \ma_scan
# in the enemy's notebox to make it only display the numbers on the gauges once
# the enemy has been scanned. You can also adjust this at line 39.
#
#===============================================================================

($pac ||= {})[:enemy_hud] = 1.3

module PAC
  module ENHUD
    MA_MC = false       # If this is true, any enemy must be scanned before its
                        # details are shown.
    MA_MC_NAME = false  # If this is true, names won't be displayed on enemies
                        # that require the MA scan.
  end
end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================

class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Get data from notebox
  #--------------------------------------------------------------------------
  def stat_note?(code)
    data = actor? ? actor : enemy
    if code.is_a?(String)
      data.note.include?(note)
    else
      !data.note[code].nil?
    end
  end
  #--------------------------------------------------------------------------
  # * Monster Catalogue Scan
  #--------------------------------------------------------------------------
  def ma_scan_req
    stat_note?(/\\ma[_ ]?scan[_ ]?(req(uired)?)?/i)
  end
  #--------------------------------------------------------------------------
  # * Have I been scanned?
  #--------------------------------------------------------------------------
  def scanned?
    return true if actor? || !PAC::ENHUD::MA_MC
    return $game_system.mamc_data_conditions_met?(:analyze, @enemy_id)
  end
  #--------------------------------------------------------------------------
  # * Don't display gauge numbers?
  #--------------------------------------------------------------------------
  def boss?
    stat_note?(/\\boss/i) || stat_note?(/\\hide[_ ]?num(bers)?/i)
  end
  #--------------------------------------------------------------------------
  # * Don't display enemy MP?
  #--------------------------------------------------------------------------
  def no_mp_display?
    stat_note?(/UNKNOWN[_ ]?MP/i)
  end
  #--------------------------------------------------------------------------
  # * Display enemy TP?
  #--------------------------------------------------------------------------
  def tp_display?
    stat_note?(/DISPLAY[_ ]?TP/i)
  end
  #--------------------------------------------------------------------------
  # * Don't display enemy TP?
  #--------------------------------------------------------------------------
  def no_tp_display?
    stat_note?(/UNKNOWN[_ ]?TP/i) || !tp_display?
  end
  #--------------------------------------------------------------------------
  # * Don't display enemy HP?
  #--------------------------------------------------------------------------
  def no_hp_display?
    stat_note?(/UNKNOWN[_ ]?HP/i)
  end
  #--------------------------------------------------------------------------
  # * Don't display enemy name?
  #--------------------------------------------------------------------------
  def no_name_display?
    return true if stat_note?(/UNKNOWN[_ ]?NAME/i)
    return false unless self.enemy?
    return true if PAC::ENHUD::MA_MC_NAME && !scanned?
    return false
  end
  #--------------------------------------------------------------------------
  # * Don't display enemy stat icons?
  #--------------------------------------------------------------------------
  def no_stat_display?
    stat_note?(/UNKNOWN[_ ]?STATS?/i)
  end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This is a super class of all windows within the game.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Find battler's boss value
  #--------------------------------------------------------------------------
  def boss?(battler)
    return battler.boss?
  end
  #--------------------------------------------------------------------------
  # * Draw HP
  #--------------------------------------------------------------------------
  def draw_actor_hp(actor, x, y, width = 124)
    draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::hp_a)
    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
      hp_color(actor), normal_color) unless boss?(actor)
  end
  #--------------------------------------------------------------------------
  # * Draw MP
  #--------------------------------------------------------------------------
  def draw_actor_mp(actor, x, y, width = 124)
    draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::mp_a)
    draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
      mp_color(actor), normal_color) unless boss?(actor)
  end
  #--------------------------------------------------------------------------
  # * Draw TP
  #--------------------------------------------------------------------------
  def draw_actor_tp(actor, x, y, width = 124)
    draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::tp_a)
    change_color(tp_color(actor))
    if $pac[:tp_system]
      draw_current_and_max_values(x, y, width, actor.tp.to_i, actor.mtp,
        tp_color(actor), normal_color) unless boss?(actor)
    else
      unless boss?(actor)
        draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2)
      end
    end
  end
end

#==============================================================================
# ** Window_EnemyHUD
#------------------------------------------------------------------------------
#  戦闘は画面上のウィンドウで、ターゲットの敵キャラクタのアクションを選択します。このウィンドウには、敵のHP、MP、
#  TP、統計情報と名前が表示されます。
#==============================================================================

class Window_EnemyHUD < Window_BattleStatus
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(info_viewport)
    super()
    self.y = info_viewport.rect.y
    self.visible = false
    self.openness = 255
    @info_viewport = info_viewport
    @enemies = []
    $game_troop.alive_members.each do |enemy|
      next unless enemy.exist?
      @enemies.push(enemy)
    end
  end
  #--------------------------------------------------------------------------
  # * Show window
  #--------------------------------------------------------------------------
  def show
    if @info_viewport
      width_remain = Graphics.width - width
      self.x = width_remain
      @info_viewport.rect.width = width_remain
      select(0)
    end
    super
  end
  #--------------------------------------------------------------------------
  # * Hide window
  #--------------------------------------------------------------------------
  def hide
    @info_viewport.rect.width = Graphics.width if @info_viewport
    super
  end
  #--------------------------------------------------------------------------
  # * Get enemy
  #--------------------------------------------------------------------------
  def enemy
    $game_troop.members[@index]
  end
  #--------------------------------------------------------------------------
  # * Get item max
  #--------------------------------------------------------------------------
  def item_max
    return $game_troop.members.size
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item to be drawn
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    contents.clear_rect(rect)
    contents.font.color = normal_color
    enemy = $game_troop.members[index]
    draw_basic_area(basic_area_rect(index), enemy)
    draw_gauge_area(gauge_area_rect(index), enemy)
  end
  #--------------------------------------------------------------------------
  # * Get rect for basic area
  #--------------------------------------------------------------------------
  def basic_area_rect(index)
    rect = item_rect_for_text(index)
    rect.width -= gauge_area_width + 10
    rect
  end
  #--------------------------------------------------------------------------
  # * Get rect for gauge area
  #--------------------------------------------------------------------------
  def gauge_area_rect(index)
    rect = item_rect_for_text(index)
    rect.x += rect.width - gauge_area_width
    rect.width -= gauge_area_width
    rect
  end
  #--------------------------------------------------------------------------
  # * Get width for gauge area
  #--------------------------------------------------------------------------
  def gauge_area_width
    return 220
  end
  #--------------------------------------------------------------------------
  # * Draw Enemy's basic information
  #--------------------------------------------------------------------------
  def draw_basic_area(rect, enemy)
    unless enemy.no_name_display?
      draw_actor_name(enemy, 4, rect.y)
    end; unless enemy.no_stat_display?
      draw_actor_icons(enemy, 114, rect.y, 48)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Enemy's gauges
  #--------------------------------------------------------------------------
  def draw_gauge_area(rect, enemy)
    if !enemy.no_tp_display?
      if enemy.no_mp_display? && !enemy.no_hp_display?
        draw_gauge_area_without_mp(rect, enemy)
      elsif enemy.no_hp_display? && !enemy.no_mp_display?
        draw_gauge_area_without_hp(rect, enemy)
      elsif enemy.no_hp_display? && enemy.no_mp_display?
        draw_gauge_area_without_mp_hp(rect, enemy)
      else
        draw_gauge_area_with_tp(rect, enemy)
      end
    else
      if enemy.no_mp_display? && !enemy.no_hp_display?
        draw_gauge_area_without_tp_mp(rect, enemy)
      elsif enemy.no_hp_display? && !enemy.no_mp_display?
        draw_gauge_area_without_tp_hp(rect, enemy)
      elsif enemy.no_hp_display? && enemy.no_mp_display?
        draw_gauge_area_blank(rect, enemy)
      else
        draw_gauge_area_without_tp(rect, enemy)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Draw gauge area with HP, MP and TP
  #--------------------------------------------------------------------------
  def draw_gauge_area_with_tp(rect, actor)
    draw_actor_hp(actor, rect.x + 0, rect.y, 72)
    draw_actor_mp(actor, rect.x + 82, rect.y, 64)
    draw_actor_tp(actor, rect.x + 156, rect.y, 64)
  end
  #--------------------------------------------------------------------------
  # * Draw gauge area with HP and MP
  #--------------------------------------------------------------------------
  def draw_gauge_area_without_tp(rect, actor)
    draw_actor_hp(actor, rect.x + 0, rect.y, 134)
    draw_actor_mp(actor, rect.x + 144,  rect.y, 76)
  end
  #--------------------------------------------------------------------------
  # * Draw gauge area with HP and TP
  #--------------------------------------------------------------------------
  def draw_gauge_area_without_mp(rect, actor)
    draw_actor_hp(actor, rect.x + 0, rect.y, 134)
    draw_actor_tp(actor, rect.x + 144, rect.y, 76)
  end
  #--------------------------------------------------------------------------
  # * Draw gauge area with MP and TP
  #--------------------------------------------------------------------------
  def draw_gauge_area_without_hp(rect, actor)
    draw_actor_mp(actor, rect.x + 0, rect.y, 134)
    draw_actor_tp(actor, rect.x + 144, rect.y, 76)
  end
  #--------------------------------------------------------------------------
  # * Draw gauge area with MP
  #--------------------------------------------------------------------------
  def draw_gauge_area_without_tp_hp(rect, actor)
    draw_actor_mp(actor, rect.x + 0, rect.y, rect.width)
  end
  #--------------------------------------------------------------------------
  # * Draw gauge area with TP
  #--------------------------------------------------------------------------
  def draw_gauge_area_without_mp_hp(rect, actor)
    draw_actor_tp(actor, rect.x + 0, rect.y, rect.width)
  end
  #--------------------------------------------------------------------------
  # * Draw gauge area with HP
  #--------------------------------------------------------------------------
  def draw_gauge_area_without_tp_mp(rect, actor)
    draw_actor_hp(actor, rect.x + 0, rect.y, rect.width)
  end
  #--------------------------------------------------------------------------
  # * Draw gauge area with no gauges (useless method ;0)
  #--------------------------------------------------------------------------
  def draw_gauge_area_blank(*a)
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * 敵キャラウィンドウの作成
  #--------------------------------------------------------------------------
  def create_enemy_window
    @enemy_window = Window_EnemyHUD.new(@info_viewport)
    @enemy_window.set_handler(:ok,     method(:on_enemy_ok))
    @enemy_window.set_handler(:cancel, method(:on_enemy_cancel))
  end
end

if PAC::ENHUD::MA_MC && !($imported ||= {})[:MA_MonsterCatalogue]
msg = "PAC Enemy HUD: Modern Algebra's Monster Catalogue not installed.\n"
msg += "Please install that script or disable its' usage in existing scripts.\n"
msg += "Make sure the Monster Catalogue is above the Enemy HUD in the editor.\n"
msgbox msg; exit; end

#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================

#===============================================================================
#
# Enemy HUD (1.3)
# 15/4/2012
# By Pacman (ported to VXA from a VX script also by Pacman)
# patch by Roninator2
# Fixes hidden enemies
#===============================================================================

#===============================================================================
#
# Enemy HUD (1.3)
# 15/4/2012
# By Pacman (ported to VXA from a VX script also by Pacman)
# patch by Roninator2
# Fixes hidden enemies
#===============================================================================

class Window_EnemyHUD < Window_BattleStatus
  #--------------------------------------------------------------------------
  # * Get item max
  #--------------------------------------------------------------------------
  def item_max
    @troop_hidden = 0
    $game_troop.members.each do |enemy|
      if enemy.hidden?
        @troop_hidden += 1
      end
    end
    return $game_troop.members.size - @troop_hidden - $game_troop.dead_members.size
  end
  #--------------------------------------------------------------------------
  # * Get enemy
  #--------------------------------------------------------------------------
  def enemy
    $game_troop.alive_members[@index]
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item to be drawn
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    contents.clear_rect(rect)
    contents.font.color = normal_color
    enemy = $game_troop.alive_members[index]
    return if enemy.hidden?
    draw_basic_area(basic_area_rect(index), enemy)
    draw_gauge_area(gauge_area_rect(index), enemy)
  end
end

Suspect 3: Yanfly Ace Message System

Suspect 4: Victor Basic Module

Suspect 5: Yanfly Skill Restrictions
Suspect 6: Neo Gauge
Spoiler: CODE
Code:
#===============================================================================
#
# Neo Gauge Ultimate Ace (1.1a)
# 21/02/2012
# Ported to Ace by Pacman (original script by Woratana and edited by Pacman)
# This script changes the way gauges are drawn. This script supports drawing
# gauges horizontally and vertically, uses a 3-colour gradient, has a very
# simple setup and two brilliant methods to change the bitmap.
# Note that much of this work is Woratana's, you should credit him the same as
# (if not more than) me. I do not claim writing this script entirely, I edited
# the VX version a while back, and this is the VXA port of that.
#
# Detailed instructions on the configuration are below.
#
#===============================================================================

class Window_Base < Window  # DO NOT TOUCH THIS
 
  #==========================================================================
  # NEO GAUGE SETTING #
  # Color: Color.new(Red, Green, Blue) # Each number you can put integer 0-255
  # * You can use this site to get RGB color:
  # http://web.njit.edu/~kevin/rgb.txt.html
  #==========================================================================
  GAUGE_GLOW_EFFECT = true # Use glow effect?
  GAUGE_GLOW_COLOR = Color.new(0,0,0) # Glow color
 
  GAUGE_OUTSIDE_BORDER = true # Use outside border?
  GAUGE_OUTSIDE_BORDER_COLOR = Color.new(255,255,255)
  GAUGE_OUTSIDE_BORDER_COLOR2 = Color.new(255,255,255)
  GAUGE_CLEAR_CORNER_OUTSIDE_BORDER = true
 
  GAUGE_INSIDE_BORDER = true # Use inside border?
  GAUGE_INSIDE_BORDER_COLOR = Color.new(255, 255, 255)
  GAUGE_INSIDE_BORDER_COLOR2 = Color.new(0, 0, 0)
  #=============================================================
  # NEO HP/MP/TP/STATS GAUGE SETTING #
  #=============================================================
  # Note: The HPMP options also apply to the TP gauge.
  HPMP_GAUGE_HEIGHT = 8 # gauge height (minumum: 6)
  # Recommend to use HPMP_GAUGE_HEIGHT at least 8,
  # if you're using GAUGE_INSIDE_BORDER in Neo-Gauge
  HPMP_GAUGE_X_PLUS = 0 # Move gauge horizontally (+,-)
  HPMP_GAUGE_Y_PLUS = ((-1)*(HPMP_GAUGE_HEIGHT - 6)) # (+,-)
  # Change '((-1)*(HPMP_GAUGE_HEIGHT - 6))' to number to move gauge vertically
 
  # BACK GAUGE COLORS
  BACK_GCOLOR_1 = Color.new(0, 0, 0) # Black [Color1]
  BACK_GCOLOR_2 = Color.new(100, 100, 100) # Dark Gray [Color2]
  BACK_GCOLOR_3 = Color.new(200, 200, 200) # Light Gray [Color3]
 
  USE_HP_GAUGE = true # Use HP Gauge? (true/false)
  USE_MP_GAUGE = true # Use MP Gauge?
  USE_TP_GAUGE = true # Use TP Gauge?
  USE_STATS_GAUGE = true # Use Attack/Defense/Spirit/Agility/Luck Gauge?
 
  # HP GAUGE COLORS
  HP_GCOLOR_1 = Color.new(139,0,0) # Dark Red
  HP_GCOLOR_2 = Color.new(255,0,0) # Pure Red
  HP_GCOLOR_3 = Color.new(255,193,37) # Goldenrod
 
  # MP GAUGE COLORS
  MP_GCOLOR_1 = Color.new(0,0,128) # Dark Blue
  MP_GCOLOR_2 = Color.new(0,191,255) # Blue
  MP_GCOLOR_3 = Color.new(46,139,87) # Light Green
 
  # TP GAUGE COLORS
  TP_GCOLOR_1 = Color.new(0, 100, 0)  # Dark Green
  TP_GCOLOR_2 = Color.new(191, 255, 0)  # Lime Green
  TP_GCOLOR_3 = Color.new(173, 255, 47) # Yellow Green
 
  # STAT GAUGE COLORS
  STAT_GCOLOR_1 = Color.new(0,0,128)
  STAT_GCOLOR_2 = Color.new(0,191,255)
  STAT_GCOLOR_3 = Color.new(152,251,152)

#===============================================================================
#
# END CONFIGURATION
#
#===============================================================================

#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  ゲーム中の全てのウィンドウのスーパークラスです。
#==============================================================================
  #--------------------------------------------------------------------------
  # * Get Gauge Back Colours
  #--------------------------------------------------------------------------
  def neo_gauge_back_color
    return BACK_GCOLOR_1, BACK_GCOLOR_2, BACK_GCOLOR_3
  end
  #--------------------------------------------------------------------------
if USE_HP_GAUGE
  #--------------------------------------------------------------------------
  # * Draw Actor HP
  #--------------------------------------------------------------------------
  def draw_actor_hp(actor, x, y, width = 124)
    gwidth = width * actor.hp / actor.mhp
    cg = neo_gauge_back_color
    c1, c2, c3 = cg[0], cg[1], cg[2]
    draw_neo_gauge(x + HPMP_GAUGE_X_PLUS, y + line_height - 8 +
      HPMP_GAUGE_Y_PLUS, width, HPMP_GAUGE_HEIGHT, c1, c2, c3)
    (1..3).each {|i| eval("c#{i} = HP_GCOLOR_#{i}")}
    draw_neo_gauge(x + HPMP_GAUGE_X_PLUS, y + line_height - 8 +
      HPMP_GAUGE_Y_PLUS, gwidth, HPMP_GAUGE_HEIGHT, c1, c2, c3, false, false,
      width, 30)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::hp_a)
    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
      hp_color(actor), normal_color)
  end
  #--------------------------------------------------------------------------
end
if USE_MP_GAUGE
  #--------------------------------------------------------------------------
  # * Draw Actor MP
  #--------------------------------------------------------------------------
  def draw_actor_mp(actor, x, y, width = 124)
    gwidth = width * actor.mp / [actor.mmp, 1].max
    cg = neo_gauge_back_color
    c1, c2, c3 = cg[0], cg[1], cg[2]
    draw_neo_gauge(x + HPMP_GAUGE_X_PLUS, y + line_height - 8 +
      HPMP_GAUGE_Y_PLUS, width, HPMP_GAUGE_HEIGHT, c1, c2, c3)
    (1..3).each {|i| eval("c#{i} = MP_GCOLOR_#{i}")}
    draw_neo_gauge(x + HPMP_GAUGE_X_PLUS, y + line_height - 8 +
      HPMP_GAUGE_Y_PLUS, gwidth, HPMP_GAUGE_HEIGHT, c1, c2, c3, false, false,
      width, 40)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::mp_a)
    draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
      mp_color(actor), normal_color)
  end
  #--------------------------------------------------------------------------
end
if USE_TP_GAUGE
  #--------------------------------------------------------------------------
  # * Draw Actor TP
  #--------------------------------------------------------------------------
  def draw_actor_tp(actor, x, y, width = 124)
    gwidth = width * actor.tp / 100
    cg = neo_gauge_back_color
    c1, c2, c3 = cg[0], cg[1], cg[2]
    draw_neo_gauge(x + HPMP_GAUGE_X_PLUS, y + line_height - 8 +
      HPMP_GAUGE_Y_PLUS, width, HPMP_GAUGE_HEIGHT, c1, c2, c3)
    (1..3).each {|i| eval("c#{i} = TP_GCOLOR_#{i}")}
    draw_neo_gauge(x + HPMP_GAUGE_X_PLUS, y + line_height - 8 +
      HPMP_GAUGE_Y_PLUS, gwidth, HPMP_GAUGE_HEIGHT, c1, c2, c3, false, false,
      width, 40)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::tp_a)
    change_color(tp_color(actor))
    draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2)
  end
  #--------------------------------------------------------------------------
end
if USE_STATS_GAUGE
  #--------------------------------------------------------------------------
  # * Draw Actor Stats
  #--------------------------------------------------------------------------
  def draw_actor_param(actor, x, y, param_id)
    param_name = Vocab::param(param_id)
    param_value = actor.param(param_id)
    param_max = actor.neo_param_max(param_id)
    width = 156
    gwidth = width * param_value / [param_max, 1].max
    cg = neo_gauge_back_color
    draw_neo_gauge(x + HPMP_GAUGE_X_PLUS, y + line_height - 8 +
      HPMP_GAUGE_Y_PLUS, width, HPMP_GAUGE_HEIGHT, cg[0], cg[1], cg[2])
    c1, c2, c3 = STAT_GCOLOR_1, STAT_GCOLOR_2, STAT_GCOLOR_3
    draw_neo_gauge(x + HPMP_GAUGE_X_PLUS, y + line_height - 8 +
      HPMP_GAUGE_Y_PLUS, gwidth, HPMP_GAUGE_HEIGHT, c1, c2, c3, false, false,
      width, 40)
    change_color(system_color)
    draw_text(x, y, 120, line_height, param_name)
    change_color(normal_color)
    draw_text(x + 120, y, 36, line_height, param_value, 2)
  end
  #--------------------------------------------------------------------------
end
  #--------------------------------------------------------------------------
  # * Draw Neo Gauge
  #     c1, c2, c3  : 3 Colours in the gradient
  #     vert  : Whether the gauge is vertical or not.
  #     outline   : Draw an outline of the gauge?
  #     max_width : Maximum width the gauge can reach.
  #     c2_spot   : Point where the second colour is drawn.
  #--------------------------------------------------------------------------
  def draw_neo_gauge(x, y, width, height, c1, c2, c3, vert = false,
      outline = true, max_width = nil, c2_spot = 50) 
    if max_width.nil? # Get Max Width
      max_width = vert ? height : width
    end
    glow = GAUGE_GLOW_EFFECT
    dx = x; dy = y
    x = y = 0
    bitmap = Bitmap.new(max_width, height)
    if glow # If drawing glow
      if outline  # If drawing outline
        if vert; rect = Rect.new(x, y, width, max_width)  # Make vertical gauge
        else; rect = Rect.new(x, y, max_width, height)  # Make horizontal gauge
        end
        bitmap.fill_rect(rect, GAUGE_GLOW_COLOR)  # Make glow
        bitmap.neo_clear_corner(rect.x, rect.y, rect.width, rect.height) # Clear
      else  # No outline
        height -= 2; width -= 2; x += 1; y += 1
        if GAUGE_INSIDE_BORDER
          height -= 2; width -= 2; x += 1; y += 1
        end
      end
    end
  #--------------------------------------------------------------------------
  # I'm not going to comment every line. There's a lot of stuff here. It may
  # look daunting, but it's actually not that diffciult to get your head
  # around. If you really want to figure this all out, just look at it a lot.
  # Failing that, you could probably just ask a more experienced scripter or
  # myself.
  #--------------------------------------------------------------------------
    if vert
      if glow; gx = gx2 = x + 1; gy = y
      else; gx = gx2 = x; gy = y
      end
      gy2 = gy - 1 + ((c2_spot * max_width) / 100)
      gw = gw2 = width - 2; gh = ((c2_spot * max_width) / 100)
      gh2 = max_width - gh - 2
      bitmap.gradient_fill_rect(gx, gy, gw, gh, c1, c2, true)
      bitmap.gradient_fill_rect(gx2, gy2, gw2, gh2, c2, c3, true)
      gh = (gh + gh2)
    else
      if glow; gx = x; gy = gy2 = y
        gx = x + 1; gy = gy2 = y + 1
      else; gx = x; gy = gy2 = y
      end
      gx2 = gx - 1 + ((c2_spot *  max_width) / 100)
      gw = ((c2_spot * max_width) / 100); gh = gh2 = (height - 2)
      gw2 = max_width - gw - 2
      bitmap.gradient_fill_rect(gx, gy, gw, gh, c1, c2)
      bitmap.gradient_fill_rect(gx2, gy2, gw2, gh2, c2, c3)
      gw = (gw + gw2)
    end
    if outline
      if GAUGE_OUTSIDE_BORDER
        bitmap.draw_neo_border(gx, gy, gw, gh, GAUGE_OUTSIDE_BORDER_COLOR,
          GAUGE_OUTSIDE_BORDER_COLOR2)
        if GAUGE_CLEAR_CORNER_OUTSIDE_BORDER
          bitmap.neo_clear_corner(gx, gy, gw, gh)
        end
      end
      if GAUGE_INSIDE_BORDER
        gx += 1; gy += 1; gw -= 2; gh -= 2
        bitmap.draw_neo_border(gx, gy, gw, gh, GAUGE_INSIDE_BORDER_COLOR,
          GAUGE_INSIDE_BORDER_COLOR2)
      end
    end
    rect = Rect.new(0, 0, width, bitmap.height)
    self.contents.blt(dx, dy, bitmap, rect)
    bitmap.dispose
  end
end

#==============================================================================
# ■ Bitmap
#------------------------------------------------------------------------------
#  かわいいですね。
#==============================================================================

class Bitmap
  #--------------------------------------------------------------------------
  # * Draw border of Neo Gauge
  #--------------------------------------------------------------------------
  def draw_neo_border(x, y, width, height, color, color2 = color, size = 1)
    gradient_fill_rect(x, y, width, size, color, color2)
    fill_rect(x, y, size, height, color)
    fill_rect(x + width - size, y, size, height, color2)
    gradient_fill_rect(x, y + height - size, width, size, color, color2)
  end
  #--------------------------------------------------------------------------
  # * Clear Corner of Neo Gauge
  #--------------------------------------------------------------------------
  def neo_clear_corner(x, y, width, height, size = 1)
    clear_rect(x, y, size, size)
    clear_rect(x + width - size, y, size, size)
    clear_rect(x, y + height - size, size, size)
    clear_rect(x + width - size, y + height - size, size, size)
  end
end

#==============================================================================
# ■ Game_Battler
#------------------------------------------------------------------------------
#  スプライトや行動に関するメソッドを追加したバトラーのクラスです。このクラス
# は Game_Actor クラスと Game_Enemy クラスのスーパークラスとして使用されます。
#==============================================================================

class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Get class (simpler method)
  #--------------------------------------------------------------------------
  def klass
    self.class if self.is_a?(Game_Actor)
  end
  #--------------------------------------------------------------------------
  # * Get Neo Parameter Max
  #--------------------------------------------------------------------------
  def neo_param_max(param_id)
    case param_id
    when 2; maxatk
    when 3; maxdef
    when 4; maxspi
    when 5; maxmdef
    when 6; maxagi
    when 7; maxluk
    end
  end
  #--------------------------------------------------------------------------
  # * Max attack
  #--------------------------------------------------------------------------
  def maxatk
    n = atk
    if self.is_a?(Game_Actor)
      n = n - klass.params[2, @level] + klass.params[2, 99]
    end
    return n
  end
  #--------------------------------------------------------------------------
  # * Max defense
  #--------------------------------------------------------------------------
  def maxdef
    n = atk
    if self.is_a?(Game_Actor)
      n = n - klass.params[3, @level] + klass.params[3, 99]
    end
    return n
  end
  #--------------------------------------------------------------------------
  # * Max magic
  #--------------------------------------------------------------------------
  def maxspi
    n = atk
    if self.is_a?(Game_Actor)
      n = n - klass.params[4, @level] + klass.params[4, 99]
    end
    return n
  end
  #--------------------------------------------------------------------------
  # * Max magic defense
  #--------------------------------------------------------------------------
  def maxmdef
    n = atk
    if self.is_a?(Game_Actor)
      n = n - klass.params[5, @level] + klass.params[5, 99]
    end
    return n
  end
  #--------------------------------------------------------------------------
  # * Max agility
  #--------------------------------------------------------------------------
  def maxagi
    n = atk
    if self.is_a?(Game_Actor)
      n = n - klass.params[6, @level] + klass.params[6, 99]
    end
    return n
  end
  #--------------------------------------------------------------------------
  # * Max luck
  #--------------------------------------------------------------------------
  def maxluk
    n = atk
    if self.is_a?(Game_Actor)
      n = n - klass.params[7, @level] + klass.params[7, 99]
    end
    return n
  end
end

$imported ||= {}
$imported[:neo_gauge_ultimate]

#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================
EDIT: Problem solved, I just placed them below all other scripts. So it was one of the two first that was causing it.
It's the transparency script. Like I said, it doesn't alias initialize...it's a rewrite of the method, meaning any scripts above it that do alias it (i.e. word wrapper) will be ignored completely. You want to ensure that any scripts that do not alias methods are placed higher up in your script list.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-word-wrapping-message-boxes-by-killozapit-venkas-bestiary-compability.136925/