Dark Thoughts Posted March 21, 2025 Report Posted March 21, 2025 (edited) At the moment, when you die you spawn X blocks around world spawn, assuming you did not use a temporal gear, based on the respawn radius set in the world gen settings, with options of very high ones like 5000 blocks. My mod request would be a mod that changes this mechanic, where you instead respawn in a radius around your death location instead - again, assuming you did not use a gear, or ran out of respawns. So on default settings, you'd respawn 50 blocks around the location you died. On more hardcore settings like the 5000 blocks example, you'd respawn 5000 blocks around the location you died. The reasoning behind this is to enable a more nomadic playstyle as an option. If you were to happen to travel from a cold spawn towards the south, you could go for many thousands of blocks just for slight climate changes. If you were to die 10000 blocks south of spawn, it would spawn you all the way back in the north, completely erasing your progress. However, even with more hardcore settings you could instead spawn just 5000 blocks around the location you died instead, being not quite as big of a setback, even if you'd technically have to more or less restart your gear progression at that point (or risk a very long walk back, if you play with an enabled map). Edited March 21, 2025 by Dark Thoughts
TC Posted March 25, 2025 Report Posted March 25, 2025 (edited) I've got other priorities and won't be making this mod myself, but in case someone else wants to pick it up, the respawn code is stored in the ServerMain class in VintageStoryLib.dll. VintageStoryLib does not have any source code available (as far as I'm aware). To make a mod that does this, you'll need to create a Harmony Patch which transpiles that method to intercepts access to ServerMain.SaveGameData.DefaultSpawn and replaces it with the location the player died at. (Edit) It might be easier to create a trigger when the player dies, which sets the global spawn position to the place where they died. However, that would have side-effects: the global spawn position is the coordinate origin - so (if you're playing with coordinates on), your coordinates will be relative to your last death location, with your body at (0 <y> 0). Additionally, if a new player joins in multiplayer, the new player would appear nearby to wherever the last death was. Edited March 25, 2025 by TC
Recommended Posts