Hi, I'm a big fan of the game and would like to say thanks for supporting Linux!

I don't know if this thread is still alive but I'm currently trying to write a basic level editor for DOS-EE Linux.

I'm getting stuck on Crc32 errors, making me think maybe the linux version of the game uses a different Crc32 implementation?

I started by trying to port: https://github.com/tmxkn1/D-OS-Save-Editor

which relies on: https://github.com/Norbyte/lslib

Instead of porting lslib I simply ripped out the bits needed to support D-OS-Save-Editor for now. Some of the C++ is windows specific, specifically crc32.cpp so I re-wrote it in C#. You can see my port here: https://gist.github.com/SamAmco/5b1f319f0ff9f58875b27707550c4220

My C++ skills aren't amazing so I suppose it's possible I got something slightly wrong but right now I'm getting the following error:


[i]Unhandled Exception:
System.AggregateException: One or more errors occurred. (CRC check failed on file 'Globals.lsf', archive is possibly corrupted. Expected F657840E, got CDE7075C) ---> System.IO.InvalidDataException: CRC check failed on file 'Globals.lsf', archive is possibly corrupted. Expected F657840E, got CDE7075C
at LSLib.LS.PackagedFileInfo.MakeStream () [0x000f6] in <227448a98e43416eb2ab52cf6538eb7e>:0
at LSLib.LS.Packager.UncompressPackage (System.String packagePath, System.String outputPath) [0x000f6] in <227448a98e43416eb2ab52cf6538eb7e>:0
at D_OS_Save_Editor.Savegame.UnpackSavegameAsync (System.IProgress`1[T] progress, System.Boolean metaOnly) [0x000b2] in <d2cd6ce312a0468782052565a30df527>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) <0x7fc51a233b60 + 0x000bc> in <e5dad02f71314095bddb65a504a4b77d>:0
at System.Threading.Tasks.Task.Wait () <0x7fc51a233ab0 + 0x0000c> in <e5dad02f71314095bddb65a504a4b77d>:0
at DivinityLinuxSaveEditor.MainClass.Main (System.String[] args) [0x00026] in <d2cd6ce312a0468782052565a30df527>:0
---> (Inner Exception #0) System.IO.InvalidDataException: CRC check failed on file 'Globals.lsf', archive is possibly corrupted. Expected F657840E, got CDE7075C
at LSLib.LS.PackagedFileInfo.MakeStream () [0x000f6] in <227448a98e43416eb2ab52cf6538eb7e>:0
at LSLib.LS.Packager.UncompressPackage (System.String packagePath, System.String outputPath) [0x000f6] in <227448a98e43416eb2ab52cf6538eb7e>:0
at D_OS_Save_Editor.Savegame.UnpackSavegameAsync (System.IProgress`1[T] progress, System.Boolean metaOnly) [0x000b2] in <d2cd6ce312a0468782052565a30df527>:0 <---[/i]


Can anyone provide me any insight on this? I would skip the CRC altogether but presumably I'll need to be able to create a valid CRC to convert back to LSF/LSV again after editing the LSX?

Perhaps I'm on the wrong lines completely? I could try porting MooseEdit instead? I don't know if the source is up to date and works for EE though?

Last edited by SamAmco; 29/05/19 05:20 PM. Reason: Further questions