MV 1.3 Encryption not working

Tested with an existing and new project. When using image encryption following error apprears. 🙂


8dLl1Wf.png
I am not sure if THAT is the case, but if you imported files from a long long folder tree, something like:


C:\Program Filex (x86)\ Steam\Steamapps\common\RPGMV\dlc\aFloderWithLongName\aSubfolderWithLongName\averylongname.png


then this might break not only a program but also how Windows can handle files.


Sometimes there is a limit on how long a path string can be.


This looks like a problem I personally encountered with Ace in the past.


What I did was put the assets on a folder named assets I created in C.


C:\Assets\


VERY long png names were renamed accordingly thus I could compile the project.


I am not making this up.


It is indeed a problem that DLC packers did not thought of. 😛


It is mostly possible to happen while using steam DLCs because if the long path.


For more info see this:


http://stackoverflow.com/questions/1065993/has-windows-7-fixed-the-255-character-file-path-limit


http://stackoverflow.com/questions/1880321/why-does-the-260-character-path-length-limit-exist-in-windows
It isn't. The problem is also appearing on a completly new project. Try it yourself if you like, you won't be able to encrypt a game.
It isn't. The problem is also appearing on a completly new project. Try it yourself if you like, you won't be able to encrypt a game.



This is interesting, but it exeeds my capabilities of answering, mostly because I don't own MV yet.


Hey, tell you what, try this:


Close MV.


Copy - paste the new project folder, inside a folder in C:\


Run the copy of the project that its folder is in C:\


Try to compile and tell me if it does.


If not, well that's a problem. :/


Edit:


I am trying to completely eliminate the case of long path strings on your PC.
Will test it out right now, I will edit this post in 5-10 minutes.


I appreciate your help but if you check the update release page on steam you'll see i'm not the only one with the problem.


Edit: Same error as before.


Also checked all folders of the new project for long names. 


Had the project on C:\ and encrypted it to C:\A1\Project1 because you can't deport the project to the exactly same folder
I don't doubt that.


What I get from this error is first that an error occured obviously.


There is no try-catch code to handle it, so it is an error that nothing in the code could handle.


Thus it says Unahndled Error I suppose.


I don't know what header gone wrong and why.


But I know that most of the time, such errors can occur by long paths.


Of course this can be a bug.


The fact I suggest you doing these steps is that it might be related with the paths. If so you can solve it.


Now if this bug is related to another part of the code, then nobody can help you but the developers.


Things like that can happen, especially on complex projects in JS and I believe they will soon fix it.


Question:


Can you pack a game with no encryption? Does this happen only when you encrypt the assets? This might help the devs.
Some code of "rpg_core.js" file should coincide with the header of encrypted file. 


So I was solved the problem by modifying the variable called 'Decrypter.REMAIN' into rpg_core.js as follows.


Decrypter.REMAIN = "0000000020";




364.png


Try this : 


https://github.com/biud436/MV/raw/master/SimpleEncryptionSystemFixes.js
It only happens when you use encryption. As I said this problem also appears on a project without any real assets. :/


I hope it will help the one developer working on MV.
@biud486 found the problem of the header, it has to do with the encryption.


I am not sure if that solution is okay, but it seems like a walkthrough.


Surely it will be valuable info to the devs.


This should be solved though through an update and not individual editing, so hopefully the devs will release the bugfix soon. 🙂
Wow, this really seems to solve the problem. At least on the first glimpse. Thank you biud. 🙂

Not sure if this can be closed or should stay open in case this problem still appears in other variations.
I suggest you leave this to a moderator to decide, maybe it would be nice to listen from the devs, and see if this patch solves efficiently and correct the problem.
Some code of "rpg_core.js" file should coincide with the header of encrypted file. 


So I was solved the problem by modifying the variable called 'Decrypter.REMAIN' into rpg_core.js as follows.



Decrypter.REMAIN = "0000000020";




View attachment 44871

Thanks for this. At least for a temp hotfix until the devs do something it's cool someone came up with something,
Thanks for this. At least for a temp hotfix until the devs do something it's cool someone came up with something,



Hey guys!


This does fix the problem on PC.


However, this does NOT fix the problem on Mac. When I attempt to encrypt the game on my Mac, I ran into the header error. I am forced to use my PC when encrypting the games. Stinks for me because my Mac is my main computer. I hope the Devs realize this. 
Fixed 

Original thread: https://forums.rpgmakerweb.com/threads/mv-1-3-encryption-not-working.66606/