Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

ES Character Info

Enyo

Member

ES Character Info
Version: 0.1

Introduction

Greetings, I wish to present you my first script :)
This script show character's biography

Screenshots

http://rpg-maker.info/gallery/albums/us ... erInfo.png[/img]
Demo

http://www.sendspace.com/file/v4o2hw
Script

Code:
 #----------------------------------------------------------------------------
# RU (for rpg-maker.info)
#----------------------------------------------------------------------------
=begin
E'S Character_Info
Автор: Enyo
Спасибо: Dr.Nick To (За оффициальную английскую версию мейкера)
Отдельное спасибо: rpg-maker.info, rmxp.org
Инструкция: читайте ниже
По всем вопросам обращайтесь:
ICQ: 352 - 434 - 311
Mail: enyos@mail.ru
=end
#----------------------------------------------------------------------------
#   EN (for rmxp.org/rmvx.org)
#----------------------------------------------------------------------------
=begin
E'S Character_Info
Thanks:
 Dr.Nick To 
 rpg-maker.info
 rmxp.org
Instruction: read below
Find any bugs?
ICQ: 352 - 434 - 311
Mail: enyos@mail.ru
Credit me (Enyo) if use it
=end
module ES
  module CharacterInfo
    # Цвет/color (default Green)
    #красный/ RED
    $esr = 0
    #зеленый/GREEN
    $esg = 255
    #синий/BLUE
    $esb = 0
    #Название категорий информации/The name of categories of the information
    Name = "Name:"
    Class = "Job:"
    Age = "Age:"
    Sex = "Gender:"
    From = "From:"
    Long = "Long:"
    Weight = "Weight:"
    ZodiacSing = "Zodiac Sing:"
    Element = "Element:"
    Weapon = "Weapon:"
    LittleInfo = "Biography:"
    Press = "Press 'Enter' to more info"
    #Для правильной работы скрипта вам необходимо заполнить следующую переменную
    #согласно примеру тоесть: Имя героя => {"Age" => "возраст героя", и т.д.
    #Если вы хотите добавить героя то просто поставте запятую после всей информеции и до
    #Символа } я отметил это место в примере/
    #For correct work of a script it is necessary for you to fill a following variable
    # to an example: the Name of the hero => {"Age" => " age of the hero ", etc.
    # you wish to add the hero that simply paste a comma after all info and up to }
    # I have noted this place in an example
    #       Имя Героя/Hero name          Возраст/age          Пол/sex(gender)
    $actors = {"Ralph" => {"Age" => "16", "Sex" => "Male",
    #          Откуда/from
    "From" => "EnterBrain city",
    #           Высота/long                 Вес/weight
    "Long" => "1.5 meters","Weight" => "70kg",
    #  Знак зодиака/zodiac sing    Стихия/element      Оружие/weapon
    "Sing" => "Aquaticus", "Element" => "Air", "Weapon" => "Swords", 
    #   Инфо:/info      Первая Строчка/ 1st string         Вторая строчка/ 2nd string
    "LittleInfo" => {"s1" => "Example", "s2" => "Example",
    #  Третяя строчка/ 3rd string
    "s3" => "rpg-maker.info"}}, #запятая/comma
    # Имя Героя/Hero Name           Возраст/Age          Пол/sex
    "Ulrika" => {"Age" => "20", "Sex" => "FeMale",
    #          Откуда/from
    "From" => "EnterBrain city",
    #           Высота/long                  Вес/weight
    "Long" => "1.7 meters","Weight" => "60kg",
    #    Знак зодиака/zodiac sing    Стихия/element    Оружие/Weapon
    "Sing" => "Tauros", "Element" => "Earth", "Weapon" => "Swords", 
    #            Инфа:/info      Первая Строчка/1st string         Вторая строчка/2nd string
    "LittleInfo" => {"s1" => "Example", "s2" => "Example",
    #  Третяя строчка/3rd string
    "s3" => "rmxp.org"}}#поставте запятую тут/paste a comma here
    }
  end
end


class ES_CharacterInfo
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    create_viewports
    create_back
    update
  end
  #--------------------------------------------------------------------------
  # * Create Viewport
  #--------------------------------------------------------------------------
  def create_viewports
    @viewport1 = Viewport.new(0, 0, 544, 416)
    @viewport2 = Viewport.new(0, 0, 544, 416)
    @viewport3 = Viewport.new(0, 0, 544, 416)
    @viewport2.z = 50
    @viewport3.z = 100
  end
  #--------------------------------------------------------------------------
  # * Create Battleback Sprite
  #--------------------------------------------------------------------------
  def create_back
    source = $game_temp.background_bitmap
    bitmap = Bitmap.new(640, 480)
    bitmap.stretch_blt(bitmap.rect, source, source.rect)
    bitmap.radial_blur(120, 12)
    @back_sprite = Sprite.new(@viewport1)
    @back_sprite.bitmap = bitmap
    @back_sprite.ox = 320
    @back_sprite.oy = 240
    @back_sprite.x = 272
    @back_sprite.y = 176
    @back_sprite.wave_amp = 2
    #@back_sprite.wave_length = 300
    #@back_sprite.wave_speed = 120
    @back_sprite.color.set(16, 16, 16, 100)
  end
  def dispose
    dispose_back_bitmap
    dispose_back
    dispose_viewports
  end
  #--------------------------------------------------------------------------
  # * Dispose of Battleback Bitmap
  #--------------------------------------------------------------------------
  def dispose_back_bitmap
    @back_sprite.bitmap.dispose
  end
  #--------------------------------------------------------------------------
  # * Dispose of Battleback Sprite
  #--------------------------------------------------------------------------
  def dispose_back
    @back_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Dispose of Battlefloor Sprite
  #--------------------------------------------------------------------------
 
  #--------------------------------------------------------------------------
  # * Dispose of Viewport
  #--------------------------------------------------------------------------
  def dispose_viewports
    @viewport1.dispose
    @viewport2.dispose
    @viewport3.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_back
    
    update_viewports
  end
  #--------------------------------------------------------------------------
  # * Update Battleback
  #--------------------------------------------------------------------------
  def update_back
    @back_sprite.update
  end
  #--------------------------------------------------------------------------
  # * Update Battlefloor
  #--------------------------------------------------------------------------
  
  #--------------------------------------------------------------------------
  # * Update Viewport
  #--------------------------------------------------------------------------
  def update_viewports
    @viewport1.tone = $game_troop.screen.tone
    @viewport1.ox = $game_troop.screen.shake
    @viewport2.color = $game_troop.screen.flash_color
    @viewport3.color.set(0, 0, 0, 255 - $game_troop.screen.brightness)
    @viewport1.update
    @viewport2.update
    @viewport3.update
  end
  #--------------------------------------------------------------------------
  # * Determine if animation is being displayed
  #--------------------------------------------------------------------------
  def animation?
    for sprite in @enemy_sprites + @actor_sprites
      return true if sprite.animation?
    end
    return false
  end
end
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
#  This window displays full status specs on the status screen.
#==============================================================================
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This is a superclass of all windows in the game.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  WLH = 24                  # Window Line Height
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     x      : window x-coordinate
  #     y      : window y-coordinate
  #     width  : window width
  #     height : window height
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super()
    self.windowskin = Cache.system("Window")
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
    self.back_opacity = 200
    self.openness = 255
    create_contents
    @opening = false
    @closing = false
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    self.contents.dispose
    super
  end
  #--------------------------------------------------------------------------
  # * Create Window Contents
  #--------------------------------------------------------------------------
  def create_contents
    self.contents.dispose
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if @opening
      self.openness += 48
      @opening = false if self.openness == 255
    elsif @closing
      self.openness -= 48
      @closing = false if self.openness == 0
    end
  end
  #--------------------------------------------------------------------------
  # * Open Window
  #--------------------------------------------------------------------------
  def open
    @opening = true if self.openness < 255
    @closing = false
  end
  #--------------------------------------------------------------------------
  # * Close Window
  #--------------------------------------------------------------------------
  def close
    @closing = true if self.openness > 0
    @opening = false
  end
  #--------------------------------------------------------------------------
  # * Get Text Color
  #     n : Text color number  (0-31)
  #--------------------------------------------------------------------------
  def text_color(n)
    x = 64 + (n % 8) * 8
    y = 96 + (n / 8) * 8
    return windowskin.get_pixel(x, y)
  end
  #--------------------------------------------------------------------------
  # * Get Normal Text Color
  #--------------------------------------------------------------------------
  def normal_color
    return text_color(0)
  end
  #--------------------------------------------------------------------------
  # * Get System Text Color
  #--------------------------------------------------------------------------
  def system_color
    return text_color(16)
  end
  #--------------------------------------------------------------------------
  # * Get Crisis Text Color
  #--------------------------------------------------------------------------
  def crisis_color
    return text_color(17)
  end
  #--------------------------------------------------------------------------
  # * Get Knockout Text Color
  #--------------------------------------------------------------------------
  def knockout_color
    return text_color(18)
  end
  #--------------------------------------------------------------------------
  # * Get Gauge Background Color
  #--------------------------------------------------------------------------
  def gauge_back_color
    return text_color(19)
  end
  #--------------------------------------------------------------------------
  # * Get HP Gauge Color 1
  #--------------------------------------------------------------------------
  def hp_gauge_color1
    return text_color(20)
  end
  #--------------------------------------------------------------------------
  # * Get HP Gauge Color 2
  #--------------------------------------------------------------------------
  def hp_gauge_color2
    return text_color(21)
  end
  #--------------------------------------------------------------------------
  # * Get MP Gauge Color 1
  #--------------------------------------------------------------------------
  def mp_gauge_color1
    return text_color(22)
  end
  #--------------------------------------------------------------------------
  # * Get MP Gauge Color 2
  #--------------------------------------------------------------------------
  def mp_gauge_color2
    return text_color(23)
  end
  #--------------------------------------------------------------------------
  # * Get Equip Screen Power Up Color
  #--------------------------------------------------------------------------
  def power_up_color
    return text_color(24)
  end
  #--------------------------------------------------------------------------
  # * Get Equip Screen Power Down Color
  #--------------------------------------------------------------------------
  def power_down_color
    return text_color(25)
  end
  #--------------------------------------------------------------------------
  # * Draw Icon
  #     icon_index : Icon number
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     enabled    : Enabled flag. When false, draw semi-transparently.
  #--------------------------------------------------------------------------
  def draw_icon(icon_index, x, y, enabled = true)
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
  end
  #--------------------------------------------------------------------------
  # * Draw Face Graphic
  #     face_name  : Face graphic filename
  #     face_index : Face graphic index
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     size       : Display size
  #--------------------------------------------------------------------------
  def draw_face(face_name, face_index, x, y, size = 96)
    bitmap = Cache.face(face_name)
    rect = Rect.new(0, 0, 0, 0)
    rect.x = face_index % 4 * 96 + (96 - size) / 2
    rect.y = face_index / 4 * 96 + (96 - size) / 2
    rect.width = size
    rect.height = size
    self.contents.blt(x, y, bitmap, rect)
    bitmap.dispose
  end
  #--------------------------------------------------------------------------
  # * Draw Character Graphic
  #     character_name  : Character graphic filename
  #     character_index : Character graphic index
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_character(character_name, character_index, x, y)
    return if character_name == nil
    bitmap = Cache.character(character_name)
    sign = character_name[/^[\!\$]./]
    if sign != nil and sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    n = character_index
    src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
  def es_draw_character(character_name, character_index, x, y)
    return if character_name == nil
    bitmap = Cache.character(character_name)
    sign = character_name[/^[\!\$]./]
    if sign != nil and sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    n = character_index
    src_rect = Rect.new((n%4*3+$espose)*cw, (n/4*4)*ch, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
  #--------------------------------------------------------------------------
  # * Get HP Text Color
  #     actor : actor
  #--------------------------------------------------------------------------
  def hp_color(actor)
    return knockout_color if actor.hp == 0
    return crisis_color if actor.hp < actor.maxhp / 4
    return normal_color
  end
  #--------------------------------------------------------------------------
  # * Get MP Text Color
  #     actor : actor
  #--------------------------------------------------------------------------
  def mp_color(actor)
    return crisis_color if actor.mp < actor.maxmp / 4
    return normal_color
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Walking Graphic
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
    draw_character(actor.character_name, actor.character_index, x, y)
  end
  def es_draw_actor_graphic(actor, x, y)
    es_draw_character(actor.character_name, actor.character_index, x, y)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Face Graphic
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     size  : Display size
  #--------------------------------------------------------------------------
  def draw_actor_face(actor, x, y, size = 96)
    draw_face(actor.face_name, actor.face_index, x, y, size)
  end
  #--------------------------------------------------------------------------
  # * Draw Name
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_name(actor, x, y)
    self.contents.font.color = hp_color(actor)
    self.contents.draw_text(x, y, 108, WLH, actor.name)
  end
   def es_draw_actor_name(actor, x, y,r,g,b)
    self.contents.font.color = Color.new(r,g,b)
    self.contents.draw_text(x, y, 108, WLH, actor.name)
  end
  #--------------------------------------------------------------------------
  # * Draw Class
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_class(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 108, WLH, actor.class.name)
  end
  #--------------------------------------------------------------------------
  # * Draw Level
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_level(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 32, y, 24, WLH, actor.level, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw State
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 96)
    count = 0
    for state in actor.states
      draw_icon(state.icon_index, x + 24 * count, y)
      count += 1
      break if (24 * count > width - 24)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw HP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_actor_hp(actor, x, y, width = 120)
    draw_actor_hp_gauge(actor, x, y, width)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Vocab::hp_a)
    self.contents.font.color = hp_color(actor)
    last_font_size = self.contents.font.size
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.hp, 2)
    else
      self.contents.draw_text(xr - 99, y, 44, WLH, actor.hp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxhp, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw HP gauge
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_actor_hp_gauge(actor, x, y, width = 120)
    gw = width * actor.hp / actor.maxhp
    gc1 = hp_gauge_color1
    gc2 = hp_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # * Draw MP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_actor_mp(actor, x, y, width = 120)
    draw_actor_mp_gauge(actor, x, y, width)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Vocab::mp_a)
    self.contents.font.color = mp_color(actor)
    last_font_size = self.contents.font.size
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.mp, 2)
    else
      self.contents.draw_text(xr - 99, y, 44, WLH, actor.mp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxmp, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw MP Gauge
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_actor_mp_gauge(actor, x, y, width = 120)
    gw = width * actor.mp / [actor.maxmp, 1].max
    gc1 = mp_gauge_color1
    gc2 = mp_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # * Draw Parameters
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     type  : Type of parameters (0-3)
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      parameter_name = Vocab::atk
      parameter_value = actor.atk
    when 1
      parameter_name = Vocab::def
      parameter_value = actor.def
    when 2
      parameter_name = Vocab::spi
      parameter_value = actor.spi
    when 3
      parameter_name = Vocab::agi
      parameter_value = actor.agi
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, parameter_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw Item Name
  #     item    : Item (skill, weapon, armor are also possible)
  #     x       : draw spot x-coordinate
  #     y       : draw spot y-coordinate
  #     enabled : Enabled flag. When false, draw semi-transparently.
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y, enabled = true)
    if item != nil
      draw_icon(item.icon_index, x, y, enabled)
      self.contents.font.color = normal_color
      self.contents.font.color.alpha = enabled ? 255 : 128
      self.contents.draw_text(x + 24, y, 172, WLH, item.name)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw number with currency unit
  #     value : Number (gold, etc)
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_currency_value(value, x, y, width)
    cx = contents.text_size(Vocab::gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, width-cx-2, WLH, value, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, width, WLH, Vocab::gold, 2)
  end
end
class Window_Status < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 544, 416)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 128, 0)
    draw_actor_face(@actor, 8, 32)
    draw_basic_info(128, 32)
    draw_parameters(32, 160)
    draw_exp_info(288, 32)
    draw_equipments(288, 160)
        self.contents.gradient_fill_rect(270, 350, 260, 2, Color.new(255, 255, 255, 255), Color.new(0, 0, 0, 10))
     self.contents.gradient_fill_rect(10, 350, 260, 2, Color.new(0, 0, 0, 10), Color.new(255, 255, 255, 255))
      self.contents.font.color = Color.new($esr,$esg,$esb)
     self.contents.draw_text(150, 336, 300, WLH,ES::CharacterInfo::Press)
  end
  #--------------------------------------------------------------------------
  # * Draw Basic Information
  #     x : Draw spot X coordinate
  #     y : Draw spot Y coordinate
  #--------------------------------------------------------------------------
  def draw_basic_info(x, y)
    draw_actor_level(@actor, x, y + WLH * 0)
    draw_actor_state(@actor, x, y + WLH * 1)
    draw_actor_hp(@actor, x, y + WLH * 2)
    draw_actor_mp(@actor, x, y + WLH * 3)
  end
  #--------------------------------------------------------------------------
  # * Draw Parameters
  #     x : Draw spot X coordinate
  #     y : Draw spot Y coordinate
  #--------------------------------------------------------------------------
  def draw_parameters(x, y)
    draw_actor_parameter(@actor, x, y + WLH * 0, 0)
    draw_actor_parameter(@actor, x, y + WLH * 1, 1)
    draw_actor_parameter(@actor, x, y + WLH * 2, 2)
    draw_actor_parameter(@actor, x, y + WLH * 3, 3)
  end
  #--------------------------------------------------------------------------
  # * Draw Experience Information
  #     x : Draw spot X coordinate
  #     y : Draw spot Y coordinate
  #--------------------------------------------------------------------------
  def draw_exp_info(x, y)
    s1 = @actor.exp_s
    s2 = @actor.next_rest_exp_s
    s_next = sprintf(Vocab::ExpNext, Vocab::level)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
    self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 2)
    self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw Equipment
  #     x : Draw spot X coordinate
  #     y : Draw spot Y coordinate
  #--------------------------------------------------------------------------
  def draw_equipments(x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
    for i in 0..4
      draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1))
    end
  end
end

=begin
  Face
=end

class Face < Window_Base
  #--------------------------------------------------------------------------
  # Инициализация обьектов
  #--------------------------------------------------------------------------
  def initialize(actor_index)
    super(50, 53, 98, 98)
    $esactor = $game_party.members[actor_index]
    self.z = 0
    self.back_opacity = 100
    self.contents = Bitmap.new(width - 32, height - 32)
    
   end
  #--------------------------------------------------------------------------
  # *Обновление кадров
  #--------------------------------------------------------------------------
  def update
  end
end

=begin
  Info
=end

class Info < Window_Base
  #--------------------------------------------------------------------------
  # Инициализация обьектов
  #--------------------------------------------------------------------------
  def initialize
    super(0, 306, 544, 110)
    self.z = 0
    self.back_opacity = 100
    self.contents = Bitmap.new(width - 32, height - 32)
    
   end
  #--------------------------------------------------------------------------
  # *Обновление кадров
  #--------------------------------------------------------------------------
  def update
  end
end


class SmallWindow < Window_Base
  #--------------------------------------------------------------------------
  # Инициализация обьектов
  #--------------------------------------------------------------------------
  def initialize
    super(8, 289, 140, 33)
    self.z = 2
     self.back_opacity = 255
   end
  #--------------------------------------------------------------------------
  # *Обновление кадров
  #--------------------------------------------------------------------------
  def update
  end
end

=begin
  Back
=end

class Back < Window_Base
  #--------------------------------------------------------------------------
  # Инициализация обьектов
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 544, 416)
    self.z = 3
    self.back_opacity = 0
    self.contents = Bitmap.new(width - 32, height - 32)
   
  end
  #--------------------------------------------------------------------------
  # *Обновление кадров
  #--------------------------------------------------------------------------
  def update
     self.contents.clear
    @esfaceheight = ($esface.y - 29 ) + $esface.height
     draw_actor_face($esactor, $esface.x - 16, $esface.y - 15)
    es_draw_actor_name($esactor, $esface.x - 16  , @esfaceheight, $esr, $esg, $esb)
    es_draw_actor_graphic($esactor,($esface.width + $esface.x) - 25 , $esface.height + $esface.y )
     self.contents.font.color = Color.new(255,255,255)
     self.contents.gradient_fill_rect(90, 160, 70, 2, Color.new(255, 255, 255, 255), Color.new(0, 0, 0, 10))
     self.contents.gradient_fill_rect(20, 160, 70, 2, Color.new(0, 0, 0, 10), Color.new(255, 255, 255, 255))
      self.contents.draw_text(250, 50, 200, WLH,ES::CharacterInfo::Name + $esactor.name)
    self.contents.draw_text(250, 82, 200, WLH,ES::CharacterInfo::Class + $esactor.class.name)
    self.contents.draw_text(250, 114, 200, WLH,ES::CharacterInfo::Sex + $actors[$esactor.name]["Sex"])
    self.contents.draw_text(250, 146, 200, WLH,ES::CharacterInfo::Age + $actors[$esactor.name]["Age"])
     self.contents.draw_text(250, 178, 200, WLH,ES::CharacterInfo::Long + $actors[$esactor.name]["Long"])
    self.contents.draw_text(250, 210, 200, WLH,ES::CharacterInfo::Weight + $actors[$esactor.name]["Weight"])
    self.contents.draw_text(250, 242, 300, WLH,ES::CharacterInfo::From + $actors[$esactor.name]["From"])
   self.contents.draw_text(25, 178, 300, WLH,ES::CharacterInfo::ZodiacSing + $actors[$esactor.name]["Sing"])
   self.contents.draw_text(25, 210, 300, WLH,ES::CharacterInfo::Element + $actors[$esactor.name]["Element"])
   self.contents.draw_text(25, 242, 300, WLH,ES::CharacterInfo::Weapon + $actors[$esactor.name]["Weapon"])
   self.contents.font.color = Color.new($esr,$esg,$esb)
   self.contents.draw_text(10, 276, 300, WLH,ES::CharacterInfo::LittleInfo)
   self.contents.font.color = Color.new(255,255,255)
   self.contents.draw_text(25, 310, 500, WLH,$actors[$esactor.name]["LittleInfo"]["s1"])
   self.contents.draw_text(25, 332, 500, WLH,$actors[$esactor.name]["LittleInfo"]["s2"])
   self.contents.draw_text(25, 354, 500, WLH,$actors[$esactor.name]["LittleInfo"]["s3"])
  end
end

#------------------------------------------------------------------------------
#  This class performs the status screen processing.
#==============================================================================

class Scene_Status < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor_index : actor index
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @actor = $game_party.members[@actor_index]
    @status_window = Window_Status.new(@actor)
 
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Menu.new(3)
  end
  #--------------------------------------------------------------------------
  # * Start Changes ES Add On
  #--------------------------------------------------------------------------
  def actor_info
    $scene = Character_Info.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # * End Changes ES Add On
  #--------------------------------------------------------------------------
  #--------------------------------------------------------------------------
  # * Switch to Next Actor Screen
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Status.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # * Switch to Previous Actor Screen
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Status.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_menu_background
    @status_window.update
  #--------------------------------------------------------------------------
  # * Start Changes ES Add On
  #--------------------------------------------------------------------------
    if Input.trigger?(Input::C)
      Sound.play_cursor
      actor_info
    elsif Input.trigger?(Input::B)
  #--------------------------------------------------------------------------
  # * End Changes ES Add On
  #--------------------------------------------------------------------------
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
    super
  end
end

class Character_Info < Scene_Base
  #--------------------------------------------------------------------------
  # Основной процесс
  #--------------------------------------------------------------------------
  def initialize(actor)
    @actor = actor
    end
  def main
    @spriteset = ES_CharacterInfo.new
    #create_menu_background
    $espose = 1
    # Создание окон
    $esface = Face.new(@actor)
    @back = Back.new
    @small = SmallWindow.new
    @info =  Info.new
       #Прочее
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    # Отключение окон
    $esface.dispose
    @back.dispose
    @info.dispose
    @spriteset.dispose
    @small.dispose
    # dispose_menu_background
  end
  #--------------------------------------------------------------------------
  # Обновление кадров
  #--------------------------------------------------------------------------
  def next_actor
    if $esactor.index + 1 <= $game_party.members.size - 1
    $scene = Character_Info.new($esactor.index + 1) 
    Graphics.transition(80, "Graphics/System/BattleStart", 80)
    Graphics.freeze
  else
    $scene = Character_Info.new(0) 
    Graphics.transition(80, "Graphics/System/BattleStart", 80)
    Graphics.freeze
    end
  end
  def prev_actor
    if $esactor.index - 1 != -1
    $scene = Character_Info.new($esactor.index - 1) 
    Graphics.transition(80, "Graphics/System/BattleStart", 80)
    Graphics.freeze
  else
    $scene = Character_Info.new($game_party.members.size - 1) 
    Graphics.transition(80, "Graphics/System/BattleStart", 80)
    Graphics.freeze
    end
  end
  def update
    
  if  Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Status.new($esactor.index)
    elsif Input.trigger?(Input::R)
    Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
    @spriteset.update
    if $espose != 2
      $espose += 1
    else
      $espose = 0
      end
    # Обновление окон
    $esface.update
    @back.update
    @info.update
    @small.update
  end
end

Instructions

Just paste above main and below other scripts


Credit me(Enyo) if you use this script
PS: Sorry for language mistakes
 

Enyo

Member

shiroika":30bcuonc said:
How do I edit the Biography ?

Sorry, I am a newbie.
Just change the following part of a code according to the instruction
Code:
module ES
  module CharacterInfo
    # Цвет/Colour (default Green)
    #краÑ
 
LOL

the instructions are in russian! O.o WTF?!
Anyway, did you realise that some people here arr dutch, otheres are english ppl, I am a brasilian guy... if you could at least have done it in english could be a lot better for everybody.
 

Enyo

Member

lol, special for rmxp.org i made instructions in english
Code:
module ES
  module CharacterInfo
    # Colour (default Green)
    # RED
    $esr = 0
    #GREEN
    $esg = 255
    #BLUE
    $esb = 0
    #The name of categories of the information
    Name = "Name:"
    Class = "Job:"
    Age = "Age:"
    Sex = "Gender:"
    From = "From:"
    Long = "Long:"
    Weight = "Weight:"
    ZodiacSing = "Zodiac Sing:"
    Element = "Element:"
    Weapon = "Weapon:"
    LittleInfo = "Biography:"
    Press = "Press 'Enter' to more info"
    #For correct work of a script it is necessary for you to fill a following variable
    # to an example: the Name of the hero => {"Age" => " age of the hero ", etc.
    # you wish to add the hero that simply paste a comma after all info and up to }
    # I have noted this place in an example
    #         Hero's name         age          sex(gender)
    $actors = {"Ralph" => {"Age" => "16", "Sex" => "Male",
    #               from
    "From" => "EnterBrain city",
    #           height                 weight
    "Long" => "1.5 meters","Weight" => "70kg",
    #   zodiac sign                   element      weapon
    "Sing" => "Aquaticus", "Element" => "Air", "Weapon" => "Swords", 
    #   info         1st string          2nd string
    "LittleInfo" => {"s1" => "Example", "s2" => "Example",
    #        3rd string
    "s3" => "rpg-maker.info"}}, #comma
    #     Hero Name           Age          sex
    "Ulrika" => {"Age" => "20", "Sex" => "FeMale",
    #          from
    "From" => "EnterBrain city",
    #           long                  weight
    "Long" => "1.7 meters","Weight" => "60kg",
    #    zodiac sing            element             Weapon
    "Sing" => "Tauros", "Element" => "Earth", "Weapon" => "Swords", 
    #          info     1st string         2nd string
    "LittleInfo" => {"s1" => "Example", "s2" => "Example",
    #  ТретÑ
 
My computer cannot read the Script


-----------    self.contents.draw_text(250, 114, 200, WLH,ES::CharacterInfo::Sex + $actors[$esactor.name]["Sex"])---------------
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top