Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Library:RPG Maker

From ReverseEngineering.wiki
Library
On this wiki Facts · Code · Notes · Topics

Enfant/Kadokawa's RPG creation tools. XP, VX and VX Ace (RGSS1, RGSS2, RGSS3) run Ruby scripts from Data/Scripts.rxdata/.rvdata/.rvdata2 with an optional encrypted Game.rgssad/.rgss2a/.rgss3a archive; MV and MZ games are HTML5/JavaScript (NW.js) projects.

Versions

Tool Runtime Script data Archive
XP RGSS1 Data/Scripts.rxdata Game.rgssad
VX RGSS2 Data/Scripts.rvdata Game.rgss2a
VX Ace RGSS3 Data/Scripts.rvdata2 Game.rgss3a
MV, MZ JavaScript (NW.js) js/ folder none (assets individually obfuscated)

Open-source clones (mkxp-z) guess the RGSS version from the extension of the Scripts file: .rvdata means 2, .rvdata2 means 3, otherwise 1.

Archives

See Format:RGSSAD. Asset encryption keys and decryption are out of scope for this wiki.

MV and MZ layout

Verified against rpgtkoolmv/corescript (MV core scripts, Utils.RPGMAKER_VERSION 1.6.1 at the pinned commit; source is split per class under js/rpg_core, rpg_managers, rpg_objects, rpg_scenes, rpg_sprites, rpg_windows and concatenated by concat.js into six files).

The template index.html loads, in order: js/libs/pixi.js (v4.5.4, see Library:PixiJS), pixi-tilemap.js, pixi-picture.js, fpsmeter.js, lz-string.js, iphone-inline-video.browser.js, then js/rpg_core.js, rpg_managers.js, rpg_objects.js, rpg_scenes.js, rpg_sprites.js, rpg_windows.js, js/plugins.js, js/main.js. main.js calls PluginManager.setup($plugins) and SceneManager.run(Scene_Boot).

  • js/plugins.js defines $plugins, an array of objects with name, status, parameters; PluginManager loads js/plugins/<name>.js for entries with status true. Plugin files start with a /*: comment block (@plugindesc, @author, @param).
  • data/*.json: DataManager loads Actors, Classes, Skills, Items, Weapons, Armors, Enemies, Troops, States, Animations, Tilesets, CommonEvents, System, MapInfos, plus MapNNN.json per map, into globals $dataActors, ... $dataSystem, $dataMap.
  • Saves (NW.js): save/ folder with config.rpgsave, global.rpgsave and fileN.rpgsave; content is LZString.compressToBase64 of JSON (StorageManager.saveToLocalFile). In a browser the same data goes to localStorage. JsonEx adds @c and @r keys for object identity and @ for class names.
  • Encrypted assets: Format:RPG Maker MV encrypted assets.
  • Desktop shell: Library:NW.js (Utils.isNwjs).

MZ uses the same idea with renamed files. Read in an unofficial, unlicensed mirror of the MZ core scripts (stak/rmmz-corescript, commit 5ecc09a, Utils.RPGMAKER_NAME "MZ", RPGMAKER_VERSION "1.1.0"; only file names and versions are cited): js/rmmz_core.js, rmmz_managers.js, rmmz_objects.js, rmmz_scenes.js, rmmz_sprites.js, rmmz_windows.js, js/plugins.js and js/main.js. In MZ main.js itself holds the script list and loads, in order, js/libs/pixi.js, pako.min.js, localforage.min.js, effekseer.min.js, vorbisdecoder.js, then the six rmmz_*.js files and js/plugins.js (effekseer.wasm sits in js/libs). The bundled PixiJS is v5.2.4 at that version (see Library:PixiJS); the libs folder lists pako and localforage and no lz-string. Unverified: that this means a different save encoding than MV's LZString (StorageManager of MZ was not read here). See Technique:Identifying HTML5 game engines.

See also

XP, VX and VX Ace data and save files are Ruby Marshal streams: Format:Ruby Marshal.

Code & repositories

  • https://github.com/mkxp-z/mkxp-z @ 37a04d14413454551a7b6aadbb4e93e67168accb · license: GPL-2.0-or-later (declared by the contributor; GitHub's detector did not recognize COPYING)
    mkxp-z: open-source RGSS (RPG Maker XP/VX/VX Ace) runtime; src/crypto/rgssad.cpp opens the .rgssad/.rgss3a archives, src/config.cpp guesses the RGSS version.
    Tested on: source read, not run: source read only · checked 2026-10-18
  • https://github.com/ruby/ruby @ af502c75307230d0ba5d9c99d4e24de9e7775df6 · license: Ruby OR BSD-2-Clause (declared by the contributor; GitHub's detector did not recognize COPYING)
    Reference implementation of Marshal in marshal.c (TYPE_* type bytes, w_long integer packing, version 4.8).
    Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2026-10-18
  • https://github.com/rpgtkoolmv/corescript @ 182e31449707ba7e406db0485c44c2a9d11e2dcd · license: MIT
    RPG Maker MV core scripts (MIT): js/rpg_core/Decrypter.js, DataManager.js, StorageManager.js, template/index.html.
    Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2021-08-26