Class in reactor_objects_map.js

Game_Map

118 public functions in 6 groups · show internal (_) functions

Everything here is tracked by Game Objects: the party, the map, its events.

Familiar territory. Game_Map keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

Quick Reference

Setup & Creation 11

initialize() Sets up a new instance.
setup() Setup.
createVehicles() Creates the vehicles.
setupEvents() Setup events.
setupScroll() Setup scroll.
setupParallax() Setup parallax.
setupBattleback() Setup battleback.
setupStartingEvent() Setup starting event.
setupTestEvent() Setup test event.
setupStartingMapEvent() Setup starting map event.
setupAutorunCommonEvent() Setup autorun common event.

Getting Information 5

width() Width.
height() Height.
data() Data.
xWithDirection() X with direction.
yWithDirection() Y with direction.

Checks (True / False) 17

isEventRunning() Whether it is event running.
isNameDisplayEnabled() Whether it is name display enabled.
isLoopHorizontal() Whether it is loop horizontal.
isLoopVertical() Whether it is loop vertical.
isDashDisabled() Whether it is dash disabled.
isOverworld() Whether it is overworld.
isValid() Whether it is valid.
isPassable() Walking asks here, before the tiles: a cell the map marks open can be entered and left in every direction, on…
isBoatPassable() Whether it is boat passable.
isShipPassable() Whether it is ship passable.
isAirshipLandOk() Whether it is airship land ok.
isLadder() Whether it is ladder.
isBush() Whether it is bush.
isCounter() Whether it is counter.
isDamageFloor() Whether it is damage floor.
isScrolling() Whether it is scrolling.
isAnyEventStarting() Whether it is any event starting.

Actions 7

requestRefresh() Requests the refresh.
disableNameDisplay() Disables the name display.
enableNameDisplay() Enables the name display.
setDisplayPos() Sets the display pos.
startScroll() Starts the scroll.
changeTileset() Changes the tileset.
changeParallax() Changes the parallax.

Updating & Drawing 11

refreshCommonEventTriggerCache() Redraws the common event trigger cache.
refreshEventList() The live event list is made again on the next call: for code that puts an event into _events (or takes one ou…
refreshIfNeeded() Redraws the if needed.
refresh() Refresh.
refreshTileEvents() Redraws the tile events.
update() Update.
updateScroll() Updates the scroll each frame.
updateEvents() RPG Maker 2000/2003 run parallel common events before map events (System.json rrLegacyEventOrder, set by the…
updateVehicles() Updates the vehicles each frame.
updateParallax() Updates the parallax each frame.
updateInterpreter() Updates the interpreter each frame.

Other 67

tileWidth() Tile width.
tileHeight() Tile height.
bushDepth() Bush depth.
mapId() Map id.
tilesetId() Tileset id.
displayX() Display x.
displayY() Display y.
parallaxName() Parallax name.
battleback1Name() Battleback1 name.
battleback2Name() Battleback2 name.
refereshVehicles() Referesh vehicles.
vehicles() Vehicles.
vehicle() Vehicle.
boat() Boat.
ship() Ship.
airship() Airship.
events() Events.
event() Event.
eraseEvent() Erase event.
autorunCommonEvents() Autorun common events.
parallelCommonEvents() Parallel common events.
reactorEdgeReach() How far the view of a 2D map may go past its edge on side, in tiles: half a screen where a neighboring map li…
parallaxOx() Parallax ox.
parallaxOy() Parallax oy.
tileset() Tileset.
tilesetFlags() Tileset flags.
displayName() Display name.
encounterList() Encounter list.
encounterStep() Encounter step.
reactorCameraZoom() Default 2D camera framing is expressed in logical game pixels.
reactorCameraOffset() Reactor camera offset.
reactorCanvasToWorld() Undo the existing event screen zoom/shake before undoing the map camera.
screenTileX() Screen tile x.
screenTileY() Screen tile y.
adjustX() Adjust x.
adjustY() Adjust y.
roundX() Round x.
roundY() Round y.
roundXWithDirection() Round x with direction.
roundYWithDirection() Round y with direction.
deltaX() Delta x.
deltaY() Delta y.
distance() Distance.
canvasToMapX() Canvas to map x.
canvasToMapY() Canvas to map y.
autoplay() Autoplay.
eventsXy() Events xy.
eventsXyNt() Events xy nt.
tileEventsXy() Tile events xy.
eventIdXy() Event id xy.
scrollDown() Scroll down.
scrollLeft() Scroll left.
scrollRight() Scroll right.
scrollUp() Scroll up.
checkPassage() Check passage.
tileId() Tile id.
layeredTiles() Layered tiles.
allTiles() All tiles.
autotileType() Autotile type.
rrPassageAt() A cell's passability set on the map itself ($dataMap.rrPassage, keys "x,y"): 1 open, 2 blocked, 16 + the side…
checkLayeredTilesFlags() Check layered tiles flags.
terrainTag() Terrain tag.
regionId() Region id.
scrollDistance() Scroll distance.
doScroll() Do scroll.
unlockEvent() Unlock event.
rrHasTimerPages() Whether a page of this map waits on the timer (rrTimerSec); worked out once per map's data, never saved.

Setup & Creation

initialize

method source
Game_Map.prototype.initialize()

Sets up a new instance. (Same as the RPG Maker MZ method of this name.)

setup

method source
Game_Map.prototype.setup(mapId)

Setup. (Same as the RPG Maker MZ method of this name.)

createVehicles

method source
Game_Map.prototype.createVehicles()

Creates the vehicles. (Same as the RPG Maker MZ method of this name.)

setupEvents

method source
Game_Map.prototype.setupEvents()

Setup events. (Same as the RPG Maker MZ method of this name.)

setupScroll

method source
Game_Map.prototype.setupScroll()

Setup scroll. (Same as the RPG Maker MZ method of this name.)

setupParallax

method source
Game_Map.prototype.setupParallax()

Setup parallax. (Same as the RPG Maker MZ method of this name.)

setupBattleback

method source
Game_Map.prototype.setupBattleback()

Setup battleback. (Same as the RPG Maker MZ method of this name.)

setupStartingEvent

method source
Game_Map.prototype.setupStartingEvent()

Setup starting event. (Same as the RPG Maker MZ method of this name.)

setupTestEvent

method source
Game_Map.prototype.setupTestEvent()

Setup test event. (Same as the RPG Maker MZ method of this name.)

setupStartingMapEvent

method source
Game_Map.prototype.setupStartingMapEvent()

Setup starting map event. (Same as the RPG Maker MZ method of this name.)

setupAutorunCommonEvent

method source
Game_Map.prototype.setupAutorunCommonEvent()

Setup autorun common event. (Same as the RPG Maker MZ method of this name.)

Getting Information

width

method source
Game_Map.prototype.width()

Width. (Same as the RPG Maker MZ method of this name.)

height

method source
Game_Map.prototype.height()

Height. (Same as the RPG Maker MZ method of this name.)

data

method source
Game_Map.prototype.data()

Data. (Same as the RPG Maker MZ method of this name.)

xWithDirection

method source
Game_Map.prototype.xWithDirection(x, d)

X with direction. (Same as the RPG Maker MZ method of this name.)

yWithDirection

method source
Game_Map.prototype.yWithDirection(y, d)

Y with direction. (Same as the RPG Maker MZ method of this name.)

Checks (True / False)

isEventRunning

method source
Game_Map.prototype.isEventRunning()

Whether it is event running. (Same as the RPG Maker MZ method of this name.)

isNameDisplayEnabled

method source
Game_Map.prototype.isNameDisplayEnabled()

Whether it is name display enabled. (Same as the RPG Maker MZ method of this name.)

isLoopHorizontal

method source
Game_Map.prototype.isLoopHorizontal()

Whether it is loop horizontal. (Same as the RPG Maker MZ method of this name.)

isLoopVertical

method source
Game_Map.prototype.isLoopVertical()

Whether it is loop vertical. (Same as the RPG Maker MZ method of this name.)

isDashDisabled

method source
Game_Map.prototype.isDashDisabled()

Whether it is dash disabled. (Same as the RPG Maker MZ method of this name.)

isOverworld

method source
Game_Map.prototype.isOverworld()

Whether it is overworld. (Same as the RPG Maker MZ method of this name.)

isValid

method source
Game_Map.prototype.isValid(x, y)

Whether it is valid. (Same as the RPG Maker MZ method of this name.)

isPassable

method source
Game_Map.prototype.isPassable(x, y, d)

Walking asks here, before the tiles: a cell the map marks open can be entered and left in every direction, one it marks blocked in none, one blocked on some sides in the others.

Details

Walking asks here, before the tiles: a cell the map marks open can be entered and left in every direction, one it marks blocked in none, one blocked on some sides in the others. It is read here and not in checkPassage, which the legacy passage rule, a room's bare floor and solid image layers each wrap (some answering without the tiles), so the mark wins over all of them whatever order they load in; boats, ships and landing ask checkPassage and keep to the tiles.

isBoatPassable

method source
Game_Map.prototype.isBoatPassable(x, y)

Whether it is boat passable. (Same as the RPG Maker MZ method of this name.)

isShipPassable

method source
Game_Map.prototype.isShipPassable(x, y)

Whether it is ship passable. (Same as the RPG Maker MZ method of this name.)

isAirshipLandOk

method source
Game_Map.prototype.isAirshipLandOk(x, y)

Whether it is airship land ok. (Same as the RPG Maker MZ method of this name.)

isLadder

method source
Game_Map.prototype.isLadder(x, y)

Whether it is ladder. (Same as the RPG Maker MZ method of this name.)

isBush

method source
Game_Map.prototype.isBush(x, y)

Whether it is bush. (Same as the RPG Maker MZ method of this name.)

isCounter

method source
Game_Map.prototype.isCounter(x, y)

Whether it is counter. (Same as the RPG Maker MZ method of this name.)

isDamageFloor

method source
Game_Map.prototype.isDamageFloor(x, y)

Whether it is damage floor. (Same as the RPG Maker MZ method of this name.)

isScrolling

method source
Game_Map.prototype.isScrolling()

Whether it is scrolling. (Same as the RPG Maker MZ method of this name.)

isAnyEventStarting

method source
Game_Map.prototype.isAnyEventStarting()

Whether it is any event starting. (Same as the RPG Maker MZ method of this name.)

Actions

requestRefresh

method source
Game_Map.prototype.requestRefresh()

Requests the refresh. (Same as the RPG Maker MZ method of this name.)

disableNameDisplay

method source
Game_Map.prototype.disableNameDisplay()

Disables the name display. (Same as the RPG Maker MZ method of this name.)

enableNameDisplay

method source
Game_Map.prototype.enableNameDisplay()

Enables the name display. (Same as the RPG Maker MZ method of this name.)

setDisplayPos

method source
Game_Map.prototype.setDisplayPos(x, y)

Sets the display pos. (Same as the RPG Maker MZ method of this name.)

startScroll

method source
Game_Map.prototype.startScroll(direction, distance, speed)

Starts the scroll. (Same as the RPG Maker MZ method of this name.)

changeTileset

method source
Game_Map.prototype.changeTileset(tilesetId)

Changes the tileset. (Same as the RPG Maker MZ method of this name.)

changeParallax

method source
Game_Map.prototype.changeParallax(name, loopX, loopY, sx, sy)

Changes the parallax. (Same as the RPG Maker MZ method of this name.)

Updating & Drawing

refreshCommonEventTriggerCache

method source
Game_Map.prototype.refreshCommonEventTriggerCache()

Redraws the common event trigger cache. (Same as the RPG Maker MZ method of this name.)

refreshEventList

method source
Game_Map.prototype.refreshEventList()

The live event list is made again on the next call: for code that puts an event into _events (or takes one out) and asks for the list in the same frame.

Details

The live event list is made again on the next call: for code that puts an event into _events (or takes one out) and asks for the list in the same frame. Spawn Unit followed by Start Battle on Map runs in one frame.

refreshIfNeeded

method source
Game_Map.prototype.refreshIfNeeded()

Redraws the if needed. (Same as the RPG Maker MZ method of this name.)

refresh

method source
Game_Map.prototype.refresh()

Refresh. (Same as the RPG Maker MZ method of this name.)

refreshTileEvents

method source
Game_Map.prototype.refreshTileEvents()

Redraws the tile events. (Same as the RPG Maker MZ method of this name.)

update

method source
Game_Map.prototype.update(sceneActive)

Update. (Same as the RPG Maker MZ method of this name.)

updateScroll

method source
Game_Map.prototype.updateScroll()

Updates the scroll each frame. (Same as the RPG Maker MZ method of this name.)

updateEvents

method source
Game_Map.prototype.updateEvents()

RPG Maker 2000/2003 run parallel common events before map events (System.json rrLegacyEventOrder, set by the importer): when both write the same screen text or picture, the map event's lands last.

updateVehicles

method source
Game_Map.prototype.updateVehicles()

Updates the vehicles each frame. (Same as the RPG Maker MZ method of this name.)

updateParallax

method source
Game_Map.prototype.updateParallax()

Updates the parallax each frame. (Same as the RPG Maker MZ method of this name.)

updateInterpreter

method source
Game_Map.prototype.updateInterpreter()

Updates the interpreter each frame. (Same as the RPG Maker MZ method of this name.)

Other

tileWidth

method source
Game_Map.prototype.tileWidth()

Tile width. (Same as the RPG Maker MZ method of this name.)

tileHeight

method source
Game_Map.prototype.tileHeight()

Tile height. (Same as the RPG Maker MZ method of this name.)

bushDepth

method source
Game_Map.prototype.bushDepth()

Bush depth. (Same as the RPG Maker MZ method of this name.)

mapId

method source
Game_Map.prototype.mapId()

Map id. (Same as the RPG Maker MZ method of this name.)

tilesetId

method source
Game_Map.prototype.tilesetId()

Tileset id. (Same as the RPG Maker MZ method of this name.)

displayX

method source
Game_Map.prototype.displayX()

Display x. (Same as the RPG Maker MZ method of this name.)

displayY

method source
Game_Map.prototype.displayY()

Display y. (Same as the RPG Maker MZ method of this name.)

parallaxName

method source
Game_Map.prototype.parallaxName()

Parallax name. (Same as the RPG Maker MZ method of this name.)

battleback1Name

method source
Game_Map.prototype.battleback1Name()

Battleback1 name. (Same as the RPG Maker MZ method of this name.)

battleback2Name

method source
Game_Map.prototype.battleback2Name()

Battleback2 name. (Same as the RPG Maker MZ method of this name.)

refereshVehicles

method source
Game_Map.prototype.refereshVehicles()

Referesh vehicles. (Same as the RPG Maker MZ method of this name.)

vehicles

method source
Game_Map.prototype.vehicles()

Vehicles. (Same as the RPG Maker MZ method of this name.)

vehicle

method source
Game_Map.prototype.vehicle(type)

Vehicle. (Same as the RPG Maker MZ method of this name.)

boat

method source
Game_Map.prototype.boat()

Boat. (Same as the RPG Maker MZ method of this name.)

ship

method source
Game_Map.prototype.ship()

Ship. (Same as the RPG Maker MZ method of this name.)

airship

method source
Game_Map.prototype.airship()

Airship. (Same as the RPG Maker MZ method of this name.)

events

method source
Game_Map.prototype.events()

Events. (Same as the RPG Maker MZ method of this name.)

event

method source
Game_Map.prototype.event(eventId)

Event. (Same as the RPG Maker MZ method of this name.)

eraseEvent

method source
Game_Map.prototype.eraseEvent(eventId)

Erase event. (Same as the RPG Maker MZ method of this name.)

autorunCommonEvents

method source
Game_Map.prototype.autorunCommonEvents()

Autorun common events. (Same as the RPG Maker MZ method of this name.)

parallelCommonEvents

method source
Game_Map.prototype.parallelCommonEvents()

Parallel common events. (Same as the RPG Maker MZ method of this name.)

reactorEdgeReach

method source
Game_Map.prototype.reactorEdgeReach(side)

How far the view of a 2D map may go past its edge on side, in tiles: half a screen where a neighboring map lies past it (its ground is drawn there, Spriteset_Map.updateNeighborTilemaps), so the party keeps the middle of the screen up to the border; none elsewhere, on a looping side, or on a 3D map (whose scene stands the neighbor).

parallaxOx

method source
Game_Map.prototype.parallaxOx()

Parallax ox. (Same as the RPG Maker MZ method of this name.)

parallaxOy

method source
Game_Map.prototype.parallaxOy()

Parallax oy. (Same as the RPG Maker MZ method of this name.)

tileset

method source
Game_Map.prototype.tileset()

Tileset. (Same as the RPG Maker MZ method of this name.)

tilesetFlags

method source
Game_Map.prototype.tilesetFlags()

Tileset flags. (Same as the RPG Maker MZ method of this name.)

displayName

method source
Game_Map.prototype.displayName()

Display name. (Same as the RPG Maker MZ method of this name.)

encounterList

method source
Game_Map.prototype.encounterList()

Encounter list. (Same as the RPG Maker MZ method of this name.)

encounterStep

method source
Game_Map.prototype.encounterStep()

Encounter step. (Same as the RPG Maker MZ method of this name.)

reactorCameraZoom

method source
Game_Map.prototype.reactorCameraZoom()

Default 2D camera framing is expressed in logical game pixels.

Details

Default 2D camera framing is expressed in logical game pixels. A 3D map owns its projection and focus; these settings must not change its viewport.

reactorCameraOffset

method source
Game_Map.prototype.reactorCameraOffset(axis)

Reactor camera offset. (Same as the RPG Maker MZ method of this name.)

reactorCanvasToWorld

method source
Game_Map.prototype.reactorCanvasToWorld(value, axis)

Undo the existing event screen zoom/shake before undoing the map camera.

Details

Undo the existing event screen zoom/shake before undoing the map camera. This is the inverse of Spriteset_Base + the map's _baseSprite transform.

screenTileX

method source
Game_Map.prototype.screenTileX()

Screen tile x. (Same as the RPG Maker MZ method of this name.)

screenTileY

method source
Game_Map.prototype.screenTileY()

Screen tile y. (Same as the RPG Maker MZ method of this name.)

adjustX

method source
Game_Map.prototype.adjustX(x)

Adjust x. (Same as the RPG Maker MZ method of this name.)

adjustY

method source
Game_Map.prototype.adjustY(y)

Adjust y. (Same as the RPG Maker MZ method of this name.)

roundX

method source
Game_Map.prototype.roundX(x)

Round x. (Same as the RPG Maker MZ method of this name.)

roundY

method source
Game_Map.prototype.roundY(y)

Round y. (Same as the RPG Maker MZ method of this name.)

roundXWithDirection

method source
Game_Map.prototype.roundXWithDirection(x, d)

Round x with direction. (Same as the RPG Maker MZ method of this name.)

roundYWithDirection

method source
Game_Map.prototype.roundYWithDirection(y, d)

Round y with direction. (Same as the RPG Maker MZ method of this name.)

deltaX

method source
Game_Map.prototype.deltaX(x1, x2)

Delta x. (Same as the RPG Maker MZ method of this name.)

deltaY

method source
Game_Map.prototype.deltaY(y1, y2)

Delta y. (Same as the RPG Maker MZ method of this name.)

distance

method source
Game_Map.prototype.distance(x1, y1, x2, y2)

Distance. (Same as the RPG Maker MZ method of this name.)

canvasToMapX

method source
Game_Map.prototype.canvasToMapX(x)

Canvas to map x. (Same as the RPG Maker MZ method of this name.)

canvasToMapY

method source
Game_Map.prototype.canvasToMapY(y)

Canvas to map y. (Same as the RPG Maker MZ method of this name.)

autoplay

method source
Game_Map.prototype.autoplay()

Autoplay. (Same as the RPG Maker MZ method of this name.)

eventsXy

method source
Game_Map.prototype.eventsXy(x, y)

Events xy. (Same as the RPG Maker MZ method of this name.)

eventsXyNt

method source
Game_Map.prototype.eventsXyNt(x, y)

Events xy nt. (Same as the RPG Maker MZ method of this name.)

tileEventsXy

method source
Game_Map.prototype.tileEventsXy(x, y)

Tile events xy. (Same as the RPG Maker MZ method of this name.)

eventIdXy

method source
Game_Map.prototype.eventIdXy(x, y)

Event id xy. (Same as the RPG Maker MZ method of this name.)

scrollDown

method source
Game_Map.prototype.scrollDown(distance)

Scroll down. (Same as the RPG Maker MZ method of this name.)

scrollLeft

method source
Game_Map.prototype.scrollLeft(distance)

Scroll left. (Same as the RPG Maker MZ method of this name.)

scrollRight

method source
Game_Map.prototype.scrollRight(distance)

Scroll right. (Same as the RPG Maker MZ method of this name.)

scrollUp

method source
Game_Map.prototype.scrollUp(distance)

Scroll up. (Same as the RPG Maker MZ method of this name.)

checkPassage

method source
Game_Map.prototype.checkPassage(x, y, bit)

Check passage. (Same as the RPG Maker MZ method of this name.)

tileId

method source
Game_Map.prototype.tileId(x, y, z)

Tile id. (Same as the RPG Maker MZ method of this name.)

layeredTiles

method source
Game_Map.prototype.layeredTiles(x, y)

Layered tiles. (Same as the RPG Maker MZ method of this name.)

allTiles

method source
Game_Map.prototype.allTiles(x, y)

All tiles. (Same as the RPG Maker MZ method of this name.)

autotileType

method source
Game_Map.prototype.autotileType(x, y, z)

Autotile type. (Same as the RPG Maker MZ method of this name.)

rrPassageAt

method source
Game_Map.prototype.rrPassageAt(x, y)

A cell's passability set on the map itself ($dataMap.rrPassage, keys "x,y"): 1 open, 2 blocked, 16 + the sides that cannot be crossed (RPG Maker's bits: 1 down, 2 left, 4 right, 8 up; 17 to 30), 0 when the map leaves the cell to its tiles.

Details

A cell's passability set on the map itself ($dataMap.rrPassage, keys "x,y"): 1 open, 2 blocked, 16 + the sides that cannot be crossed (RPG Maker's bits: 1 down, 2 left, 4 right, 8 up; 17 to 30), 0 when the map leaves the cell to its tiles. A placed 2D structure writes it (docs/DESIGN-2D-STRUCTURES.md).

checkLayeredTilesFlags

method source
Game_Map.prototype.checkLayeredTilesFlags(x, y, bit)

Check layered tiles flags. (Same as the RPG Maker MZ method of this name.)

terrainTag

method source
Game_Map.prototype.terrainTag(x, y)

Terrain tag. (Same as the RPG Maker MZ method of this name.)

regionId

method source
Game_Map.prototype.regionId(x, y)

Region id. (Same as the RPG Maker MZ method of this name.)

scrollDistance

method source
Game_Map.prototype.scrollDistance()

Scroll distance. (Same as the RPG Maker MZ method of this name.)

doScroll

method source
Game_Map.prototype.doScroll(direction, distance)

Do scroll. (Same as the RPG Maker MZ method of this name.)

unlockEvent

method source
Game_Map.prototype.unlockEvent(eventId)

Unlock event. (Same as the RPG Maker MZ method of this name.)

rrHasTimerPages

method source
Game_Map.prototype.rrHasTimerPages()

Whether a page of this map waits on the timer (rrTimerSec); worked out once per map's data, never saved.