Tool RPGM Ren'Py Cruncher - Ren'Py & RPGM MV Game Compactor [v0.4.1] [bas]

4.80 star(s) 4 Votes

bas

retired
Respected User
Donor
Former Staff
May 6, 2017
3,987
30,351
Just a quick note regarding video compressing by Cruncher.

Libvpx (ffmpeg) included supports encoding/decoding far more video formats than a default "video-set" in Cruncher ( ). So, if you're in need of compressing some other video, apart those included in Cruncher (webm, avi, mp4, mkv etc), just add them to the code.
For example, today when compressing a new game (Altered city) I bumped into an old and rarely used m2t/MPEG-2 some..., and this tool did the work perfectly.
Yeah, just add the file extension for pretty much any file in the appropriate place and it should work. m2t, eh? wow.
 
  • Like
Reactions: Abhai

0011

Active Member
Aug 17, 2019
733
3,177
For Some Reason, renpy cruncher is fucking up the transparency in Sprites.
 

Abhai

Devoted Member
Sep 12, 2018
8,467
35,713
For Some Reason, renpy cruncher is fucking up the transparency in Sprites.
That happens sometimes with png/webp-s processing. You could try either with lossless settings (as parallaxes), or with adjusted alpha transparency level, and see if that helps with those troublesome images of yours.
 

0011

Active Member
Aug 17, 2019
733
3,177
That happens sometimes with png/webp-s processing. You could try either with lossless settings (as parallaxes), or with adjusted alpha transparency level, and see if that helps with those troublesome images of yours.
how do I do that? I just press 6 and enter
 

Abhai

Devoted Member
Sep 12, 2018
8,467
35,713
Just tweak the cruncher's script (notepad++ or so) and change standard cwebp settings a bit (as above mentioned). Here is the , if you didnt check it already.
 

0011

Active Member
Aug 17, 2019
733
3,177
Just tweak the cruncher's script (notepad++ or so) and change standard cwebp settings a bit (as above mentioned). Here is the , if you didnt check it already.
tried using -lossless but it gives the same result.
 
Jul 21, 2018
18
4
For Some Reason, renpy cruncher is fucking up the transparency in Sprites.
Can you upload some sample picture? I'm very curious this issue.

=================================================
I research this issue
"Added code to properly encode parallaxes in RPGM games (must use lossless or it breaks movement)"
Can anyone tell me which game have this issue?

I create a parallaxes test project, have parallaxes movement
but still can't reproduce this issue
maybe i make a mistake on this issue...

this test project have 5 folder
Project1-jpg-lossy
Project1-png
Project1-webp-lossless
Project1-webp-lossy-q100
Project1-webp-near_lossless

libwebp 1.0.3, RPGM 1.61

 
Last edited:

bas

retired
Respected User
Donor
Former Staff
May 6, 2017
3,987
30,351
Can you upload some sample picture? I'm very curious this issue.

=================================================
I'm research this issue
"Added code to properly encode parallaxes in RPGM games (must use lossless or it breaks movement)"
Can anyone tell me which game have this issue?

I create a parallaxes test project, have parallaxes movement
but still can't reproduce this issue
maybe i make a mistake on this issue...

this test project have 5 folder
Project1-jpg-lossy
Project1-png
Project1-webp-lossless
Project1-webp-lossy-q100
Project1-webp-near_lossless

libwebp 1.0.3, RPGM 1.61

My (very limited) understanding of RPGM parallaxes is that they're the background images for maps that the player can walk about on. This works like an image map. If the color of a given pixel is changed, it breaks the image map so players can walk where they shouldn't, and cannot walk where the should be able to. Lossless doesn't change the colors, lossy does.

As for the issue that 0011 was having; cruncher works by re-encoding files to more efficient formats but leaving the filename and (just as importantly) file extensions the same. I.e., it will take a 5MB image.png, re-encode it to a lossy webp image that's maybe 200KB, but the filename/extension is still image.png. This allows you to compress assets of a game without changing any of the script/code. When an image is loaded by the game, it looks at the header of the file to decode & display, not the file extension.

cwebp breaks image transparency when re-encoding webp files. I've added nconvert to the latest couple versions of cruncher as it preserves transparency. However, it's much slower than cwebp so I only set it run on files with a webp file extension. 0011 ran cruncher on a game that had already been crunched by the author, so cwebp was run on files with png extension that were actually encoded as webp already.

Hope this helps clarify?
 
Jul 21, 2018
18
4
My (very limited) understanding of RPGM parallaxes is that they're the background images for maps that the player can walk about on. This works like an image map. If the color of a given pixel is changed, it breaks the image map so players can walk where they shouldn't, and cannot walk where the should be able to. Lossless doesn't change the colors, lossy does.

As for the issue that 0011 was having; cruncher works by re-encoding files to more efficient formats but leaving the filename and (just as importantly) file extensions the same. I.e., it will take a 5MB image.png, re-encode it to a lossy webp image that's maybe 200KB, but the filename/extension is still image.png. This allows you to compress assets of a game without changing any of the script/code. When an image is loaded by the game, it looks at the header of the file to decode & display, not the file extension.

cwebp breaks image transparency when re-encoding webp files. I've added nconvert to the latest couple versions of cruncher as it preserves transparency. However, it's much slower than cwebp so I only set it run on files with a webp file extension. 0011 ran cruncher on a game that had already been crunched by the author, so cwebp was run on files with png extension that were actually encoded as webp already.

Hope this helps clarify?
Hello bas ,Thanks for your reply
my english is not good, sorry

1.RPGM parallaxes lossy issue
I understand what you mean.

I compress a lot of rpg maker vx ace and woldrpg game, some game parallaxes folder use jpg and png
and i use some png lossy tool to compress that parallaxes folder...

until see this bug issue, i know rpg maker mv is difference vx ace and wolfrpg *1,
but i very worry, maybe lossy parallaxes will break some game,
so i try to reproduce this issue, know how to trigger this issue in rpg maker mv
but my test project can't reproduce this.

I create a movement route in my test parallaxes picture
and change lossy picture try to trigger this issue,
but still fail, maybe i lost something in important setting.

2. webp breaks image transparency issue
this bug can reproduce,
cwebp resample will break alpha channel.

=======================================================
*1 RPG Maker MV editor only support .png, but nw.js core is support .webp

=======================================================
update 20200316

I think conversion to lossless webp will change png structure.

BlueSky.png(original png)
Input file: BlueSky.png | 873563 bytes
Image: 816x816 pixels | 8 bits/sample | RGB | 27773 color(s)
Delta filter: None
Filter per scanline:
000000000000000000000000000000000000000000000000
Chunks: only critical

dwebp BlueSky.webp => BlueSky.png
Input file: BlueSky.png | 614860 bytes
Image: 816x816 pixels | 8 bits/sample | RGB | 27773 color(s)
Delta filter: Paeth
Filter per scanline:
111111111111111111112122122111112111111111111111
Chunks: gAMA, sRGB
 
Last edited:

cold_arctus

Devoted Member
Sep 25, 2018
8,945
10,816

Abhai

Devoted Member
Sep 12, 2018
8,467
35,713
Abhai Do you use 10-bit (--enable-vp9-highbitdepth) when encoding? e.g. "Treasure of Nadia"

If yes, maybe you should mention it in the links, because some older gpus do not support it and will let those users scratching their heads of what is wrong with their systems.
https://f95zone.to/threads/playing-on-linux-tutorials-tools-and-help.19523/post-3190726
Nope, Im not using 10-bit encoding/"enable-vp9-highbitdepth" unless it is a hidden default setting in libvpx-vp9...
Yet, I guess Bas is the far more competent person to ask that question here.
And yes, the mentioned game has trouble playing on some older (read "mine") win-systems, and it has nothing to do with compressed/normal versions there.
 
  • Like
Reactions: pk2000 and bas

bas

retired
Respected User
Donor
Former Staff
May 6, 2017
3,987
30,351
  • Like
Reactions: pk2000 and Abhai

playb0y44

Well-Known Member
Game Compressor
Game Developer
Aug 16, 2017
1,789
28,410
The Mac/Linux version of RenCruncher 0.4 is here:

If there's demand I'll look into doing RPGMCruncher.

The zip includes Mac versions of cwebp, ffmeg and nconvert. Linux users should install the relevant packages. Linux users shouldn't delete the Cruncher-Mac directory, because it contains webp-header-fix.py.

You need python 2.7.x to run this. I couldn't get Ren'Py's python to work, and I think having python is a reasonable requirement. Get it from .

This has NOT been tested on Linux.

Like the PC version, this assumes you've gone ahead and extracted RPAs, so you have the image/audio/video files.

To run:

Mac: double click RenCruncher-v0.4.command. Drag the Ren'Py app to the terminal window and hit enter, or type in the path to the app.

OR

Mac: launch terminal
Mac/Linux: run RenCruncher-v0.4.command. You can pass in the game directory on the command line, or type it in when asked.

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.
Hello, I just used it and find out that it's not compressing audio (.mp3) files. Did compress (.wav) 1584990145418.png
Edit: Just tried a game having webp images - Turns out it does not compress webp images also.
1585028135991.png
 
Last edited:
Mar 6, 2020
47
17
Here's my crunched version.

Image/audio/video quality is reduced to make shit smaller. This is not a perfect process and sometimes can break a game. You've been warned so no bitching.

Acting Lessons [v1.0.2] [DrPinkCake] - Original Size: 3.38GB

Download PC (830MB): - MEGA - WORKUPLOAD -

You don't have permission to view the spoiler content. Log in or register now.
Bro, I have seen you have compressed so many games and I am literally a fan of you. Can you teach me how to compress games like is there any software or program. I like programming/developing so I thought of starting it here.
 

bas

retired
Respected User
Donor
Former Staff
May 6, 2017
3,987
30,351
Bro, I have seen you have compressed so many games and I am literally a fan of you. Can you teach me how to compress games like is there any software or program. I like programming/developing so I thought of starting it here.
Moved this to the thread for the tool I made/use for compressing. Take a look at the OP of this thread and ask any questions you have here. :)
 

Beastnation

Member
Sep 2, 2019
172
86
If you put a lower number the images will be compressed with very reduced quality (More Blur), and if you put higher number images will be compressed with better/good quality.
That's the lossy quality. 100 is the highest, anything below 70 and you'll start to notice on all images, and below like 40 is like minecraft.
Okay Thank and what about value of '- q 80' on line 79?
 
4.80 star(s) 4 Votes