📜
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
  • tileset_id
  • width
  • height
  • autoplay_bgm
  • bgm
  • autoplay_bgs
  • bgs
  • encounter_list
  • encounter_step
  • data
  • events
  • Definition
  1. Game Library
  2. RPGXP Data Structures

RPG::Map

Data class for maps.

PreviousRPGXP Data StructuresNextRPG::MapInfo

Last updated 2 years ago

Superclass

Attributes

tileset_id

Tileset ID to be used in the map.

width

The map width.

height

The map height.

autoplay_bgm

Truth-value of whether BGM autoswitching is enabled.

bgm

autoplay_bgs

Truth-value of whether BGS autoswitching is enabled.

bgs

encounter_list

Encounter list. A troop ID array.

encounter_step

Number of steps between encounters.

data

events

Definition

module RPG
  class Map
    def initialize(width, height)
      @tileset_id = 1
      @width = width
      @height = height
      @autoplay_bgm = false
      @bgm = RPG::AudioFile.new
      @autoplay_bgs = false
      @bgs = RPG::AudioFile.new("", 80)
      @encounter_list = []
      @encounter_step = 30
      @data = Table.new(width, height, 3)
      @events = {}
    end
    attr_accessor :tileset_id
    attr_accessor :width
    attr_accessor :height
    attr_accessor :autoplay_bgm
    attr_accessor :bgm
    attr_accessor :autoplay_bgs
    attr_accessor :bgs
    attr_accessor :encounter_list
    attr_accessor :encounter_step
    attr_accessor :data
    attr_accessor :events
  end
end

If BGM autoswitching is enabled, the name of that BGM ().

If BGS autoswitching is enabled, the name of that BGS ().

The map data. A 3-dimensional tile ID array ().

Map events. A hash that represents instances as values, using event IDs as the keys.

Object
RPG::AudioFile
RPG::AudioFile
Table
RPG::Event