The static class that manages the database and game objects.
Methods
- Check if there are any errors, throw a retry screen error if any exist
Throws:
Retry screen error - Tries to correct any bad data
- Creates $gameTemp and the other game objects
- Gets the earliest save file
Returns:
Type Description number The index of the earliest save file - Gets the index of an empty save file
Returns:
Type Description number The index of the empty save file - Extract metadata from an array object
Name Type Description array
Array The array to extract metadata from - Extract metadata from an individual object
Name Type Description data
* The data that might have a meta property in its note - Extracts the content from a save file to the various game objects
Name Type Description contents
Object The save file contents - Check if there are any save files
Returns:
Type Description boolean True if any save files exist - Check if the given object is an armor from the database
Name Type Description item
* Item to check for inclusion in $dataArmors Returns:
Type Description boolean True if the object is an armor - Check if the game is in battle test mode
Returns:
Type Description boolean True if the game is in battle test mode - Check if all of the database files are loaded
Returns:
Type Description boolean True if all database files are loaded - Check if the game is in event test mode
Returns:
Type Description boolean True if the game is in event test mode - Check if global info is loaded
Returns:
Type Description boolean True if global info is loaded. - Check if the given object is an item from the database
Name Type Description item
* Item to check for inclusion in $dataItems Returns:
Type Description boolean True if the object is an item - Check if the map is loaded
Returns:
Type Description boolean True if map data is loaded - Check if an object represents map data
Name Type Description object
* The object to check for map info Returns:
Type Description boolean True if the object represents a map - Check if the given object is a skill from the database
Name Type Description item
* Item to check for inclusion in $dataSkills Returns:
Type Description boolean True if the object is a skill - Check if title skip option is enabled
- Since:
- Version 1.7.0
Returns:
Type Description boolean True if title skip is on - Check if the given object is a weapon from the database
Name Type Description item
* Item to check for inclusion in $dataWeapons Returns:
Type Description boolean True if the object is a weapon - Gets the last used save file
Returns:
Type Description number The index of the last save file - Loads the images needed for display in the file select screen
- Loads the database file with the given name and src
Name Type Description name
string The name of the data object to store loaded data in src
string The path to the data file to load - Loads each of the database files
- Tries to load game info from the given save file id slot
Name Type Description savefileId
number The id of the save file slot to load - Loads the "global" object
- Loads a map data file by the map's id
Name Type Description mapId
number The ID of the map to load - Loads the images needed for display in the file select screen from a specific save file
Name Type Description info
* The save file info with image data to load - Makes an empty map with no data or events, stored in $dataMap
- Creates save file contents
Returns:
Type Description Object The save file contents - Creates save file info for the file select screen
Returns:
Type Description Object The save file info contents - Creates the file name of the save file from the save file id slot
Name Type Description savefileId
number The id of the save file slot Returns:
Type Description string The save file name - Determines the maximum number of save files allowed
Returns:
Type Description number The maximum number of save files allowed - Handling for when a data object is loaded
Name Type Description object
* The object that was loaded - Handling for when the xhr object encounters an error
Name Type Description name
string The name of the data object to store loaded data in src
string The path to the data file to load url
string The full path to the data file to load - Handling for when the xhr object is loaded
Name Type Description xhr
XMLHttpRequest The XMLHttpRequest object name
string The name of the data object to store loaded data in src
string The path to the data file to load url
string The full path to the data file to load - Check for and remove invalid global info if any exists
- Tries to save the game in the given save file id slot
Name Type Description savefileId
number The id of the save file slot to save - Saves the "global" object
- Checks if a given save file exists by save file id
Name Type Description savefileId
number The id of the save file to check Returns:
Type Description boolean True if save data exists for that file id - Gets the save file info for a specific save file id
Name Type Description savefileId
number The id of the save file to load Returns:
Type Description Object|null Either the save file info if exists, or null - Selects the initial save file slot for a new game
- Handles setting up a battle test
- Handles setting up an event test
- Handles setting up a new game