Module: RgssDb

Defined in:
lib/rgss_db.rb,
lib/rgss_db/app.rb,
lib/rgss_db/version.rb,
lib/rgss_db/model/debug.rb,
lib/rgss_db/model/errors.rb,
lib/rgss_db/view/app_cli.rb,
lib/rgss_db/model/strings.rb,
lib/rgss_db/model/data_file.rb,
lib/rgss_db/model/utilities.rb,
lib/rgss_db/model/mixins/jsonable.rb,
lib/rgss_db/controller/data_manager.rb,
lib/rgss_db/model/data_file_factory.rb,
lib/rgss_db/model/mixins/jsonable_constructor.rb

Overview

Application module

Defined Under Namespace

Modules: DataFileFactory, Debug, EntryPoint, Jsonable, JsonableConstructor, Strings, Utilities Classes: App, AppCli, DataFile, DataFileArray, DataFileHash, DataFileHashNumber, DataManager, Error

Constant Summary collapse

APP_OPTION_DEBUG_MODE =

App option debug mode

Returns:

  • (Symbol)
:debug
APP_OPTION_BACK_UP =

App option back up flag

Returns:

  • (Symbol)
:backup
APP_OPTION_ACTION =

App option action type

Returns:

  • (Symbol)
:action
APP_OPTION_FILE_ENTRIES =

App option file entries

Returns:

  • (Symbol)
:files
APP_OPTION_IDS =

App option object ids

Returns:

  • (Symbol)
:ids
APP_OPTION_FORMAT_TYPE =

App option format

Returns:

  • (Symbol)
:type
APP_OPTION_WORKING_DIR =

App option working directory

Returns:

  • (Symbol)
:directory
APP_ACTION_EXPORT =

Export data action command name

This action exports all binary files into external files

Returns:

  • (String)
"export"
APP_ACTION_EXPORT_CUSTOM =

Export custom data action command name

This action exports the supported binary files custom objects into external files

Returns:

  • (String)
"export_custom"
APP_ACTION_IMPORT =

Import data action command name

This action imports external files into binary files

Returns:

  • (String)
"import"
APP_ACTION_IMPORT_CUSTOM =

Import custom data action command name

This action imports external custom data files into their appropiate binary files

Returns:

  • (String)
"import_custom"
APP_DEFAULT_BACK_UP =

Default back up mode of the application

Returns:

  • (Boolean)
true
APP_DEFAULT_DEBUG_MODE =

Default debug mode of the application

Returns:

  • (Integer)
0
APP_DEFAULT_FORMAT_TYPE =

Default file format type for the application

Returns:

  • (String)
"YAML"
APP_DEFAULT_WORKING_DIR =

Default working directory for the application

Returns:

  • (String)
"./rgss-db"
VERSION =

App version as a string

Returns:

  • (String)
"1.0.3"
APP_CLI_SELECT_PER_PAGE =

Value that determines the number of options per page on the select prompt

Returns:

  • (Integer)
7
APP_CLI_MULTI_SELECT_PER_PAGE =

Value that determines the number of options per page on the multi select prompt

Returns:

  • (Integer)
7
APP_CLI_MULTI_SELECT_ENUM_CHAR =

Value that determines the enumator character for the multi select prompt

Returns:

  • (String)
"."
DATA_FILE_CUSTOM_LABEL =

Label used for data files that allows objects selection

Returns:

  • (String)
"_custom"
DATA_FILE_ACTORS =

RPG Maker actors data file (glob pattern)

Returns:

  • (String)
"Actors"
DATA_FILE_ANIMATIONS =

RPG Maker animations data file (glob pattern)

Returns:

  • (String)
"Animations"
DATA_FILE_AREAS =

RPG Maker areas data file (glob pattern)

Returns:

  • (String)
"Areas"
DATA_FILE_ARMORS =

RPG Maker armors data file (glob pattern)

Returns:

  • (String)
"Armors"
DATA_FILE_CLASSES =

RPG Maker classes data file (glob pattern)

Returns:

  • (String)
"Classes"
DATA_FILE_COMMON_EVENTS =

RPG Maker common events data file (glob pattern)

Returns:

  • (String)
"CommonEvents"
DATA_FILE_ENEMIES =

RPG Maker enemies data file (glob pattern)

Returns:

  • (String)
"Enemies"
DATA_FILE_ITEMS =

RPG Maker items data file (glob pattern)

Returns:

  • (String)
"Items"
DATA_FILE_MAPS =

RPG Maker maps data file (glob pattern)

Returns:

  • (String)
"Map[0-9][0-9][0-9]"
DATA_FILE_MAP_INFOS =

RPG Maker map infos data file (glob pattern)

Returns:

  • (String)
"MapInfos"
DATA_FILE_SKILLS =

RPG Maker skills data file (glob pattern)

Returns:

  • (String)
"Skills"
DATA_FILE_STATES =

RPG Maker states data file (glob pattern)

Returns:

  • (String)
"States"
DATA_FILE_SYSTEM =

RPG Maker system data file (glob pattern)

Returns:

  • (String)
"System"
DATA_FILE_TILESETS =

RPG Maker tilesets data file (glob pattern)

Returns:

  • (String)
"Tilesets"
DATA_FILE_TROOPS =

RPG Maker troops data file (glob pattern)

Returns:

  • (String)
"Troops"
DATA_FILE_WEAPONS =

RPG Maker weapons data file (glob pattern)

Returns:

  • (String)
"Weapons"
RGSS_BACK_UP_RELATIVE_PATH =

Relative path within the working directory to store back ups

Returns:

  • (String)
"./Back Ups"
RGSS_VERSION_XP =

RPG Maker XP RGSS version symbol

Returns:

  • (Symbol)
:rpg_maker_xp
RGSS_VERSION_VX =

RPG Maker VX RGSS version symbol

Returns:

  • (Symbol)
:rpg_maker_vx
RGSS_VERSION_VX_ACE =

RPG Maker VX Ace RGSS version symbol

Returns:

  • (Symbol)
:rpg_maker_vx_ace
RGSS_FORMAT_TYPE_BINARY =

Binary file format type

Returns:

  • (Symbol)
:binary
RGSS_FORMAT_TYPE_JSON =

JSON file format type

Returns:

  • (Symbol)
:json
RGSS_FORMAT_TYPE_YAML =

YAML file format type

Returns:

  • (Symbol)
:yaml
RGSS_FILE_EXT_JSON =

JSON file format extension

Returns:

  • (String)
".json"
RGSS_FILE_EXT_YAML =

Exported YAML data file extension

Returns:

  • (String)
".yml"
RGSS_FILE_EXT_XP =

RPG Maker XP binary data file extension

Returns:

  • (String)
".rxdata"
RGSS_FILE_EXT_VX =

RPG Maker VX binary data file extension

Returns:

  • (String)
".rvdata"
RGSS_FILE_EXT_VX_ACE =

RPG Maker VX Ace binary data file extension

Returns:

  • (String)
".rvdata2"
RGSS_EXTRACTED_FILE_EXTENSIONS =

Hash of all extracted file extensions

The type of external file is used as the key, the value is the file extension string

Returns:

  • (Hash<Symbol, String>)
{
  RGSS_FORMAT_TYPE_JSON => RGSS_FILE_EXT_JSON,
  RGSS_FORMAT_TYPE_YAML => RGSS_FILE_EXT_YAML
}.freeze
RGSS_DB_FILE_EXTENSIONS =

Hash of all database file extensions for each RPG Maker (RGSS) version

The RPG Maker version is used as the key, the value is the file extension string

This hash is used to detect the RPG Maker database version based on the file extension

Returns:

  • (Hash<Symbol, String>)
{
  RGSS_VERSION_XP => RGSS_FILE_EXT_XP,
  RGSS_VERSION_VX => RGSS_FILE_EXT_VX,
  RGSS_VERSION_VX_ACE => RGSS_FILE_EXT_VX_ACE
}.freeze
RGSS_DB_MODELS =

Hash that contains the appropiate database model (data classes) for each RPG Maker (RGSS) version

The RPG Maker version is used as the key, the value is an array of file paths

Returns:

  • (Hash<Symbol, Array<String>>)
{
  RGSS_VERSION_XP => [
    "../model/rpg_maker_data/xp/rgss",
    "../model/rpg_maker_data/xp/rpg"
  ],
  RGSS_VERSION_VX => [
    "../model/rpg_maker_data/vx/rgss",
    "../model/rpg_maker_data/vx/rpg"
  ],
  RGSS_VERSION_VX_ACE => [
    "../model/rpg_maker_data/vx_ace/rgss",
    "../model/rpg_maker_data/vx_ace/rpg"
  ]
}.freeze
RGSS_DB_FILES =

Hash of all supported database glob patterns files for each RPG Maker (RGSS) version

The RPG Maker version is used as the key, the value is an array of glob patterns file names

Returns:

  • (Hash<Symbol, Array<String>>)
{
  RGSS_VERSION_XP => [
    DATA_FILE_ACTORS,
    DATA_FILE_ANIMATIONS,
    DATA_FILE_ARMORS,
    DATA_FILE_CLASSES,
    DATA_FILE_COMMON_EVENTS,
    DATA_FILE_ENEMIES,
    DATA_FILE_ITEMS,
    DATA_FILE_MAPS,
    DATA_FILE_MAP_INFOS,
    DATA_FILE_SKILLS,
    DATA_FILE_STATES,
    DATA_FILE_SYSTEM,
    DATA_FILE_TILESETS,
    DATA_FILE_TROOPS,
    DATA_FILE_WEAPONS
  ],
  RGSS_VERSION_VX => [
    DATA_FILE_ACTORS,
    DATA_FILE_ANIMATIONS,
    DATA_FILE_AREAS,
    DATA_FILE_ARMORS,
    DATA_FILE_CLASSES,
    DATA_FILE_COMMON_EVENTS,
    DATA_FILE_ENEMIES,
    DATA_FILE_ITEMS,
    DATA_FILE_MAPS,
    DATA_FILE_MAP_INFOS,
    DATA_FILE_SKILLS,
    DATA_FILE_STATES,
    DATA_FILE_SYSTEM,
    DATA_FILE_TROOPS,
    DATA_FILE_WEAPONS
  ],
  RGSS_VERSION_VX_ACE => [
    DATA_FILE_ACTORS,
    DATA_FILE_ANIMATIONS,
    DATA_FILE_ARMORS,
    DATA_FILE_CLASSES,
    DATA_FILE_COMMON_EVENTS,
    DATA_FILE_ENEMIES,
    DATA_FILE_ITEMS,
    DATA_FILE_MAPS,
    DATA_FILE_MAP_INFOS,
    DATA_FILE_SKILLS,
    DATA_FILE_STATES,
    DATA_FILE_SYSTEM,
    DATA_FILE_TILESETS,
    DATA_FILE_TROOPS,
    DATA_FILE_WEAPONS
  ]
}.freeze