RPG Maker XP Database Sort Tool

RPG Maker XP Database Sort Tool​

PxA7foA.png

Intro
RMXP DB Sort tool is a Ruby script that sorts the database, switch and variable entries by name. It also examines all database entries, maps, events and common events and updates the references so that no functionality is changed.

Prerequisites
  • A local Ruby installation to execute the script. This script was written using Ruby 2.7.1.
Usage
  1. Back up your project
  2. If you're sorting the project you're currently working on, make sure to close the editor first
  3. Run ruby rmxp-db-sort.rb <project directory> -o <output directory>
Use the --help argument to display all script parameters.

Note: As the IDs will be changing order, batch variable and switch assignment event commands may end up splitting into smaller groups, or individually, depending on how the sorted layout groups them together. By default, the best effort is made to keep them in bulk calls where possible, but this can be toggled to force any bulk commands that would be split into smaller bulk commands to instead be split individually.

Issues
Because this tool performs translations, it isn't able to translate what it isn't aware of. Custom scripts that reference database entries, switches or variables by ID will be incompatible, along with shortcuts used via event script calls. You will need to update them manually if you are using them.

To-do
  • Testing: I haven't tested this on a fleshed-out project yet
  • Allow the user to skip sorting for individual components
  • Add plugin support for text commands
  • Index mapping export, to accommodate manually updating external components based on what changed
Download
By using this script you are accepting the risks associated with it. Make sure to back up your data and test thoroughly.
View Releases on GitLab

Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-xp-database-sort-tool.135543/