Durdz Posted June 16, 2019 Share Posted June 16, 2019 (edited) Hi, I followed the custom character mod and made a character, but i dont know how to code his perks (make them function in-game), and I want to know how to ADD custom items into the game. I also want to make it so that my character loses a certain value of sanity when killing something that isnt a monster (a rabbit, beefalo, bird, etc), how do i do that? And back to the custom item. I want to add a wearable magic donut (weird, i know) that emits a small amount of light, can be eaten for a bonus to all stats, OR that can be haunted to respawn (resulting in the donut getting destroyed). If hat items can’t be coded to be eaten, then im fine with it being a food item too. Can anyone help guide me for where i need to go in the files or what i have to do? Thanks. heres pictures of my character and perks to help you understand it a little more. Edited June 16, 2019 by Durdz Link to comment Share on other sites More sharing options...
MidrealmDM Posted June 20, 2019 Share Posted June 20, 2019 add custom items into the game. - check existing characters that have items exclusive to them - wathgrithr.lua , wickerbottom.lua, etc. loses a certain value of sanity when killing something that isn't a monster - again, wigfird is similar to that (gaining when she does kill a monster) check wathgrithr.lua Magic donut - sound like you want a food item that can be equipped Again the best first approach is to think of an existing item that does something similar and check the code for that. Look at Life giving amulet = revives player when haunted Look at Telltale heart = revives player and lowers health cap glow is easy, inst.entity:AddLight() inst.Light:Enable(true) inst.Light:SetFalloff(.7) -- I believe this affects how quickly the light dims as it approaches the limit of the radius, I haven't experimented with it.. inst.Light:SetColour(150 / 255, 150 / 255, 150 / 255) -- these are RGB values that set the color inst.Light:SetIntensity(0.5) -- brightness of light inst.Light:SetRadius(1.0) -- radius of light Link to comment 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