Class: GameData::Zone

Inherits:
Base show all
Extended by:
DataSource
Defined in:
scripts/00800 GameData/00100 Serializable/00900 Zone.rb

Overview

Map Zone Data structure

Author:

  • Nuri Yuri

Direct Known Subclasses

Map

Constant Summary

Constants included from DataSource

DataSource::SOURCES

Instance Attribute Summary collapse

Attributes inherited from Base

#db_symbol, #id

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DataSource

[], all, convert_to_symbols, db_symbol, get_id, id_valid?, load

Constructor Details

#initialize(map_id, panel_id = 0, description = nil, warp_x = nil, warp_y = nil, sub_map = nil, pos_x = nil, pos_y = nil, fly_allowed = true, warp_dissalowed = false, forced_weather = nil, worldmap_id = 0) ⇒ Zone

Create a new GameData::Map object

Parameters:

  • map_id (Integer)

    future value of the attribute

  • panel_id (Integer) (defaults to: 0)

    future value of the attribute

  • warp_x (Integer, nil) (defaults to: nil)

    future value of the attribute

  • warp_y (Integer, nil) (defaults to: nil)

    future value of the attribute

  • pos_x (Integer, nil) (defaults to: nil)

    future value of the attribute

  • pos_y (Integer, nil) (defaults to: nil)

    future value of the attribute

  • sub_map (Array, nil) (defaults to: nil)

    future value of the attribute

  • fly_allowed (Boolean) (defaults to: true)

    future value of the attribute

  • warp_dissalowed (Boolean) (defaults to: false)

    future value of the attribute

  • forced_weather (Integer) (defaults to: nil)

    future value of the attribute

  • description (String, nil) (defaults to: nil)

    future value of the attribute

  • worldmap_id (Integer, 0) (defaults to: 0)

    future value of the attribute

Instance Attribute Details

#descriptionString?

Unused

Returns:

#fly_allowedBoolean

If the player can use fly in this zone (otherwise he can use Dig)

Returns:

  • (Boolean)

#forced_weatherInteger?

ID of the weather in the zone

Returns:

#groupsArray?

See PFM::Wild_Battle#load_groups

Returns:

  • (Array, nil)

#map_idInteger+

ID or list of MAP ID the zone is related to. (RMXP MAP ID !)

Returns:

#panel_idInteger

Number at the end of the Panel file (Graphics/Windowskins/Panel_#panel_id)

Returns:

  • (Integer)

    if 0 no pannel is shown

#pos_xInteger?

X position of the player on the World Map

Returns:

#pos_yInteger?

Y position of the player on the World Map

Returns:

#sub_mapArray?

Unused

Returns:

  • (Array, nil)

#warp_dissalowedBoolean

If its not allowed to use fly, dig or teleport in this zone

Returns:

  • (Boolean)

#warp_xInteger?

X position of the Warp when using Dig, Teleport or Fly

Returns:

  • (Integer, nil)

    nil if no warp

#warp_yInteger?

Y position of the Warp when using Dig, Teleport or Fly

Returns:

  • (Integer, nil)

    nil if no warp

#worldmap_idInteger

ID of the worldmap to display when in this zone

Returns:

Class Method Details

.data_filename

Name of the file containing the data

.get(id) ⇒ Zone

Return a zone according to its id

Parameters:

Returns:

.load_data(filename)

Load the data properly

.origina_load_data

Instance Method Details

#map_included?(map_id) ⇒ Boolean

Indicate if a map (by its id) is included in this zone

Returns:

  • (Boolean)

#map_nameString

Return the real name of the map (multi-lang compatible)

Returns:

#warp_disallowed

Correct name of the attribute