Mods / TerritorialPause

Tags:
Storage QoL Tweak Claims Difficulty Survival
Author:
Macyler
Side:
Server
Created:
May 14th at 5:21 AM
Last modified:
May 28th at 4:27 AM
Downloads:
257
Latest release (for Vintage Story 1.22.0 - 1.22.2, potentially outdated):
TerritorialPause_v0.6.2.zip  1-click install

WARNING: This mod is in BETA state, and may not 100% work correctly yet. Feel free to test it and let me know of any issues.

 

I wanted to host a server for friends, but we all live in different time zones, so end up playing at different times. Unfortunately, this means that while one player is online, all other players' food is still spoiling, which is not fun. To resolve this, I created this simple mod that attempts to pause food spoilage while the owner is not online.

The pausing only applies to items stored within a land claim, during time periods where ALL owners of that specific claim are offline. Owners include the player who created that land claim, and any players who have permission on that claim.

 

Tested and working:

  • Storage vessels
  • Ground storage
  • Crocks and bowls
  • Chests
  • Shelves
  • Cabinets (as of v0.5.0)
  • Pies (as of v0.6.1)
  • Placed backpacks (as of v0.6.1)

 

The mod does NOT currently prevent spoilage of items in:

  • Player's inventories (I may not implement this?)

It may not work with some modded inventories as well, I haven't tested this as we don't use any such mods.

 

I programmed the mod in such a way that it is safe to install or uninstall at any time. The only potential side effect that should be possible is that food which would have spoiled without the mod installed regardless, will spoil as normal.

This mod was created just for my server, but I thought maybe someone else may also find it useful. It only needs to be installed on the server. Feel free to comment with any suggestions or issues you find, but I make no guarantees I'll implement/fix them.

 

 

Debug Commands

The mod adds 2 commands to help debug any issues that may come up. Both require "readlists" permission:

/countplayertime <player> <timerange> and /countofflinetime <timerange>

If you see any weird behaviour, please stand inside the land claim, and run both of these, with the relevant player(s) and in-game hours that encompasses the time range of interest. If you include this info in your bug report, it would greatly help me track down the issue.

 

 

Note to server owners: I foresee this mod potentially creating exploits if players take advantage of the mechanics (being able to pause time in one area, while not paused the next block over is bound to create some kind of exploit). It is only intended to be used on servers where the players can be trusted not to take advantage of this mechanic. Please use with caution.

 

Everything about this mod is 100% human-created. No AI slop code, all bugs are handcrafted just to inconvenience you :)

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
0.6.2 territorialpause
1.22.0 - 1.22.2
106 May 28th at 4:27 AM TerritorialPause_v0.6.2.zip 1-click install

I added new fault detection and logging in 0.6.0, but accidentally made it too sensitive and spam the log unnecessarily. This version just fixes that to reduce logspam.

0.6.1 territorialpause
1.22.0 - 1.22.2
18 May 28th at 4:01 AM TerritorialPause_v0.6.1.zip 1-click install

Fixed spoilage of pies placed directly on ground not being paused.

Added pausing for backpacks placed on the ground.

No longer pausing in claims where all players have "use" permission.

Fixed algorithm faults causing incorrect player offline time calculations.

Improved cleanup code at exit.

0.5.0 territorialpause
1.22.0 - 1.22.2
55 May 20th at 3:35 PM TerritorialPause_v0.5.0.zip 1-click install

Fixed spoilage in Cabinets not being paused. Guarded against unexpected time calcuation results, if they were to occur, from breaking item spoil times. Fixed static components potentially leaking on singleplayer built-in server restarts (e.g. on world switch).

0.4.1 territorialpause
1.22.0 - 1.22.2
55 May 14th at 5:40 AM Empty TerritorialPause_v0.4.1.zip 1-click install
0.4.0 territorialpause
1.22.0 - 1.22.2
23 May 14th at 5:23 AM Empty TerritorialPause_v0.4.0.zip 1-click install

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.


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

DiZurix, Aug 28th at 9:06 AM (modified Aug 28th at 9:08 AM)

Hello Macyler, 

Thanks for the mod, it’s really useful for different player profiles and playtimes!

Would it be possible to add a setting to exclude certain blocks/items from the territory protection while paused? I use Art of Growing on my server, where crops and grass need to dry over time (ground storage mainly), so I’d like them to remain unprotected.

Thanks!

Macyler , Jun 1st at 6:57 AM

We noticed that cheese ripening (on a shelf) might be broken by this mod. I'll look into and fix this in the next update.

Tunaa, May 28th at 10:59 PM (modified May 28th at 11:22 PM)

Hey hey! is it possible to turn on pausing if the owner of the land claim is offline via config? Would be nice to play and still be able to walk into my friends claims without burning through food spoilrate.

(edit: Will jsut use downgraded patch for the time being, my poor floor pies have turned to rot over the night.)

Macyler , May 29th at 2:53 AM
@Tunaa: Hey hey! is it possible to turn on pausing if the owner of the land claim is offline via config? Would be nice to play and still be able to walk into my friends claims without burning through food spoilrate.(edit: Will jsut use downgraded patch for the ti

Hi there! Apologies, I didn't quite understand what you mean. Are you asking for a config option to toggle whether allowuseeveryone will prevent a claim from being paused?

Wrum, May 28th at 4:04 PM

Remember: No sloppin 

MiraLeaps, May 28th at 4:10 AM

this is so genius!

Macyler , May 28th at 4:05 AM

I just released a new version that fixes pies on the ground not being paused, and added pausing for backpacks. Land claims with all players having "use" permissions (/land claim allowuseeveryone true) are no longer paused, since this would create an exploit. I also tracked down and attempted to fix the algorithm faults that wtfcolt reported.

Macyler , May 23rd at 5:33 PM

We noticed that pies don't pause when they are placed on the ground directly. They are fine if placed in a vessel or on a shelf. I'll fix this in the next update.

wtfcolt, May 22nd at 4:24 PM

Love the mod! We're gonna give it shot on our server and hopefully save eveyone some work.

 

If this also paused the time on hung animals from the Butchery mod, we'd be in heaven!

Macyler , May 23rd at 5:32 PM
@wtfcolt: Love the mod! We're gonna give it shot on our server and hopefully save eveyone some work. If this also paused the time on hung animals from the Butchery mod, we'd be in heaven!

Sweet, let me know how it goes!

Unfortunately, without manual implementation on my side, I'm fairly certain it won't work on Butchering corpses.

wtfcolt, May 27th at 3:32 PM
@Macyler: Sweet, let me know how it goes! Unfortunately, without manual implementation on my side, I'm fairly certain it won't work on Butchering corpses.

Seems fine so far mostly. After today's scheduled restart, I did notice errors like this one but we didnt notice any real problems that im aware of.

Spoiler!
27.5.2026 15:12:24 [Server Error] [territorialpause] Algorithm fault: GetOfflineHoursForRegion would return too high 25.18237499049974 for location 511878, 117, 511838 between 6270.8185027682775 and 6270.901961101556!
PlzJustCallMeDoc, May 20th at 4:43 PM

See: The Purity Trap vs Operational Success

Attac_Mage, May 28th at 12:43 AM
@PlzJustCallMeDoc: See: The Purity Trap vs Operational Success

It's the modern-day veganism.

Even if veganism is already modern-day...

Krzysiek1410, May 20th at 3:52 PM

I will download the mod instantly because of the no-ai-slop sign

Macyler , May 20th at 3:38 PM (modified May 20th at 3:45 PM)

Thanks for the positive comments. We've been using the mod on my server for close to 2 weeks now with no problems other than Cabinets not pausing food spoilage. I just released v0.5.0 which fixes this issue. If anyone else out there is using the mod, I'd love to hear about your experiences! This is my first VS mod, and the code to accomplish this pausing in a clean way is a bit gnarly, so there's most likely still some bugs we just haven't spotted.

Novalus, May 14th at 7:09 PM

This is actually a stellar idea TBH, even beyond the use of 'time zones' there is often a large disparity between players on-times, a player that is on for longer stints causes food for other casual players to spoil pretty fast. Especially since many servers pause time when no players are online. TBH options like this and player inventory spoilage while offline, should just be options in vanilla game, it makes that much sense.

Stalltt, May 14th at 2:11 PM

this is actually an awesome idea

ijomeli, May 14th at 11:52 AM

this being uploaded just before the chatAI mod was a hilarious bit of juxtaposition

SongOfSilence, May 14th at 5:17 PM
@ijomeli: this being uploaded just before the chatAI mod was a hilarious bit of juxtaposition

Came here basically to say the same. Proudly displaying the 'no AI-slop'-sign, right next to the newest AI-slop entry.

 

"Everything AI touches... turns to shit" - Mufasa to Simba, probably.

ArsenikMilk, May 14th at 10:39 AM

We like our bugs ORGANIC and GMO-FREE!!! Thank you for the handcrafted QoL!