Most of the HUD mods replace the HUD's textures themselves. That means that every time Klei updates the HUD's textures, those mods'll have to be updated too. This guide will help you make a mod that changes HUD without replacing textures!
Download my HUD skins library from here
Copy hud_skins.lua file to your mod's folder.
In your modmain.lua file paste this line:
Create a scripts folder with img_override_data.lua file in it.
Place this code in it:
And that's it! The setup is done. But we still need to tell the lib what textures are we using. Let's say that we want to replace a texture named clock_hand.tex from images/hud.xml atlas with our image named somename.tex with atlas images/somename.xml. To do this, you need to modify img_override_data file like this:
["images/hud.xml"] = -- Atlas to replace textures in
["clock_hand.tex"] = -- Texture that we're replacing
"images/somename.xml", -- Atlas with image that we're replacing clock_hand with
"somename.tex" -- Texture that we're replacing clock_hand with
And that's it, your mod should work just fine now! P.S. This lib automatically adds all of your textures referenced in img_override_data file to assets, so you don't need to manually add them. Mods that use this lib: