• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Resource icon

v20.1 Essentials Unpack'd v3.0.0

This resource pertains to version 20.1 of Pokémon Essentials.
Pokémon Essentials Version
Non-applicable

Essentials Unpack'd



unpackd.exe is a tool for the Pokémon Essentials, to extract data binaries (.rxdata) to readable .rb and .yaml files and to combine them back, Thus making your game to be version-controlled and to be collaborated on.

Made with Ruby Essentials v20.1 github download



Story Time:

So, I was making a puzzle map, and the directions per tile got weird and quite irritable, I thought I would probably do a better job in an IDE. So, I started looking and I found rvpacker, It could change .rxdata files into [ICODE] .yaml [/ICODE] and vice versa, It was working for some files. This includes Tilesets.yaml, But it turns out, it is way too hard to edit directions in an IDE as well, anyways... as I looked upon this file, it hit me, that this may not be a method to edit files, but could be a method to share files!

I started updating the code so that it could work with all .rxdata files in pokemon essentials. and added the code from scripts_combine.rb and scripts_extract.rb pokemon essentials GitHub repo

... and Voila! This tiny tool can decrypt and encrypt every single .rxdata file in Data folder!

Usage:

Code:
Expand Collapse Copy
$ unpackd.exe --help

Essentials Unpack\'d v3.0.0
`unpackd` is a tool \for Pokémon Essentials, to extract data binaries (.rxdata)
  to readable .rb and .yaml files and to combine them back, thus making
  your game to be version-controlled and to be collaborated on.

Usage:
  unpackd {--extract|--combine|-b|-r} [options]

Options:
  -e, --extract        Extract given binaries(.rxdata) into individual .yaml/.rb
  -c, --combine        Combine given .yaml/.rb files into binaries(.rxdata)
  -b, --backup Make Backup \for given binary(.rxdata) files
  -r, --revert         Revert given binary(.rxdata) from Backup Folder

  -d, --project=<s> Essentials project path. (default: Current Folder)
  -f, --files=<s+>     File Names \for .rxdata/.yaml/.rb to operate on. (default: *)

  -F, --force Used with `--combine` to Pack Data Forcefully
  -s, --silent Do not output any information \while processing

  -v, --version Print version and \exit
  -h, --help           Show this message

Examples:

To Extract Scripts.rxdata and Tilesets.rxdata of a game in "D:\Examples\MyEssentialsGame":

Code:
Expand Collapse Copy
$ unpackd.exe --extract --project "D:\Examples\MyEssentialsGame" --files scripts tilesets

This will create 3 Folders, Backup, Scripts, and YAML in the "D:\Examples\MyEssentialsGame\Data" folder.
  • Firstly, Backup files will be created in Data\Backup (*.rxdata.backup files)
  • Scripts.rxdata consists of many ruby scripts and these now will be extracted to individual .rb files placed in grouped folders within the Data\Scripts folder.
  • Scripts.rxdata will be replaced with a loader file, this file can read the individual .rb files in the Data\Scripts Folder, Therefore making Game.exe still playable! This would not work, if the game is encrypted !
  • Tilesets.rxdata will be extracted to a readable Tilesets.yaml file within Data\YAML folder.
  • If at any point, unpackd is unable to perform the extraction, mentioned Backup files will be reinstated.

To Combine { ruby scripts in Data/Scripts to Scripts.rxdata } and { Tilesets.yaml to Tilesets.rxdata }:

Bash:
Expand Collapse Copy
$ unpackd.exe --combine --project "D:\Examples\MyEssentialsGame" --files scripts tilesets

This will create 3 Folders, Backup, Scripts, and YAML in the "D:\Examples\MyEssentialsGame\Data" folder.
  • Firstly, Backup files will be created in Data\Backup (*.rxdata.backup files)
  • Will check if the Scripts.rxdata is a loader file or an already data-packed file.
    • If in case, it is already a packed data file, this operation will skip, unless --force flag is passed along.
    • Else, ruby scripts will be reintegrated back into Scripts.rxdata
  • Tilesets.yaml will be converted back to Tilesets.rxdata.
  • If at any point, the script is unable to perform a combination, mentioned Backup files will be reinstated.

To create a general Backup for Scripts.rxdata and Tilesets.rxdata:
Bash:
Expand Collapse Copy
$ unpackd.exe --backup --project "D:\Examples\MyEssentialsGame" --files scripts tilesets

To Revert an already created backup of Scripts.rxdata and Tilesets.rxdata:
Bash:
Expand Collapse Copy
$ unpackd.exe --revert --project "D:\Examples\MyEssentialsGame" --files scripts tilesets

Tips and Tricks:

  • Put unpackd.exe in the game directory, it is a light file and it removes the need to pass the --project flag
  • Currently, only Tilesets and Scripts are understandable, I am not sure about the rest of the files.
  • To add YAML in your version control add !Data/YAML/ to .gitignore.
    • Bash:
      Expand Collapse Copy
       $ echo !Data/YAML/ >> .gitignore
  • Extracted Scripts.rxdata cannot be loaded into RPG Maker, even with the loader file, always combine it, if you plan on using the script editor of RPG Maker.
  • Using ---files flag again and again for the same files, can be a bit effortful, create a batch file or makefile for your workflow, I have added a makefile.template in the repo, as a base to add on.
  • Suppose your game throws an error, but you couldn't note it down. You try to run the game again, but now Game.exe just shows a blank screen and it exits. This happens due to caching of binary files, Now, I don't know how to delete/ignore those cache but, I know, by --combine --force again (or by --combine then --extract, if you are working with loader), Game.exe assumes it is a new binary. (Warn: This would corrupt backup)
  • In Case, you don't use a VCS (big mistake), be aware of backups! Suppose you made changes to a file, and combined it to run the game and it did not work (right now the file is bad but the backup is good). but if you make another change and combined forcefully, even if the file is good, the backup becomes bad!

Credits
  • Howard "SiCrane" Jeng
  • Aaron Patterson
  • Andrew Kesterson
  • Rachel Wall
  • Maruno
  • ra101
Author
ra101
Downloads
875
Views
3,340
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from ra101

Back
Top