Mods / Manifold Sample
- Tags:
- Author:
- Pixnop
- Side:
- Both
- Created:
- May 20th at 8:45 PM
- Last modified:
- Jun 12th at 9:22 PM
- Downloads:
- 154
-
For testers:
ManifoldSample-0.4.1.zip
Manifold Sample is a small demo mod that shows how to build custom dimensions with the Manifold library. It is a working example and smoke test - not a content mod.
Vintage Story 1.21+ Universal Copy-paste friendly MIT
What it adds
- A void dimension (empty air) -
/voiddim. Always lands you at a fixed spawn point. - A flat dimension (granite floor) -
/flatdim. Returns you to your last position there. - A streaming dimension -
/streamdim. Demonstrates opt-in streaming worldgen: chunks generate on demand as you walk, with no fixed region edge. - A vault dimension (0.3.0) -
/vaultdim. Demonstrates the per-dimension separate inventory: your overworld items wait safely while you are inside, and the vault inventory is returned on re-entry. /overworlddim- travels back to the overworld, to your last position./sendtestitem(0.3.0) - spawns a test item entity at your position and teleports it to the flat dimension, demonstrating the non-player entity transit API./sendtestblock(0.4.0) - teleports the block you are looking at (with itsBlockEntitycontents) to the flat dimension. Place a chest, put items in it, look at it, run the command, then check it under/flatdimat the announced coordinates./createtempdimand/destroytempdim(0.4.1) - create and destroy an ephemeral dimension at runtime, demonstrating the ephemeral lifecycle and theDestroyedsignal that companions (like Chart) react to.- The sample also subscribes to the 0.4.0
PlayerArrivingandEntityChangedDimensionevents and logs them to the server console, so the new transit lifecycle is observable in-game. - A simple portal block built on Manifold's
PortalBlockBase.
For developers
Read the source as a copy-paste starting point for your own dimension mod: samples/ManifoldSample. It covers registering dimensions, picking a spawn behavior, opting into streaming worldgen, opting into a separate per-dimension inventory, registering chat commands via DimensionCommandBuilder, calling TeleportEntity and TeleportBlock, and subscribing to the transit events.
Compatibility
Vintage Story 1.21+. Universal. MIT licensed. Requires Manifold 0.4.0 or later.
| Mod Version | Downloads | Released | Changelog | Download |
|---|---|---|---|---|
| 0.4.1 | 49 | Jun 12th at 9:22 PM | ManifoldSample-0.4.1.zip | |
|
Rebuilt against Manifold 0.4.1; adds
Requires Manifold 0.4.1+. For Vintage Story 1.21+. | ||||
| 0.4.0 | 24 | May 30th at 8:47 PM | ManifoldSample-0.4.0.zip | |
|
Rebuilt against Manifold 0.4.0; adds
Requires Manifold 0.4.0+. For Vintage Story 1.21+. | ||||
| 0.3.1 | 21 | May 23rd at 3:03 PM | ManifoldSample-0.3.1.zip | |
|
Rebuilt against Manifold 0.3.1 (crash fix on Vintage Story 1.22.x).
Requires Manifold 0.3.1+. For Vintage Story 1.21+. | ||||
| 0.3.0 | 16 | May 23rd at 10:04 AM | ManifoldSample-0.3.0.zip | |
|
Adds a separate-inventory dimension and an entity-transit demo.
Requires Manifold 0.3.0+. For Vintage Story 1.21+. | ||||
| 0.2.0 | 21 | May 21st at 11:24 PM | ManifoldSample-0.2.0.zip | |
|
Adds a streaming dimension demo.
Requires Manifold 0.2.0+. For Vintage Story 1.21+. | ||||
| 0.1.0 | 23 | May 20th at 8:49 PM | ManifoldSample-0.1.0.zip | |
|
First public release — a demo for the Manifold dimension API.
Requires Manifold. Built against 1.21.0, validated in-game on 1.22.2 (works on 1.21 and 1.22). | ||||

Can you add a custom dimension to the list for mining purposes, that can be reset, without affecting the main overworld dimension (
overworlddim)?Hi DilanRona, thanks for the interest. Quick clarification: Manifold is a library for mod authors, and ManifoldSample is just a small showcase of what the API can do, not a content mod we keep adding features to. So I won't be adding a mining dimension to the sample itself, but what you're describing is exactly the kind of thing the library is built for, and it's fully doable today.
A custom dimension is completely isolated from the overworld: it gets its own dimension id, so generating it, filling it, or wiping it never touches overworld terrain or chunks. "Resetting" a mining dimension just means destroying it and recreating it. When a dimension is destroyed, Manifold drops its generated-column records, so the recreated dimension runs its worldgen again from scratch (fresh layout and ores) instead of reloading the old chunks.
The sample already demonstrates the two building blocks you'd combine:
So a resettable mining world is essentially a persistent dimension whose worldgen strategy places stone and ores, plus a command that calls ForceRemoveDimension and re-registers it. The overworld is never affected. If you (or a modder) want to build that as its own mod on top of Manifold, that's the intended path, and I'm happy to help point you to the right API bits.
Played some more with it today, and noticed a problem with the void dim. i filled it with a cube with dirt. and when i went back to the overworld, it placed me back where I was. Going back to the void dim placed me at y axis 1, and i started to fall into the void. Another problem I encountered is that if I use for example the portal mod, or something similar, it doesnt work between overworld and void dimensions. The void dimensions would be perfect for one particular megabuild project with a lot of space ships and a space station.
would it be possible for this to work with teleporters/translocators vanilla/modded? or perhaps have players trigger this without commands much like the time shift you see within the vannila game at the devastation?
Hi! Yes to both.
Block-triggered transit (no commands) is the main path I designed Manifold around: it ships a `PortalBlockBase` helper class. A mod just registers a block that extends it; when a player touches or interacts with the block, Manifold runs the transit for you. ManifoldSample does this with a single demo portal block. The same hook works for a runic gate, a teleporter pad, a devastation-style proximity zone, anything visual the mod wants. No chat commands needed.
Vanilla translocators specifically are a bit more involved. Their teleport logic lives in the survival mod and isn't dimension-aware, so wiring them into Manifold means either a small Harmony patch on the translocator block-entity (totally fine for a companion mod, just not for Manifold core which is zero-Harmony) or a parallel translocator-style block that uses Manifold under the hood. I'd lean toward the second option so vanilla translocators keep working inside the overworld and your cross-dim hops live in a clearly-marked block.
If you want to take a swing at either, the API surface is small: `manifold.Transitions.TeleportPlayer(player, dimensionCode, options)` from any block-entity is enough. Happy to help via GitHub issues if you have a specific design in mind.
Thanks for the quick response! This is great to know as I would love to try and mess around with the manifold system for something i have in mind in the future, as for a specific design being set in mind i dont have on quite yet 😅. This is mainly me planning for the far future. im curios to see how your current mod and future mods develop!
Interesting, most interesting.
Here's a bit of errors
Can I integrate the code into BotaniaStory in the future?
Hi! Yes, please do. ManifoldSample is MIT-licensed and meant exactly as a template / starting point, so you are welcome to reuse or integrate its code into BotaniaStory. That is what it is there for.
Thanks for the error report as well. I'll dig into the logs and follow up here.