Tool RPGM RPG MV and MZ Linux and OSX Porter [v1.3]

m4kro

Member
Feb 7, 2020
438
458
Please Read the instructions and FAQ if you plan on using it. DO NOT PUT GAME ISSUES HERE!!!

This is a tool/script that I developed to streamline the RPG MV and MZ porting process. It is meant to be a run and forget solution that does most of the work for you. If there are any issues please post them in this thread.
Painless Porter (0.1) (GUI version): (releases will be much slower as CLI version is currently prioritized)

Instructions for Painless Porter are on GitHub page

Porter (1.3) (Google Colab Version):
Possible to be banned by Colab! Use at your own risk!


Porter (1.3) (CLI version):


Features
Does all the extracting, repackaging, and archiving for you
Choose nwjs version on linux
Unpack Game_EN.exe and apply patch
Decrypts files
Rencodes images into webp
Rencodes audio to opus
Does the uploading for you
Creates ports for Linux, OSX x64, and OSX arm64
Prevents case insensitive issues on Linux ports
Adds a cheat menu to the game
Updates pixijs
nwjs sdk version
Cleanup after uploading is finished
Docker image for easy setup and ability to run on all systems
WebUI for easier use

Planned Features
Less jank
Better WebUI
Apply OrangeGreenworks.js crack
error detection

You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.

Instructions
The Google Colab version is recommended as it sets up the environment for you.
Simply and make a copy of the colab as it says. Then follow the included instructions.

You don't have permission to view the spoiler content. Log in or register now.

Once the script is done there will be two files, gofile.txt and pixeldrain.txt
These contain the download links to the ports, note that the link order is:
Windows + Linux link
OSX x64 link
OSX arm64 link

You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:

m4kro

Member
Feb 7, 2020
438
458
Announcement:
The Docker image and WebUI have been released. They are still in very early development and if you want to contribute please do so on the GitHub repo.

Also I may remove Gofile uploading or make it optional in the future due to the extremely limited time/life of each file.
 

sweatycuk77

New Member
Nov 16, 2023
2
1
Tried using Apple silicon version of Scars of summer, heres what happened :

is damaged and can’t be opened. You should move it to the Trash.
 

m4kro

Member
Feb 7, 2020
438
458
Tried using Apple silicon version of Scars of summer, heres what happened :

is damaged and can’t be opened. You should move it to the Trash.
Did you port it using the tool or did you download it from here?

For game issues please put them here. Also please attach a screen shot.
 
Last edited:

m4kro

Member
Feb 7, 2020
438
458
Announcement
CLI version 0.5 has been released
nwjs has been downgraded to v0.78.1 to hopefully prevent texture issues
the will be applied automatically, can be disabled with --no-cheats
 

Print1727

Member
Apr 20, 2020
133
108
Coming from https://f95zone.to/threads/68528/post-13029473.

Hello again. I checked out your porter.

In my opinion, you should not distribute the ports with NWJS and instead let the user provide their own instead.
(This will make it not a port but just sharing game files though...)

Directory structure:
Code:
tree -L 2
.
├── 68528 Tower of Ardia 2022-09-24
│     ├── Game
│     ├── package.json
│     ├── RJ283271_img_main.webp
│     └── www
└── NWJS
      ├── chrome_crashpad_handler
      ├── credits.html
      ├── icudtl.dat
      ├── lib
      ├── locales
      ├── nw
      ├── nw_100_percent.pak
      ├── nw_200_percent.pak
      ├── resources.pak
      ├── swiftshader
      ├── v8_context_snapshot.bin
      └── www
The www directory in the Game directory is the one that contains all the game files, while the one in the NWJS directory is empty and only act as a mount point.

The Game file:

Code:
#!/usr/bin/env bash

if command -v fusermount > /dev/null 2>&1
then
    echo "FUSE found."
    www_dir=$(find . -type d -name "www" -print -quit)
    if [ -n "$www_dir" ]
    then
        echo "'www' directory found."
        cp ./package.json ../NWJS/package.json & wait $!
        echo "Mounting..."
        ../NWJS/lib/cicpoffs ./www ../NWJS/www
    fi
else echo "FUSE not found. Game will launch as case sensitive."
fi

if [[ "$XDG_SESSION_TYPE" == "wayland" ]]
then
    echo "Launching as a Wayland application."
#     ../NWJS/nw --ozone-platform=wayland; # Performance degradation
    ../NWJS/nw --ozone-platform=x11
else echo "Launching as a X11 application."; ../NWJS/nw --ozone-platform=x11
fi
if command -v fusermount > /dev/null 2>&1
then
    www_temp=$(find ../NWJS -type d -name "www" -print -quit)
    if [ -n "$www_temp" ]
    then
        echo "Unmounting..." &
        fusermount -u ../NWJS/www & wait $!
        rm ../NWJS/package.json
    fi
fi
echo "Finished."
This reduce storage space significantly as user won't have multiple NWJS on their computer. NWJS can also be updated easily.

Tested working (on my machine).
 
Last edited:
  • Like
Reactions: m4kro

m4kro

Member
Feb 7, 2020
438
458
Coming from https://f95zone.to/threads/68528/post-13029473.

Hello again. I checked out your porter.

In my opinion, you should not distribute the ports with NWJS and instead let the user provide their own instead.
(This will make it not a port but just sharing game files though...)

Directory structure:
Code:
tree -L 2
.
├── 68528 Tower of Ardia 2022-09-24
│     ├── Game
│     ├── package.json
│     ├── RJ283271_img_main.webp
│     └── www
└── NWJS
      ├── chrome_crashpad_handler
      ├── credits.html
      ├── icudtl.dat
      ├── lib
      ├── locales
      ├── nw
      ├── nw_100_percent.pak
      ├── nw_200_percent.pak
      ├── resources.pak
      ├── swiftshader
      ├── v8_context_snapshot.bin
      └── www
The www directory in the Game directory is the one that contains all the game files, while the one in the NWJS directory is empty and only act as a mount point.

The Game file:

Code:
#!/usr/bin/env bash

if command -v fusermount > /dev/null 2>&1
then
    echo "FUSE found."
    www_dir=$(find . -type d -name "www" -print -quit)
    if [ -n "$www_dir" ]
    then
        echo "'www' directory found."
        cp ./package.json ../NWJS/package.json & wait $!
        echo "Mounting..."
        ../NWJS/lib/cicpoffs ./www ../NWJS/www
    fi
else echo "FUSE not found. Game will launch as case sensitive."
fi

if [[ "$XDG_SESSION_TYPE" == "wayland" ]]
then
    echo "Launching as a Wayland application."
#     ../NWJS/nw --ozone-platform=wayland; # Performance degradation
    ../NWJS/nw --ozone-platform=x11
else echo "Launching as a X11 application."; ../NWJS/nw --ozone-platform=x11
fi
if command -v fusermount > /dev/null 2>&1
then
    www_temp=$(find ../NWJS -type d -name "www" -print -quit)
    if [ -n "$www_temp" ]
    then
        echo "Unmounting..." &
        fusermount -u ../NWJS/www & wait $!
        rm ../NWJS/package.json
    fi
fi
echo "Finished."
This reduce storage space significantly as user won't have multiple NWJS on their computer. NWJS can also be updated it easily.

Tested working (on my machine).
I decided to include the nwjs files to make the experience as easy as possible for players. No setup needed, download and play. But I do see what you mean by how this wastes lots of disk space. I'll probably go with your solution and also have start.sh check ~/.nwjs/ for the nwjs files and if its not there then download it.

I will also start a poll later to see if others also think it's a good idea.
 

Print1727

Member
Apr 20, 2020
133
108
I decided to include the nwjs files to make the experience as easy as possible for players. No setup needed, download and play. But I do see what you mean by how this wastes lots of disk space. I'll probably go with your solution and also have start.sh check ~/.nwjs/ for the nwjs files and if its not there then download it.

I will also start a poll later to see if others also think it's a good idea.
Sounds good. But please not another dot file. I have enough of them.
Maybe using '~/.local/share/porter/nwjs' and having an updater/version chooser is a better idea.

Also the way the original script handles MZ is not ideal. You should package MZ game files into the www directory like with MV instead.
 
Last edited:
  • Like
Reactions: m4kro

m4kro

Member
Feb 7, 2020
438
458
Announcement:
CLI version 0.7 has been released

You don't have permission to view the spoiler content. Log in or register now.
The next version will likely be version 1.0 with all the planned features except for the GUI stuff.
 
Last edited:

m4kro

Member
Feb 7, 2020
438
458
Announcement:
A GitHub repo has been created for the shell scripts of the CLI version. If anyone wants to make changes please create a pull request there. Changes with files too large for github will need to be done here.
You can find the repo .
 

Print1727

Member
Apr 20, 2020
133
108
Touch The Bio-Unit Lady [v1.01] [egig ere faundation], Using nwjs 0.83.0 caused major graphical issues with incorrect texures.
I've also seen a few things like missing background textures for some games but those are usually minor and not as extreme as the example above.

Maybe upgrading pixijs would fix it?
I'm playing it (not really, I don't know how to play this...) on NWJS v0.84 and there doesn't seems to be any issues, even before upgrading Pixi.
 

m4kro

Member
Feb 7, 2020
438
458
I'm playing it (not really, I don't know how to play this...) on NWJS v0.84 and there doesn't seems to be any issues, even before upgrading Pixi.
Nvm figured it out. Newer versions of nwjs weren't playing well with my laptops dual gpu setup. Will go with latest nwjs (0.84.0) as default now and users can change to 0.78.1 if they also run into the same issues.
 

Print1727

Member
Apr 20, 2020
133
108
Nvm figured it out. Newer versions of nwjs weren't playing well with my laptops dual gpu setup. Will go with latest nwjs (0.84.0) as default now and users can change to 0.78.1 if they also run into the same issues.
I tested on a dual GPU laptop. I just don't use the dGPU at all because I just don't want to deal with Nvidia specific issues.
 
  • Like
Reactions: m4kro

m4kro

Member
Feb 7, 2020
438
458
Announcement
Version 1.0 has been released!
Big thanks to Print1727/Revival8697 for ideas and parts of the code.
You don't have permission to view the spoiler content. Log in or register now.
 

m4kro

Member
Feb 7, 2020
438
458
Announcement
A google colab version of porter has been released! This helps simplify the process and move everything into the cloud for free. Instructions are included.

 

gfurst

Active Member
Nov 6, 2019
607
262
This looks really useful, but another thing I like included could be the MV/MZ text hooker for those who want to play japanese games, its the thing that takes the most work imo.
 
  • Like
Reactions: m4kro