Mods / Stability Setter
- Tags:
- 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 Identifier | For Game version | Downloads | Released | Changelog | Download | 1-click mod install* |
|---|---|---|---|---|---|---|---|
| 0.1.6 | vsstabilitysetter | 8196 | Apr 21st at 8:47 PM | vsstabilitysetter_0.1.6.zip | 1-click install | ||
| |||||||
| 0.1.5 | vsstabilitysetter | 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 | ||
| |||||||
| 0.1.3 | vsstabilitysetter | 580 | Jan 21st at 4:15 AM | vsstabilitysetter_0.1.3.zip | 1-click install | ||
| |||||||
| 0.1.2 | vsstabilitysetter | 147 | Jan 15th at 11:55 PM | vsstabilitysetter_0.1.2.zip | 1-click install | ||
| |||||||
| 0.1.1 | vsstabilitysetter | 82 | Jan 15th at 1:11 AM | vsstabilitysetter_0.1.1.zip | 1-click install | ||
|
Added client/server syncing | |||||||
| 0.1.0 | vsstabilitysetter | 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 | |||||||
still works on 1.22.7?
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.
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.
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
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')
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.
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.
Good to know, I'll try to remember to avoid casting from strings in the future.
Didn't get around to testing it until now, but yep, that fixes it. This certainly feels similar to having to deal with
StringComparison.InvariantCulturein 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
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.
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.
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
Works now. It was Tungsten, thank you so much haha I would have never figured that out. :)
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.
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 :)
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.
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')
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.
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.
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.
1.21.6, i'm trying to set to 1 and its a singleplayer world, forgot to add details mb
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?
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
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 😔
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?
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!
ok so it DOES work, but it does still throw those errors
how strange
Doesn't work in singleplayer? (Doesn't crash, but does error)
additionally the setstabilitymode command fires this error in SP