Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Download" button should download the original dat, not the extracted one. #131

Open
LeftofZen opened this issue Nov 13, 2024 · 1 comment
Labels

Comments

@LeftofZen
Copy link
Collaborator

Using Online mode in the editor to view and download objects, the file that is downloaded and saved to disk will be the extracted/unencoded version of the DAT file. This means the images are not compressed. This means some DAT files go from 700kb to 19mb, a massive size increase. Since the game can read the encoded versions, we should simply save the original encoded version of the file.

I wasn't aware the size increase could be so great, and this means I might have to implement compression into object saving (even just single pass would be good)

@LeftofZen LeftofZen added the dat label Nov 13, 2024
@LeftofZen
Copy link
Collaborator Author

Just recently I added the auto-save and this DOES save the original bytes: https://github.com/OpenLoco/ObjectEditor/blob/master/Gui/Models/ObjectEditorModel.cs#L225

But clicking the button "Download" we do save the uncompressed file, which is the issue:
https://github.com/OpenLoco/ObjectEditor/blob/master/Gui/ViewModels/DatTypes/DatObjectEditorViewModel.cs#L184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant