luau / UniversalSynSaveInstance

Shortly USSI. A universal saveinstance revival. This can also be edited and used as a Roblox-Format-File writer.
https://luau.github.io/UniversalSynSaveInstance/
GNU Affero General Public License v3.0
69 stars 32 forks source link

[BUG] Properties that can be saved without gethiddenproperties not being saved. #34

Closed centerepic closed 1 month ago

centerepic commented 1 month ago

Are you sure a similar issue hasn't been opened yet?

Describe the bug Properties such as Color, MaterialVariant, Size, etc. are not being saved when gethiddenproperty isn't present/implemented fully on an executor.

To Reproduce Steps to reproduce the behavior:

  1. Go on any place with parts
  2. Set gethiddenproperty to nil or use an executor that doesn't have it
  3. Run synsaveinstance

Expected behavior Properties that can be read without gethiddenproperty to be properly reflected in the saved file

Screenshots

Sofa with MaterialVariant and part colors in game

image

Sofa in saved game

image

Note: For the second image the script is slightly modified, gethiddenproperty has been replaced with a function that just tries directly indexing the property, which fixed the issue for part size. I have also added a patch that fixed mesh sizing, normally the meshes for the sofa would be massive.

Without any modifications other than my patches for celery, this is what it would look like. image

Executor (& Emulator if used) Name(s): Celery, no emulator. Latest version as of August 2, 2024.

Game Link: https://www.roblox.com/games/331780620/ROBLOX-Library-2024

Additional context It seems like one of the issues is properties being improperly flagged as being special/hidden. That is not the only issue behind this though, since then just replacing gethiddenproperty with the function that directly indexes the property would fix it. If you think you know any ways I can fix this, please let me know. Or just add me on discord or something.

centerepic commented 1 month ago

Also doesn't seem to try to fetch MeshSize? This is why meshparts are wrongly sized.

centerepic commented 1 month ago

From what I see so far it looks like you trying to automatically determine what properties are readable or not or what to ignore has inadvertently caused massive compatibility losses.

centerepic commented 1 month ago

Printing instance MeshSize ingame via executor image Printing same instance's MeshSize in-studio via executor image

centerepic commented 1 month ago

after adding interrupts inside ReadProperty it seems like it just never reads this property.

centerepic commented 1 month ago

Fixed by adding ClassPropertyExceptions. I understand that you want to do things as closely as possible to how roblox internally saves, but these checks critically compromise compatability. If you care about having compatability for exploits missing ghp you'll probably need to change how this works. image

centerepic commented 1 month ago

Fixed it myself, check PR.