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 sourceGame_Map.prototype.initialize()
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
setup
method sourceGame_Map.prototype.setup(mapId)
Setup. (Same as the RPG Maker MZ method of this name.)
createVehicles
method sourceGame_Map.prototype.createVehicles()
Creates the vehicles. (Same as the RPG Maker MZ method of this name.)
setupEvents
method sourceGame_Map.prototype.setupEvents()
Setup events. (Same as the RPG Maker MZ method of this name.)
setupScroll
method sourceGame_Map.prototype.setupScroll()
Setup scroll. (Same as the RPG Maker MZ method of this name.)
setupParallax
method sourceGame_Map.prototype.setupParallax()
Setup parallax. (Same as the RPG Maker MZ method of this name.)
setupBattleback
method sourceGame_Map.prototype.setupBattleback()
Setup battleback. (Same as the RPG Maker MZ method of this name.)
setupStartingEvent
method sourceGame_Map.prototype.setupStartingEvent()
Setup starting event. (Same as the RPG Maker MZ method of this name.)
setupTestEvent
method sourceGame_Map.prototype.setupTestEvent()
Setup test event. (Same as the RPG Maker MZ method of this name.)
setupStartingMapEvent
method sourceGame_Map.prototype.setupStartingMapEvent()
Setup starting map event. (Same as the RPG Maker MZ method of this name.)
setupAutorunCommonEvent
method sourceGame_Map.prototype.setupAutorunCommonEvent()
Setup autorun common event. (Same as the RPG Maker MZ method of this name.)
Getting Information
width
method sourceGame_Map.prototype.width()
Width. (Same as the RPG Maker MZ method of this name.)
height
method sourceGame_Map.prototype.height()
Height. (Same as the RPG Maker MZ method of this name.)
data
method sourceGame_Map.prototype.data()
Data. (Same as the RPG Maker MZ method of this name.)
xWithDirection
method sourceGame_Map.prototype.xWithDirection(x, d)
X with direction. (Same as the RPG Maker MZ method of this name.)
yWithDirection
method sourceGame_Map.prototype.yWithDirection(y, d)
Y with direction. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
isEventRunning
method sourceGame_Map.prototype.isEventRunning()
Whether it is event running. (Same as the RPG Maker MZ method of this name.)
isNameDisplayEnabled
method sourceGame_Map.prototype.isNameDisplayEnabled()
Whether it is name display enabled. (Same as the RPG Maker MZ method of this name.)
isLoopHorizontal
method sourceGame_Map.prototype.isLoopHorizontal()
Whether it is loop horizontal. (Same as the RPG Maker MZ method of this name.)
isLoopVertical
method sourceGame_Map.prototype.isLoopVertical()
Whether it is loop vertical. (Same as the RPG Maker MZ method of this name.)
isDashDisabled
method sourceGame_Map.prototype.isDashDisabled()
Whether it is dash disabled. (Same as the RPG Maker MZ method of this name.)
isOverworld
method sourceGame_Map.prototype.isOverworld()
Whether it is overworld. (Same as the RPG Maker MZ method of this name.)
isValid
method sourceGame_Map.prototype.isValid(x, y)
Whether it is valid. (Same as the RPG Maker MZ method of this name.)
isPassable
method sourceGame_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 sourceGame_Map.prototype.isBoatPassable(x, y)
Whether it is boat passable. (Same as the RPG Maker MZ method of this name.)
isShipPassable
method sourceGame_Map.prototype.isShipPassable(x, y)
Whether it is ship passable. (Same as the RPG Maker MZ method of this name.)
isAirshipLandOk
method sourceGame_Map.prototype.isAirshipLandOk(x, y)
Whether it is airship land ok. (Same as the RPG Maker MZ method of this name.)
isLadder
method sourceGame_Map.prototype.isLadder(x, y)
Whether it is ladder. (Same as the RPG Maker MZ method of this name.)
isBush
method sourceGame_Map.prototype.isBush(x, y)
Whether it is bush. (Same as the RPG Maker MZ method of this name.)
isCounter
method sourceGame_Map.prototype.isCounter(x, y)
Whether it is counter. (Same as the RPG Maker MZ method of this name.)
isDamageFloor
method sourceGame_Map.prototype.isDamageFloor(x, y)
Whether it is damage floor. (Same as the RPG Maker MZ method of this name.)
isScrolling
method sourceGame_Map.prototype.isScrolling()
Whether it is scrolling. (Same as the RPG Maker MZ method of this name.)
isAnyEventStarting
method sourceGame_Map.prototype.isAnyEventStarting()
Whether it is any event starting. (Same as the RPG Maker MZ method of this name.)
Actions
requestRefresh
method sourceGame_Map.prototype.requestRefresh()
Requests the refresh. (Same as the RPG Maker MZ method of this name.)
disableNameDisplay
method sourceGame_Map.prototype.disableNameDisplay()
Disables the name display. (Same as the RPG Maker MZ method of this name.)
enableNameDisplay
method sourceGame_Map.prototype.enableNameDisplay()
Enables the name display. (Same as the RPG Maker MZ method of this name.)
setDisplayPos
method sourceGame_Map.prototype.setDisplayPos(x, y)
Sets the display pos. (Same as the RPG Maker MZ method of this name.)
startScroll
method sourceGame_Map.prototype.startScroll(direction, distance, speed)
Starts the scroll. (Same as the RPG Maker MZ method of this name.)
changeTileset
method sourceGame_Map.prototype.changeTileset(tilesetId)
Changes the tileset. (Same as the RPG Maker MZ method of this name.)
changeParallax
method sourceGame_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 sourceGame_Map.prototype.refreshCommonEventTriggerCache()
Redraws the common event trigger cache. (Same as the RPG Maker MZ method of this name.)
refreshEventList
method sourceGame_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 sourceGame_Map.prototype.refreshIfNeeded()
Redraws the if needed. (Same as the RPG Maker MZ method of this name.)
refresh
method sourceGame_Map.prototype.refresh()
Refresh. (Same as the RPG Maker MZ method of this name.)
refreshTileEvents
method sourceGame_Map.prototype.refreshTileEvents()
Redraws the tile events. (Same as the RPG Maker MZ method of this name.)
update
method sourceGame_Map.prototype.update(sceneActive)
Update. (Same as the RPG Maker MZ method of this name.)
updateScroll
method sourceGame_Map.prototype.updateScroll()
Updates the scroll each frame. (Same as the RPG Maker MZ method of this name.)
updateEvents
method sourceGame_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 sourceGame_Map.prototype.updateVehicles()
Updates the vehicles each frame. (Same as the RPG Maker MZ method of this name.)
updateParallax
method sourceGame_Map.prototype.updateParallax()
Updates the parallax each frame. (Same as the RPG Maker MZ method of this name.)
updateInterpreter
method sourceGame_Map.prototype.updateInterpreter()
Updates the interpreter each frame. (Same as the RPG Maker MZ method of this name.)
Other
tileWidth
method sourceGame_Map.prototype.tileWidth()
Tile width. (Same as the RPG Maker MZ method of this name.)
tileHeight
method sourceGame_Map.prototype.tileHeight()
Tile height. (Same as the RPG Maker MZ method of this name.)
bushDepth
method sourceGame_Map.prototype.bushDepth()
Bush depth. (Same as the RPG Maker MZ method of this name.)
mapId
method sourceGame_Map.prototype.mapId()
Map id. (Same as the RPG Maker MZ method of this name.)
tilesetId
method sourceGame_Map.prototype.tilesetId()
Tileset id. (Same as the RPG Maker MZ method of this name.)
displayX
method sourceGame_Map.prototype.displayX()
Display x. (Same as the RPG Maker MZ method of this name.)
displayY
method sourceGame_Map.prototype.displayY()
Display y. (Same as the RPG Maker MZ method of this name.)
parallaxName
method sourceGame_Map.prototype.parallaxName()
Parallax name. (Same as the RPG Maker MZ method of this name.)
battleback1Name
method sourceGame_Map.prototype.battleback1Name()
Battleback1 name. (Same as the RPG Maker MZ method of this name.)
battleback2Name
method sourceGame_Map.prototype.battleback2Name()
Battleback2 name. (Same as the RPG Maker MZ method of this name.)
refereshVehicles
method sourceGame_Map.prototype.refereshVehicles()
Referesh vehicles. (Same as the RPG Maker MZ method of this name.)
vehicles
method sourceGame_Map.prototype.vehicles()
Vehicles. (Same as the RPG Maker MZ method of this name.)
vehicle
method sourceGame_Map.prototype.vehicle(type)
Vehicle. (Same as the RPG Maker MZ method of this name.)
boat
method sourceGame_Map.prototype.boat()
Boat. (Same as the RPG Maker MZ method of this name.)
ship
method sourceGame_Map.prototype.ship()
Ship. (Same as the RPG Maker MZ method of this name.)
airship
method sourceGame_Map.prototype.airship()
Airship. (Same as the RPG Maker MZ method of this name.)
events
method sourceGame_Map.prototype.events()
Events. (Same as the RPG Maker MZ method of this name.)
event
method sourceGame_Map.prototype.event(eventId)
Event. (Same as the RPG Maker MZ method of this name.)
eraseEvent
method sourceGame_Map.prototype.eraseEvent(eventId)
Erase event. (Same as the RPG Maker MZ method of this name.)
autorunCommonEvents
method sourceGame_Map.prototype.autorunCommonEvents()
Autorun common events. (Same as the RPG Maker MZ method of this name.)
parallelCommonEvents
method sourceGame_Map.prototype.parallelCommonEvents()
Parallel common events. (Same as the RPG Maker MZ method of this name.)
reactorEdgeReach
method sourceGame_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 sourceGame_Map.prototype.parallaxOx()
Parallax ox. (Same as the RPG Maker MZ method of this name.)
parallaxOy
method sourceGame_Map.prototype.parallaxOy()
Parallax oy. (Same as the RPG Maker MZ method of this name.)
tileset
method sourceGame_Map.prototype.tileset()
Tileset. (Same as the RPG Maker MZ method of this name.)
tilesetFlags
method sourceGame_Map.prototype.tilesetFlags()
Tileset flags. (Same as the RPG Maker MZ method of this name.)
displayName
method sourceGame_Map.prototype.displayName()
Display name. (Same as the RPG Maker MZ method of this name.)
encounterList
method sourceGame_Map.prototype.encounterList()
Encounter list. (Same as the RPG Maker MZ method of this name.)
encounterStep
method sourceGame_Map.prototype.encounterStep()
Encounter step. (Same as the RPG Maker MZ method of this name.)
reactorCameraZoom
method sourceGame_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 sourceGame_Map.prototype.reactorCameraOffset(axis)
Reactor camera offset. (Same as the RPG Maker MZ method of this name.)
reactorCanvasToWorld
method sourceGame_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 sourceGame_Map.prototype.screenTileX()
Screen tile x. (Same as the RPG Maker MZ method of this name.)
screenTileY
method sourceGame_Map.prototype.screenTileY()
Screen tile y. (Same as the RPG Maker MZ method of this name.)
adjustX
method sourceGame_Map.prototype.adjustX(x)
Adjust x. (Same as the RPG Maker MZ method of this name.)
adjustY
method sourceGame_Map.prototype.adjustY(y)
Adjust y. (Same as the RPG Maker MZ method of this name.)
roundX
method sourceGame_Map.prototype.roundX(x)
Round x. (Same as the RPG Maker MZ method of this name.)
roundY
method sourceGame_Map.prototype.roundY(y)
Round y. (Same as the RPG Maker MZ method of this name.)
roundXWithDirection
method sourceGame_Map.prototype.roundXWithDirection(x, d)
Round x with direction. (Same as the RPG Maker MZ method of this name.)
roundYWithDirection
method sourceGame_Map.prototype.roundYWithDirection(y, d)
Round y with direction. (Same as the RPG Maker MZ method of this name.)
deltaX
method sourceGame_Map.prototype.deltaX(x1, x2)
Delta x. (Same as the RPG Maker MZ method of this name.)
deltaY
method sourceGame_Map.prototype.deltaY(y1, y2)
Delta y. (Same as the RPG Maker MZ method of this name.)
distance
method sourceGame_Map.prototype.distance(x1, y1, x2, y2)
Distance. (Same as the RPG Maker MZ method of this name.)
canvasToMapX
method sourceGame_Map.prototype.canvasToMapX(x)
Canvas to map x. (Same as the RPG Maker MZ method of this name.)
canvasToMapY
method sourceGame_Map.prototype.canvasToMapY(y)
Canvas to map y. (Same as the RPG Maker MZ method of this name.)
autoplay
method sourceGame_Map.prototype.autoplay()
Autoplay. (Same as the RPG Maker MZ method of this name.)
eventsXy
method sourceGame_Map.prototype.eventsXy(x, y)
Events xy. (Same as the RPG Maker MZ method of this name.)
eventsXyNt
method sourceGame_Map.prototype.eventsXyNt(x, y)
Events xy nt. (Same as the RPG Maker MZ method of this name.)
tileEventsXy
method sourceGame_Map.prototype.tileEventsXy(x, y)
Tile events xy. (Same as the RPG Maker MZ method of this name.)
eventIdXy
method sourceGame_Map.prototype.eventIdXy(x, y)
Event id xy. (Same as the RPG Maker MZ method of this name.)
scrollDown
method sourceGame_Map.prototype.scrollDown(distance)
Scroll down. (Same as the RPG Maker MZ method of this name.)
scrollLeft
method sourceGame_Map.prototype.scrollLeft(distance)
Scroll left. (Same as the RPG Maker MZ method of this name.)
scrollRight
method sourceGame_Map.prototype.scrollRight(distance)
Scroll right. (Same as the RPG Maker MZ method of this name.)
scrollUp
method sourceGame_Map.prototype.scrollUp(distance)
Scroll up. (Same as the RPG Maker MZ method of this name.)
checkPassage
method sourceGame_Map.prototype.checkPassage(x, y, bit)
Check passage. (Same as the RPG Maker MZ method of this name.)
tileId
method sourceGame_Map.prototype.tileId(x, y, z)
Tile id. (Same as the RPG Maker MZ method of this name.)
layeredTiles
method sourceGame_Map.prototype.layeredTiles(x, y)
Layered tiles. (Same as the RPG Maker MZ method of this name.)
allTiles
method sourceGame_Map.prototype.allTiles(x, y)
All tiles. (Same as the RPG Maker MZ method of this name.)
autotileType
method sourceGame_Map.prototype.autotileType(x, y, z)
Autotile type. (Same as the RPG Maker MZ method of this name.)
rrPassageAt
method sourceGame_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 sourceGame_Map.prototype.checkLayeredTilesFlags(x, y, bit)
Check layered tiles flags. (Same as the RPG Maker MZ method of this name.)
terrainTag
method sourceGame_Map.prototype.terrainTag(x, y)
Terrain tag. (Same as the RPG Maker MZ method of this name.)
regionId
method sourceGame_Map.prototype.regionId(x, y)
Region id. (Same as the RPG Maker MZ method of this name.)
scrollDistance
method sourceGame_Map.prototype.scrollDistance()
Scroll distance. (Same as the RPG Maker MZ method of this name.)
doScroll
method sourceGame_Map.prototype.doScroll(direction, distance)
Do scroll. (Same as the RPG Maker MZ method of this name.)
unlockEvent
method sourceGame_Map.prototype.unlockEvent(eventId)
Unlock event. (Same as the RPG Maker MZ method of this name.)
rrHasTimerPages
method sourceGame_Map.prototype.rrHasTimerPages()
Whether a page of this map waits on the timer (rrTimerSec); worked out once per map's data, never saved.