Class: Game_Character

Inherits:
Object show all
Includes:
EvalKiller, GameData::SystemTags
Defined in:
docs/4_Systems_003_Map_Engine.rb

Overview

Class that describe and manipulate a Character (Player/Events)

Direct Known Subclasses

Game_Event, Game_Player

Constant Summary collapse

SurfTag =

SystemTags that trigger Surfing

[TPond, TSea, RapidsL, RapidsR, RapidsU, RapidsD]
SurfLTag =

SystemTags that does not trigger leaving water

SurfTag + [BridgeUD, BridgeRL, RapidsL, RapidsR, RapidsU, RapidsD, AcroBikeRL, AcroBikeUD, WaterFall, JumpD, JumpL, JumpR, JumpU, TUnderWater, Whirlpool]
SlideTags =

SystemTags that triggers "sliding" state

[TIce, RapidsL, RapidsR, RapidsU, RapidsD, RocketL, RocketU, RocketD, RocketR, RocketRL, RocketRU, RocketRD, RocketRR]
SHADOW_DISABLED_UPDATE_VALUES =

Values that allows the shadow_disabled update in set_appearance

[false, true, nil]
StairsTag =

Array of SystemTag that define stairs

[StairsL, StairsD, StairsU, StairsR]
PARTICLES_METHODS =

Constant defining all the particle method to call

{TGrass => :particle_push_grass, TTallGrass => :particle_push_tall_grass, TSand => :particle_push_sand, TSnow => :particle_push_snow, TPond => :particle_push_pond, TWetSand => :particle_push_wetsand, Puddle => :particle_push_puddle, WaterFall => :particle_push_waterfall, Whirlpool => :particle_push_whirlpool}
SAND_PARTICLE_NAME =

Constant telling the sand particle name to push (according to the direction)

{2 => :sand_d, 4 => :sand_l, 6 => :sand_r, 8 => :sand_u}
SNOW_PARTICLE_NAME =

Constant telling the snow particle name to push (according to the direction)

{2 => :snow_d, 4 => :snow_l, 6 => :snow_r, 8 => :snow_u}
WHIRLPOOL_PARTICLE_NAME =

Constant telling the Whirlpool particle name to push (according to the direction)

{2 => :whirlpool_d, 4 => :whirlpool_l, 6 => :whirlpool_r, 8 => :whirlpool_u}
EMPTY_MOVE_ROUTE =

Move route that is empty and serve as a template for all the generate move route (by Path Finding)

RPG::MoveRoute.new

Constants included from GameData::SystemTags

GameData::SystemTags::AcroBike, GameData::SystemTags::AcroBikeRL, GameData::SystemTags::AcroBikeUD, GameData::SystemTags::BridgeRL, GameData::SystemTags::BridgeUD, GameData::SystemTags::CrackedSoil, GameData::SystemTags::DeepSwamp, GameData::SystemTags::Empty, GameData::SystemTags::HeadButt, GameData::SystemTags::Hole, GameData::SystemTags::JumpD, GameData::SystemTags::JumpL, GameData::SystemTags::JumpR, GameData::SystemTags::JumpU, GameData::SystemTags::MachBike, GameData::SystemTags::Puddle, GameData::SystemTags::RClimb, GameData::SystemTags::RapidsD, GameData::SystemTags::RapidsL, GameData::SystemTags::RapidsR, GameData::SystemTags::RapidsU, GameData::SystemTags::Road, GameData::SystemTags::RocketD, GameData::SystemTags::RocketL, GameData::SystemTags::RocketR, GameData::SystemTags::RocketRD, GameData::SystemTags::RocketRL, GameData::SystemTags::RocketRR, GameData::SystemTags::RocketRU, GameData::SystemTags::RocketU, GameData::SystemTags::SlopesL, GameData::SystemTags::SlopesR, GameData::SystemTags::StairsD, GameData::SystemTags::StairsL, GameData::SystemTags::StairsR, GameData::SystemTags::StairsU, GameData::SystemTags::StopSlide, GameData::SystemTags::SwampBorder, GameData::SystemTags::TCave, GameData::SystemTags::TGrass, GameData::SystemTags::TIce, GameData::SystemTags::TMount, GameData::SystemTags::TPond, GameData::SystemTags::TSand, GameData::SystemTags::TSea, GameData::SystemTags::TSnow, GameData::SystemTags::TTallGrass, GameData::SystemTags::TUnderWater, GameData::SystemTags::TWetSand, GameData::SystemTags::WaterFall, GameData::SystemTags::Whirlpool, GameData::SystemTags::ZTag

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GameData::SystemTags

gen, system_tag_db_symbol

Constructor Details

#initialize ⇒ Game_Character

Default initializer



2047
2048
# File 'docs/4_Systems_003_Map_Engine.rb', line 2047

def initialize
end

Instance Attribute Details

#__bridge

The bridge state



2703
2704
2705
# File 'docs/4_Systems_003_Map_Engine.rb', line 2703

def __bridge
  @__bridge
end

#animation_id ⇒ Integer

Returns ID of the animation to play on the character.

Returns:

  • (Integer) —

    ID of the animation to play on the character



2031
2032
2033
# File 'docs/4_Systems_003_Map_Engine.rb', line 2031

def animation_id
  @animation_id
end

#blend_type ⇒ Integer (readonly)

Returns blending of the event (0 is the only one that actually works).

Returns:

  • (Integer) —

    blending of the event (0 is the only one that actually works)



2386
2387
2388
# File 'docs/4_Systems_003_Map_Engine.rb', line 2386

def blend_type
  @blend_type
end

#can_make_footprint ⇒ Boolean

Returns tell if the character can make footprint on the ground or not.

Returns:

  • (Boolean) —

    tell if the character can make footprint on the ground or not



2460
2461
2462
# File 'docs/4_Systems_003_Map_Engine.rb', line 2460

def can_make_footprint
  @can_make_footprint
end

#character_hue ⇒ Intger

Returns must be 0.

Returns:

  • (Intger) —

    must be 0



2382
2383
2384
# File 'docs/4_Systems_003_Map_Engine.rb', line 2382

def character_hue
  @character_hue
end

#character_name ⇒ String

Returns name of the character graphic used to display the event.

Returns:

  • (String) —

    name of the character graphic used to display the event



2380
2381
2382
# File 'docs/4_Systems_003_Map_Engine.rb', line 2380

def character_name
  @character_name
end

#charset_animation ⇒ Hash?

Returns hash if a charset animation is setup, else nil.

Returns:

  • (Hash, nil) —

    hash if a charset animation is setup, else nil



2396
2397
2398
# File 'docs/4_Systems_003_Map_Engine.rb', line 2396

def charset_animation
  @charset_animation
end

#direction ⇒ Integer

Returns direction where the event is looking (2 = down, 6 = right, 4 = left, 8 = up).

Returns:

  • (Integer) —

    direction where the event is looking (2 = down, 6 = right, 4 = left, 8 = up)



2025
2026
2027
# File 'docs/4_Systems_003_Map_Engine.rb', line 2025

def direction
  @direction
end

#direction_fix ⇒ Boolean (readonly)

If the direction is fixed

Returns:

  • (Boolean)


2042
2043
2044
# File 'docs/4_Systems_003_Map_Engine.rb', line 2042

def direction_fix
  @direction_fix
end

#follower ⇒ Game_Character? (readonly)

Returns the follower.

Returns:



2035
2036
2037
# File 'docs/4_Systems_003_Map_Engine.rb', line 2035

def follower
  @follower
end

#id ⇒ Integer (readonly)

Id of the event in the map

Returns:

  • (Integer)


2013
2014
2015
# File 'docs/4_Systems_003_Map_Engine.rb', line 2013

def id
  @id
end

#in_swamp ⇒ Integer, false

Returns if the character is in swamp tile and the power of the swamp tile.

Returns:

  • (Integer, false) —

    if the character is in swamp tile and the power of the swamp tile



2456
2457
2458
# File 'docs/4_Systems_003_Map_Engine.rb', line 2456

def in_swamp
  @in_swamp
end

#is_pokemon ⇒ Boolean

Returns if the character is a Pokemon (affect the step anime).

Returns:

  • (Boolean) —

    if the character is a Pokemon (affect the step anime)



2458
2459
2460
# File 'docs/4_Systems_003_Map_Engine.rb', line 2458

def is_pokemon
  @is_pokemon
end

#move_route (readonly)

The current move route



2699
2700
2701
# File 'docs/4_Systems_003_Map_Engine.rb', line 2699

def move_route
  @move_route
end

#move_route_forcing ⇒ Boolean (readonly)

Returns if the character is forced to move using a specific route.

Returns:

  • (Boolean) —

    if the character is forced to move using a specific route



2027
2028
2029
# File 'docs/4_Systems_003_Map_Engine.rb', line 2027

def move_route_forcing
  @move_route_forcing
end

#move_route_index (readonly)

The current move route index



2701
2702
2703
# File 'docs/4_Systems_003_Map_Engine.rb', line 2701

def move_route_index
  @move_route_index
end

#move_speed ⇒ Integer

Dynamic move_speed value of the Game_Character, return a different value than @move_speed

Returns:

  • (Integer) —

    the dynamic move_speed

Author:

  • Nuri Yuri



2033
2034
2035
# File 'docs/4_Systems_003_Map_Engine.rb', line 2033

def move_speed
  @move_speed
end

#no_slide ⇒ Boolean

Returns if the character is unaffected by sliding tags.

Returns:

  • (Boolean) —

    if the character is unaffected by sliding tags



2037
2038
2039
# File 'docs/4_Systems_003_Map_Engine.rb', line 2037

def no_slide
  @no_slide
end

#offset_screen_x ⇒ Integer?

Returns offset x of the character on the screen.

Returns:

  • (Integer, nil) —

    offset x of the character on the screen



2402
2403
2404
# File 'docs/4_Systems_003_Map_Engine.rb', line 2402

def offset_screen_x
  @offset_screen_x
end

#offset_screen_y ⇒ Integer?

Returns offset y of the character on the screen.

Returns:

  • (Integer, nil) —

    offset y of the character on the screen



2398
2399
2400
# File 'docs/4_Systems_003_Map_Engine.rb', line 2398

def offset_screen_y
  @offset_screen_y
end

#offset_shadow_screen_x ⇒ Integer?

Returns offset x of the character on the screen.

Returns:

  • (Integer, nil) —

    offset x of the character on the screen



2404
2405
2406
# File 'docs/4_Systems_003_Map_Engine.rb', line 2404

def offset_shadow_screen_x
  @offset_shadow_screen_x
end

#offset_shadow_screen_y ⇒ Integer?

Returns offset y of the character on the screen.

Returns:

  • (Integer, nil) —

    offset y of the character on the screen



2400
2401
2402
# File 'docs/4_Systems_003_Map_Engine.rb', line 2400

def offset_shadow_screen_y
  @offset_shadow_screen_y
end

#opacity ⇒ Integer

Returns opacity of the event when it's shown.

Returns:

  • (Integer) —

    opacity of the event when it's shown



2384
2385
2386
# File 'docs/4_Systems_003_Map_Engine.rb', line 2384

def opacity
  @opacity
end

#particles_disabled ⇒ Boolean

Returns if the particles are disabled for the Character.

Returns:

  • (Boolean) —

    if the particles are disabled for the Character



2648
2649
2650
# File 'docs/4_Systems_003_Map_Engine.rb', line 2648

def particles_disabled
  @particles_disabled
end

#path ⇒ Array<RPG::MoveCommand>, ...

The current path

Returns:



2710
2711
2712
# File 'docs/4_Systems_003_Map_Engine.rb', line 2710

def path
  @path
end

#pattern ⇒ Integer (readonly)

Returns current pattern of the character graphic shown.

Returns:

  • (Integer) —

    current pattern of the character graphic shown



2388
2389
2390
# File 'docs/4_Systems_003_Map_Engine.rb', line 2388

def pattern
  @pattern
end

#real_x ⇒ Integer (readonly)

Returns "real" X position of the event, usually x * 128.

Returns:

  • (Integer) —

    "real" X position of the event, usually x * 128



2021
2022
2023
# File 'docs/4_Systems_003_Map_Engine.rb', line 2021

def real_x
  @real_x
end

#real_y ⇒ Integer (readonly)

Returns "real" Y position of the event, usually y * 128.

Returns:

  • (Integer) —

    "real" Y position of the event, usually y * 128



2023
2024
2025
# File 'docs/4_Systems_003_Map_Engine.rb', line 2023

def real_y
  @real_y
end

#reflection_enabled ⇒ Boolean

If the character has reflection

Returns:

  • (Boolean)


2045
2046
2047
# File 'docs/4_Systems_003_Map_Engine.rb', line 2045

def reflection_enabled
  @reflection_enabled
end

#shadow_disabled ⇒ Boolean

Returns if the shadow should be shown or not.

Returns:

  • (Boolean) —

    if the shadow should be shown or not



2394
2395
2396
# File 'docs/4_Systems_003_Map_Engine.rb', line 2394

def shadow_disabled
  @shadow_disabled
end

#sliding

The current sliding state



2039
2040
2041
# File 'docs/4_Systems_003_Map_Engine.rb', line 2039

def sliding
  @sliding
end

#step_anime ⇒ Boolean

Returns if the event has a patern animation while staying.

Returns:

  • (Boolean) —

    if the event has a patern animation while staying



2392
2393
2394
# File 'docs/4_Systems_003_Map_Engine.rb', line 2392

def step_anime
  @step_anime
end

#surfing=(value) (writeonly)

The current surfing state



2707
2708
2709
# File 'docs/4_Systems_003_Map_Engine.rb', line 2707

def surfing=(value)
  @surfing = value
end

#through ⇒ Boolean

Returns if the character is traversable and it can walk through any tiles.

Returns:

  • (Boolean) —

    if the character is traversable and it can walk through any tiles



2029
2030
2031
# File 'docs/4_Systems_003_Map_Engine.rb', line 2029

def through
  @through
end

#tile_id ⇒ Integer (readonly)

Returns ID of the tile shown as the event (0 = no tile).

Returns:

  • (Integer) —

    ID of the tile shown as the event (0 = no tile)



2378
2379
2380
# File 'docs/4_Systems_003_Map_Engine.rb', line 2378

def tile_id
  @tile_id
end

#transparent ⇒ Boolean

Returns if the event is invisible.

Returns:

  • (Boolean) —

    if the event is invisible



2390
2391
2392
# File 'docs/4_Systems_003_Map_Engine.rb', line 2390

def transparent
  @transparent
end

#x ⇒ Integer

Returns X position of the event in the current map.

Returns:

  • (Integer) —

    X position of the event in the current map



2015
2016
2017
# File 'docs/4_Systems_003_Map_Engine.rb', line 2015

def x
  @x
end

#y ⇒ Integer

Returns Y position of the event in the current map.

Returns:

  • (Integer) —

    Y position of the event in the current map



2017
2018
2019
# File 'docs/4_Systems_003_Map_Engine.rb', line 2017

def y
  @y
end

#z ⇒ Integer

Returns Z priority of the event.

Returns:

  • (Integer) —

    Z priority of the event



2019
2020
2021
# File 'docs/4_Systems_003_Map_Engine.rb', line 2019

def z
  @z
end

Instance Method Details

#activated? ⇒ Boolean

Check if the character is activated. Useful to make difference between event without active page and others.

Returns:

  • (Boolean)


2108
2109
# File 'docs/4_Systems_003_Map_Engine.rb', line 2108

def activated?
end

#animate_from_charset(lines, duration, reverse: false, repeat: false, last_frame_delay: false, reset_at_end: false) ⇒ Boolean

Set the charset animation. It can be needed to set the event in direction fixed.

Parameters:

  • lines (Array<Integer>) —

    list of the lines to animates (0,1,2,3)

  • duration (Integer) —

    duration of the animation in frame (30 frames per secondes)

  • reverse (Boolean) (defaults to: false) —

    <default: false> set it to true if the animation is reversed

  • repeat (Boolean, Integer) (defaults to: false) —

    true if looping continuously, Integer for the number of loops, false for no loops

  • last_frame_delay (Boolean) (defaults to: false) —

    if the delay should also be applied to the last frame of the animation

  • reset_at_end (Boolean) (defaults to: false) —

    if the character's appearance should be set back to the first frame at the end of the anim

Returns:

  • (Boolean)


2424
2425
# File 'docs/4_Systems_003_Map_Engine.rb', line 2424

def animate_from_charset(lines, duration, reverse: false, repeat: false, last_frame_delay: false, reset_at_end: false)
end

#bridge_down_check(z) Also known as: bridge_up_check

Adjust the Character informations related to the brige when it moves down (or up)

Parameters:

  • z (Integer) —

    the z position

Author:

  • Nuri Yuri



2632
2633
# File 'docs/4_Systems_003_Map_Engine.rb', line 2632

def bridge_down_check(z)
end

#bridge_left_check(z) Also known as: bridge_right_check

Adjust the Character informations related to the brige when it moves left (or right)

Parameters:

  • z (Integer) —

    the z position

Author:

  • Nuri Yuri



2638
2639
# File 'docs/4_Systems_003_Map_Engine.rb', line 2638

def bridge_left_check(z)
end

#bush_depth ⇒ Integer

bush_depth of the sprite of the character

Returns:

  • (Integer)


2414
2415
# File 'docs/4_Systems_003_Map_Engine.rb', line 2414

def bush_depth
end

#cancel_charset_animation

Cancel the charset animation



2427
2428
# File 'docs/4_Systems_003_Map_Engine.rb', line 2427

def cancel_charset_animation
end

#check_event_trigger_touch(*args)

Define the function check_event_trigger_touch to prevent bugs



2104
2105
# File 'docs/4_Systems_003_Map_Engine.rb', line 2104

def check_event_trigger_touch(*args)
end

#contact?(x, y, z) ⇒ Boolean

Check if it's possible to have contact interaction with this Game_Character at certain coordinates

Parameters:

  • x (Integer) —

    x position

  • y (Integer) —

    y position

  • z (Integer) —

    z position

Returns:

  • (Boolean)

Author:

  • Nuri Yuri



2622
2623
# File 'docs/4_Systems_003_Map_Engine.rb', line 2622

def contact?(x, y, z)
end

#define_path(path)

Define the path from path_finding

Parameters:



2734
2735
# File 'docs/4_Systems_003_Map_Engine.rb', line 2734

def define_path(path)
end

#detect_swamp

Detect if the event walks in a swamp or a deep swamp and change the Game_Character states.

Author:

  • Nuri Yuri



2626
2627
# File 'docs/4_Systems_003_Map_Engine.rb', line 2626

def detect_swamp
end

#each_front_tiles(nb_steps) {|x, y, d| ... }

Iterate through each front tiles including current tile

Parameters:

  • nb_steps (Integer) —

    number of step in front of the event to iterate

Yield Parameters:

  • x (Integer) —

    x coordinate

  • y (Integer) —

    y coordinate

  • d (Integer) —

    direction



2562
2563
# File 'docs/4_Systems_003_Map_Engine.rb', line 2562

def each_front_tiles(nb_steps)
end

#each_front_tiles_rect(nb_steps, dist) {|x, y, d| ... }

Iterate through each front tiles including current tile

Parameters:

  • nb_steps (Integer) —

    number of step in front of the event to iterate

  • dist (Integer) —

    distance in both side of the detection

Yield Parameters:

  • x (Integer) —

    x coordinate

  • y (Integer) —

    y coordinate

  • d (Integer) —

    direction



2570
2571
# File 'docs/4_Systems_003_Map_Engine.rb', line 2570

def each_front_tiles_rect(nb_steps, dist)
end

#emotion(type, wait = 34, params = {})

Show an emotion to an event or the player

Parameters:

  • type (Symbol) —

    the type of emotion (see wiki)

  • wait (Integer) (defaults to: 34) —

    the number of frame the event will wait after this command.

  • params (Hash) (defaults to: {}) —

    particle params



2653
2654
# File 'docs/4_Systems_003_Map_Engine.rb', line 2653

def emotion(type, wait = 34, params = {})
end

#event_passable_check?(new_x, new_y, z, game_map) ⇒ Boolean

Check the passage related to events

Parameters:

  • new_x (Integer) —

    new x position

  • new_y (Integer) —

    new y position

  • z (Integer) —

    current z position

  • game_map (Game_Map) —

    map object

Returns:

  • (Boolean) —

    if the tile has no event that block the way



2146
2147
# File 'docs/4_Systems_003_Map_Engine.rb', line 2146

def event_passable_check?(new_x, new_y, z, game_map)
end

#find_path(to:, radius: 0, tries: Pathfinding::TRY_COUNT, type: nil, running: false)

Request a path to the target and follow it as soon as it found

Examples:

find path to x=10 y=15 with an error radius of 5 tiles

find_path(to:[10,15], radius:5)

find path to x=10 y=15 while running

find_path(to:[10,15], running: true)

Parameters:

  • to (Array<Integer, Integer>, Game_Character) —

    the target, [x, y] or Game_Character object

  • radius (Integer) (defaults to: 0) —

    <default : 0> the distance from the target to consider it as reached

  • tries (Integer, Symbol) (defaults to: Pathfinding::TRY_COUNT) —

    <default : 5> the number of tries allowed to this request, use :infinity to unlimited try count

  • type (Symbol) (defaults to: nil)
  • running (Boolean) (defaults to: false) —

    <default: false> if true, the character will run during the pathfinding



2724
2725
# File 'docs/4_Systems_003_Map_Engine.rb', line 2724

def find_path(to:, radius: 0, tries: Pathfinding::TRY_COUNT, type: nil, running: false)
end

#fishing_creek_amount ⇒ Integer

Count the number of impassable tiles around the fishing spot

Returns:

  • (Integer) —

    The number of impassable tiles



2512
2513
# File 'docs/4_Systems_003_Map_Engine.rb', line 2512

def fishing_creek_amount
end

#fly_reset_attributes

Reset some attributes when using Fly



2160
2161
# File 'docs/4_Systems_003_Map_Engine.rb', line 2160

def fly_reset_attributes
end

#follower_check?(new_x, new_y, z) ⇒ Boolean

Check the passage related to events

Parameters:

  • new_x (Integer) —

    new x position

  • new_y (Integer) —

    new y position

  • z (Integer) —

    current z position

Returns:

  • (Boolean) —

    if the tile has no event that block the way



2153
2154
# File 'docs/4_Systems_003_Map_Engine.rb', line 2153

def follower_check?(new_x, new_y, z)
end

#follower_move

Move a follower

Author:

  • Nuri Yuri



2521
2522
# File 'docs/4_Systems_003_Map_Engine.rb', line 2521

def follower_move
end

#follower_sliding? ⇒ Boolean

Check if the follower slides

Returns:

  • (Boolean)

Author:

  • Nuri Yuri



2530
2531
# File 'docs/4_Systems_003_Map_Engine.rb', line 2530

def follower_sliding?
end

#follower_tail ⇒ Game_Character, self

Return the tail of the following queue

Returns:



2539
2540
# File 'docs/4_Systems_003_Map_Engine.rb', line 2539

def follower_tail
end

#force_move_route(move_route)

Force the character to adopt a move route and save the original one

Parameters:



2058
2059
# File 'docs/4_Systems_003_Map_Engine.rb', line 2058

def force_move_route(move_route)
end

#front_name_check(name) ⇒ Boolean Also known as: front_name_detect

Check a the #front_event has a specific name

Returns:

  • (Boolean)

Author:

  • Nuri Yuri



2575
2576
# File 'docs/4_Systems_003_Map_Engine.rb', line 2575

def front_name_check(name)
end

#front_system_tag ⇒ Integer

Return the SystemTag in the front of the Game_Character

Returns:

  • (Integer) —

    ID of the SystemTag

Author:

  • Nuri Yuri



2587
2588
# File 'docs/4_Systems_003_Map_Engine.rb', line 2587

def front_system_tag
end

#front_system_tag_db_symbol ⇒ Symbol

Return the db_symbol of the front system tag

Returns:

  • (Symbol)


2595
2596
# File 'docs/4_Systems_003_Map_Engine.rb', line 2595

def front_system_tag_db_symbol
end

#front_terrain_tag ⇒ Integer?

Terrain tag in front of the character

Returns:

  • (Integer, nil)


2591
2592
# File 'docs/4_Systems_003_Map_Engine.rb', line 2591

def front_terrain_tag
end

#front_tile ⇒ Array(Integer, Integer)

Return tile position in front of the player

Returns:

  • (Array(Integer, Integer)) —

    the position x and y



2551
2552
# File 'docs/4_Systems_003_Map_Engine.rb', line 2551

def front_tile
end

#front_tile_event ⇒ Game_Event?

Return the event that stand in the front of the Player

Returns:



2555
2556
# File 'docs/4_Systems_003_Map_Engine.rb', line 2555

def front_tile_event
end

#front_tile_event_id ⇒ Integer, 0 Also known as: front_tile_id

Return the id of the #front_tile_event

Returns:

  • (Integer, 0) —

    0 if no front_tile_event

Author:

  • Nuri Yuri



2581
2582
# File 'docs/4_Systems_003_Map_Engine.rb', line 2581

def front_tile_event_id
end

#increase_steps

Increase step prototype (sets @stop_count to 0)



2241
2242
# File 'docs/4_Systems_003_Map_Engine.rb', line 2241

def increase_steps
end

#jump(x_plus, y_plus, follow_move = true) ⇒ Boolean

Make the Game_Character jump

Parameters:

  • x_plus (Integer) —

    the number of tile the Game_Character will jump on x

  • y_plus (Integer) —

    the number of tile the Game_Character will jump on y

  • follow_move (Boolean) (defaults to: true) —

    if the follower moves when the Game_Character starts jumping

Returns:

  • (Boolean) —

    if the character is jumping



2324
2325
# File 'docs/4_Systems_003_Map_Engine.rb', line 2324

def jump(x_plus, y_plus, follow_move = true)
end

#jump_bridge_check(x_plus, y_plus)

Perform the bridge check for the jump operation

Parameters:

  • x_plus (Integer) —

    the number of tile the Game_Character will jump on x

  • y_plus (Integer) —

    the number of tile the Game_Character will jump on y



2329
2330
# File 'docs/4_Systems_003_Map_Engine.rb', line 2329

def jump_bridge_check(x_plus, y_plus)
end

#jumping? ⇒ Boolean

is the character jumping ?

Returns:

  • (Boolean)


2467
2468
# File 'docs/4_Systems_003_Map_Engine.rb', line 2467

def jumping?
end

#lock

Make the character look the player during a dialog



2487
2488
# File 'docs/4_Systems_003_Map_Engine.rb', line 2487

def lock
end

#lock? ⇒ Boolean

Note:

in this state, the character is not able to perform automatic moveroute (rmxp conf)

Is the character locked ? (looking to the player when it's activated)

Returns:

  • (Boolean)


2492
2493
# File 'docs/4_Systems_003_Map_Engine.rb', line 2492

def lock?
end

#look_this_event

Look directly to the current event



2603
2604
# File 'docs/4_Systems_003_Map_Engine.rb', line 2603

def look_this_event
end

#look_to(event_id)

Look directly to a specific event

Parameters:

  • event_id (Integer) —

    id of the event on the Map

Author:

  • Nuri Yuri



2600
2601
# File 'docs/4_Systems_003_Map_Engine.rb', line 2600

def look_to(event_id)
end

#movable? ⇒ Boolean

Is the character able to execute a move action

Returns:

  • (Boolean)


2470
2471
# File 'docs/4_Systems_003_Map_Engine.rb', line 2470

def movable?
end

#move_away_from_player

Move the Game_Character away from the player



2308
2309
# File 'docs/4_Systems_003_Map_Engine.rb', line 2308

def move_away_from_player
end

#move_backward

Move the Game_Character backward



2317
2318
# File 'docs/4_Systems_003_Map_Engine.rb', line 2317

def move_backward
end

#move_down(turn_enabled = true)

Move Game_Character down

Parameters:

  • turn_enabled (Boolean) (defaults to: true) —

    if the Game_Character turns when impossible move



2249
2250
# File 'docs/4_Systems_003_Map_Engine.rb', line 2249

def move_down(turn_enabled = true)
end

#move_follower_to_character

Warp the follower to the event it follows

Author:

  • Nuri Yuri



2525
2526
# File 'docs/4_Systems_003_Map_Engine.rb', line 2525

def move_follower_to_character
end

#move_forward

Move the Game_Character forward



2314
2315
# File 'docs/4_Systems_003_Map_Engine.rb', line 2314

def move_forward
end

#move_frequency=(value)

Set the move_frequency (and define the max_stop_count value)

Parameters:

  • value (Numeric)


2051
2052
# File 'docs/4_Systems_003_Map_Engine.rb', line 2051

def move_frequency=(value)
end

#move_left(turn_enabled = true)

Move Game_Character left

Parameters:

  • turn_enabled (Boolean) (defaults to: true) —

    if the Game_Character turns when impossible move



2253
2254
# File 'docs/4_Systems_003_Map_Engine.rb', line 2253

def move_left(turn_enabled = true)
end

#move_lower_left

Move the Game_Character lower left



2279
2280
# File 'docs/4_Systems_003_Map_Engine.rb', line 2279

def move_lower_left
end

#move_lower_right

Move the Game_Character lower right



2282
2283
# File 'docs/4_Systems_003_Map_Engine.rb', line 2282

def move_lower_right
end

#move_random

Move the Game_Character to a random direction



2291
2292
# File 'docs/4_Systems_003_Map_Engine.rb', line 2291

def move_random
end

#move_random_within_systemtag(sys_tag_id)

Move the Game_Character to a random direction within a rectangular zone

Parameters:

  • sys_tag_id (Integer) —

    the ID of the systemtag the character should only move into



2302
2303
# File 'docs/4_Systems_003_Map_Engine.rb', line 2302

def move_random_within_systemtag(sys_tag_id)
end

#move_random_within_zone(lx, rx, ty, dy)

Move the Game_Character to a random direction within a rectangular zone

Parameters:

  • lx (Integer) —

    the x coordinate of the left border of the zone

  • rx (Integer) —

    the x coordinate of the right border of the zone

  • ty (Integer) —

    the y coordinate of the top border of the zone

  • dy (Integer) —

    the y coordinate of the down border of the zone



2298
2299
# File 'docs/4_Systems_003_Map_Engine.rb', line 2298

def move_random_within_zone(lx, rx, ty, dy)
end

#move_right(turn_enabled = true)

Move Game_Character right

Parameters:

  • turn_enabled (Boolean) (defaults to: true) —

    if the Game_Character turns when impossible move



2264
2265
# File 'docs/4_Systems_003_Map_Engine.rb', line 2264

def move_right(turn_enabled = true)
end

#move_toward(tx, ty)

Move the entity toward a specific coordinate



2311
2312
# File 'docs/4_Systems_003_Map_Engine.rb', line 2311

def move_toward(tx, ty)
end

#move_toward_player

Move the Game_Character toward the player



2305
2306
# File 'docs/4_Systems_003_Map_Engine.rb', line 2305

def move_toward_player
end

#move_type_path

Movement induced by the Path Finding



2730
2731
# File 'docs/4_Systems_003_Map_Engine.rb', line 2730

def move_type_path
end

#move_up(turn_enabled = true)

Move Game_Character up

Parameters:

  • turn_enabled (Boolean) (defaults to: true) —

    if the Game_Character turns when impossible move



2276
2277
# File 'docs/4_Systems_003_Map_Engine.rb', line 2276

def move_up(turn_enabled = true)
end

#move_upper_left

Move the Game_Character upper left



2285
2286
# File 'docs/4_Systems_003_Map_Engine.rb', line 2285

def move_upper_left
end

#move_upper_right

Move the Game_Character upper right



2288
2289
# File 'docs/4_Systems_003_Map_Engine.rb', line 2288

def move_upper_right
end

#movement_process_end(no_follower_move = false)

End of the movement process

Parameters:

  • no_follower_move (Boolean) (defaults to: false) —

    if the follower should not move

Author:

  • Nuri Yuri



2336
2337
# File 'docs/4_Systems_003_Map_Engine.rb', line 2336

def movement_process_end(no_follower_move = false)
end

#moveto(x, y)

Warps the character on the Map to specific coordinates. Adjust the z position of the character.

Parameters:

  • x (Integer) —

    new x position of the character

  • y (Integer) —

    new y position of the character



2064
2065
# File 'docs/4_Systems_003_Map_Engine.rb', line 2064

def moveto(x, y)
end

#moving? ⇒ Boolean

is the character moving ?

Returns:

  • (Boolean)


2463
2464
# File 'docs/4_Systems_003_Map_Engine.rb', line 2463

def moving?
end

#next_event_follower ⇒ Game_Event?

Rerturn the first follower that is a Game_Event in the queue

Returns:



2543
2544
# File 'docs/4_Systems_003_Map_Engine.rb', line 2543

def next_event_follower
end

#original_move_speed ⇒ Integer

Return the original move speed of the character

Returns:

  • (Integer)


2614
2615
# File 'docs/4_Systems_003_Map_Engine.rb', line 2614

def original_move_speed
end

#particle_push

Push a particle to the particle stack if possible

Author:

  • Nuri Yuri



2659
2660
# File 'docs/4_Systems_003_Map_Engine.rb', line 2659

def particle_push
end

#particle_push_grass

Push a grass particle



2662
2663
# File 'docs/4_Systems_003_Map_Engine.rb', line 2662

def particle_push_grass
end

#particle_push_pond

Push a pond particle



2681
2682
# File 'docs/4_Systems_003_Map_Engine.rb', line 2681

def particle_push_pond
end

#particle_push_puddle

Push a pond particle



2684
2685
# File 'docs/4_Systems_003_Map_Engine.rb', line 2684

def particle_push_puddle
end

#particle_push_rockclimb

Push a RockClimb particle



2687
2688
# File 'docs/4_Systems_003_Map_Engine.rb', line 2687

def particle_push_rockclimb
end

#particle_push_sand

Push a sand particle



2670
2671
# File 'docs/4_Systems_003_Map_Engine.rb', line 2670

def particle_push_sand
end

#particle_push_snow

Push a snow particle



2678
2679
# File 'docs/4_Systems_003_Map_Engine.rb', line 2678

def particle_push_snow
end

#particle_push_tall_grass

Push a tall grass particle



2665
2666
# File 'docs/4_Systems_003_Map_Engine.rb', line 2665

def particle_push_tall_grass
end

#particle_push_waterfall

Push Waterfall Particle



2690
2691
# File 'docs/4_Systems_003_Map_Engine.rb', line 2690

def particle_push_waterfall
end

#particle_push_wetsand

Push a wet sand particle



2673
2674
# File 'docs/4_Systems_003_Map_Engine.rb', line 2673

def particle_push_wetsand
end

#particle_push_whirlpool

Push Whirlpool Particle



2695
2696
# File 'docs/4_Systems_003_Map_Engine.rb', line 2695

def particle_push_whirlpool
end

#passable?(x, y, d, skip_event = false) ⇒ Boolean

Is the tile in front of the character passable ?

Parameters:

  • x (Integer) —

    x position on the Map

  • y (Integer) —

    y position on the Map

  • d (Integer) —

    direction : 2, 4, 6, 8, 0. 0 = current position

  • skip_event (Boolean) (defaults to: false) —

    if the function does not check events

Returns:

  • (Boolean) —

    if the front/current tile is passable



2121
2122
# File 'docs/4_Systems_003_Map_Engine.rb', line 2121

def passable?(x, y, d, skip_event = false)
end

#passable_bridge_check?(x, y, d, new_x, new_y, z, game_map, sys_tag) ⇒ Boolean

Check the bridge related passabilities

Parameters:

  • x (Integer) —

    current x position

  • y (Integer) —

    current y position

  • d (Integer) —

    current direction

  • new_x (Integer) —

    new x position

  • new_y (Integer) —

    new y position

  • z (Integer) —

    current z position

  • game_map (Game_Map) —

    map object

  • sys_tag (Integer) —

    current system_tag

Returns:

  • (Boolean) —

    if the tile is passable according to the bridge rules



2133
2134
# File 'docs/4_Systems_003_Map_Engine.rb', line 2133

def passable_bridge_check?(x, y, d, new_x, new_y, z, game_map, sys_tag)
end

#passage_surf_check?(sys_tag) ⇒ Boolean

Check the surf related passabilities

Parameters:

  • sys_tag (Integer) —

    current system_tag

Returns:

  • (Boolean) —

    if the tile is passable according to the surf rules



2138
2139
# File 'docs/4_Systems_003_Map_Engine.rb', line 2138

def passage_surf_check?(sys_tag)
end

#process_slope_y_modifier(y_modifier)

Process the slope y modifier



2244
2245
# File 'docs/4_Systems_003_Map_Engine.rb', line 2244

def process_slope_y_modifier(y_modifier)
end

#reset_follower

Reset the follower stack of the current entity



2546
2547
# File 'docs/4_Systems_003_Map_Engine.rb', line 2546

def reset_follower
end

#reset_follower_move

Remove the memorized moves of the follower

Author:

  • Nuri Yuri



2517
2518
# File 'docs/4_Systems_003_Map_Engine.rb', line 2517

def reset_follower_move
end

#screen_x ⇒ Integer

Return the x position of the sprite on the screen

Returns:

  • (Integer)


2084
2085
# File 'docs/4_Systems_003_Map_Engine.rb', line 2084

def screen_x
end

#screen_y ⇒ Integer

Return the y position of the sprite on the screen

Returns:

  • (Integer)


2088
2089
# File 'docs/4_Systems_003_Map_Engine.rb', line 2088

def screen_y
end

#screen_z(_height = 0) ⇒ Integer

Return the z superiority of the sprite of the character

Parameters:

  • _height (Integer) (defaults to: 0) —

    height of a frame of the character (ignored)

Returns:

  • (Integer)


2101
2102
# File 'docs/4_Systems_003_Map_Engine.rb', line 2101

def screen_z(_height = 0)
end

#set_appearance(character_name, character_hue = 0)

Define the new appearance of the character

Parameters:

  • character_name (String) —

    name of the character graphic to display

  • character_hue (Integer) (defaults to: 0) —

    must be 0



2410
2411
# File 'docs/4_Systems_003_Map_Engine.rb', line 2410

def set_appearance(character_name, character_hue = 0)
end

#set_follower(follower)

Define the follower of the event

Parameters:

Author:

  • Nuri Yuri



2535
2536
# File 'docs/4_Systems_003_Map_Engine.rb', line 2535

def set_follower(follower)
end

#set_surfing

Set the Game_Character in the "surfing" mode (not able to walk on ground but able to walk on water)

Author:

  • Nuri Yuri



2474
2475
# File 'docs/4_Systems_003_Map_Engine.rb', line 2474

def set_surfing
end

#shadow_screen_x ⇒ Integer

Return the x position of the shadow of the character on the screen

Returns:

  • (Integer)


2092
2093
# File 'docs/4_Systems_003_Map_Engine.rb', line 2092

def shadow_screen_x
end

#shadow_screen_y ⇒ Integer

Return the y position of the shadow of the character on the screen

Returns:

  • (Integer)


2096
2097
# File 'docs/4_Systems_003_Map_Engine.rb', line 2096

def shadow_screen_y
end

#sliding? ⇒ Boolean

Check if the Game_Character slides

Returns:

  • (Boolean)

Author:

  • Nuri Yuri



2484
2485
# File 'docs/4_Systems_003_Map_Engine.rb', line 2484

def sliding?
end

#slope_check_left(write = true)

Update the slope values when moving to left



2260
2261
# File 'docs/4_Systems_003_Map_Engine.rb', line 2260

def slope_check_left(write = true)
end

#slope_check_right(write = true) ⇒ Integer

Update the slope values when moving to right, and return y slope modifier

Returns:

  • (Integer)


2272
2273
# File 'docs/4_Systems_003_Map_Engine.rb', line 2272

def slope_check_right(write = true)
end

#stair_move_left ⇒ Boolean

Try to move the Game_Character on a stair to the left

Returns:

  • (Boolean) —

    if the player cannot perform a regular movement (success or blocked)



2257
2258
# File 'docs/4_Systems_003_Map_Engine.rb', line 2257

def stair_move_left
end

#stair_move_right ⇒ Boolean

Try to move the Game_Character on a stair to the right

Returns:

  • (Boolean) —

    if the player cannot perform a regular movement (success or blocked)



2268
2269
# File 'docs/4_Systems_003_Map_Engine.rb', line 2268

def stair_move_right
end

#stop_path

Stop following the path if there is one and clear the agent



2727
2728
# File 'docs/4_Systems_003_Map_Engine.rb', line 2727

def stop_path
end

#straighten

Adjust the character position



2054
2055
# File 'docs/4_Systems_003_Map_Engine.rb', line 2054

def straighten
end

#surfing? ⇒ Boolean

Check if the Game_Character is in the "surfing" mode

Returns:

  • (Boolean)

Author:

  • Nuri Yuri



2479
2480
# File 'docs/4_Systems_003_Map_Engine.rb', line 2479

def surfing?
end

#system_tag ⇒ Integer

Return the SystemTag where the Game_Character stands

Returns:

  • (Integer) —

    ID of the SystemTag

Author:

  • Nuri Yuri



2504
2505
# File 'docs/4_Systems_003_Map_Engine.rb', line 2504

def system_tag
end

#system_tag_db_symbol ⇒ Symbol

Return the db_symbol of the system tag

Returns:

  • (Symbol)


2508
2509
# File 'docs/4_Systems_003_Map_Engine.rb', line 2508

def system_tag_db_symbol
end

#terrain_tag ⇒ Integer?

current terrain tag on which the character steps

Returns:

  • (Integer, nil)


2499
2500
# File 'docs/4_Systems_003_Map_Engine.rb', line 2499

def terrain_tag
end

#turn_180

Turn 180°



2358
2359
# File 'docs/4_Systems_003_Map_Engine.rb', line 2358

def turn_180
end

#turn_away_from_player

Turn away from the player



2374
2375
# File 'docs/4_Systems_003_Map_Engine.rb', line 2374

def turn_away_from_player
end

#turn_down

Turn down unless direction fix



2340
2341
# File 'docs/4_Systems_003_Map_Engine.rb', line 2340

def turn_down
end

#turn_left

Turn left unless direction fix



2343
2344
# File 'docs/4_Systems_003_Map_Engine.rb', line 2343

def turn_left
end

#turn_left_90

Turn 90° to the left of the Game_Character



2355
2356
# File 'docs/4_Systems_003_Map_Engine.rb', line 2355

def turn_left_90
end

#turn_random

Turn in a random direction



2364
2365
# File 'docs/4_Systems_003_Map_Engine.rb', line 2364

def turn_random
end

#turn_right

Turn right unless direction fix



2346
2347
# File 'docs/4_Systems_003_Map_Engine.rb', line 2346

def turn_right
end

#turn_right_90

Turn 90° to the right of the Game_Character



2352
2353
# File 'docs/4_Systems_003_Map_Engine.rb', line 2352

def turn_right_90
end

#turn_right_or_left_90

Turn random right or left 90°



2361
2362
# File 'docs/4_Systems_003_Map_Engine.rb', line 2361

def turn_right_or_left_90
end

#turn_toward_character(character)

Turn toward another character

Parameters:



2371
2372
# File 'docs/4_Systems_003_Map_Engine.rb', line 2371

def turn_toward_character(character)
end

#turn_toward_player

Turn toward the player



2367
2368
# File 'docs/4_Systems_003_Map_Engine.rb', line 2367

def turn_toward_player
end

#turn_up

Turn up unless direction fix



2349
2350
# File 'docs/4_Systems_003_Map_Engine.rb', line 2349

def turn_up
end

#unlock

Release the character, can perform its natural movements



2495
2496
# File 'docs/4_Systems_003_Map_Engine.rb', line 2495

def unlock
end

#update

Update the Game_Character (manages movements and some animations)



2157
2158
# File 'docs/4_Systems_003_Map_Engine.rb', line 2157

def update
end

#wait_charset_animation

Tell the Game_Character to wait for its charset animation to finish



2430
2431
# File 'docs/4_Systems_003_Map_Engine.rb', line 2430

def wait_charset_animation
end

#z_bridge_check(sys_tag)

Check bridge information and adjust the z position of the Game_Character

Parameters:

  • sys_tag (Integer) —

    the SystemTag

Author:

  • Nuri Yuri



2644
2645
# File 'docs/4_Systems_003_Map_Engine.rb', line 2644

def z_bridge_check(sys_tag)
end