rubinho Posted July 7, 2024 Share Posted July 7, 2024 Hello, everyone. Can someone help me create a mod to disable certain HUD elements in Don't Starve Together? For instance, disabling the hunger HUD, sanity HUD, and especially the crafting bar. I want to keep only the health and inventory displays. Like in some mods, such as 'Deathmatch - PvP Game Mode' by creator 'Electroely,' they managed to remove several on-screen elements, leaving only the inventory and health. How is this possible? I know there's a mod to hide HUDs, but it only works client-side. I would like to create one that works server-side Link to comment https://forums.kleientertainment.com/forums/topic/158063-disable-some-huds/ Share on other sites More sharing options...
alainmcd Posted July 8, 2024 Share Posted July 8, 2024 Hi, welcome to the forums! If you want a mod to disable HUD elements from all players, you can set all_clients_require_mod = true. If you want to dynamically hide and show elements as decided by the server, you'd have to write the server-side logic AND some client-side logic to act accordingly. I don't believe the current widgets listen to server commands to be displayed or not (most of them, anyway). As for how to actually disable the HUD: you could look into that mod, or ask the creator. Other ideas: Create empty/transparent textures for the HUD elements you want to hide. I've not tried this. Try to force the widgets to always hide, see the example below. However, depending on which widgets you hide, you might want to reposition some elements to make the UI look nicer: -- modmain.lua local alwaysHideWidget = function(widget, owner) widget:Hide() local oldFn = widget.Show widget.Show = function(self, ...) oldFn(self, GLOBAL.unpack(arg)) self:Hide() end end AddClassPostConstruct( "widgets/healthbadge", alwaysHideWidget ) One thing to note is that if someone really wants to display the widgets, they'll be able to by overriding your mod (unless you rework A LOT of the game logic). Good luck! 1 Link to comment https://forums.kleientertainment.com/forums/topic/158063-disable-some-huds/#findComment-1733807 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now