Jump to content

Custom Character Hat Perk

Recommended Posts

Heyho everyone,

So I am working together with a few friends on some custom characters I have been getting their perks done quiet well except for one.
They have a hat obsession and are supposed to be able to gain weeber's friend of spiders as long as they wear it. I am not certain tho how to create a dependency on all hats so everything that is equipabel in the head slot and connect it to a character tag.
Do I have to maybe write around it and code everything so I don't depend on the character tag?

Thank you for the help!

Link to comment
Share on other sites

You would need to copy the hats.lua from DST and include that in your mod. Once you have a copy of the file you'll need to go in and add a special tag to each hat and grant the ability while it's true. Then you would need to add a tag to the character that matches it.


Inside your Character.lua file



Inside the Hats.lua file

if inst:HasTag("ilovehats") then

--grant ability


Link to comment
Share on other sites

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...