SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Vintage Story

Manifold

PBy Pixnop

API library for creating and managing custom dimensions in Vintage Story.

Description

<div style="background: linear-gradient(135deg, rgba(92,123,137,0.22), rgba(213,237,240,0.45)); border: 1px solid #5C7B89; border-left: 5px solid #E28F70; padding: 16px 20px; border-radius: 8px; margin-bottom: 10px;"><p style="margin: 0; font-size: 1.12em; color: #333f48;"><strong style="color: #b5542e; font-size: 1.15em;">Manifold</strong> is a library mod for <strong>Vintage Story 1.21+</strong> that lets other mods create and manage their own <strong style="color: #5f7f45;">custom dimensions</strong>. It adds no content of its own - install it only because another mod depends on it.</p> </div> <p style="margin: 0 0 18px 0;"><span style="display: inline-block; background: rgba(92,123,137,0.25); border: 1px solid #5C7B89; border-radius: 12px; padding: 2px 12px; font-size: 0.85em; margin: 2px 4px 2px 0; color: #333f48;">Vintage Story 1.21+</span> <span style="display: inline-block; background: rgba(92,123,137,0.25); border: 1px solid #5C7B89; border-radius: 12px; padding: 2px 12px; font-size: 0.85em; margin: 2px 4px 2px 0; color: #333f48;">Universal</span> <span style="display: inline-block; background: rgba(140,178,116,0.18); border: 1px solid #8CB274; border-radius: 12px; padding: 2px 12px; font-size: 0.85em; margin: 2px 4px 2px 0; color: #333f48;">Zero Harmony</span> <span style="display: inline-block; background: rgba(92,123,137,0.25); border: 1px solid #5C7B89; border-radius: 12px; padding: 2px 12px; font-size: 0.85em; margin: 2px 4px 2px 0; color: #333f48;">NuGet API</span> <span style="display: inline-block; background: rgba(92,123,137,0.25); border: 1px solid #5C7B89; border-radius: 12px; padding: 2px 12px; font-size: 0.85em; margin: 2px 4px 2px 0; color: #333f48;">MIT</span></p> <h2 style="color: #333f48; border-bottom: 2px solid #5C7B89; padding-bottom: 5px; letter-spacing: 0.5px;">For players</h2> <p>Manifold is a <strong style="color: #b5542e;">dependency</strong>. If a mod you use requires Manifold, install this alongside it. It is safe on both client and server (<strong>Universal</strong>). On its own, it does nothing visible.</p> <h2 style="color: #333f48; border-bottom: 2px solid #5C7B89; padding-bottom: 5px; letter-spacing: 0.5px;">For mod developers</h2> <p>Manifold exposes a clean public API to declare and run custom dimensions:</p> <ul> <li><strong>Custom dimensions</strong> - persistent or ephemeral, registered at boot or at runtime, identified by an <code>AssetLocation</code> code.</li> <li><strong>Active worldgen</strong> - implement <code>IWorldgenStrategy</code>; Manifold pre-generates a chunk region around the arrival point <em>before</em> the player enters (bounded mode, configurable radius). Dimensions can also opt into <strong>streaming</strong> generation via <code>.Streaming(loadRadius)</code>, which generates chunks on demand as players move with no fixed edge. The streaming radius is extended to the server view distance so generated terrain always reaches as far as players can see, and the relight band height is configurable per dimension via <code>WithRelightHeight</code>.</li> <li><strong>Player transit</strong> - one call, <code>TeleportPlayer</code>, moves a player between dimensions, with cancellable lifecycle events and opt-in helpers (a portal-block base class and a chat-command builder).</li> <li><strong>Non-player entity transit</strong> (0.3.0) - <code>TeleportEntity</code> moves items and other non-player entities between dimensions; the destination region is generated on demand before the entity is re-homed.</li> <li><strong>Block transit</strong> (0.4.0) - <code>TeleportBlock(source, targetDim, targetLocal)</code> moves a single block plus its <code>BlockEntity</code> state (inventory, attributes, BE-behaviors) between dimensions, completing the Player / Entity / Block triplet.</li> <li><strong>Travel policy per dimension</strong> - pick the landing position (<code>SameCoordinates</code>, <code>DimensionSpawn</code>, or <code>LastVisited</code>) and optionally force a game mode.</li> <li><strong>Per-dimension player inventory</strong> (0.3.0, opt-in) - <code>WithSeparateInventory(Hotbar | Backpack | Character)</code> gives a dimension its own player inventory; profiles are stored in player moddata, saved together with the physical inventory, so they survive logout and server restarts with no item loss.</li> <li><strong>Per-dimension metadata</strong> (0.4.0) - <code>WithMetadata(key, value)</code> attaches typed registration-time hints (display name, category, opt-in flags) readable by any consumer via <code>IDimension.GetMetadata&lt;T&gt;(key)</code>. Supports primitives, <code>string</code>, <code>enum</code>, <code>byte[]</code>.</li> <li><strong>Per-dimension streaming budget</strong> (0.4.0) - <code>WithStreamingBudget(maxColumnsPerTick)</code> (range 1..64) caps streaming generation per dim per tick. Budgets are independent across dimensions so a busy dim cannot starve a quiet one.</li> <li><strong>Transit events</strong> (0.4.0) - <code>PlayerEntering</code> (cancellable, pre-generation), <code>PlayerArriving</code> (cancellable, post-generation, pre-teleport), <code>PlayerLeft</code> / <code>PlayerEntered</code> (post-teleport), and <code>EntityChangedDimension</code> (post <code>TeleportEntity</code>).</li> <li><strong>Persistence</strong> - dimensions, generated chunks and per-player positions survive restarts. A dimension whose owning mod is removed is <strong>quarantined</strong>: its chunks are kept and transit is refused, never corrupted.</li> <li><strong>Zero Harmony patches</strong> - built entirely on the public <code>VintagestoryAPI</code>.</li> </ul> <h3 style="color: #5f7f45; letter-spacing: 0.5px;">Quickstart</h3> <p>Add Manifold as a dependency in your <code>modinfo.json</code>:</p> <pre style="background: rgba(51,63,72,0.08); border-left: 3px solid #8CB274; padding: 10px 14px; border-radius: 4px;"><code>"dependencies": { "manifold": "" }</code></pre> <p>Reference the API at compile time from the NuGet package <a href="h

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.