Mods / Stability Setter

Tags:
Harmony Patching Utility QoL Cheat
Author:
MrFastZombie
Side:
Both
Created:
Dec 24th 2025 at 10:38 PM
Last modified:
Apr 29th at 7:44 PM
Downloads:
9933
Latest release (for Vintage Story 1.22.0-pre.1 - 1.22.1, potentially outdated):
vsstabilitysetter_0.1.6.zip  1-click install

Tungsten users: If you are using Tungsten with this mod, please ensure you have Tungsten 1.2.1 or higher if you are experiencing null errors!

 

This mod uses a Harmony patch on Vintagestory.GameContent.SystemTemporalStability.GetTemporalStability() to override a chunk's stability values, alllowing the tempoaral gear on the HUD to turn in the appropriate direction for the new values. Note that this method of patching may break more often with game updates, especially if the temporal stability system gets updated. The upside to this method is that anything that grabs chunk stability will see the set value rather than the inherent value. The changes made by this mod are non-destructive and can be reversed through a command or by simply removing the mod.

 

This mod is required on both the client and server!

 

This mod is inspired by Chunk Stability Override!

 

Stability Modes

  • "Vanilla Behavior" - Chunks will return their normal stability value, or their set value if it has been set.
  • Global Stability - Chunks will all have the same stability value set to whatever the current global stability value is.
  • Global Stability Offset - Every chunk will have an offset applied to its final value, based on the current global offset value. For example, if the global offset is 2 then a chunk with 0.87658 stability will have 2.87658 stability or -1.12342 stability if the value is -2. Stability override values will also still be applied before the offset, so if you set a chunk to -3 stability and turn on a -2 offset the final stability will be -5.

Interaction with vanilla mechanics

  • During temporal storms, the stability value of chunks which have had their values set will be offset by the storm, as if the set value was already the chunk's inherent value.
  • Temporal rifts will still drain your stability rapidly if you approach them even if you are in a high-stability chunk.

Seralization

Most data from this mod is saved within the global savegame data.

The following data values are serialized:

  • setChunks - A list of chunks stored as strings containing their coordinates and their set stability values.
  • StabilityMode - The current stability mode, stored as a number [0,2].
  • GlobalStability - Current global stability value stored as a float.
  • GlobalStabilityOffset - Current global stability offset stored as a float.

Commands

/setStability <stability> - Sets the stability of the chunk you are in to a specific value (Not an offset!). A value of 1 is neutral stability, less is unstable and more is positive stability. Note that chunks are cubic, so higher or lower chunks in your column will have different values. Value range: -10000 to 10000. (The limits are in place to stop the HUD gear from glitching out, these values are enough to almost instantly fill/drain stability.)

/resetStability - Resets the stability of the chunk you are in to its default value.

/resetStability all <confirmCode> -  Resets stability for all chunks back to default. Run this without inputting any confirm code first to get a confirmation code, then run it again with that confirmation code to reset all chunk stability. This is not reversible!!!

/getStability - Shows the stability value for the position you are standing in.

/getStability global - Shows the current global value (Which is used only when global mode is set).

/getStability offset - Gets the current offset value (Which is used only when global offset mode is set)!

/getStability mode - Shows the current stability override mode. Could be the vanilla behavior, global offset, or global mode.

/setStabilityMode -  Sets the current stability mode. Default is "Vanilla Behavior". The possible values are: 0 - Vanilla Behavior, 1 - Global stability, 2 - Global stability offset. Value range: 0 to 2

/setGlobalStability <stability> - Sets the stability value for all chunks to a specific value, when Global Stability mode is active. Value range: -10000 to 10000.

/setGlobalStabilityOffset <stability> - Sets a value to apply as an offset to all chunk stability values. Final stability values will be clamped to -10000 to 10000. Value range: -10000 to 10000.

/requestStabilityData - Requests a new data packet from the server to the client, syncing all mod data from the server to the client. You probably won't need to use this.

Compatibility

Temporal Amulets - Confirmed Compatible

Spreading Devastation - Minor issues? In devestated chunks, the stability value from /getStability reflects changes made by that mod, but not the cog. Other chunks should be unaffected. You can still override devestated chunks.

Temporality Plus - Unknown. Game will load, no obvious issues. Can't yet confirm if temporal rifts will spawn in manually set unstable chunks or not or if it will spare manually set stable chunks. No issues with temporal storms.

Stable Surface - Seems to work fine. All surface chunks will start with 1.5 surface stability, but can still be affected by Stability Setter.

Tungsten - Recommended to use version 1.2.1 or higher. Lower versions may cause issues.

Questions that are not yet frequently asked but could be? (QTANYFABCB?)

  • I set the stability value, why is the gear not spinning? - The gear will only spin when stability is actually changing. If you are at full or minimum stability then it will stop spinning if the value is not moving towards the other direction. If this is not the case, you may have found a bug!
  • The game updated and the mod broke! - Since this mod uses a harmony patch it is more likely to break due to updates, though I do hope that the way I wrote it will minimize these issues. If this happens the mod will need an update.
  • I set stability in my chunk, but my basement/attic has different stability values!? - Unlike the other block game which uses chunk columns, Vintage Story has a cubic chunk system. This means that a chunk is a large cube, and there are other chunks below and above it. You will need to set the values in these spaces if needed.
  • How do I see chunks? - Use .debug wireframe chunk

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
0.1.6 vsstabilitysetter
1.22.0-pre.1 - 1.22.1
8196 Apr 21st at 8:47 PM vsstabilitysetter_0.1.6.zip 1-click install
  • Recompile with .NET 10 for 1.22 stable
0.1.5 vsstabilitysetter
1.21.0 - 1.21.6
753 Feb 27th at 8:42 PM vsstabilitysetter_0.1.5.zip 1-click install

-Better typecasting for float/double parameters.

0.1.4 vsstabilitysetter 170 Feb 8th at 3:24 AM vsstabilitysetter_0.1.4.zip 1-click install
  • Recompile with .NET 10 for 1.22.0-pre.1
0.1.3 vsstabilitysetter
1.21.0 - 1.21.6
580 Jan 21st at 4:15 AM vsstabilitysetter_0.1.3.zip 1-click install
  • Fixed another typo
  • Null check on chunk update packet
0.1.2 vsstabilitysetter
1.21.0 - 1.21.6
147 Jan 15th at 11:55 PM vsstabilitysetter_0.1.2.zip 1-click install
  • Rewrote network packet code
    • Split the server packet into two, which now serve a singular purpose each.
    • Fixed accidentally using "AllPlayers" instead of "AllOnlinePlayers"
      • AllPlayers is a list of all players that connected to the server at some point, even if they are offline. This would probably cause some bugs if it wasn't fixed, as the packets are meant for online players only.
0.1.1 vsstabilitysetter
1.21.0 - 1.21.6
82 Jan 15th at 1:11 AM vsstabilitysetter_0.1.1.zip 1-click install

Added client/server syncing

0.1.0 vsstabilitysetter
1.21.0 - 1.21.6
5 Dec 25th 2025 at 3:02 AM Release Retracted

Retraction Reason:

This version lacks client/server syncing, making it only work properly in singleplayer.

Changelog:

Initial release

Disclaimer

By downloading a mod you consent to our Terms of Use.

We tell you this specifically because we want to make sure you are aware that we cannot validate every mod, and you are responsible for any damages you might incur by installing or loading mods.

This prompt will not be shown to you again (for the current browser session) if you proceed.


30 Comments (oldest first | newest first) (threaded | flat)

SimonBBallin, Oct 21st at 9:48 PM

still works on 1.22.7?

Paeddy, Jul 19th at 6:39 PM

Anything that may get corrupted by this while Updating/removing it?

MrFastZombie , Jul 19th at 8:52 PM
@Paeddy: Anything that may get corrupted by this while Updating/removing it?

I'd back up your world to be safe, but the data this mod adds to a save game is only accessed by its harmony patches so it should behave as it did before the mod was installed. Updating shouldn't cause any issues either. 

DURUS, May 26th at 10:40 AM

Would I be able to use this mod to set every existing chunk below a certain Y level to have pretty high temporal instability? (not one by one please)

MrFastZombie , May 27th at 2:03 AM
@DURUS: Would I be able to use this mod to set every existing chunk below a certain Y level to have pretty high temporal instability? (not one by one please)

As of right now it couldn't do that. You can set a global offset or a global value but I'm guessing you want to keep surface chunks as they are.

VerySpicySoup, Apr 17th at 11:03 PM

MrFastZombie 20thCenturyFox I had the same issue with the 1.22 game version but restarting the game fixed it :) Just in case anyone else runs into the same issue

20thCenturyFox, Mar 31st at 4:49 AM

MrFastZombie Sorry to waste your time, booted it up to take a look and its now working as intended. The only thing that has changed since I wrote the post is that I rebooted my PC. At the time I tried restarting the client but that made no difference.

 

Version 0.1.5

No stability related mods

No temporal rifts nearby

Checked getStability, returns a value without any mention of offset or global (e.g 'Stability at chunk pos XX,YY,ZZ: xyz')

MrFastZombie , Mar 30th at 10:58 PM

20thCenturyFox Apologies for the late response. I've got a few questions to help me reproduce the issue.

What version of the mod specifically?

Any other stability related mods?

Any temporal rifts nearby?

When you run /getStability does it mention an offset or global value? 

 

Also, try running /requestStabilityData It might be failing to sync the value to the client side (which can happen in singleplayer). If this fixes it then I'll know something is failing in the client-server sync code.

20thCenturyFox, Mar 28th at 12:18 PM

Hi, trying this on 1.21.6 singleplayer, getting an issue where temporal stability continues to decrease after using setStability (the gear spins backwards and the value falls). Started at 1.25, found temporal stability continues to decrease even after applying values like 1000 or more.

MrFastZombie , Mar 6th at 12:03 AM

Good to know, I'll try to remember to avoid casting from strings in the future.

RedFlames, Mar 5th at 10:36 PM

Didn't get around to testing it until now, but yep, that fixes it. This certainly feels similar to having to deal with StringComparison.InvariantCulture in C#, except it's NumberFormat...

> On Windows, the initial value of this property is derived from the settings in the "Region and Language" item in Control Panel.

(from dotnet Documentation on NumberFormatInfo.NumberDecimalSeparator)

...yep, that sure says I use "English (Germany)" and it sure does have "," set for decimals and "." for thousands... (which I'm guessing is also why I have to deal with that in Powertoys Run tool, but that's not VS...)

How come VS commands work fine but yours didn't? Is this something VS Api should've dealt with for you? To maybe ignore region stuff for parsing?

Ah, ToFloat is from... Vintagestory.API.Util.StringUtil? And it uses GlobalConstants.DefaultCultureInfo which idk if that makes sense. Not for me to deal with tho, I'm closing ILSpy again :3

MrFastZombie , Feb 27th at 7:58 PM (modified Feb 27th at 8:42 PM)

RedFlames What language do you play in? Maybe the language setting is causing a formatting issue somehow. I can't reproduce the issue so far (other than by typing "0,8" instead of "0.8". Can't fix that formatting issue without taking it as a string arg and parsing it myself).

EDIT: I just uploaded a version with better typecasting, let me know if it helps at all.

MrFastZombie , Feb 27th at 7:39 PM (modified Feb 27th at 8:23 PM)

RedFlames I'll take a look and see if I can reproduce the issue and see if I missed a bug somewhere. Looking at the code it's declared as a double in the command and cast to a string then a float in the actual implementation (I'm gonna try releasing an update with better type casting, maybe the string messes it up in rare cases).

The data is saved in the savegame. I don't know where exactly that goes in the files but I'd imagine it's in the VCDBS somewhere.

RedFlames, Feb 27th at 6:24 PM

The commands that accept float / double type decimal values don't seem to work for me, strangely enough.

I'm on VS 1.21.6, mod v0.1.3 and after noticing this I disabled all other mods I had, restarted, loaded into a new world, and same thing. "/setStability 0.8" sets the value to 8. Same for ".8" / "0,8" or anything else I tried. The /getStability also returns the default value of the chunk as 0,8 and not 0.8 but I think that's just VS being slightly silly.

I've also for good measure tried to find a vanilla command, and can say that /player asdf movespeed 0.5 or even with ".5" works as expected.

I s'pose since I just want to fix my house location I might be fine with setting the chunks to 1 or 2 for now. Also where is the data saved? Is it inside the VCDBS files rather than ModConfig or ModData? I had hoped I could edit the chunk set values manually somewhere there. :D

FAIV, Feb 26th at 5:05 AM

Works now. It was Tungsten, thank you so much haha I would have never figured that out. :)

MrFastZombie , Feb 25th at 10:51 PM (modified Feb 25th at 10:52 PM)

FAIV If you are using 0.1.4 of this mod, downgrade to 0.1.3 as well! I'm guesing you are using 0.1.3 because 0.1.4 would probably crash on 1.21.6 but I haven't checked. The latest release is for 1.22 prereleases and some mod manager software may install it if they don't check version compatability properly.

FAIV, Feb 25th at 9:52 PM

Dedicated Server on 1.21.6 latest Version of this Mod but I also just saw the Tungston Update, didn't know theres a Relation but I'll try it out and give Feedback if it works, tyvm :)

MrFastZombie , Feb 25th at 9:02 PM (modified Feb 25th at 9:27 PM)

FAIV What versions of the mod and game? (And is this a server, or singleplayer?)

EDIT: Also, do you use Tungsten? Tungsten just released an update yesterday that could be related. Haven't tested it yet, so it could be a cause or a fix of this issue. Tried it out, Tungsten versions 1.2.0 and 1.1.1 at least cause this issue. It can be resolved by updating Tungsten to 1.2.1.

FAIV, Feb 25th at 5:58 AM

Getting this Error when I try to run the setStability command:


[Server Error] Player FAIV caused an exception through a command.
[Server Error] Command: /setstability 1
[Server Error] Exception: Value cannot be null. (Parameter 'No players supplied to send the packet to')

MrFastZombie , Feb 14th at 12:57 AM (modified Feb 14th at 1:00 AM)

Agent89Tuxedo As of right now you would. I do have plans to add an area selection command but I haven't gotten around to it yet. How many chunks is your home area? If it helps, you should be able to press the up arrow key when you have chat open to put in the previous input. Keep in mind that chunks are cubic, so if you fly over an area and try to set chunk stability it may set stability for a chunk above the surface level chunk. 

Agent89Tuxedo, Feb 13th at 9:05 AM

Hey MrFastZombie, I'am trying to use your mod for an apocalypse style world where everywhere is unstable except for the home area. My problem is I am not able to figure out how to do so, if I set globalstabilityoffset do I need to then set every chunk in the homezones stability one by one? any advice would be great thanks.

MrFastZombie , Feb 10th at 11:29 PM (modified Feb 10th at 11:32 PM)

SucodePenes A value of 1 is completely neutral (it's how the game is set up, idk why they didn't use 0 for neutral). At that value the gear should slowly bob left and right. If you go above 1 then stability should start filling up. Are you using version 0.1.3 of the mod? (If you use some mod managers like Simple VS Manager, they may update the mod to the tester version which I'm guessing could cause issues since the tester version uses a newer .NET than VS 1.21.6)  And are you absolutely sure it goes counter clockwise at a value of 1? Sorry for asking so many questions but this issue is difficult to fix without knowing how to reproduce it.

SucodePenes, Feb 10th at 1:18 PM

1.21.6, i'm trying to set to 1 and its a singleplayer world, forgot to add details mb

MrFastZombie , Feb 10th at 3:04 AM (modified Feb 10th at 3:05 AM)

SucodePenes Which game version are you using and what mod version? What number are you trying to set it to? Is this on a server or singleplayer?

SucodePenes, Feb 10th at 1:32 AM

how to use this? i'm using the commands and nothing happens, I receive the notification that stability changed but the gear still moves counter clockwise, help

MrFastZombie , Jan 20th at 10:44 PM (modified Jan 20th at 10:54 PM)

Well I'm getting the error on my personal server now, I made the same mistake again when I split the packet code. 

patch of shame will be uploaded soon 😔

MrFastZombie , Jan 15th at 11:57 PM

VaelophisNyx

I just released an update, I'm still not 100% on the second error. Couldn't even reproduce either but the first one should be fixed and I suspect my changes might affect the second error too. Let me know if they still happen, and just to be clear was the set stability mode command actually working when it threw that error?

MrFastZombie , Jan 15th at 9:29 PM (modified Jan 15th at 9:35 PM)

For the first error I suppose I missed an edge case where it might try to send a packet while not having any players detected whatsoever, though I'm not sure why this would ever happen in singleplayer. I'm not sure about the other error just by looking at it, I didn't have that issue in testing but I'll see if I can figure that one out. Thanks for reporting the errors!

VaelophisNyx, Jan 15th at 12:14 PM

ok so it DOES work, but it does still throw those errors
how strange

VaelophisNyx, Jan 15th at 9:19 AM (modified Jan 15th at 9:27 AM)

Doesn't work in singleplayer? (Doesn't crash, but does error)

Crash Report
15.1.2026 03:18:29 [Error] Exception: Value cannot be null. (Parameter 'No players supplied to send the packet to')
at Vintagestory.Server.NetworkChannel.SendPacket[T](T message, IServerPlayer[] players) in VintagestoryLib\Server\API\NetworkChannel.cs:line 70
at VS_Stability_Setter.Network.BroadcastChunkUpdate(String chunkPos, Single stability, Boolean remove) in C:\Users\Skylar\Documents\01_Personal_Docs\Git\VS-Stability-Setter\VS-Stability-Setter\Network.cs:line 63
at VS_Stability_Setter.VS_Stability_SetterModSystem.OnSetStabCommand(TextCommandCallingArgs args) in C:\Users\Skylar\Documents\01_Personal_Docs\Git\VS-Stability-Setter\VS-Stability-Setter\VS-Stability-SetterModSystem.cs:line 257
at Vintagestory.Common.ChatCommandImpl.CallHandler(TextCommandCallingArgs callargs, Action`1 onCommandComplete, Dictionary`2 asyncParseResults) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 313
at Vintagestory.Common.ChatCommandImpl.Execute(TextCommandCallingArgs callargs, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 238
at Vintagestory.Common.ChatCommandApi.Execute(String commandName, TextCommandCallingArgs args, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 101
at Vintagestory.Common.ChatCommandApi.Execute(String commandName, IServerPlayer player, Int32 groupId, String args, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 145

additionally the setstabilitymode command fires this error in SP

Crash Report
15.1.2026 03:21:07 [Error] Exception: The call is ambiguous between the following methods or properties: 'Vintagestory.API.Server.IServerNetworkChannel.SendPacket(VS_Stability_Setter.Network.NetworkApiResponse, params Vintagestory.API.Server.IServerPlayer[])' and 'Vintagestory.API.Server.IServerNetworkChannel.SendPacket(VS_Stability_Setter.Network.NetworkApiResponse, byte[], params Vintagestory.API.Server.IServerPlayer[])'
at CallSite.Target(Closure, CallSite, IServerNetworkChannel, NetworkApiResponse, Object)
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at VS_Stability_Setter.Network.BroadcastData(Dictionary`2 setChunks, Int32 StabilityMode, Single GlobalStability, Single GlobalStabilityOffset, IServerPlayer player) in C:\Users\Skylar\Documents\01_Personal_Docs\Git\VS-Stability-Setter\VS-Stability-Setter\Network.cs:line 53
at VS_Stability_Setter.VS_Stability_SetterModSystem.OnSetStabModeCommand(TextCommandCallingArgs args) in C:\Users\Skylar\Documents\01_Personal_Docs\Git\VS-Stability-Setter\VS-Stability-Setter\VS-Stability-SetterModSystem.cs:line 353
at Vintagestory.Common.ChatCommandImpl.CallHandler(TextCommandCallingArgs callargs, Action`1 onCommandComplete, Dictionary`2 asyncParseResults) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 313
at Vintagestory.Common.ChatCommandImpl.Execute(TextCommandCallingArgs callargs, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 238
at Vintagestory.Common.ChatCommandApi.Execute(String commandName, TextCommandCallingArgs args, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 101
at Vintagestory.Common.ChatCommandApi.Execute(String commandName, IServerPlayer player, Int32 groupId, String args, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 145