SnowSzn / rgss-db-cli

rgss-db is a tool for developers to export and/or import the database files of a game made in RPG Maker XP, RPG Maker VX or RPG Maker VX Ace
GNU General Public License v3.0
2 stars 1 forks source link
command-line command-line-tool developer-tools rgss rpg-maker rpg-maker-vx rpg-maker-vxace rpg-maker-xp rpgmaker rpgmakervx rpgmakervxace rpgmakerxp ruby ruby-gem rubygem

RPG Maker Database Tool

This extension should be used for development purposes only!

Table of contents

Introduction

RGSS Database is a tool designed for developers to export and import the database files of a game created in RPG Maker.

This gem is compatible with any RPG Maker editor based on RGSS, including:

The purpose of this tool is to provide version control features on the RPG Maker database files if you are working on your game with a team and using any version control software.

Now, with JSON/YAML files you can see what's changed between versions on the database, something that was impossible with the RPG Maker binary format.

The only tool that does this that I know of is rvpacker, but I haven't been able to get it to work and it doesn't seem to be maintained by anyone anymore, so I made my own tool for this.

Also, I have included some other cool features you may find useful!

List of all supported RPG Maker database files:

The Scripts database file is not supported for a few reasons:

Features

Screenshots

Main Menu

main-menu

Settings Menu

settings-menu

Export Menu

export-menu

Import Menu

import-menu

Requirements

Installation

The gem is hosted at RubyGems

You can install this gem using the following command:

$ gem install rgss_db

Usage

Command Syntax

rgss-db data_directory [options]

Basic Information

You can simply use this tool by calling the rgss-db command and supplying a RPG Maker data path:

# Opens the current directory
rgss-db .

The path needs to be the data folder where all binary database files are stored, otherwise the app won't work.

This will open the application's menu where you can manually perform the desired action.

The application has a number of options that allow you to customize the behavior and output of the application, you can check more about this below.

Skip CLI Menu

You can use the -a (--action) flag to skip the application's CLI menu, this will perform the specified action and finish execution, see more at -a, --action

Options

--debug

You can set the application's debug mode with the following option.

A log file will be created inside the application's working directory.

rgss-db . --debug 0 # Disables debug functionality (default)
rgss-db . --debug 1 # Enables debug error level
rgss-db . --debug 2 # Enables debug warning level
rgss-db . --debug 3 # Enables debug info level

--backup, --no-backup

You can enable/disable the automatic backup creation with these flags.

rgss-db . --backup      # Backups are created (default)
rgss-db . --no-backup   # Backups are not created

-d, --directory

Sets the application's working directory (used for exporting and importing)

All extracted files will be created inside this directory.

rgss-db . -d "./rgss-db"          # Data folder relative (default)
rgss-db . -d "C:/Absolute/Folder" # Absolute path

-t, --type

Sets the application's file format (used for exporting)

Supported file format types:

rgss-db . -t yaml   # Uses YAML format (default)
rgss-db . -t json   # Uses JSON format
rgss-db . -t binary # Uses Binary format

-f, --files

Sets a list of data files that will be affected by the action.

If not provided, it will consider all data files.

rgss-db . -f Actors.rvdata2 # Selects only the Actors file
rgss-db . -f Actors.json    # Selects only the Actors file
rgss-db . -f Actors.rxdata Items.rxdata

-i, --ids

Sets a list of objects that will be affected by an action (per data file)

This option only works for data files that supports this behavior:

This option can be repeated for each data file provided, meaning that if you use:

# Selects the Actors.rvdata2, Items.rvdata2 and Weapons.rvdata2 database files
rgss-db . -f Actors.rvdata2 Items.rvdata2 Weapons.rvdata2

You can use the -i option three times to specify the IDs for each file, in the same order they are in the -f option

# Object IDs received:
# - Actors.rvdata2  => [420, 123]
# - Items.rvdata2   => [73, 3, 7]
# - Weapons.rvdata2 => [69, 79, 89]
rgss-db . -f Actors.rvdata2 Items.rvdata2 Weapons.rvdata2 -i 420 123 -i 73 3 7 -i 69 79 89

-a, --action

You can skip the application's CLI menu completely if you supply a supported action.

The application will start and perform the action, using the given files and object IDs (if any) and close itself when the action finishes

These are the possible actions:

Here's a few examples with the action option using the default application directory:

# Opens the current directory and export all data
rgss-db . -a export

# Opens the current directory and import all data
rgss-db . -a import

# Opens the current directory and export only the Items file
rgss-db . -a export -f Items.rvdata2

# Opens the current directory and export only the object with ID: 100 from the Items file
rgss-db . -a export_custom -f Items.rvdata2 -i 100

# Opens the current directory and export only the object with ID: 100 from the Items file to a JSON file
rgss-db . -a export_custom -f Items.rvdata2 -i 100 -t json

-v, --version

Prints the application version and exit.

rgss-db -v
rgss-db --version

-h, --help

Prints a help message on the standard output and exit.

rgss-db -h
rgss-db --help

Known Issues

Planned

Contributing

Bug reports and pull requests are welcome on GitHub at the issue tracker.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the GNU General Public License version 3 License.

Code of Conduct

Everyone interacting in the RGSS Database project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.