You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

5h 38m 21s logged

v0.8.1

I thought this step was going to be simple… Not at all!
It’s been a nightmare of an ordeal. The save selection menu’s code (its logic) was basically one flat, tangled plate of spaghetti.

The base game used a bunch of dictionaries to store data and look it back up. The functions tied to the buttons used the Rect object handed to the class to look up the data they needed. Why hand over an object to look up data through a dictionary when you can just pass the function what it needs directly…
I completely rewrote the menu’s behavior from scratch, cleanly, to support displaying and loading saves in their new archive form.

What’s changed:

  • Rewrote the save selection menu so it lists both classic save folders and the new .msa archives side by side.
  • Added a proper confirmation popup (reused for save deletion, and reusable for anything else later) instead of the base game’s tangled state.
  • Rebuilt the difficulty settings screen flow so it works the same way whether the save is a folder or an archive.
  • Deleting a save now works for both save folders and .msa archives.
  • Fixed thumbnails not showing for saves without a screenshot.
  • Hooked up unloading the virtual file system when leaving a world, so you can load another world without restarting the game.
  • Squashed a good number of bugs along the way (mixed up path separators, wrong field types, missing state resets) that only showed up once real saves were being loaded and listed.

Progress so far:

  • ✅ VFS (Virtual File System).
  • ✅ Write the fake System.IO functions.
  • ✅ Write/Read the .msa (Mechanica Save Archive) file.
  • ✅ Intercepting the system functions.
  • ✅ Write the triggers that will fire the capture/emission of virtual files.
  • ✅ Add display/support for the new save format in the world selection menu.
  • ❌ Add a config file, [deinitialize the VFS on world exit - Early Done], and other minor details/improvements (new)
  • ❌ [Optional] Fix non-blocking base-game load/save errors that clutter the console.
0
0
21
Open comments for this post

7h 15m 16s logged

0.6.0

It wasn’t as simple as expected… But it works now!
You can load a normal world, and on the first save it will be converted into a .msa archive. From then on, whenever you try to load a world that has an archived version, that version will be loaded instead of the other one.

What’s changed:

  • Fixed VirtualFS incorrectly normalizing the root save path, which caused it to no longer match the paths built by the game itself, breaking file lookups everywhere.
  • Fixed QueryEntries not sanitizing multi-level directory paths, which caused Directory.GetFiles/GetDirectories to return nothing for nested folders (welds, anchors, etc.).
  • Fixed reconstructed paths mixing / and \ separators, which broke the game’s own string comparisons (e.g. RemoveOldFiles deleting everything instead of only orphaned files).
  • Added patches for DirectoryInfo/FileInfo instance methods (GetFiles, GetDirectories, CreateSubdirectory, Exists), which weren’t covered by the static File/Directory patches.
  • Simplified VirtualFS‘s internal mode from three states (Idle/Capturing/Playback) down to two (Idle/Intercepting), since capture and playback behaved identically from the interception logic’s point of view.
  • Wrote the Save()/LoadSave() coroutine wrappers that trigger the capture/playback cycle and commit/load the .msa archive.

Progress so far:

  • ✅ VFS (Virtual File System).
  • ✅ Write the fake System.IO functions.
  • ✅ Write/Read the .msa (Mechanica Save Archive) file.
  • ✅ Intercepting the system functions.
  • ✅ Write the triggers that will fire the capture/emission of virtual files.
  • ❌ Add display/support for the new save format in the world selection menu.
  • ❌ Add a config file, deinitialize the VFS on world exit, and other minor details/improvements (new)
  • ❌ [Optional] Fix non-blocking base-game load/save errors that clutter the console. (new)
0
0
11
Open comments for this post

55m 14s logged

v0.5.1

I added the Harmony patches to intercept System.IO functions. It was long and repetitive 👍.

What’s changed:

  • Add src\Patches\io\Directory.cs for the directory-related function patches.
  • Add src\Patches\io\File.cs for the file-related function patches.
  • Removed old test files for writing/reading files.

Progress so far:

  • ✅ VFS (Virtual File System).
  • ✅ Write the fake System.IO functions.
  • ✅ Write/Read the .msa (Mechanica Save Archive) file.
  • ✅ Intercepting the system functions.
  • ❌ Write the triggers that will fire the capture/emission of virtual files.
  • ❌ Add display/support for the new save format in the world selection menu.

The next step should let me run the first tests, which will probably be followed by some bug fixes. Hopefully not 🤞.

0
0
10
Open comments for this post

1h 57m 48s logged

v0.4.1

I almost went CRAZY 😰 I ran into an architecture problem, and I was about two steps away from refactoring EVERYTHING to make it clean. I finally found a solution. It’s not the cleanest, but I didn’t have any other idea. So the world-swap function lives inside the VFS. In the end it’s just a matter of roles/responsibilities, nothing technically blocking really 😅.

What’s changed:

  • Add method to write the VFS to a zip archive.
  • Add method to load a zip archive into the VFS.
  • Add method to replace the world’s save with the new one and move the previous version to backup.
  • Improved the versioning system, and included build info (hash, time…).

Progress so far:

  • ✅ VFS (Virtual File System).
  • ✅ Write the fake System.IO functions.
  • ✅ Write/Read the .msa (Mechanica Save Archive) file.
  • ❌ Intercepting the system functions.
  • ❌ Write the triggers that will fire the capture/emission of virtual files.
  • ❌ Add display/support for the new save format in the world selection menu.
0
0
1
Open comments for this post

1h 34m 11s logged

Mostly environment/tooling additions and improvements.

What’s changed:

  • Add build.yml GitHub CI, to verify that commits and PRs compile.
  • Add release.yml GitHub CI, to build and attach the mod to releases.
  • Minor tweaks to the build script.
  • Add a VSCode task to build the project without running a command.

Progress so far (so no changes here ¯_(ツ)_/¯):

  • ✅ VFS (Virtual File System).
  • ✅ Write the fake System.IO functions.
  • ❌ Write/Read the .msa (Mechanica Save Archive) file.
  • ❌ Intercepting the system functions.
  • ❌ Write the triggers that will fire the capture/emission of virtual files.
  • ❌ Add display/support for the new save format in the world selection menu.
0
0
6
Open comments for this post

57m 57s logged

I finished the Forward component, which faithfully reproduces every System.IO function (the functions used to interact with the computer’s file system).

Why? : I need functions with the exact same API, since I’m going to intercept the game’s disk read/write functions to stop it from writing thousands of small files and folders.

What’s changed:

  • Add VirtualFS.DeleteFile()
  • Add VirtualFS.DeleteFileNoThrow() (System.IO‘s Delete function doesn’t throw an error, unlike VirtualFS.DeleteFile(), so I made an alternative to properly mimic Delete’s behavior.
  • Add Forward.cs

Progress so far:

  • ✅ VFS (Virtual File System).
  • ✅ Write the fake System.IO functions.
  • ❌ Write/Read the .msa (Mechanica Save Archive) file.
  • ❌ Intercepting the system functions.
  • ❌ Write the triggers that will fire the capture/emission of virtual files.
  • ❌ Add display/support for the new save format in the world selection menu.
0
0
5
Open comments for this post

7h 44m 42s logged

I have to admit I’ve been working on reverse-engineering / decompiling this game for a long time now, so getting set up was pretty quick.

I established the mod/patch structure, refactored it, refactored it again, until I landed on my current plan.
Right now I’ve only written VirtualFS.cs, which contains the virtual file system that will intercept System.IO requests to prevent them from writing to disk.

Next I’ll move on to writing the fake System.IO functions (write a file, read a file, etc.), the functions that will write and read the save in .zip format, the patches for the system functions, the triggers, and finally the interface.

Progress so far:

  • ✅ VFS (Virtual File System).
  • ❌ Write the fake System.IO functions.
  • ❌ Write/Read the .msa (Mechanica Save Archive) file.
  • ❌ Intercepting the system functions.
  • ❌ Write the triggers that will fire the capture/emission of virtual files.
  • ❌ Add display/support for the new save format in the world selection menu.

Markdown checkboxes don’t work… so I’m using good old emojis instead. ¯_(ツ)_/¯

0
0
9

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…