• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Compressing and encrypting game seems messed up?

yonicstudios

Game Developer
54
Posts
8
Years
  • I want to make an alpha release of my game for my first closed alpha, using RPGXP's compress and encription to an .exe command.
    I followed this guide in order to do so. However it seems to behave extremely buggy with the latest versions of Pokémon Elite Combat and Pokémon Gen VI scripts, and I guess with Pokémon Essentials 16.1 as well?

    • Sometimes the process of compressing and packaging the game into the .exe stalls very frequently. When this happens, if I try to run the .exe to extract the files back again will stall after a while with the "Game.rgssad" file.
    • Other times I get a warning popup saying "????????". The files seem to have extracted correctly, but when I try to play the extracted game, anytime the game wants to prompt up a message, it crashes with the error: "Marshal data too small". I can't provide a screenshot since I haven't been able to reproduce this at this time.
    • One time, when I removed the Battlers graphics from the original project in order to reduce the compressed .exe (about 68MB). This time the warning popup didn't appear, but the error from the game keeps appearing.
    I've read on this thread that it might be because the encription might have corrupted some Data files.
    Has anyone encountered this wild bug? Are there any possible workarounds?

    EDIT: I've just found that the Data folder from the compressed and extracted project is completely gone, not even hidden. I'm not sure why it didn't get copied, but I assume it's the cause of the problem.

    EDIT 2: I've tried to compress a clean version of my game (without Elite Combat & GenVI), and the issue persists, so I guess it could be related to how RPGXP compresses the Pokémon Essentials's data.
     
    Last edited:

    ptisnjunk95

    Made in Portugal
    129
    Posts
    11
    Years
  • The rgssad file is where your encripted files (Graphics and Data folders) are stored. It takes a while to encrypt the file you have to wait... You mustn't remove the battlers folder, because the RMXP compress those files to the rgssad file.

    Note that RPG Maker XP may corrupt a compressed game if it is over 128MB in size. In this case, you should reduce the size of the project before you compress it. The easiest way to do this is to remove the Audio folder from the project folder beforehand, since typically music/audio is the largest part of a game. Afterwards, add the Audio folder back to the collection of files produced by the created .exe file.
     

    yonicstudios

    Game Developer
    54
    Posts
    8
    Years
  • The rgssad file is where your encripted files (Graphics and Data folders) are stored. It takes a while to encrypt the file you have to wait... You mustn't remove the battlers folder, because the RMXP compress those files to the rgssad file.
    Yes, I've done this now (I've always waited for the compression to finish, though), however this time the exe still has a size a little bit over 128MB.
    The problem is that the extractor freezes while trying to extract the rgssad file. It is weird because one of the times I managed to extract the files with the warning pop-up was with the full project and only spent a minute and a half or so, with all the Audio and Battlers, so it might should have spent less time without the audio.

    I could try to remove some extra files, like the town map generator and the editor, though it might not be enough.
     

    ptisnjunk95

    Made in Portugal
    129
    Posts
    11
    Years
  • Try to compress without these files.

    The ones in red should be deleted and the green ones just move out the folder and then paste it after compress and decompress
    Capturar.png
     

    yonicstudios

    Game Developer
    54
    Posts
    8
    Years
  • Try to compress without these files.

    The ones in red should be deleted and the green ones just move out the folder and then paste it after compress and decompress
    Capturar.png
    Somehow it made it worse. Most of the graphics have disappeared, except for some random tiles, though the audio can be heard. The game still suffers from the marshal data too short error.
    I noticed that the size of the .exe is still 128MB (131,154 KB to be precise), even after doing it again by removing the stock battlers from Essentials which I used as a backup. I also noticed that a few extra files, from Test.002 to Test.008, have appeared. The first files weight 127MB, while the Test.008 one has a size of 22.2MB
     

    ptisnjunk95

    Made in Portugal
    129
    Posts
    11
    Years
  • The rgssad file contains your data folder. That's why it doesn't appear.

    But you can't remove the battlers folder... Sorry but I ran out of ideas... :s

    EDIT: I found this while googling. It's not the same issue but similar. Corrupted Data? [RESOLVED]

    Why don't you get a fresh .rxproj? All you need to do really is just grab the scripting .rxdata, the Database, and all the maps .rxdata . Maybe a specific file of the data is corrupting the whole project, and therefore you should experiment which one is corrupting. Once you find that file (or those files), try and emulate a new version of them...
     
    Last edited:

    ptisnjunk95

    Made in Portugal
    129
    Posts
    11
    Years
  • Somehow it made it worse. Most of the graphics have disappeared, except for some random tiles, though the audio can be heard. The game still suffers from the marshal data too short error.
    I noticed that the size of the .exe is still 128MB (131,154 KB to be precise), even after doing it again by removing the stock battlers from Essentials which I used as a backup. I also noticed that a few extra files, from Test.002 to Test.008, have appeared. The first files weight 127MB, while the Test.008 one has a size of 22.2MB

    I've searched for this issue, since most of Essentials users might have issues with this, so try this instead:
    Forums RPG Maker - RPG Maker XP/VX Encrypter - When your project exceeds 128 MB
     
    199
    Posts
    8
    Years
    • Seen Apr 27, 2024
    I'm responding a bit late but I ran into a similar issue. With 16.1 something with the trainer data files seems to mess up encryption and I couldn't get the game to load a previously made save file without crashing with a "marshal data too short" error after encrypting it (yes, even with clean essentials). I had to end up messing around by taking most of the compiler script from 15.1 (since I could encrypt with that just fine) and merging it with some of 16.1 so it could still read some the new PBS file formats properly.

    If anyone is having similar issues this is the compiler script I used to get around it: http://pastebin.com/f1xKjupU
     

    Telemetius

    Tele*
    267
    Posts
    9
    Years
  • I'm responding a bit late but I ran into a similar issue. With 16.1 something with the trainer data files seems to mess up encryption and I couldn't get the game to load a previously made save file without crashing with a "marshal data too short" error after encrypting it (yes, even with clean essentials). I had to end up messing around by taking most of the compiler script from 15.1 (since I could encrypt with that just fine) and merging it with some of 16.1 so it could still read some the new PBS file formats properly.

    If anyone is having similar issues this is the compiler script I used to get around it: http://pastebin.com/f1xKjupU

    Thank you for sharing this, have you encountered any compatibility issues after editing the compiler with pieces of the old one? Just asking if it's 100% safe for the project.
     
    199
    Posts
    8
    Years
    • Seen Apr 27, 2024
    Thank you for sharing this, have you encountered any compatibility issues after editing the compiler with pieces of the old one? Just asking if it's 100% safe for the project.

    I've done a few basic play tests since encrypting (starting a new game, starting a previous save, battling trainers, catching pokemon, item getting, berry planting, pokedex checking, map metadata/encounters, TMs) and I haven't encountered any issues. I can't guarantee it's bug free but it got me to actually start the game at least.
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen yesterday
    It would be helpful if you had a look to see what had been changed that might cause your problem. Aside from the tweaks you also have in your code (adding the "Incense" property to Pokémon, etc.), I think all I've done is rearrange the methods in Compiler, which I can't imagine would cause any problems.
     
    199
    Posts
    8
    Years
    • Seen Apr 27, 2024
    It would be helpful if you had a look to see what had been changed that might cause your problem. Aside from the tweaks you also have in your code (adding the "Incense" property to Pokémon, etc.), I think all I've done is rearrange the methods in Compiler, which I can't imagine would cause any problems.

    Well, before I started messing with the compiler I replaced the files in the Data folder one by one with the ones in v15 and the problem stopped once I replaced "trainertypes.dat" with the one from v15. So maybe it has something to do with the way the compiler is handling skill codes? Since I think that's the only the thing about trainer types that changed from v15 to 16. When I have time I'll try and get more specifics.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen yesterday
    When I have time I'll try and get more specifics.
    That would help. I'd prefer it if you started with the v16.1 scripts, and made whatever changes to them in order to fix the problem, rather than make your own updates to v15 code. If your suspicion that it's caused by the skill codes is correct, you'd only need to modify one script accordingly (as few as a couple of lines).

    I've had a hard look, and I can't see how they'd be a problem, though. For some reason I can't open compressed/encrypted files made by RMXP, so I can't test this error myself.
     
    4
    Posts
    9
    Years
    • Seen Apr 5, 2016
    That would help. I'd prefer it if you started with the v16.1 scripts, and made whatever changes to them in order to fix the problem, rather than make your own updates to v15 code. If your suspicion that it's caused by the skill codes is correct, you'd only need to modify one script accordingly (as few as a couple of lines).

    I've had a hard look, and I can't see how they'd be a problem, though. For some reason I can't open compressed/encrypted files made by RMXP, so I can't test this error myself.

    I am totally new to Pokemon Essentials, so I have not found a real fix for this yet but I'm going to post my findings here:

    This is the error I get when trying to run a compressed game.
    [ArgumentError, "marshal data too short", (and a lot of code lines here)
    After pressing OK I get the next one:
    Script "PokeBattle_Trainer' line 118: NoMethodError occurred.
    undefined method '[]' for #<StringInput:0xc94dec8> (the =0x number is always different).

    Now I have no idea what the exact problem is (which method it can't find), but going into PokeBattle_Trainer and changing
    Code:
    def gender
        ret=2   # 2 = gender unknown
        pbRgssOpen("Data/trainertypes.dat","rb"){|f|
           trainertypes=Marshal.load(f)
           if !trainertypes[@trainertype]
             ret=2
           else
             ret=trainertypes[@trainertype][7]
             ret=2 if !ret
           end
        }
        return ret
      end
    to
    Code:
      def gender
        ret=2   # 2 = gender unknown
        #pbRgssOpen("Data/trainertypes.dat","rb"){|f|
        #   trainertypes=Marshal.load(f)
        #   if !trainertypes[@trainertype]
        #     ret=2
        #   else
        #     ret=trainertypes[@trainertype][7]
        #     ret=2 if !ret
        #   end
        #}
        return ret
      end

    Makes sure I can launch without the error, but now everyone has unknown gender ofc.

    I hope this helps finding the bug?
     
    4
    Posts
    9
    Years
    • Seen Apr 5, 2016
    Nevermind. The above only fixes loading an existing savegame.
    When trying to start a new game it still gives an error:
    pbGetTrainerTypeGender undefined method
    when running pbTrainerName
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen yesterday
    I've found and fixed this bug. See the solution here. Remember to run the game again and recompile it after making the changes before compressing it.
     
    Back
    Top