Class in reactor_managers.js
DataManager
54 public functions in 6 groups · show internal (_) functions
Familiar territory. DataManager 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 16
| loadGlobalInfo() | Loads the global info. |
| loadDatabase() | Loads the database. |
| loadDataFile() | Loads the data file. |
| loadMapData() | Loads the map data. |
| loadMapSidecar() | Fetch a 3D map's sidecar, if it declares itself one. |
| makeEmptyMap() | Makes the empty map. |
| createGameObjects() | Creates the game objects. |
| setupNewGame() | Setup new game. |
| setupBattleTest() | Setup battle test. |
| setupEventTest() | Setup event test. |
| loadAllSavefileImages() | Loads the all savefile images. |
| loadSavefileImages() | Loads the savefile images. |
| loadGame() | Loads the game. |
| makeSavename() | Makes the savename. |
| makeSavefileInfo() | Makes the savefile info. |
| makeSaveContents() | Makes the save contents. |
Getting Information 1
| maxSavefiles() | The maximum savefiles. |
Checks (True / False) 14
| isGlobalInfoLoaded() | Whether it is global info loaded. |
| isDatabaseLoaded() | Whether it is database loaded. |
| isMapLoaded() | Whether it is map loaded. |
| isMapObject() | Whether it is map object. |
| isBattleTest() | Whether it is battle test. |
| isEventTest() | Whether it is event test. |
| isTitleSkip() | Whether it is title skip. |
| isSkill() | Whether it is skill. |
| isItem() | Whether it is item. |
| isWeapon() | Whether it is weapon. |
| isArmor() | Whether it is armor. |
| isAnySavefileExists() | Whether it is any savefile exists. |
| isPlaytestCheckpointEnabled() | Whether it is playtest checkpoint enabled. |
| hasPlaytestCheckpoint() | Whether it has the playtest checkpoint. |
Actions 7
| removeInvalidGlobalInfo() | Removes the invalid global info. |
| removeHiddenGlobalInfo() | The playtest checkpoint is not a save the player made. |
| saveGlobalInfo() | Saves the global info. |
| savePlaytestCheckpoint() | Saves the checkpoint, unless one is being written or the party is dead. |
| saveGame() | Saves the game. |
| selectSavefileForNewGame() | Selects the savefile for new game. |
| swapReferences() | Every writable reference reachable from roots to a key of swaps replaced by its value (data fields only; acce… |
Events, Commands & Input 3
| onXhrLoad() | Called when xhr load happens. |
| onXhrError() | Called when xhr error happens. |
| onLoad() | Called when load happens. |
Other 13
| bridgeStateDescriptions() | Bridge state descriptions. |
| extractArrayMetadata() | Extract array metadata. |
| extractMetadata() | Extract metadata. |
| checkError() | Check error. |
| latestSavefileId() | Latest savefile id. |
| earliestSavefileId() | Earliest savefile id. |
| emptySavefileId() | Empty savefile id. |
| savefileInfo() | Savefile info. |
| playtestCheckpointId() | The checkpoint to resume: the named file, else one left in slot 99 by an earlier build; null with neither. |
| savefileExists() | Savefile exists. |
| extractSaveContents() | Extract save contents. |
| evenCharacterShapes() | The restored characters rebuilt in one shape per kind (Game_CharacterBase.evenOut), and every reference to on… |
| correctDataErrors() | Correct data errors. |
Setup & Creation
loadGlobalInfo
static sourceDataManager.loadGlobalInfo()
Loads the global info. (Same as the RPG Maker MZ method of this name.)
loadDatabase
static sourceDataManager.loadDatabase()
Loads the database. (Same as the RPG Maker MZ method of this name.)
loadDataFile
static sourceDataManager.loadDataFile(name, src)
Loads the data file. (Same as the RPG Maker MZ method of this name.)
loadMapData
static sourceDataManager.loadMapData(mapId)
Loads the map data. (Same as the RPG Maker MZ method of this name.)
loadMapSidecar
static sourceDataManager.loadMapSidecar(mapData)
Fetch a 3D map's sidecar, if it declares itself one.
Details
Fetch a 3D map's sidecar, if it declares itself one.
The map note is the switch and the sidecar is the data: only a map carrying <3d> is asked for one, so a project with no 3D maps issues no extra requests and pays nothing for the feature. A missing or unreadable sidecar is not an error — the map renders flat at elevation 0, which is exactly the state an existing 2D map is in before any elevation has been painted.
makeEmptyMap
static sourceDataManager.makeEmptyMap()
Makes the empty map. (Same as the RPG Maker MZ method of this name.)
createGameObjects
static sourceDataManager.createGameObjects()
Creates the game objects. (Same as the RPG Maker MZ method of this name.)
setupNewGame
static sourceDataManager.setupNewGame()
Setup new game. (Same as the RPG Maker MZ method of this name.)
setupBattleTest
static sourceDataManager.setupBattleTest()
Setup battle test. (Same as the RPG Maker MZ method of this name.)
setupEventTest
static sourceDataManager.setupEventTest()
Setup event test. (Same as the RPG Maker MZ method of this name.)
loadAllSavefileImages
static sourceDataManager.loadAllSavefileImages()
Loads the all savefile images. (Same as the RPG Maker MZ method of this name.)
loadSavefileImages
static sourceDataManager.loadSavefileImages(info)
Loads the savefile images. (Same as the RPG Maker MZ method of this name.)
loadGame
static sourceDataManager.loadGame(savefileId)
Loads the game. (Same as the RPG Maker MZ method of this name.)
makeSavename
static sourceDataManager.makeSavename(savefileId)
Makes the savename. (Same as the RPG Maker MZ method of this name.)
makeSavefileInfo
static sourceDataManager.makeSavefileInfo()
Makes the savefile info. (Same as the RPG Maker MZ method of this name.)
makeSaveContents
static sourceDataManager.makeSaveContents()
Makes the save contents. (Same as the RPG Maker MZ method of this name.)
Getting Information
maxSavefiles
static sourceDataManager.maxSavefiles()
The maximum savefiles. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
isGlobalInfoLoaded
static sourceDataManager.isGlobalInfoLoaded()
Whether it is global info loaded. (Same as the RPG Maker MZ method of this name.)
isDatabaseLoaded
static sourceDataManager.isDatabaseLoaded()
Whether it is database loaded. (Same as the RPG Maker MZ method of this name.)
isMapLoaded
static sourceDataManager.isMapLoaded()
Whether it is map loaded. (Same as the RPG Maker MZ method of this name.)
isMapObject
static sourceDataManager.isMapObject(object)
Whether it is map object. (Same as the RPG Maker MZ method of this name.)
isBattleTest
static sourceDataManager.isBattleTest()
Whether it is battle test. (Same as the RPG Maker MZ method of this name.)
isEventTest
static sourceDataManager.isEventTest()
Whether it is event test. (Same as the RPG Maker MZ method of this name.)
isTitleSkip
static sourceDataManager.isTitleSkip()
Whether it is title skip. (Same as the RPG Maker MZ method of this name.)
isSkill
static sourceDataManager.isSkill(item)
Whether it is skill. (Same as the RPG Maker MZ method of this name.)
isItem
static sourceDataManager.isItem(item)
Whether it is item. (Same as the RPG Maker MZ method of this name.)
isWeapon
static sourceDataManager.isWeapon(item)
Whether it is weapon. (Same as the RPG Maker MZ method of this name.)
isArmor
static sourceDataManager.isArmor(item)
Whether it is armor. (Same as the RPG Maker MZ method of this name.)
isAnySavefileExists
static sourceDataManager.isAnySavefileExists()
Whether it is any savefile exists. (Same as the RPG Maker MZ method of this name.)
isPlaytestCheckpointEnabled
static sourceDataManager.isPlaytestCheckpointEnabled()
Whether it is playtest checkpoint enabled. (Same as the RPG Maker MZ method of this name.)
hasPlaytestCheckpoint
static sourceDataManager.hasPlaytestCheckpoint()
Whether it has the playtest checkpoint. (Same as the RPG Maker MZ method of this name.)
Actions
removeInvalidGlobalInfo
static sourceDataManager.removeInvalidGlobalInfo()
Removes the invalid global info. (Same as the RPG Maker MZ method of this name.)
removeHiddenGlobalInfo
static sourceDataManager.removeHiddenGlobalInfo()
The playtest checkpoint is not a save the player made.
Details
The playtest checkpoint is not a save the player made. Its file is written, its entry never stays in the save list, so no list, newest-save lookup or Continue (the engine's or a plugin's) can land on it.
saveGlobalInfo
static sourceDataManager.saveGlobalInfo(info)
Saves the global info. (Same as the RPG Maker MZ method of this name.)
savePlaytestCheckpoint
static sourceDataManager.savePlaytestCheckpoint(reason)
Saves the checkpoint, unless one is being written or the party is dead.
saveGame
static sourceDataManager.saveGame(savefileId)
Saves the game. (Same as the RPG Maker MZ method of this name.)
selectSavefileForNewGame
static sourceDataManager.selectSavefileForNewGame()
Selects the savefile for new game. (Same as the RPG Maker MZ method of this name.)
swapReferences
static sourceDataManager.swapReferences(roots, swaps)
Every writable reference reachable from roots to a key of swaps replaced by its value (data fields only; accessors are not read).
Events, Commands & Input
onXhrLoad
static sourceDataManager.onXhrLoad(xhr, name, src, url)
Called when xhr load happens. (Same as the RPG Maker MZ method of this name.)
onXhrError
static sourceDataManager.onXhrError(name, src, url)
Called when xhr error happens. (Same as the RPG Maker MZ method of this name.)
onLoad
static sourceDataManager.onLoad(object)
Called when load happens. (Same as the RPG Maker MZ method of this name.)
Other
bridgeStateDescriptions
static sourceDataManager.bridgeStateDescriptions(states)
Bridge state descriptions. (Same as the RPG Maker MZ method of this name.)
extractArrayMetadata
static sourceDataManager.extractArrayMetadata(array)
Extract array metadata. (Same as the RPG Maker MZ method of this name.)
extractMetadata
static sourceDataManager.extractMetadata(data)
Extract metadata. (Same as the RPG Maker MZ method of this name.)
checkError
static sourceDataManager.checkError()
Check error. (Same as the RPG Maker MZ method of this name.)
latestSavefileId
static sourceDataManager.latestSavefileId()
Latest savefile id. (Same as the RPG Maker MZ method of this name.)
earliestSavefileId
static sourceDataManager.earliestSavefileId()
Earliest savefile id. (Same as the RPG Maker MZ method of this name.)
emptySavefileId
static sourceDataManager.emptySavefileId()
Empty savefile id. (Same as the RPG Maker MZ method of this name.)
savefileInfo
static sourceDataManager.savefileInfo(savefileId)
Savefile info. (Same as the RPG Maker MZ method of this name.)
playtestCheckpointId
static sourceDataManager.playtestCheckpointId()
The checkpoint to resume: the named file, else one left in slot 99 by an earlier build; null with neither.
savefileExists
static sourceDataManager.savefileExists(savefileId)
Savefile exists. (Same as the RPG Maker MZ method of this name.)
extractSaveContents
static sourceDataManager.extractSaveContents(contents)
Extract save contents. (Same as the RPG Maker MZ method of this name.)
evenCharacterShapes
static sourceDataManager.evenCharacterShapes(contents)
The restored characters rebuilt in one shape per kind (Game_CharacterBase.evenOut), and every reference to one anywhere in the loaded game (contents, or the game objects when not given) moved to its rebuilt self: a save that keeps shared references (an interpreter waiting on an event, a plugin's list of characters) plays on the same objects.
correctDataErrors
static sourceDataManager.correctDataErrors()
Correct data errors. (Same as the RPG Maker MZ method of this name.)