Tool RPGM HTML Ren'Py Ren'py,Rpgm &Html Cruncher V1.2 Fixed Developer Edition

GamingLord

Newbie
May 5, 2018
20
11
316414

OVERVIEW:

It Is Simple lossy Batch tool for rpgm ,Ren'py and html which will automatically detect the game type whether if it is Ren'py or html or Rpgm Game. and can save your disk space without losing images,audio,video quality and it can also work with 32bit and 64bit.If anyone Don't Know if their Os is 32bit or 64bit they can download and use aio tool which will automatically detect os and will use appropriate tools.
It will not touch any other files except of images,audio and videos files + Added a developer Menu which will Help a lot.
Some of Highlights of developer menu Are:
*Resize images(For example from 1024*768 to 1920*1080 or any other of your choice
*convert Image files to one another(For example From jpg to webp or Any other type of your choice
*Compress Pics With your Given Instructions.
*Change bitrate of Audio(For example from 24k to 512k or any other of your choice
*Resize Videos(For example from 1080p to 720p or any other of your choice)
*Compress Videos With your Given Instructions.
*Delete Files In Game Folder(For Example to Delete mp3 files type of files or any other of your choice
*Change Extension Of files In Game folder(For example mp3 to wav or any other of your choice

READ IT FIRST:
IMPORTANT: THIS TOOL WILL NOT BACKUP ANY FILE OR WILL NOT SEND THEM TO RECYCLE BIN.
iT WILL OVERWRITE ALL FILES.
MAKE A BACKUP OF GAME BEFORE USING IT.


UPDATED: 2019-06-03
Author: @GamingLord
Tool Version: V1.2 fixed Developer Edition
OS: Windows
Language: English

THANKS TO @bossapplesauce FOR HIS AMAZING SOURCE TOOL CRUNCHER X64 AND @Sam FOR HIS UNREN TOOL.

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

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

iNSTALLATION:
You don't have permission to view the spoiler content. Log in or register now.
>32bit Version=
>64bit Version=
>Aio(32+64bit) Version =
IF You Encountered Any problem then tell me I will Look Into It.
 
Last edited:

gue5t

Active Member
Sep 11, 2016
594
1,035
It Is Simple loseless Batch tool for rpgm and ren'py which can save your disk space without losing images,audio,video quality.
*CAN COMPRESS IMAGES UPTO 60-90% OFF.
@GamingLord, I hope you are unaware and not intentionally misleading the users here that this "tool" is using loseless compression when in fact it is using lossy compression? I'd suggest that you fix the tool description.

P.S. loseless == big files and no loss in quality, lossy == sacrifices quality in order to reduce size.
 

GamingLord

Newbie
May 5, 2018
20
11
@GamingLord, I hope you are unaware and not intentionally misleading the users here that this "tool" is using loseless compression when in fact it is using lossy compression? I'd suggest that you fix the tool description.

P.S. loseless == big files and no loss in quality, lossy == sacrifices quality in order to reduce size.
I am totally aware of it and i am not misleading the users:p.you can check this tool by youself I am sure that you will not find too much difference:cool:.It can compress any video,audio and photo files at high speed without losing quality as compared to other compression softwares.(y)
I am sorry for my mistake
and I have Change lossless to lossy as you said.Thanks for informing me.
 

gue5t

Active Member
Sep 11, 2016
594
1,035
A batch file utility for simple automated LOSSY compressing of image, audio, and video files in Ren'Py & RPGM MV games without any updating of script/json files.
The basic principle is that each time you use LOSSY compression some of the original quality is sacrificed in order to compress the file (the amount lost is based on the tool and settings used). Just because you can't notice the loss in quality doesn't mean it's not there and in order to "COMPRESS IMAGES UPTO 60-90%" the loss of quality should be easily noticeable with the naked eye (put the original and the compressed picture in the same folder and switch between them while looking for the defects due to the compression - most of the time it's a sightly different color or loss of detail but you need to use a tool to determine the actual loss).

P.S. I'd suggest Updating the OP to (please consider this a user's suggestion) and removing the user name from "It will show your user name, current date and time." feature because it can leak personal data like full name of the user:


OVERVIEW:
This is a simple LOSSY batch tool for RPGMaker MV and Ren'Py games which can save you disk space by sacrificing image, audio and video quality that can be used on both 32bit and 64bit processor because it's a 32 bit application and 64bit Windows can run 32bit applications by default.

It will not touch any other files except of images, audio and videos files.
IT contains @Sam Unren V0.7. It means You can Run it directly from REN'PY Cruncher main menu.

IMPORTANT:
THIS TOOL OVERWRITES THE FILES, IT DOES NOT MAKE BACKUPS OR SEND FILES TO RECYCLE BIN.
BACKUP YOUR GAME BEFORE USING IT.

UPDATED: 2018-12-29
Author: @GamingLord
Tool Version: V1.0 Stable
OS: Windows
Language: English

THANKS TO @bossapplesauce FOR HIS AMAZING SOURCE TOOL CRUNCHER X64 AND @Sam FOR HIS UNREN TOOL.

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

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

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

:cool:DOWNLOAD:

IF you encounter any problem then please tell me and I'll look into it.
 

GamingLord

Newbie
May 5, 2018
20
11
The basic principle is that each time you use LOSSY compression some of the original quality is sacrificed in order to compress the file (the amount lost is based on the tool and settings used). Just because you can't notice the loss in quality doesn't mean it's not there and in order to "COMPRESS IMAGES UPTO 60-90%" the loss of quality should be easily noticeable with the naked eye (put the original and the compressed picture in the same folder and switch between them while looking for the defects due to the compression - most of the time it's a sightly different color or loss of detail but you need to use a tool to determine the actual loss).

P.S. I'd suggest Updating the OP to (please consider this a user's suggestion) and removing the user name from "It will show your user name, current date and time." feature because it can leak personal data like full name of the user:


OVERVIEW:
This is a simple LOSSY batch tool for RPGMaker MV and Ren'Py games which can save you disk space by sacrificing image, audio and video quality that can be used on both 32bit and 64bit processor because it's a 32 bit application and 64bit Windows can run 32bit applications by default.

It will not touch any other files except of images, audio and videos files.
IT contains @Sam Unren V0.7. It means You can Run it directly from REN'PY Cruncher main menu.

IMPORTANT:
THIS TOOL OVERWRITES THE FILES, IT DOES NOT MAKE BACKUPS OR SEND FILES TO RECYCLE BIN.
BACKUP YOUR GAME BEFORE USING IT.

UPDATED: 2018-12-29
Author: @GamingLord
Tool Version: V1.0 Stable
OS: Windows
Language: English

THANKS TO @bossapplesauce FOR HIS AMAZING SOURCE TOOL CRUNCHER X64 AND @Sam FOR HIS UNREN TOOL.

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

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

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

:cool:DOWNLOAD:

IF you encounter any problem then please tell me and I'll look into it.
Everything has been changed and the version is updated.Thanks for imp suggestion.
 

gue5t

Active Member
Sep 11, 2016
594
1,035
From the updated screenshot the username might still be visible (top left corner of the window), unless this is the user type?
Your features are still repeating twice (probably double pasted).
And the download link for the new version is damaged.

[EDIT]
  • I applaud the switch from PureBasic to BAT files for transparency and removal of suspicion of malicious code.
  • I strongly disagree with the use of unknown, unofficial or old versions of FFMPEG & CWEBP and recommend replacing them with the current stable versions from the authors sites:

  • I'd also suggest that you move the unrpyc & rpatool files to the Cruncher-x86 folder instead of leaving them encoded in the BAT - there is no longer any point to it if you are going to use multiple files and would make the updating of the scripts more difficult in the future.
  • Also have you considered renaming the Cruncher-x86 folder to Cruncher with the appropriate files in it for x86 & x64 and a detection that will run the proper files for the installed OS?
 

GamingLord

Newbie
May 5, 2018
20
11
From the updated screenshot the username might still be visible (top left corner of the window), unless this is the user type?
Your features are still repeating twice (probably double pasted).
And the download link for the new version is damaged.

[EDIT]
  • I applaud the switch from PureBasic to BAT files for transparency and removal of suspicion of malicious code.
  • I strongly disagree with the use of unknown, unofficial or old versions of FFMPEG & CWEBP and recommend replacing them with the current stable versions from the authors sites:

  • I'd also suggest that you move the unrpyc & rpatool files to the Cruncher-x86 folder instead of leaving them encoded in the BAT - there is no longer any point to it if you are going to use multiple files and would make the updating of the scripts more difficult in the future.
  • Also have you considered renaming the Cruncher-x86 folder to Cruncher with the appropriate files in it for x86 & x64 and a detection that will run the proper files for the installed OS?
I have updated it to v1.1 stable.
link fixed.
it will not show administrator name.it always opens with admin control so don't worry about it.
The official version of libwebp and ffmpeg has been updated.
Unren has been totally removed.
os detection is not supported in batch file(only 32bit or 64bit can detected) so 32bit detection has been added.
It is for 32bit. it can alse be used for 64bit and cruncher-x86 has been changed to cruncher.
THANKS FOR YOUR IMP SUGGESTIONS.
PLZ CHECK THE UPDATED VERSION AND TELL ME ABOUT ANY PROBLEM OR BUG.
 
  • Like
Reactions: gue5t

gue5t

Active Member
Sep 11, 2016
594
1,035
  • You can include the unrpyc & rpatool tools in the cruncher folder, put the commands in the menu and run them from there (preferably put a link to there authors pages as a comment in the bat file). I think you'll only need to put back this code + the menu entries (preferably with the authors permision):
Code:
REM Check for python
if not exist "%pythondir%python.exe" (
    echo    ! Error: Cannot locate python.exe, unable to continue.
    echo            
    echo.
    pause>nul|set/p=.            Press any key to exit...
    exit
)

REM Unpack RPA (tool from https://github.com/Shizmob/rpatool )
echo   Searching for RPA packages
cd "%gamedir%"
set "PYTHONPATH=%pythondir%Lib"
for %%f in (*.rpa) do (
    echo    + Unpacking "%%~nf%%~xf" - %%~zf bytes
    "%pythondir%python.exe" -O "%CD%\cruncher\rpatool" -x "%%f"
)
echo.

REM Decompile rpyc files (tool from https://github.com/amanapanama/unrpyc )
echo   Searching for rpyc files...
cd "%gamedir%"
set "PYTHONPATH=%pythondir%Lib"
for /r %%f in (*.rpyc) do (
    if not %%~nf == un (
        echo    + Decompiling "%%~nf%%~xf" - %%~zf bytes
        "%pythondir%python.exe" -O "%CD%\cruncher\unrpyc.py" "%%f"
    )
)
echo.
  • I'd recommend changing the %OS% value to 32 or 64 value - for example use this code ( ). This way we can use the same script with the appropriate executable depending on the OS bitness.:
Code:
REM Detect OS bitness
set OS=64
IF %PROCESSOR_ARCHITECTURE% == x86 ( IF NOT DEFINED PROCESSOR_ARCHITEW6432 set OS=32 )
then just add "-%OS%" at the end of each file name (for example instead of):
Code:
if not exist "cruncher\cwebp.exe" (
We get:
Code:
if not exist "cruncher\cwebp-%OS%.exe" (
When running instead of:
Code:
set "command-var="%CD%\cruncher\ffmpeg.exe" -i "%%a" -map_metadata -1 -codec:a libmp3lame -qscale:a 5 -vn "%%~dpa%%~na".temp."
We get:
Code:
set "command-var="%CD%\cruncher\ffmpeg-%OS%.exe" -i "%%a" -map_metadata -1 -codec:a libmp3lame -qscale:a 5 -vn "%%~dpa%%~na".temp."
Then put the appropriate file versions in the cruncher folder named like:
cwebp-32.exe
cwebp-64.exe
ffmpeg-32.exe
ffmpeg-64.exe
  • I don't see the point of removing the hidden attribute (attrib -h "%CD%\GAME\*.*" /s /d) considering the files extracted from the .RPA archive can't have it.
  • I also don't understand why have you commented out the webp-header-fix portion of the code?
  • I'd also recommend thinking of a way to add a detection for a folder named parallaxes and excluding it from processing/conversion because doing so usually results in errors in each game that uses the parallaxes system.
P.S. You can use ALT + PrtScr to make the screen shot or the if you prefer GUI.
 

GamingLord

Newbie
May 5, 2018
20
11
  • You can include the unrpyc & rpatool tools in the cruncher folder, put the commands in the menu and run them from there (preferably put a link to there authors pages as a comment in the bat file). I think you'll only need to put back this code + the menu entries (preferably with the authors permision):
Code:
REM Check for python
if not exist "%pythondir%python.exe" (
    echo    ! Error: Cannot locate python.exe, unable to continue.
    echo          
    echo.
    pause>nul|set/p=.            Press any key to exit...
    exit
)

REM Unpack RPA (tool from https://github.com/Shizmob/rpatool )
echo   Searching for RPA packages
cd "%gamedir%"
set "PYTHONPATH=%pythondir%Lib"
for %%f in (*.rpa) do (
    echo    + Unpacking "%%~nf%%~xf" - %%~zf bytes
    "%pythondir%python.exe" -O "%CD%\cruncher\rpatool" -x "%%f"
)
echo.

REM Decompile rpyc files (tool from https://github.com/amanapanama/unrpyc )
echo   Searching for rpyc files...
cd "%gamedir%"
set "PYTHONPATH=%pythondir%Lib"
for /r %%f in (*.rpyc) do (
    if not %%~nf == un (
        echo    + Decompiling "%%~nf%%~xf" - %%~zf bytes
        "%pythondir%python.exe" -O "%CD%\cruncher\unrpyc.py" "%%f"
    )
)
echo.
  • I'd recommend changing the %OS% value to 32 or 64 value - for example use this code ( ). This way we can use the same script with the appropriate executable depending on the OS bitness.:
Code:
REM Detect OS bitness
set OS=64
IF %PROCESSOR_ARCHITECTURE% == x86 ( IF NOT DEFINED PROCESSOR_ARCHITEW6432 set OS=32 )
then just add "-%OS%" at the end of each file name (for example instead of):
Code:
if not exist "cruncher\cwebp.exe" (
We get:
Code:
if not exist "cruncher\cwebp-%OS%.exe" (
When running instead of:
Code:
set "command-var="%CD%\cruncher\ffmpeg.exe" -i "%%a" -map_metadata -1 -codec:a libmp3lame -qscale:a 5 -vn "%%~dpa%%~na".temp."
We get:
Code:
set "command-var="%CD%\cruncher\ffmpeg-%OS%.exe" -i "%%a" -map_metadata -1 -codec:a libmp3lame -qscale:a 5 -vn "%%~dpa%%~na".temp."
Then put the appropriate file versions in the cruncher folder named like:
cwebp-32.exe
cwebp-64.exe
ffmpeg-32.exe
ffmpeg-64.exe
  • I don't see the point of removing the hidden attribute (attrib -h "%CD%\GAME\*.*" /s /d) considering the files extracted from the .RPA archive can't have it.
  • I also don't understand why have you commented out the webp-header-fix portion of the code?
  • I'd also recommend thinking of a way to add a detection for a folder named parallaxes and excluding it from processing/conversion because doing so usually results in errors in each game that uses the parallaxes system.
P.S. You can use ALT + PrtScr to make the screen shot or the if you prefer GUI.
Updated and fixed as you suggester.thanks again
 
  • Like
Reactions: gue5t

gue5t

Active Member
Sep 11, 2016
594
1,035
I'm attaching a patch containing some code fixes for RPGMCruncher-v1.2 AIO, also the RenCruncher-v1.2 AIO file contains the previously suggested change to include the unrpyc & rpatool tools in the cruncher folder and run them from there.

P.S. The unrpyc is updated to latest version.
 

GamingLord

Newbie
May 5, 2018
20
11
I'm attaching a patch containing some code fixes for RPGMCruncher-v1.2 AIO, also the RenCruncher-v1.2 AIO file contains the previously suggested change to include the unrpyc & rpatool tools in the cruncher folder and run them from there.

P.S. The unrpyc is updated to latest version.
Have you checked the patch before uploading?
It contain many errors
*Unren tools can't be run from rpatool in cruncher/rpatool
*32bit & 64bit detection of cwebp & ffmpeg in (if exist) not working. I have write them as cruncher-32,ffmpeg-32 and
cwebp-64 and ffmpeg-64.
*rpatool included in cruncher folder is not for this type of batch file.
The fixed version has uploaded.
 

CobraPL

NTR PALADIN
Donor
Sep 3, 2016
2,020
4,047
gue5t

WebP v1.0.2 from Jan 2019

Also, please add option for: -lossless -q 100 -m 6
 
  • Like
Reactions: GamingLord

Ryahn

Birb Skull Fuckery
Staff member
Moderator
Donor
Compressor
Jul 5, 2017
6,045
40,049
GamingLord May I suggest some improvements on audio? Currently the audio that is being converted, is in poor quality. To keep its quality but make it smaller, this is what I use.

MP3
Code:
ffmpeg.exe -i Audio.mp3 -map_metadata -1 -hide_banner -codec:a libmp3lame -q:a 7 Audio.mp3
Original: 1.5MB
Compressed: 391KB

OGG
8k doesnt work on all files
Code:
ffmpeg.exe -i Aduio.ogg -map_metadata -1 -hide_banner -c:a libvorbis -vn -b:a 64k Audio.ogg
Original: 7.2MB
Compressed: 2.7MB

WAV
Code:
ffmpeg.exe -i Aduio.wav-map_metadata -1 -hide_banner -acodec pcm_s16le -ac 1 -ar 16000 Audio.wav
Original: 420KB
Compressed: 77KB
 
  • Like
Reactions: GamingLord