Class: Game_Map
Overview
Describe the Map processing
Constant Summary collapse
- PATH_FINDING_ENABLED =
If the Path Finding system is enabled
true- CenterPlayer =
If the player is always on the center of the screen
Configs.display.is_player_always_centered
- NUM_TILE_VIEW_Y =
Number of tiles the player can see in x
15- NUM_TILE_VIEW_X =
Number of tiles the player can see in y
20- FOLLOWER_ID_REGEXP =
Regular expression catching follower id
/\[follow=([0-9]+)\]/- TERRAIN_TAGS_TABLE =
Convert terrain tag to location symbol
{GameData::SystemTags::TGrass => :grass, GameData::SystemTags::TTallGrass => :grass, GameData::SystemTags::HeadButt => :grass, GameData::SystemTags::TSnow => :snow, GameData::SystemTags::TPond => :shallow_water, GameData::SystemTags::TWetSand => :shallow_water, GameData::SystemTags::SwampBorder => :shallow_water, GameData::SystemTags::DeepSwamp => :shallow_water, GameData::SystemTags::TSand => :desert, GameData::SystemTags::TCave => :cave, GameData::SystemTags::TMount => :cave, GameData::SystemTags::TIce => :icy_cave, GameData::SystemTags::TSea => :water, GameData::SystemTags::WaterFall => :water, GameData::SystemTags::RapidsL => :water, GameData::SystemTags::RapidsD => :water, GameData::SystemTags::RapidsU => :water, GameData::SystemTags::RapidsR => :water, GameData::SystemTags::Whirlpool => :water}
- IVAR_TO_REMOVE_FROM_SAVE_FILE =
List of variable to remove in order to keep the map data safe
%i[@map @tileset_name @autotile_names @panorama_name @panorama_hue @fog_name @fog_hue @fog_opacity @fog_blend_type @fog_zoom @fog_sx @fog_sy @battleback_name @passages @priorities @terrain_tags @events @common_events @system_tags]
Instance Attribute Summary collapse
-
#autotile_names
タイルセット ファイル名.
-
#battleback_name
フォグ SY.
-
#camera_animation ⇒ Yuki::Animation::Player
Animation of the camera movement.
-
#camera_moving
リフレッシュ要求フラグ.
-
#display_x
バトルバック ファイル名.
-
#display_y
表示 X 座標 * 128.
-
#event_erased ⇒ Boolean
If an event has been erased (helps removing it).
-
#events ⇒ Hash{Integer => Game_Event}
readonly
地形タグ テーブル.
-
#events_sym_to_id ⇒ Hash{Symbol => Integer}
Return the hash of symbol associate to event id.
-
#fog_blend_type
フォグ 不透明度.
-
#fog_hue
フォグ ファイル名.
-
#fog_name
パノラマ 色相.
-
#fog_opacity
フォグ 色相.
-
#fog_ox
readonly
Returns the value of attribute fog_ox.
-
#fog_oy
readonly
フォグ 原点 X 座標.
-
#fog_sx
フォグ 拡大率.
-
#fog_sy
フォグ SX.
-
#fog_tone
readonly
フォグ 原点 Y 座標.
-
#fog_zoom
フォグ ブレンド方法.
-
#maplinker_disabled ⇒ Boolean
readonly
フォグ 色調.
-
#need_refresh
表示 Y 座標 * 128.
-
#panorama_hue
パノラマ ファイル名.
-
#panorama_name
オートタイル ファイル名.
-
#passages
readonly
Is the camera currently moving.
-
#priorities
readonly
通行 テーブル.
-
#system_tags ⇒ Table
readonly
The system_tags linked to each tiles of the tileset.
-
#terrain_tags
readonly
プライオリティ テーブル.
-
#tileset_name
Returns the value of attribute tileset_name.
Instance Method Summary collapse
-
#autoplay
Auto play bgm and bgs of the map if defined.
-
#begin_save
Method that prevent non wanted data save of the Game_Map object.
-
#bush?(x, y) ⇒ Boolean
Tells if the tile is a bush tile.
-
#counter?(x, y) ⇒ Boolean
カウンター判定 (no idea, need GTranslate).
-
#create_camera_animation(duration, start_x, start_y, end_x, end_y, block_interpreter, distortion: :UNICITY_DISTORTION)
Create and start the camera movement animation.
-
#data ⇒ Table
Returns the tile matrix of the Map.
-
#encounter_list
deprecated
Deprecated.
Not used by the Core of PSDK because not precise enough to be used
-
#end_save
Method that end the save state of the Game_Map object.
-
#get_tile(x, y) ⇒ Integer
Retrieve the id of a specific tile.
-
#height ⇒ Integer
Returns the height of the map.
-
#initialize ⇒ Game_Map
constructor
Initialize the default Game_Map object.
-
#jump_passable?(x, y, d) ⇒ Boolean
Check if the player can jump a case with the acro bike.
-
#load_systemtags
Loads the SystemTags of the map.
-
#location_type(x, y) ⇒ Symbol
Return the current location type.
-
#map_id ⇒ Integer
Returns the ID of the Map.
-
#passable?(x, y, d, self_event = nil) ⇒ Boolean
Tells if the tile front/current tile is passsable or not.
-
#refresh
Refresh events and common events of the map.
-
#reset_camera_to_player(duration, blocking_interpreter = true, distortion: :UNICITY_DISTORTION)
Reset the camera to the player position over a given duration (in seconds).
-
#rmxp_encounter_steps ⇒ Integer
Returns the encounter steps from RMXP data.
-
#scroll_down(distance, is_priority = false)
Scrolls the map down.
-
#scroll_left(distance, is_priority = false)
Scrolls the map left.
-
#scroll_map_to_event(event_id, duration, block_interpreter = true, distortion: :UNICITY_DISTORTION)
Smoothly scrolls the map camera to a specific event over a given duration (in seconds).
-
#scroll_right(distance, is_priority = false)
Scrolls the map right.
-
#scroll_to_tiles(x, y, duration, block_interpreter = true, distortion: :UNICITY_DISTORTION)
Smoothly scrolls the map camera to specific tile coordinates over a given duration (in seconds).
-
#scroll_up(distance, is_priority = false)
Scrolls the map up.
-
#scrolling? ⇒ Boolean
is the map scrolling ?.
-
#setup(map_id)
setup the Game_Map object with the right Map data.
-
#start_fog_opacity_change(opacity, duration)
Starts a fog opacity change process.
-
#start_fog_tone_change(tone, duration)
Starts a fog tone change process.
-
#start_scroll(direction, distance, speed, x_priority = false, y_priority = false)
Starts a scroll processing.
-
#system_tag(x, y, skip_bridge: false) ⇒ Integer
Retrieve the ID of the SystemTag on a specific tile.
-
#system_tag_here?(x, y, tag) ⇒ Boolean
Check if a specific SystemTag is present on a specific tile.
-
#terrain_tag(x, y) ⇒ Integer?
Returns the tag of the tile.
-
#update
Update the Map processing.
-
#valid?(x, y) ⇒ Boolean
Tells if the x,y coordinate is valid or not (inside of bounds).
-
#width ⇒ Integer
Returns the width of the map.
Constructor Details
#initialize ⇒ Game_Map
Initialize the default Game_Map object
3319 3320 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3319 def initialize end |
Instance Attribute Details
#autotile_names
タイルセット ファイル名
3269 3270 3271 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3269 def autotile_names @autotile_names end |
#battleback_name
フォグ SY
3289 3290 3291 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3289 def battleback_name @battleback_name end |
#camera_animation ⇒ Yuki::Animation::Player
Animation of the camera movement
3538 3539 3540 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3538 def camera_animation @camera_animation end |
#camera_moving
リフレッシュ要求フラグ
3297 3298 3299 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3297 def camera_moving @camera_moving end |
#display_x
バトルバック ファイル名
3291 3292 3293 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3291 def display_x @display_x end |
#display_y
表示 X 座標 * 128
3293 3294 3295 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3293 def display_y @display_y end |
#event_erased ⇒ Boolean
If an event has been erased (helps removing it)
3458 3459 3460 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3458 def event_erased @event_erased end |
#events ⇒ Hash{Integer => Game_Event} (readonly)
地形タグ テーブル
3306 3307 3308 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3306 def events @events end |
#events_sym_to_id ⇒ Hash{Symbol => Integer}
Return the hash of symbol associate to event id
3309 3310 3311 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3309 def events_sym_to_id @events_sym_to_id end |
#fog_blend_type
フォグ 不透明度
3281 3282 3283 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3281 def fog_blend_type @fog_blend_type end |
#fog_hue
フォグ ファイル名
3277 3278 3279 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3277 def fog_hue @fog_hue end |
#fog_name
パノラマ 色相
3275 3276 3277 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3275 def fog_name @fog_name end |
#fog_opacity
フォグ 色相
3279 3280 3281 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3279 def fog_opacity @fog_opacity end |
#fog_ox (readonly)
Returns the value of attribute fog_ox.
3310 3311 3312 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3310 def fog_ox @fog_ox end |
#fog_oy (readonly)
フォグ 原点 X 座標
3312 3313 3314 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3312 def fog_oy @fog_oy end |
#fog_sx
フォグ 拡大率
3285 3286 3287 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3285 def fog_sx @fog_sx end |
#fog_sy
フォグ SX
3287 3288 3289 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3287 def fog_sy @fog_sy end |
#fog_tone (readonly)
フォグ 原点 Y 座標
3314 3315 3316 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3314 def fog_tone @fog_tone end |
#fog_zoom
フォグ ブレンド方法
3283 3284 3285 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3283 def fog_zoom @fog_zoom end |
#maplinker_disabled ⇒ Boolean (readonly)
フォグ 色調
3317 3318 3319 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3317 def maplinker_disabled @maplinker_disabled end |
#need_refresh
表示 Y 座標 * 128
3295 3296 3297 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3295 def need_refresh @need_refresh end |
#panorama_hue
パノラマ ファイル名
3273 3274 3275 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3273 def panorama_hue @panorama_hue end |
#panorama_name
オートタイル ファイル名
3271 3272 3273 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3271 def panorama_name @panorama_name end |
#passages (readonly)
Is the camera currently moving
3299 3300 3301 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3299 def passages @passages end |
#priorities (readonly)
通行 テーブル
3301 3302 3303 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3301 def priorities @priorities end |
#system_tags ⇒ Table (readonly)
The system_tags linked to each tiles of the tileset
3461 3462 3463 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3461 def @system_tags end |
#terrain_tags (readonly)
プライオリティ テーブル
3303 3304 3305 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3303 def @terrain_tags end |
#tileset_name
Returns the value of attribute tileset_name.
3267 3268 3269 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3267 def tileset_name @tileset_name end |
Instance Method Details
#autoplay
Auto play bgm and bgs of the map if defined
3350 3351 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3350 def autoplay end |
#begin_save
Method that prevent non wanted data save of the Game_Map object
3507 3508 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3507 def begin_save end |
#bush?(x, y) ⇒ Boolean
Tells if the tile is a bush tile
3393 3394 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3393 def bush?(x, y) end |
#counter?(x, y) ⇒ Boolean
カウンター判定 (no idea, need GTranslate)
3399 3400 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3399 def counter?(x, y) end |
#create_camera_animation(duration, start_x, start_y, end_x, end_y, block_interpreter, distortion: :UNICITY_DISTORTION)
Create and start the camera movement animation
3562 3563 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3562 def create_camera_animation(duration, start_x, start_y, end_x, end_y, block_interpreter, distortion: :UNICITY_DISTORTION) end |
#data ⇒ Table
Returns the tile matrix of the Map
3347 3348 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3347 def data end |
#encounter_list
Not used by the Core of PSDK because not precise enough to be used
Returns the encounter list
3339 3340 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3339 def encounter_list end |
#end_save
Method that end the save state of the Game_Map object
3511 3512 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3511 def end_save end |
#get_tile(x, y) ⇒ Integer
Retrieve the id of a specific tile
3486 3487 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3486 def get_tile(x, y) end |
#height ⇒ Integer
Returns the height of the map
3335 3336 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3335 def height end |
#jump_passable?(x, y, d) ⇒ Boolean
Check if the player can jump a case with the acro bike
3494 3495 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3494 def jump_passable?(x, y, d) end |
#load_systemtags
Loads the SystemTags of the map
3479 3480 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3479 def end |
#location_type(x, y) ⇒ Symbol
Return the current location type
3498 3499 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3498 def location_type(x, y) end |
#map_id ⇒ Integer
Returns the ID of the Map
3327 3328 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3327 def map_id end |
#passable?(x, y, d, self_event = nil) ⇒ Boolean
Tells if the tile front/current tile is passsable or not
3387 3388 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3387 def passable?(x, y, d, self_event = nil) end |
#refresh
Refresh events and common events of the map
3353 3354 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3353 def refresh end |
#reset_camera_to_player(duration, blocking_interpreter = true, distortion: :UNICITY_DISTORTION)
Reset the camera to the player position over a given duration (in seconds)
3568 3569 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3568 def reset_camera_to_player(duration, blocking_interpreter = true, distortion: :UNICITY_DISTORTION) end |
#rmxp_encounter_steps ⇒ Integer
Returns the encounter steps from RMXP data
3343 3344 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3343 def rmxp_encounter_steps end |
#scroll_down(distance, is_priority = false)
Scrolls the map down
3358 3359 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3358 def scroll_down(distance, is_priority = false) end |
#scroll_left(distance, is_priority = false)
Scrolls the map left
3363 3364 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3363 def scroll_left(distance, is_priority = false) end |
#scroll_map_to_event(event_id, duration, block_interpreter = true, distortion: :UNICITY_DISTORTION)
Smoothly scrolls the map camera to a specific event over a given duration (in seconds)
3544 3545 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3544 def scroll_map_to_event(event_id, duration, block_interpreter = true, distortion: :UNICITY_DISTORTION) end |
#scroll_right(distance, is_priority = false)
Scrolls the map right
3368 3369 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3368 def scroll_right(distance, is_priority = false) end |
#scroll_to_tiles(x, y, duration, block_interpreter = true, distortion: :UNICITY_DISTORTION)
Smoothly scrolls the map camera to specific tile coordinates over a given duration (in seconds)
3552 3553 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3552 def scroll_to_tiles(x, y, duration, block_interpreter = true, distortion: :UNICITY_DISTORTION) end |
#scroll_up(distance, is_priority = false)
Scrolls the map up
3373 3374 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3373 def scroll_up(distance, is_priority = false) end |
#scrolling? ⇒ Boolean
is the map scrolling ?
3417 3418 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3417 def scrolling? end |
#setup(map_id)
setup the Game_Map object with the right Map data
3323 3324 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3323 def setup(map_id) end |
#start_fog_opacity_change(opacity, duration)
Starts a fog opacity change process
3427 3428 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3427 def start_fog_opacity_change(opacity, duration) end |
#start_fog_tone_change(tone, duration)
Starts a fog tone change process
3422 3423 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3422 def start_fog_tone_change(tone, duration) end |
#start_scroll(direction, distance, speed, x_priority = false, y_priority = false)
Starts a scroll processing
3413 3414 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3413 def start_scroll(direction, distance, speed, x_priority = false, y_priority = false) end |
#system_tag(x, y, skip_bridge: false) ⇒ Integer
Retrieve the ID of the SystemTag on a specific tile
3467 3468 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3467 def system_tag(x, y, skip_bridge: false) end |
#system_tag_here?(x, y, tag) ⇒ Boolean
Check if a specific SystemTag is present on a specific tile
3475 3476 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3475 def system_tag_here?(x, y, tag) end |
#terrain_tag(x, y) ⇒ Integer?
Returns the tag of the tile
3405 3406 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3405 def terrain_tag(x, y) end |
#update
Update the Map processing
3430 3431 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3430 def update end |
#valid?(x, y) ⇒ Boolean
Tells if the x,y coordinate is valid or not (inside of bounds)
3379 3380 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3379 def valid?(x, y) end |
#width ⇒ Integer
Returns the width of the map
3331 3332 |
# File 'docs/4_Systems_003_Map_Engine.rb', line 3331 def width end |