Repository navigation
Releases: dfanz0r/PortalSpatialMinifier
Release list
v1.5 - Many fixes/improvments smaller files!
This release includes many significant improvements including the following:
Asset matrix Position and basis vectors can now be configured at different digit precisions. This is useful because often you want the basis vectors(right up front) to be at a higher resolution than the position vector because rotation and scale are baked into these 3 values they have a larger impact on asset position correctness. So by splitting them we can lower the position precision further to get even smaller file sizes in some cases. In a well formed spatial it only shaves off a few hundred bytes but everything counts here. (the old method still exists if you use the previous --precision flag for backwards compatibility with scripts) All of the values are now configurable separately. It also allows you to now reduce precision of bounding volume points separately if you really just don't care for them to be exact.
Second i've rewritten how asset renames work for referenced values within a spatial type to use the "linked" field which always tells us values that are pointing to another spatial asset name. This allows this update to always work for future asset schemas without needing any more future updates to add those field names to a static rename lookup table. No more random breakage with new game features now!
Added color field stripping. This field is only found in some cases with colorizer scripts and is a godot asset metadata field that sometimes leaks into spatial exports and can bloat sizes, now these are stripped out by default. along with color there is often godot only "metadata/*" fields that will slip into the spatial as well that are not needed for bf6 these are also now stripped by default. Both of these can be disabled through a cli flag if you want to keep them for some awful reason.
So all together these improvements can save anywhere between 1 and 5% in size depending on what your exports end up having leaking into them.
Bumped the version from v1.3 -> 1.5 because i forgot to actually release v1.4 when i was going to, and i've done some additional improvements since then so 1.5 it is!
This version is not using NativeAOT on windows because i cannot make nativeaot builds for windows from linux, so everything is using the standard bundled single file executable distribution format for C#.
1.3 - Fix bugs with latest portal sdk
Fixed SurroundingVolume reference handling so those linked volumes are renamed and resolved correctly.
Fixed additional Ring of Fire / combat-area reference cases by handling more single-ID properties:
ExclusionVolume, AdditionalCaptureArea, HardRestrictOBB, and RestrictShapeData.
Fixed the build script so dotnet publish targets JsonMinifier.csproj explicitly instead of failing when both a .sln and .csproj are present.
1.2 - Couple of fixes
Fixes a localization issue that was serializing numbers using commas in certain regions which broke the json files.
Fixes a missed array type for rename checks
Upgraded to .net 10
1.1 - Critical Bug fixes
The first version would break id references between nodes in the json file such as spawn references, bounding volumes, etc. This resolves that issue. Additionally the command line flags have been changed to merge --no-names --no-ids to --no-renames since the names and id's should likely be synced together in naming.