RPG::Map

The data class for maps.

Superclass

Attributes

display_name

The map's display name.

tileset_id

The map's tile set.

width

The map's width.

height

The map's height.

scroll_type

The scroll type (0: No Loop, 1: Vertical Loop, 2: Horizontal Loop, 3: Both Loop).

specify_battleback

The truth value indicating whether the battle background specification is enabled.

battleback1_name

The file name of the floor graphic if the battle background specification is enabled.

battleback2_name

The file name of the wall graphic if the battle background specification is enabled.

autoplay_bgm

The truth value indicating whether BGM autoswitching is enabled.

bgm

The name of that BGM (RPG::BGM) if BGM autoswitching is enabled.

autoplay_bgs

The truth value indicating whether BGS autoswitching is enabled.

bgs

The name of that BGS (RPG::BGS) if BGS autoswitching is enabled.

disable_dashing

The truth value of the [Disable Dashing] option.

encounter_list

An encounter list. A RPG::Map::Encounter ID array.

encounter_step

The average number of steps between encounters.

parallax_name

The file name of the parallax background's graphic.

parallax_loop_x

The truth value of the [Loop Horizontal] option for the parallax background.

parallax_loop_y

The truth value of the [Loop Vertical] option for the parallax background.

parallax_sx

The automatic x-axis scrolling speed for the parallax background.

parallax_sy

The automatic y-axis scrolling speed for the parallax background.

parallax_show

The truth value of the [Show in the Editor] option for the parallax background.

note

The text of the note.

data

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

events

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

Inner Class

Definition

class RPG::Map
  def initialize(width, height)
    @display_name = ''
    @tileset_id = 1
    @width = width
    @height = height
    @scroll_type = 0
    @specify_battleback = false
    @battleback_floor_name = ''
    @battleback_wall_name = ''
    @autoplay_bgm = false
    @bgm = RPG::BGM.new
    @autoplay_bgs = false
    @bgs = RPG::BGS.new('', 80)
    @disable_dashing = false
    @encounter_list = []
    @encounter_step = 30
    @parallax_name = ''
    @parallax_loop_x = false
    @parallax_loop_y = false
    @parallax_sx = 0
    @parallax_sy = 0
    @parallax_show = false
    @note = ''
    @data = Table.new(width, height, 4)
    @events = {}
  end
  attr_accessor :display_name
  attr_accessor :tileset_id
  attr_accessor :width
  attr_accessor :height
  attr_accessor :scroll_type
  attr_accessor :specify_battleback
  attr_accessor :battleback1_name
  attr_accessor :battleback2_name
  attr_accessor :autoplay_bgm
  attr_accessor :bgm
  attr_accessor :autoplay_bgs
  attr_accessor :bgs
  attr_accessor :disable_dashing
  attr_accessor :encounter_list
  attr_accessor :encounter_step
  attr_accessor :parallax_name
  attr_accessor :parallax_loop_x
  attr_accessor :parallax_loop_y
  attr_accessor :parallax_sx
  attr_accessor :parallax_sy
  attr_accessor :parallax_show
  attr_accessor :note
  attr_accessor :data
  attr_accessor :events
end