DeadlyFox Posted March 6, 2025 Share Posted March 6, 2025 (edited) I wanna make a hat that as long as you wear it, it gives you + 30 max sanity or another one that decreases 30 max sanity as example (also if anybody knows how i can copy the code of one band man or other items so it would do the same thing as it, it would be cool) I would really appreciate if anybody could help. Edited March 6, 2025 by DeadlyFox Link to comment https://forums.kleientertainment.com/forums/topic/164682-need-help-codding-is-it-possible-to-make-a-custom-hat-that-increases-or-decreases-the-maximum-amount-of-a-stat-as-long-as-you-wear-it/ Share on other sites More sharing options...
DeadlyFox Posted March 8, 2025 Author Share Posted March 8, 2025 (update) i found where the code for one band man is and only if someone could help me with the hat it would be greatly appreciated! Link to comment https://forums.kleientertainment.com/forums/topic/164682-need-help-codding-is-it-possible-to-make-a-custom-hat-that-increases-or-decreases-the-maximum-amount-of-a-stat-as-long-as-you-wear-it/#findComment-1805269 Share on other sites More sharing options...
Haruhi Kawaii Posted March 9, 2025 Share Posted March 9, 2025 On 3/8/2025 at 7:21 PM, DeadlyFox said: (update) i found where the code for one band man is and only if someone could help me with the hat it would be greatly appreciated! You can add this code when equipping the hat. You can check the wearer's tag to avoid overriding your sanity value on other characters when they equip your hat. OnEquip if owner.components.sanity then owner.components.sanity.max = TUNING.YOUR_CHARACTER_SANITY + 30 end OnUnequip if owner.components.sanity then owner.components.sanity.max = TUNING.YOUR_CHARACTER_SANITY end 1 Link to comment https://forums.kleientertainment.com/forums/topic/164682-need-help-codding-is-it-possible-to-make-a-custom-hat-that-increases-or-decreases-the-maximum-amount-of-a-stat-as-long-as-you-wear-it/#findComment-1805565 Share on other sites More sharing options...
DeadlyFox Posted March 9, 2025 Author Share Posted March 9, 2025 Thanks a lot, It works perfectly! Link to comment https://forums.kleientertainment.com/forums/topic/164682-need-help-codding-is-it-possible-to-make-a-custom-hat-that-increases-or-decreases-the-maximum-amount-of-a-stat-as-long-as-you-wear-it/#findComment-1805576 Share on other sites More sharing options...
DeadlyFox Posted March 10, 2025 Author Share Posted March 10, 2025 @Haruhi KawaiiDoes it work the same with health instead of sanity? because i tried to replace sanity with health and it doesn't really work, here is what i wrote: OnEquip Quote if owner.components.health then owner.components.health.max = TUNING.EMILY_HEALTH + 20 end OnUnequip Quote if owner.components.health then owner.components.health.max = TUNING.EMILY_HEALTH end Link to comment https://forums.kleientertainment.com/forums/topic/164682-need-help-codding-is-it-possible-to-make-a-custom-hat-that-increases-or-decreases-the-maximum-amount-of-a-stat-as-long-as-you-wear-it/#findComment-1805981 Share on other sites More sharing options...
Haruhi Kawaii Posted March 10, 2025 Share Posted March 10, 2025 39 minutes ago, DeadlyFox said: @Haruhi KawaiiDoes it work the same with health instead of sanity? because i tried to replace sanity with health and it doesn't really work, here is what i wrote: OnEquip OnUnequip I just looked at the health component, it's a bit different if owner.components.health then owner.components.health.maxhealth = TUNING.EMILY_HEALTH + 20 owner.components.health:ForceUpdateHUD(true) end 1 Link to comment https://forums.kleientertainment.com/forums/topic/164682-need-help-codding-is-it-possible-to-make-a-custom-hat-that-increases-or-decreases-the-maximum-amount-of-a-stat-as-long-as-you-wear-it/#findComment-1805995 Share on other sites More sharing options...
DeadlyFox Posted March 10, 2025 Author Share Posted March 10, 2025 Thanks a lot again, now it works! Link to comment https://forums.kleientertainment.com/forums/topic/164682-need-help-codding-is-it-possible-to-make-a-custom-hat-that-increases-or-decreases-the-maximum-amount-of-a-stat-as-long-as-you-wear-it/#findComment-1806014 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