DeinNameGamePL Posted February 7, 2020 Share Posted February 7, 2020 Hi I want to add custom perks to character I made but I don't know how. The perks I want to add are: 1. Cooked seeds are giving 3x more food. 2. Increased running speed. 3. Sanity is decreasing faster. Can someone help me with that? I will be very grateful! Link to comment https://forums.kleientertainment.com/forums/topic/115546-custom-perks/ Share on other sites More sharing options...
Yakuzashi Posted February 8, 2020 Share Posted February 8, 2020 Did you use this tutorial: to create your character ? Probably yes. Quote 1. Cooked seeds are giving 3x more food. Above master_postinit: local function seeds(inst, food) if inst.components.eater and food.prefab == "seeds_cooked" then inst.components.hunger:DoDelta(10) end end Under master_postinit: inst.components.eater:SetOnEatFn(seeds) Quote 2. Increased running speed. Inside of [your.character's.name].lua (mod->scripts->prefabs) you should see something like this: local function onbecamehuman(inst) inst.components.locomotor:SetExternalSpeedMultiplier(inst, "[character's.name]_speed_mod", 1.5) end 1 is default Quote 3. Sanity is decreasing faster. You will need to paste this under master_postinit inst.components.sanity.night_drain_mult = 1.5 1 is default I am glad I could help. Cheers! 2 Link to comment https://forums.kleientertainment.com/forums/topic/115546-custom-perks/#findComment-1305784 Share on other sites More sharing options...
DeinNameGamePL Posted February 8, 2020 Author Share Posted February 8, 2020 Thank you so much!! Link to comment https://forums.kleientertainment.com/forums/topic/115546-custom-perks/#findComment-1305933 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