Jump to content

Need help with custom perks modding


Recommended Posts

I'm new to the modding scene and I wanted my character to have special perks, that being -1 sanity loss from meat, and hounds being neutral until provoked by said character. Can anyone help?

Link to comment
Share on other sites

In yourchar.lua inside common_postinit put

inst:AddTag("houndfriend")

I think this will make hounds neutral to you (I don't know about hound attack hounds though)

 

in yourchar.lua inside master_postinit put

inst:ListenForEvent("oneat", function(inst, data)
	if data.food and data.food.components.edible.foodtype == FOODTYPE.MEAT then
		inst.components.sanity:DoDelta(-1)
	end
end)

for making eating meat drain 1 sanity

Link to comment
Share on other sites

On 6/7/2019 at 8:57 PM, Warbucks said:

In yourchar.lua inside common_postinit put


inst:AddTag("houndfriend")

I think this will make hounds neutral to you (I don't know about hound attack hounds though)

 

in yourchar.lua inside master_postinit put


inst:ListenForEvent("oneat", function(inst, data)
	if data.food and data.food.components.edible.foodtype == FOODTYPE.MEAT then
		inst.components.sanity:DoDelta(-1)
	end
end)

for making eating meat drain 1 sanity

Thank you so much!! Everyone on here is so helpful (,:

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
 Share

×
  • Create New...