

HoR Engine Shim
IL rewrite + Harmony shims for common 1.21->1.22 API breaks - fixes many mods, not all.
Description
<div style="background: linear-gradient(180deg, #4a494863 0%, #4a494863 100%); width: 100%; max-width: 1000px; margin: 20px auto 10px auto; padding: 16px; box-sizing: border-box; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(88, 46, 109, 0.12);"> <div style="background: linear-gradient(180deg, #d4a8e8 0%, #dfd0c5 100%); color: #201d1d; padding: 14px 16px; margin: 4px 0 0 0; border-radius: 5px;"> <p style="margin: 0; color: #334155;">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.</p> <p style="margin: 10px 0 0 0; color: #1f2937;"><strong>Stats:</strong> 11 IL Rewrite Rules • 5 Engine Shims • 4 Safety Net Patches • 10+ Mods Fixed • Mono.Cecil IL Rewriting • Universal</p> </div> <details style="background-color: #faf8f5; border-radius: 5px; margin-bottom: 4px; overflow: hidden; box-shadow: 0 2px 6px rgba(88, 46, 109, 0.08);" open="open"> <summary style="background: linear-gradient(180deg, #b168d3 0%, #d6b299 100%); color: #201d1d; padding: 12px 15px; cursor: pointer; font-weight: bold; list-style: none; outline: none; border-bottom: 2px solid #cbb081ca; display: flex; align-items: center;">📌 What's New in v1.0.4 <span style="margin-left: auto; font-size: 12px;">▼</span></summary> <div style="padding: 15px; background: linear-gradient(180deg, #d4a8e8 0%, #dfd0c5 100%); color: #243447;"> <ul style="margin: 10px 0;"> <li><strong style="color: #1f2937;">ForgeContentsRenderer Crash Fix (Safety Net)</strong><br />Adds a Harmony finalizer on <code style="color: #334155;">ForgeContentsRenderer.OnRenderFrame</code> that suppresses <code style="color: #334155;">NullReferenceException</code> when the forge block entity's <code style="color: #334155;">MultiTextureMeshRef</code> is 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.</li> </ul> </div> </details><details style="background-color: #faf8f5; border-radius: 5px; margin-bottom: 4px; overflow: hidden; box-shadow: 0 2px 6px rgba(88, 46, 109, 0.08);"> <summary style="background: linear-gradient(180deg, #b168d3 0%, #d6b299 100%); color: #201d1d; padding: 12px 15px; cursor: pointer; font-weight: bold; list-style: none; outline: none; border-bottom: 2px solid #cbb081ca; display: flex; align-items: center;">✨ Core Features <span style="margin-left: auto; font-size: 12px;">▼</span></summary> <div style="padding: 15px; background: linear-gradient(180deg, #d4a8e8 0%, #dfd0c5 100%); color: #243447;"> <ul style="margin: 10px 0;"> <li><strong style="color: #1f2937;">Three-Layer Compatibility Architecture</strong><br />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.</li> <li><strong style="color: #1f2937;">Clothing Pipeline Stability</strong><br />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.</li> <li><strong style="color: #1f2937;">Digitigrade Model Clothing Geometry Handling</strong><br />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.</li> <li><strong style="color: #1f2937;">Child Deposit Grade Clamp</strong><br />Patches <code>ChildDepositGenerator.GenDeposit</code> behavior so invalid child grade indexes are clamped instead of crashing world generation when geology mods provide incomplete grade variants.</li> <li><strong style="color: #1f2937;">CoolNow Orphan Override Neutralization</strong><br />Neutralizes legacy orphaned overrides of <code style="color: #334155;">BlockEntityFirepit.CoolNow()</code> so outdated assemblies can still load under 1.22 without CLR <code style="color: #334155;">TypeLoadException</code> failures.</li> <li><strong style="color: #1f2937;">Version-Flexible Microsoft.Extensions Binding</strong><br />Adds resolver support for selected <code style="color: #334155;">Microsoft.Extensions.*</code> assemblies so compatible runtime versions can satisfy strict legacy binding requests at load time.</li> </ul> </div> </details><details style="background-color: #faf8f5; border-radius: 5px; margin-bottom: 4px; overflow: hidden; box-shadow: 0 2px 6px rgba(88, 46, 109, 0.08);"> <summary style="background: linear-gradient(180deg, #b168d3 0%, #d6b299 100%); color: #201d1d; padding: 12px 15px; cursor: pointer; font-weight: bold; list-style: none; outline: none; border-bottom: 2px solid #cbb081ca; display: flex; align-items: center;">🔌 Layer 0: IL Rewriting (Mono.Cecil) <span style="margin-left: auto; font-size: 12px;">▼</span></summary> <div style="padding: 15px; background: linear-gradient(180deg, #d4a8e8 0%, #dfd0c5 100%); color: #243447;"> <p style="color: #1f2937; margin: 5px 0;"><strong>Technology:</strong> In-memory assembly rewriting via Mono.Cecil</p> <ul style="margin: 10px 0;"> <li><strong style="color: #1f2937;">R1: Entity.Pos Field → Property</strong><br />Converts <code style="color: #334155;">ldfld Entity::Pos</code> to <code style="color: #334155;">callvirt Entity::get_Pos()</code>. In 1.22, Entity.Pos changed from a public field to a property. Without this fix, any mod accessing Entity.Pos crashes with MissingFieldException.</li> <li><strong styl
Ratings & reviews
Sign in to leave a rating or comment.
