uuksu / RPGMakerDecrypter

Tool for extracting RPG Maker XP, VX and VX Ace encrypted archives.
MIT License
197 stars 42 forks source link

Invalid archive error only on windows 10 and wine #5

Closed izayoi256 closed 1 year ago

izayoi256 commented 1 year ago

I'm thinking of using this tool to distribute Japanese translation mod for the game Impostor Factory.

I could correctly extract its Game.rgssad with RPGMakerDecrypter-cli on Linux Mint 19.1. But RPGMakerDecrypter-cli.exe on Windows 10 and Wine shows the error below and the process aborted.

Something went wrong with reading or extraction. Archive is likely invalid or corrupted.

The tool that can extract rgssad file via CLI is really useful for the mod, so hopefully you could solve the issue...

Here is the Game.rgssad file. https://drive.google.com/file/d/1_IS74rbs56MkEd4Y3-EbBGyx9-TUA_vK/view?usp=sharing

FYI, RGSSAD - RGSS2A Decrypter seems to be able to complete decryption, but shows the error message below at the last. error (名前は正しくありません。 means "Name is invalid.")

tyrone-sudeium commented 1 year ago

I had this exact problem with this exact same game 2 years ago actually, I never committed or pushed the workaround which I used though which I've now done here. I didn't consider it worthy of submitting a patch for since I don't necessarily think what I've done is the best behaviour for this specific error but I'll leave it up to @uuksu to decide that heh

izayoi256 commented 1 year ago

@tyrone-sudeium Oh goodness you saved my day. The workaround worked fine on Wine! I'll leave the issue opened for @uuksu .

uuksu commented 1 year ago

Hey @izayoi256!

Thanks for reporting the issue! First thing that came to my mind is that maybe there is some kind of encoding issue because you're trying to translate Japanese game. I'll take a look of this and maybe we can fix for this.

I'm glad that @tyrone-sudeium was able to help you for now with a workaround. Problem with the provided solution is that some files might not get extracted. I hope that we could find solution for extracting all the files from the archive.

The rgssad file you shared was behind the protected share. I sent you a request to give me access to the file.

uuksu commented 1 year ago

As I was suspecting, there was some invalid characters in the file name that prevented the file writing correctly. I've fixed this by cleaning the file name as good as possible. Fixed version is v.2.0.11.

It's possible that there is sideeffect to this that some games are not 1-to-1 to the original source extracted from the archive (file names may differ). Sadly there is no good way to do this otherwise as the operating systems are the limiting factor here.

I hope this solves the problem. I'll now close the issue, but please open a new one if more problems arise.