
Back to NxLabs

HoR Engine Shim
PBy Panduhs
IL rewrite + Harmony shims for common 1.21->1.22 API breaks - fixes many mods, not all.
Description
HoR-Shim is a three-layer compatibility engine that allows mods compiled for Vintage Story 1.21 to run on VS 1.22. It intercepts assembly loading to rewrite broken IL instructions, applies Harmony-based engine shims for specific API changes, and provides safety-net patches that catch runtime errors from incompatible mods. This mod is the foundation that keeps the HoR modpack stable on 1.22.
Stats: 11 IL Rewrite Rules • 5 Engine Shims • 4 Safety Net Patches • 10+ Mods Fixed • Mono.Cecil IL Rewriting • Universal
📌 What's New in v1.0.4 <span style="margin-left: auto; font-size: 12px;">▼</span>
- ForgeContentsRenderer Crash Fix (Safety Net)
Adds a Harmony finalizer onForgeContentsRenderer.OnRenderFramethat suppressesNullReferenceExceptionwhen the forge block entity'sMultiTextureMeshRefis null. This is a base-game VS 1.22.2 race condition, the forge renderer subscribes to the render loop before its mesh is ready. Without the fix, the client hard-crashes every time a forge is in render range during that window. The safety net logs the first 3 occurrences then silences, and the mesh rebuilds normally on the next tick.
✨ Core Features <span style="margin-left: auto; font-size: 12px;">▼</span>
- Three-Layer Compatibility Architecture
Combines in-memory IL rewriting, targeted Harmony engine shims, and safety-net runtime guards to keep legacy 1.21-era mods operational on Vintage Story 1.22. - Clothing Pipeline Stability
Uses deferred patch application plus shape-scoped normalization in the wearable merge path to prevent white/black upperbodyover regressions and shirt-switch GUI crashes caused by unsafe texture mutation. - Digitigrade Model Clothing Geometry Handling
Adds targeted PML merge filtering for non-seraph digitigrade models (Skaven/Rat and Arachnoid), including lower flap geometry cleanup to remove lingering floating lower texture artifacts near the feet. - Child Deposit Grade Clamp
PatchesChildDepositGenerator.GenDepositbehavior so invalid child grade indexes are clamped instead of crashing world generation when geology mods provide incomplete grade variants. - CoolNow Orphan Override Neutralization
Neutralizes legacy orphaned overrides ofBlockEntityFirepit.CoolNow()so outdated assemblies can still load under 1.22 without CLRTypeLoadExceptionfailures. - Version-Flexible Microsoft.Extensions Binding
Adds resolver support for selectedMicrosoft.Extensions.*assemblies so compatible runtime versions can satisfy strict legacy binding requests at load time.
🔌 Layer 0: IL Rewriting (Mono.Cecil) <span style="margin-left: auto; font-size: 12px;">▼</span>
Technology: In-memory assembly rewriting via Mono.Cecil
- R1: Entity.Pos Field → Property
Convertsldfld Entity::Postocallvirt Entity::get_Pos(). In 1.22, Entity.Pos changed from a public field to a property. Without this fix, any mod accessing Entity.Pos crashes with MissingFieldException.
Ratings & reviews
No ratings yet
Sign in to leave a rating or comment.
