Ability To Compile RPGMaker Games From Command Line?

@Zeriab yeah... most of the reason for going with AES was the off-the-shelf support and while I had it implemented in a handful of lines of code... didn't do exactly what I needed it do, so probably custom-ish cipher it is.

*arguably* hardware accelerated AES support may make decryption faster but I'm not sure node can leverage that.
What you need to understand is that all encryptions and protections can be broken.
AAA-Companies pour literally millions into DRM systems and copy protection, and they still get only months until their games are cracked - but they calculate with those months to give them enough sales.
Yea I think someones calculator is broken lol.
For the legal requirements of purchased DLC even the build-in encryption is considered enough.
Not because it is especially strong (everyone knows it had been hacked years ago) but because using it makes proving intend when suing easy - since you cannot get the unencrypted resources by accident the fact that someone has them from a game proves that he/she hacked that game.
Literally the first reason I ever heard for DRM that makes sense.

Besides this, if your DRM inconveniences one person, its not worth it. If your game is on the pirate sites I'd say you are doing pretty good.
Do you think you will make more money by inconveniencing one hacker once or by making a better game? Like previously said, updating the game is a great way to keep people paying.
OK so a few final notes here:

  1. Implemented an AES encryption routine because node supports it out of the box and the encrypt/decrypt cycle is literally 3 statements each.
  2. No perceived slowdowns even on a relatively slow VM for gameplay (at least it's not slower than it was before, we had some previous hitching since there is no hardware acceleration in the VM, and that's not made any worse by the AES encryption)
  3. Built-in an encryption routine, running the plugin from CLI and giving it a path will encrypt all png/m4a/ogg files and delete the originals, it will also set the "hasEncryptedImages" and "hasEncryptedAudio" flags since this is usually used by CI/CD to prepare a release.
  4. The entire plugin is under 130 lines, and includes an abundance of logging during the encryption process, so could be even smaller.
  5. Works for both music and audio, we had briefly considered adding JS encryption support which actually may not have been too difficult (possibly?), but figured it's not really needed and obviously the encryption routine has to stay decrypted for the NWJS system to natively execute it.


May consider providing this as a plugin someday with a tiny bit of cleanup, I'll ponder that... not sure if there's any real interest or anything, but wasn't too bad, I had shelved it for other work for a few weeks and ended up hammering out the entire design from scratch again in a few hours.
You can use RPGMaker Packer
https://github.com/erri120/rpgmpacker

Which reimplements the export functionality of RPGMaker as a CLI tool and is fairly easy to use.
Just need to also download nwjs into your container. I am using it for CI/CD to automatically deploy builds on a scheduled basis.

I don't use the encryption feature but it's also supported.
Oh that'll be a super handy drop-in for getting us better cross-platform support, so I'll definitely drop that into our pipeline when we get there, thanks!

Original thread: https://forums.rpgmakerweb.com/threads/ability-to-compile-rpgmaker-games-from-command-line.154149/