Help - Search - Members - Calendar
Full Version: RPG Maker Encryptor
RPG Maker VX Community > RGSS2/Ruby Scripting > Complete RGSS2 Scripts
Jet
RPG Maker VX Encryptor

by Jet


Introduction


As some people may know, RPG Maker VX has a built-in encryptor that makes a .rgss2a file to protect your data and graphics.
This seems to take issue when the project is too big, it errors out, and the entire process a slow anyways.
This .exe will make the .rgss2a file, quicker and without limits. In addition, it will also compress your .rvdata files, including the Scripts.rvdata file which hasn't been done before.
So in total: You run the .exe which will: compress the .rvdata files to a smaller size, compress the Scripts.rvdata, archive them in the .rgss2a file, and create a new folder with all the files you need to distribute your compressed, encrypted game.

Features

- Compresses game to .rgss2a archive
- Compresses all .rvdata files to smaller size
- Compresses the Scripts.rvdata file
- (OPTIONAL) Include the RTP files.
- (OPTIONAL) Compresses Graphics in a .rvdata file.
- (OPTIONAL/BETA) Compresses the entire encrypted game into a single .exe
- Hackers cannot take data files without knowing how to reverse compression
- No size limit
- Quicker than default, built-in encryption
- Just a simple .exe
- No user-actions required other than clicking the .exe
- And more...

Screenshot

This is what the console window should look like after all the compression, encryption, and removals:


This is the GUI in the GUI version:


Program:

Console:
http://dl.dropbox.com/u/35988679/RPG%20Maker%20Encryptor.exe

GUI:
http://dl.dropbox.com/u/35988679/RPG%20Mak...yptor%20GUI.exe

How To Use:

1) Ensure you have Java installed.
2) Download the .exe
3) Move the .exe to your game directory
4) Run the .exe
4.5) Follow in-console prompts for extra features.
5) Wait until it tells you to "Press enter to exit."
6) Press Enter.
7) Ensure your project works by entering the EncryptedGame directory and running the game.
8) Move the EncryptedGame directory elsewhere and do what you want to.

Notes:

- Do NOT use my RVDATA Compression if you plan to compress with this script.
- If you want "no risks", even though this program was fully tested, make a copy of your project and run the .exe in that.
- Do NOT run this with your game open, editing, or playing.
- This script does do some editing to files, so you should not touch anything in your game while the .exe is running. Any changes will be reverted when the process is over.
- This will not include the RTP files. You need to add those to your graphics manually.
- This script, while written in Ruby, use a .jar file as well. This means this requires Java to be installed. Java can be found here

Additionally:

This program is written under this license:


If you really like this program, and wish to show your support, donate to me:


I am not responsible for any damage you may cause to yourself, your project, your soul, or anything else when using this program.

Credit

Jet
Zeriab
Creators of zlib, win32api, fileutils, rbconfig, and ocra ruby extensions/gems.
mitchi.exe
OMJ. x(
After my semester ends in the next 7 hours, I'll get my hands on this.

If we use this, will your past rvdata compression script be redundant?

This was the best feature, btw!
Spoiler:
QUOTE ("Jet")
- Hackers cannot take data files without knowing how to reverse compression
bastian
Jet strikes again with something super awesome!

My first game was well over the allotted size limit so I had to through the annoying process of removing the audio folder to encrypt/compress, then decompress and put the audio folder back in, then zip it. This awesome exe not only saves me from all those additional steps, but compacts the file size wonderfully! From 139mb to 99mb!

EDIT: Er... I've tried it twice now... and it doesn't seem to include my custom graphics in the "EncryptedGame" folder, and I assume it should?

EDIT2: Specifically only the files in the Systems folder; the rest are accounted for.
Jet
QUOTE (bastian @ Oct 16 2011, 03:22 PM) *
Jet strikes again with something super awesome!

My first game was well over the allotted size limit so I had to through the annoying process of removing the audio folder to encrypt/compress, then decompress and put the audio folder back in, then zip it. This awesome exe not only saves me from all those additional steps, but compacts the file size wonderfully! From 139mb to 99mb!

EDIT: Er... I've tried it twice now... and it doesn't seem to include my custom graphics in the "EncryptedGame" folder, and I assume it should?

EDIT2: Specifically only the files in the Systems folder; the rest are accounted for.



Graphics are in the .rgss2a file.

EDIT: I have changed the file to have it wait a bit more before continuing with the process but, i cannot personally replicate the issue.
bastian
I downloaded your exe again and tried it and... yeah, it's definitely not grabbing all the graphics. :/
Jet
QUOTE (bastian @ Oct 16 2011, 04:06 PM) *
I downloaded your exe again and tried it and... yeah, it's definitely not grabbing all the graphics. :/


I'll look further into, though myself and none of my testers come across the same issue. I'll update as soon as i figure it out.

EDIT: Should be fixed. I have updated the .exe to better detect if the rgss2a file is done being encrypted and compressed.
Emmych
Welp, I'm not sure I approve of dangers to my soul, but if it encrypts projects better I'll be glad to use this. >w<d

Nice one, man~!
bastian
It works perfectly now! Great job man!
Jet
@Emmych: Only 1 person experienced permanent damage to their soul.

@bastian: Excellent, glad to make it better for everyone cool.gif
r2roboy
Hey Jet! Awesome tool biggrin.gif.

However, it seems to overlook the "extra_tiles" folder and the new passage setting files used for Bullet's SwapXT program. Mind checking it out? My program crashes whenever I enter an area using a new passage setting and a new tileset generated under SwapXT.
rgangsta
Very awesome, Jet! Totally gonna use this. You should think about a sound encryptor.
Anddy
Cool a fusion of Zeriab encrypter and jet RVDATA Compressor the only left is that you fuse it with your Graphics To .rvdata for more awsomeness.

And feedback: this script is prety awesome hackers can extract the game but can't edit it wink.gif

Jet
QUOTE (r2roboy @ Oct 17 2011, 05:15 AM) *
Hey Jet! Awesome tool biggrin.gif.

However, it seems to overlook the "extra_tiles" folder and the new passage setting files used for Bullet's SwapXT program. Mind checking it out? My program crashes whenever I enter an area using a new passage setting and a new tileset generated under SwapXT.


Should be fixed.

QUOTE (Anddy @ Oct 17 2011, 11:59 AM) *
Cool a fusion of Zeriab encrypter and jet RVDATA Compressor the only left is that you fuse it with your Graphics To .rvdata for more awsomeness.

And feedback: this script is prety awesome hackers can extract the game but can't edit it wink.gif


How did you know i was going to do that? o_O
This feature has also been added, though using it can be time-consuming if you have a lot of graphics.
Anddy
QUOTE (WarJet @ Oct 17 2011, 06:53 PM) *
Should be fixed.



How did you know i was going to do that? o_O
This feature has also been added, though using it can be time-consuming if you have a lot of graphics.


Is too esay because you credit Zeriab and i supposed that you have used his Rpg maker Encrypter.

Can you add this metod of encryption: http://www.hbgames.org/forums/viewtopic.php?p=731574#p731574 ?
Jet
QUOTE (Anddy @ Oct 17 2011, 04:35 PM) *
Is too esay because you credit Zeriab and i supposed that you have used his Rpg maker Encrypter.

Can you add this metod of encryption: http://www.hbgames.org/forums/viewtopic.php?p=731574#p731574 ?


No i meant, how did you know i was gonna fuse my Graphics To .rvdata with this as well?
But yes, i use an edited source code from Zeriab that he uses in his Encryptor to do my own encryption.

As for the other method, no i don't think i will, that is a lot of attempt to automate sorry.

UPDATE: I have added a new BETA feature to the encryptor, which will compress the encrypted game into a single .exe, this can be done mainly to hide the game files when they play the game.
This feature is beta because: a console window will appear momentarily when the .exe'd game opens up, and the icon for the new .exe is not changable.
fmstwre
Beautiful Jet. This has added your support bar into my siggy. You deserve it.
Anddy
Jet you should consider adding time stamps to all of your stuff
MISTER BIG T
When I compressed to single exe it gave me this error

Permission denied - GameEXE.exe
Jet
QUOTE (MISTER BIG T @ Oct 19 2011, 05:55 AM) *
When I compressed to single exe it gave me this error

Permission denied - GameEXE.exe


Should be fixed, though it doesn't really cause any issues.
EZaxess
SO... COOL. banghead.gif

But not enough because music is still there. -crack whip- What are you waiting for Jetski.
EvilEagles
Jet.
YOU ARE SO COOL.
You saved my day. I'm eternally grateful. OTL
Jet
Thanks guys, weird how you posted at the same time o_O

Also, UPDATE
There is now a feature to include the RTP when compressing. No more manual movements of the graphics/audio you use.
Emmych
QUOTE (WarJet @ Oct 16 2011, 09:46 PM) *
@Emmych: Only 1 person experienced permanent damage to their soul.


I still don't like dem odds. B|
fmstwre
It's absolutely incredible now. Literally the one thing that this didn't have it now has. Nice job Jet, really nice.
Zeriab
Good work on assembling this utility happy.gif

Please do note that the scripts are already compressed. It's only the header that's not compressed which contains script section name for example.

*hugs*
Jet
QUOTE (Zeriab @ Oct 21 2011, 12:21 PM) *
Good work on assembling this utility happy.gif

Please do note that the scripts are already compressed. It's only the header that's not compressed which contains script section name for example.

*hugs*


Could not have done it without your code tongue.gif
Yeah, i know the scripts are already, but i do it a second time to make it harder for noobs to take a look.

UPDATE: I fixed it so the rtp which was added is deleted from your game folder after finishing the encryption process.
Nelderson
Jet....this is incredible....


Words do describe how awesome you are either.......I think I kinda have a Man crush on you...... wink.gif
Jet
@Nelderson: Many-a-men do.

Anyways, UPDATE:
I added a simpler GUI version for people who don't want to have to wait on the console for the process to finish, or those who need to pack both an rtp and non-rtp version without having to re-run the program.
Anddy
The GUI version is faster than the console
Zeriab
When you include the RTP I highly recommend you look up which rtp to use and the path of the rtp.
You can acquire this path programmatically:

CODE
module Utility
  #############
  # DLL STUFF #
  #############
  READ_INI         = Win32API.new('kernel32',  'GetPrivateProfileStringA',
                                  %w(p p p p l p), 'l')
  WRITE_INI        = Win32API.new('kernel32',  'WritePrivateProfileStringA',
                                  %w(p p p p), 'l')
  READ_REGISTRY    = Win32API.new('advapi32',  'RegGetValue',
                                  %w(l p p l p p p), 'l')
  
  HKEY_CURRENT_USER = 0x80000001
  HKEY_LOCAL_MACHINE = 0x80000002

  ##
  # Read from system ini
  #
  def self.read_ini(key_name, app_name = 'Game', filename = 'Game.ini',
                    buffer_size = 256, default = '')
    buffer = "\0" * buffer_size
    READ_INI.call(app_name, key_name, default, buffer, buffer_size - 1,
                  ".\\" + filename)
    return buffer.delete("\0")
  end

  ##
  # Write to system ini
  #
  def self.write_ini(key_name, value, app_name = 'Game', filename = 'Game.ini')
    return WRITE_INI.call(app_name, key_name, value.to_s, ".\\" + filename)
  end
  
  ##
  # Read rtp path from registry
  #   Returns nil if no rtp is specified in the ini-file
  #
  def self.read_rtp_path(rtp = read_ini('RTP'))
    return nil unless rtp?
    hkey = HKEY_LOCAL_MACHINE
    subkey = 'Software\Enterbrain\RGSS2\RTP'
    value = rtp
    type = 0x00000008 # Binary
    buftype = "\0" * 5
    buffer_size = 256
    buffer = "\0" * buffer_size
    size = [buffer_size-1].pack("L")
    res = READ_REGISTRY.call(hkey, subkey, value, type, buftype, buffer, size)
    size = size.unpack("L")
    return buffer[0...size[0]].rstrip
  end
  
  ##
  # Check if it uses an rtp
  #
  def self.rtp?
    read_ini('RTP') != ''
  end
end


To read the path just use Utility.read_rtp_path and it look up first the rtp to use in the ini-file and then in the registry.
If you are not doing it already I suggest that you delete the rtp setting from Game.ini file after adding the rtp to follow the normal VX compression.

I highly suggest that you modify the Java code so that it can put files from several directories into the encrypted archive. I can help you with this if you have trouble doing it yourself.

*hugs*
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.