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

NxLabs / Vintage Story

No Offline Container Food Spoil

DBy Draconikard

A player tagging system to stop food in containers owned by offline players from spoiling.

Description

<h2><span style="color: #e74c3c;">WARNING:</span></h2> <p><br /><span style="color: #e74c3c;">MAKE A BACKUP OF YOUR WORLD BEFORE ADDING THIS MOD. IF YOU ADD THIS MOD AFTER THE FACT, OR UPDATE TO 2.0, PLEASE DESTROY AND REPLACE CHESTS THAT YOU OWN. SERVER OWNERS, INSTRUCT YOUR USERS TO DO THE SAME.</span><br /><br /></p> <p><strong>This mod does not prevent spoilage in a player's inventory.</strong> There is an existing <a href="https://mods.vintagestory.at/offlinefoodnospoil" target="_blank" rel="noopener">mod</a> for this made by <a href="https://github.com/Wiltoga" target="_blank" rel="noopener">Wiltoga</a>, and I really don't know how to make a good-enough solution that wouldn't just copy their work. Both mods should be compatible with each other.</p> <p>This project has been very difficult for me, as I am not a programmer, and the logic that had to be implemented for this to work was very difficult for me to comprehend and work with. I am sorry if it isn't working for you or your mods, although I have tried to cover every edge case in version 2.0. I am exhausted from this project, especially becausing testing this takes so much time, and probably won't continue to work on it. If you find a problem, and want to upload a fix, please submit a pull request and I will try to find time to test it.</p> <h2>Overview</h2> <hr /> <p>&nbsp;</p> <p>This mod targets an issue with food in Vintage Story multiplayer. In the base game, if a player leaves food in a container and then leaves the server, it will gradually spoil over time. Players that spend large amounts of time on servers can negatively affect other player's experience as by the time they log back on, everything they have will be turned into rot.</p> <h2>How it works</h2> <hr /> <p>&nbsp;</p> <p dir="auto">Containers blocks have custom behavior attached to them that tracks who placed the block, as well as who last opened it. If the owner of the block is offline, the "transition" rate for that container will be changed to 0.</p> <p dir="auto">If a player interacts with this container, the food in it will act like the owner never went offline and spoil like normal until that player leaves, or the owner comes back online and interacts with the chest. This is done to avoid players abusing this mechanic.</p> <h2>Credit</h2> <hr /> <p>&nbsp;</p> <p>This was not my idea. I knew this was a problem and was looking for a solution, and credit for this idea goes fully to <a title="Tabulius" href="https://www.vintagestory.at/profile/347446-tabulius/" target="_blank" rel="noopener">Tabulius</a>. The post I found their idea on is <a href="https://www.vintagestory.at/forums/topic/18000-mod-request-solution-to-offline-food-perishing-in-multiplayer/" target="_blank" rel="noopener">here</a>.</p>

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.