📜
RGSS Reference Manual
  • RGSS Reference Manual
  • RGSS Specifications
  • Ruby Syntax
    • Syntax and Expressions
    • Variables and Constants
    • Literals
    • Operator Expressions
    • Control Structures
    • Method Calls
    • Class and Method Definitions
  • Standard Library
    • Built-in Functions
    • Built-in Variables
    • Built-in Classes
      • Object
        • Array
        • Exception
        • FalseClass
        • Hash
        • IO
          • File
        • MatchData
        • Module
          • Class
        • NilClass
        • Numeric
          • Integer
            • Bignum
            • Fixnum
          • Float
        • Range
        • Proc
        • Regexp
        • String
        • Symbol
        • Time
        • TrueClass
    • Built-in Modules
      • Comparable
      • Enumerable
      • Errno
      • FileTest
      • GC
      • Kernel
      • Marshal
      • Math
    • Built-in Exception Classes
  • Game Library
    • RGSS Built-in Functions
    • RGSS Built-in Classes
      • Bitmap
      • Color
      • Font
      • Plane
      • Rect
      • Sprite
      • Table
      • Tilemap
      • Tone
      • Viewport
      • Window
      • RGSSError
      • RPG::Sprite
      • RPG::Weather
    • RGSS Built-in Modules
      • Audio
      • Graphics
      • Input
      • RPG
      • RPG::Cache
    • RPGXP Data Structures
      • RPG::Map
      • RPG::MapInfo
      • RPG::Event
      • RPG::Event::Page
      • RPG::Event::Page::Condition
      • RPG::Event::Page::Graphic
      • RPG::EventCommand
      • RPG::MoveRoute
      • RPG::MoveCommand
      • RPG::Actor
      • RPG::Class
      • RPG::Class::Learning
      • RPG::Skill
      • RPG::Item
      • RPG::Weapon
      • RPG::Armor
      • RPG::Enemy
      • RPG::Enemy::Action
      • RPG::Troop
      • RPG::Troop::Member
      • RPG::Troop::Page
      • RPG::Troop::Page::Condition
      • RPG::State
      • RPG::Animation
      • RPG::Animation::Frame
      • RPG::Animation::Timing
      • RPG::Tileset
      • RPG::CommonEvent
      • RPG::System
      • RPG::System::Words
      • RPG::System::TestBattler
      • RPG::AudioFile
  • Appendix
    • Regular Expression
    • sprintf Format
Powered by GitBook
On this page
  • Superclass
  • Attributes
  • id
  • name
  • class_id
  • initial_level
  • final_level
  • exp_basis
  • exp_inflation
  • character_name
  • character_hue
  • battler_name
  • battler_hue
  • parameters
  • weapon_id
  • armor1_id
  • armor2_id
  • armor3_id
  • armor4_id
  • weapon_fix
  • armor1_fix
  • armor2_fix
  • armor3_fix
  • armor4_fix
  • Definition
  1. Game Library
  2. RPGXP Data Structures

RPG::Actor

Data class for actors.

PreviousRPG::MoveCommandNextRPG::Class

Last updated 1 year ago

Superclass

Attributes

id

The actor ID.

name

The actor name.

class_id

The actor class ID.

initial_level

The actor's initial level.

final_level

The actor's final level.

exp_basis

The value on which the experience curve is based (10..50).

exp_inflation

The amount of experience curve inflation (10..50).

character_name

The actor's character graphic file name.

character_hue

The adjustment value for the character graphic's hue (0..360).

battler_name

The actor's battler graphic file name.

battler_hue

The adjustment value for the battler graphic's hue (0..360).

parameters

Generally takes the form parameters[kind, level].

kind indicates the parameter type (0: max HP, 1: max SP, 2: strength, 3: dexterity, 4: agility, 5: intelligence).

weapon_id

ID of the actor's initially equipped weapon.

armor1_id

ID of the actor's initially equipped shield.

armor2_id

ID of the actor's initially equipped helmet.

armor3_id

ID of the actor's initially equipped body armor.

armor4_id

ID of the actor's initially equipped accessory.

weapon_fix

Flag making the actor's weapon unremovable.

armor1_fix

Flag making the actor's shield unremovable.

armor2_fix

Flag making the actor's helmet unremovable.

armor3_fix

Flag making the actor's body armor unremovable.

armor4_fix

Flag making the actor's accessory unremovable.

Definition

module RPG
  class Actor
    def initialize
      @id = 0
      @name = ""
      @class_id = 1
      @initial_level = 1
      @final_level = 99
      @exp_basis = 30
      @exp_inflation = 30
      @character_name = ""
      @character_hue = 0
      @battler_name = ""
      @battler_hue = 0
      @parameters = Table.new(6,100)
      for i in 1..99
        @parameters[0,i] = 500+i*50
        @parameters[1,i] = 500+i*50
        @parameters[2,i] = 50+i*5
        @parameters[3,i] = 50+i*5
        @parameters[4,i] = 50+i*5
        @parameters[5,i] = 50+i*5
      end
      @weapon_id = 0
      @armor1_id = 0
      @armor2_id = 0
      @armor3_id = 0
      @armor4_id = 0
      @weapon_fix = false
      @armor1_fix = false
      @armor2_fix = false
      @armor3_fix = false
      @armor4_fix = false
    end
    attr_accessor :id
    attr_accessor :name
    attr_accessor :class_id
    attr_accessor :initial_level
    attr_accessor :final_level
    attr_accessor :exp_basis
    attr_accessor :exp_inflation
    attr_accessor :character_name
    attr_accessor :character_hue
    attr_accessor :battler_name
    attr_accessor :battler_hue
    attr_accessor :parameters
    attr_accessor :weapon_id
    attr_accessor :armor1_id
    attr_accessor :armor2_id
    attr_accessor :armor3_id
    attr_accessor :armor4_id
    attr_accessor :weapon_fix
    attr_accessor :armor1_fix
    attr_accessor :armor2_fix
    attr_accessor :armor3_fix
    attr_accessor :armor4_fix
  end
end

2-dimensional array containing base parameters for each level ().

Object
Table