RPG Maker MV Cook Tool

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
Another small update has arrived:

UI
Changelog

- Added a tool to edit the nwjs' package.json file.
- Added the option to adjust the compression level.

CLI
Changelog:

- Added the command line argument --SetCompressionLevel to adjust the compression level (0 = Optimal, 1 = Fastest, 2 = NoCompression).
-Slight performance improvements thanks to .NET Core's tiered compilation.
 

Nekohime1989

Veteran
Veteran
Joined
May 31, 2014
Messages
345
Reaction score
158
First Language
English
Primarily Uses
N/A
Does this work only with Javascript, or with other directories too?
Such as the overlay directory for orange overlay?
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
@Rachnera , this only works with Javascript files. Since plugin and script calls are stored on the Data folder, you'll need to obfuscate the JSON files or embed them to the Javascript files. For audio and image files, use the Deployment menu to encrypt them.
 

Fhntop

Villager
Member
Joined
May 4, 2017
Messages
28
Reaction score
22
First Language
Spanish
Primarily Uses
RMMV
Hey! This is pretty cool!
I've just found out about this so I'm a bit too late and made my own script for compiling but yours seems way more complete.
I saw on your video tutorial that you take the encryptionKey from System.json and edit the Decrypter object so as to hide it from prying eyes, which I find as a stroke of genius xD
I may be talking nonsense here but isn't it possible that someone edits index.html and adds their own script tag with their sneaky js and then access Decrypter._encryptionKey?
Thinking about this maybe it's best to change decryptArrayBuffer and hardcode the key there
Decrypter.decryptArrayBuffer = function(arrayBuffer) {
if (!arrayBuffer) return null;
var header = new Uint8Array(arrayBuffer, 0, this._headerlength);

var i;
var ref = this.SIGNATURE + this.VER + this.REMAIN;
var refBytes = new Uint8Array(16);
for (i = 0; i < this._headerlength; i++) {
refBytes = parseInt("0x" + ref.substr(i * 2, 2), 16);
}
for (i = 0; i < this._headerlength; i++) {
if (header !== refBytes) {
throw new Error("Header is wrong");
}
}

arrayBuffer = this.cutArrayHeader(arrayBuffer, Decrypter._headerlength);
var view = new DataView(arrayBuffer);



//this.readEncryptionkey();
var key = "encryption key here";



if (arrayBuffer) {
var byteArray = new Uint8Array(arrayBuffer);
for (i = 0; i < this._headerlength; i++) {


//byteArray = byteArray ^ parseInt(Decrypter._encryptionKey, 16);
byteArray = byteArray ^ parseInt(key, 16);


view.setUint8(i, byteArray);
}
}

return arrayBuffer;
};


Then again, I haven't tested if it's possible to gain access to the encryption key like this but I thought it was best to say it.
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,294
Reaction score
1,270
First Language
Finnish
Primarily Uses
RMMV
The new update broke it, my compiled games boot into a black screen and nothing happens. Tried both normal optimization and no compression and still black screen.
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
This is weird... I checked the latest version and it worked for me. Is the deployed project set up right? If you can, can you show me the dev console's output? You'll need to run the deployed game on the SDK version of nwjs.
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
907
Reaction score
361
First Language
Portuguese - Br
Primarily Uses
RMMV
Hi @AceOfAces_Mod !
I'm just trying your tool right now. Does this works with mobile deployments?
Also, whats the difference of the Compression level?
- Added the command line argument --SetCompressionLevel to adjust the compression level (0 = Optimal, 1 = Fastest, 2 = NoCompression).
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
Hey, @Eliaquim .

1. The tool doesn't work with games that are deployed to mobile. The compiler coming with nwjs SDK (which my tool wraps around) is designed to only work on Desktop.
2. The --SetCompression command line argument adjusts the compression applied to the archive when the game files are compressed (setting the --CompressProject argument as well, which creates an archive named package.nw). It follows .NET Standard's API setting. So:

- Optimal is compressing the archive as best as possible, but it takes the longest to decompress.
- Fastest compresses the archive quickly but the space savings are smaller. Although it's faster to decompress than the optimal compression.
- No Compression doesn't apply compression to the archive at all. It's like you've never compressed it. This provides the fastest decompression but the archive will be just as big as the project before compressing it to an archive.

Now, which compression you'll choose which is up to you. If nwjs sees the package.nw, it will decompress it to a temporary folder before starting the game (on Windows, at least), which will cause some delay at startup. The more compression is applied, the more time it takes to start the game up.
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
907
Reaction score
361
First Language
Portuguese - Br
Primarily Uses
RMMV
Hey, @Eliaquim .

1. The tool doesn't work with games that are deployed to mobile. The compiler coming with nwjs SDK (which my tool wraps around) is designed to only work on Desktop.
2. The --SetCompression command line argument adjusts the compression applied to the archive when the game files are compressed (setting the --CompressProject argument as well, which creates an archive named package.nw). It follows .NET Standard's API setting. So:

- Optimal is compressing the archive as best as possible, but it takes the longest to decompress.
- Fastest compresses the archive quickly but the space savings are smaller. Although it's faster to decompress than the optimal compression.
- No Compression doesn't apply compression to the archive at all. It's like you've never compressed it. This provides the fastest decompression but the archive will be just as big as the project before compressing it to an archive.

Now, which compression you'll choose which is up to you. If nwjs sees the package.nw, it will decompress it to a temporary folder before starting the game (on Windows, at least), which will cause some delay at startup. The more compression is applied, the more time it takes to start the game up.
Thank you for your answer!
I managed to make it work. However, I have a problem. When I try to test any game by the rpg maker mv editor it shows me this warning:


"An error has occurred in your profile

Your profile can not be used because it is from a newer version of NW.js. Some resources may not be available. Specify another profile directory or use a newer version of NW.js."

Even so, I can make it work. But there are two errors ocurring:
1 - The image has a small black bar on the sides. Really small.
2 - This plugin no longer works. It enabled me to add some lights on the map inside the editor, now it does not open anymore.
https://forums.rpgmakerweb.com/index.php?threads/lighting-and-time-editor-continued.86409/

I had already had this problem when I upgraded nwjs following this post:

https://forums.rpgmakerweb.com/index.php?threads/rmmv-tips-upgrade-nwjs-and-chromium-67-68-64bits.96908/

But, to fix the problem, i have to format my computer.
I though that the changes will be only applied to the project itself, but applied to all =/
I don't want you to solve the problems, because i figure it out that i only have to rollback to the older version of nwjs.
How can i do that?
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
"An error has occurred in your profile

Your profile can not be used because it is from a newer version of NW.js. Some resources may not be available. Specify another profile directory or use a newer version of NW.js."
Did you happen to run the game (deployed or not) with a newer version of nwjs? That's the most likely scenario. nwjs profiles aren't backward compatible with older versions. It's an easy fix: Windows Key + R -> type %localappdata% -> Click OK. -> Delete the folder named after the "name" variable in the game's package.json file.
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
907
Reaction score
361
First Language
Portuguese - Br
Primarily Uses
RMMV
Yes, i run the game with the newer version of nwjs that i download here to use with yout tool:
https://nwjs.io
When I saw the black bars, I suspected that it was the same problem that had happened to me before. So to confirm I opened other projects and the warning appeared.

I manage to do what you say "Windows Key + R -> type %localappdata%"
But i don't understando the other part you say abut the "name". Here what happens when i click OK after the command %localappdata%:
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA

On the game's folder, there's a file named package.json. Open that file and look for a variable like the one on the photo above. The folder should be named like this (or if you added / on the variable, it will have the first section.

Looking at the image you uploaded, deleting the "KADOKAWA" folder should do it.
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
907
Reaction score
361
First Language
Portuguese - Br
Primarily Uses
RMMV
Last edited:

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
I've released a new update for the tool (it will arrive on the Microsoft Store soon).

Core
  • Updated Newtonsoft.Json to 12.0.2.
UI
Changelog
  • Fixed a bug where the settings wouldn't be re-enabled after a failure.
  • Fixed a bug where the JSON editor would fill the icon location in the HTML file location text box instead of the icon location text box.
  • Improved the presentation of the output text.
CLI
Changelog
  • Improved the presentation of the text.
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
Hello everyone!

I released a new version of the tool (both of the UI and command-line version). Both of them will see performance improvements.

Changelog:
Common
- Ported over to .NET Core 3.
- Compiled with Ahead-Of-Time compilation.

UI
- Improved High DPI support.

CLI
- Added Greek Translation.
- Sight text cleanup.
- Reduced space consumption (except the UI version, due to crashes caused by the PublishTrimmed option).
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
Another update to the tool. This has some extra fixes and improvements.

Common
  • Technical improvements.
  • New compression system.
  • Slight to moderate performance improvements.
UI
  • Improved error messages.
  • The taskbar will now show progress.
  • Slight tweaks.
CLI
  • The CLI will throw a warning if the –PackageApp flag is active and the –ReleaseMode flag isn’t included.
  • Added the –CompressionSafeMode flag to use the old system.
 

HintonR

Veteran
Veteran
Joined
Mar 2, 2016
Messages
197
Reaction score
25
First Language
English
Primarily Uses
RMMV
Hi there.

Question about NWJS and upgrading. I'm currently working on a project I started in 1.5.1 and cannot upgrade due to compatibility issues with some plugins. Will it be okay if I just copy/paste a newer version of NWJS -- or will that break my current project.

Also, for clarification -- when I deployed a cooked project using this -- It is not clear to me about the can only run on that version and that platform. Meaning only people with the same specs of my computer as of deployment will able to run the game or... what did you mean about that (I understand non-cross-platform) but Windows to Windows, for example -- I run Windows 10. So it will not run on other Windows versions?

Thanks
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,706
Reaction score
1,164
First Language
Greek
Primarily Uses
RMVXA
@HintonR ,
For the upgrade question, you can use a newer version of nwjs. The only reason to worry about compatibility issues is if you are using NodeJS scripts. If you are only using MV plugins, it shouldn't be a problem.

For the Windows compatibility question, it will work in older versions of Windows.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,039
Reaction score
10,258
First Language
Czech
Primarily Uses
RMMV
If you update nwjs on MV 1.5.1, the playtest button won't work though and you will need to playtest manually every time.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I'm playing DQ:XI DE in 2d mode with the synthesized soundtrack, the only way a RPGMAKER creator should play it. :D
:/ it really get on my nerves reading stuff about how to write a resume and they say things like "turn your failures into wins!!!" ... no interview Ive ever had cared to hear anything about my failures, and why would they :( ?
"Huh? You haven't backed up yet? *menacing stare* "
Been having a lot of fun playing Hearts of Iron IV. Had to restart a few times, but now I've finally conquerd Europe with my Axis friends, and am currently invading the Soviet Union.
Guess I'll rework all the existing screens in my game. Except of the save/battle screen. For this I will be lazy and use Yanfly. With my current pace it'll take a few months.

Forum statistics

Threads
93,632
Messages
914,146
Members
123,221
Latest member
Luspeon
Top