Jump to content

Recommended Posts

Hi! So, i've been working on my modded character for some time now and He's almost done. I've been wondering about how to add a custom UI meter that would replace regular sanity essentialy it would appear maxed out when insane and empty when sane. If anyone has any tips or examples I can look at it would mean allot! :wilson_love: (I will say nobody gets notified when I reply because i'm a new user and I can't send messages, so I do tend to get ghosted allot even though I reply. So be aware of that) 

image.png.02e7de847ca0987d6a527d9be0a1ecef.png

I haven't really figured out how to do custom animation for items or anything like that yet, but I figure for a custom sanity meter I would only need a few icons.

Hello. I've been digging through the game files and I found what you need: The Badge class, located in widgets/badge.lua, allows you to create a UI object (from what I understand of the code) similar to those used for food, sanity, and, as you mentioned, Wanda's ability. In fact, this is the same class they all use.

To create your object, I recommend looking at the code for widgets/hungerbadge.lua and widgets/sanitybadge.lua.

I wasn't sure if your question was about how to create it or how to replace it, so if you need to know how to replace it, just let me know and I'll try to find something to help you.

I hope this was helpful.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...