Don't Starve Together

Don't Starve Together

221 ratings
Proper Switching & Auto Re-Equip Client Mod
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
393.889 KB
27 Jul, 2022 @ 3:13pm
12 Aug, 2022 @ 7:58pm
8 Change Notes ( view )

Subscribe to download
Proper Switching & Auto Re-Equip Client Mod

Description
Known Issues
*Incompatibility with Item Info and Advanced Controls mod, credits to @niflich and @₩Ø₦ÐEƦ for the report.

This is a Client Mod
It works when joining other servers or hosting your own DST server with caves.
For compatibility when hosting Don't Starve Alone mod/cave-less worlds, it becomes a server mod that affects only the host.

It aims to make equipment switching more intuitive & consistent
Remember how many times your dark sword went to some slot you didn't expect it to go to when switching to your cane? It usually happens when you're switching between more than 2 items, like when your dark sword breaks and you equip another from a different slot (and many other cases). This mod attempts to solve both problems by automatically doing two things: re-equipping extra weapons when broken/out of ammo and correcting prevslots when needed (i.e. maintaining 2-2-2 as cane-darksword-cane). With this, equip switching will reliably make both items exchange places, instead of the unequipped sometimes going to slot 13 or somewhere on the left. I also limited this auto prevslot correction to the player's inventory and backpack, so you wouldn't accidentally leave your cane in a chest of tools for example.

Special Thanks to the Following:
w00tyd00d - for helping me fix and finally understand some bugs related to global scopes and Lua environments, when no one else was helping in the forums
Rebelleliously aka lili - for always being there for me, for supporting me in what I do and what I love, for being my partner, and for creating this project's logo

If you like the mod, consider giving a thumbs up
I'm hoping Klei would notice and consider making this a default feature. Client mods have latency limitations, while prevslot correction would only need around 5 lines of code in the game's inventory script.

Source Code:
https://github.com/kurozawa6/dst-proper-switching-and-auto-re-equip
Please leave a comment or reach out to me for suggestions or any bugs you encounter. I hope you have a nice day~

Latest Patch Notes:
v1.5 : Updated mod name+description & notes for Klei
v1.4 : Slingshot now auto-reloads +safeties from crash
-auto reload idea by M A X W E L L G A M I N G
46 Comments
kurozawa  [author] 17 Mar @ 3:37am 
@Liquid_Wesker
Can you tell me more about how exactly it failed to work? Did it crash? Or did it seem to not give any effect in game?
kurozawa  [author] 17 Mar @ 3:35am 
@niflich
Oh I see. Thanks for letting me know!
I'll see some time if there's a way to make this mod compatible with Item Info client mod.
Liquid_Wesker 13 Mar @ 11:47pm 
not working
niflich 2 Mar @ 12:29pm 
@kurozawa, I realized that crashes happen when this mod is enabled along with this https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=836583293
And its other versions
kurozawa  [author] 25 Feb @ 6:45pm 
@Raishou
What seems to be the problem with Charged Elding Spear?
kurozawa  [author] 23 Feb @ 8:41pm 
@niflich
Hello! Thank you for the bug report!

I just did some tests I am not able to reproduce the bug you described. Can you give more details? What character were you using? You may also Google how to check the logs in DST, so that once the bug occurs again, you can paste the latest logs here and we'll know the exact cause.
niflich 17 Feb @ 8:18pm 
@kurozawa
Hi, the game crashes when I hover over a spider Spitter. Normal DST server with caves, without DSA.
kurozawa  [author] 30 Nov, 2024 @ 5:27am 
Update (just got back):
+ After some tests in a normal DST server, I haven't found any issues/crashes with new Brightshade and Void items (ran them to 0% in varying scenarios with no crashes whatsoever).
+ I found 0 problems with dropping Spiders as Webber as well.

Please report to me should there be any actual problem/crash for normal DST servers (WITH caves, WITHOUT Don't Starve Alone mod).

WARNING for Cave-less servers/users of the Don't Starve Alone mod:
The code is different in these scenarios and I haven't tested yet.
kurozawa  [author] 30 Nov, 2024 @ 5:20am 
@ɅµЋƵƵ
You'll understand what the mod fixes once you get into later bosses and you have to use more than 2 hand equips instead of just ham bat-cane ;)
ɅµЋƵƵ 1 Jul, 2024 @ 6:00pm 
You know how you fix this skill issue? It's not with a mod, it's by figuring out that all you have to do is press 1 on your keyboard, and you will switch your currently equipped item for the first item in your hotbar, reliable avoids any bugs that may occur from accidentally instantly equipping and unequipping an item in the same frame or latency from clients or whatever your claim happens with 'prevslot correction'.