Pig_ofgold Posted Sunday at 09:07 PM Share Posted Sunday at 09:07 PM Im making a hard challange character that has some really solid upsides and i want the big flailing drawback to them to be they cant wear a helmet. I know its possible since there are some older characters on the workshop that already have this feature. Looking through them though i cant seem to find the tag that prevents it. And i dont know how to go about making the feature from scratch. Any help? I also would like some feedback from people who dont neccisarily have to be advanced at modding because i want to know if there is some big thing im missing that i will need to adress that makes not being able to wear armor prevent progress in the story. As far as i know everything that is benifit from wearing a helmet (like the moonstorm) doesent acctually need you to its just really helpful Link to comment https://forums.kleientertainment.com/forums/topic/172172-preventing-wearing-a-helmet/ Share on other sites More sharing options...
kyupita Posted 5 hours ago Share Posted 5 hours ago On 6/14/2026 at 9:07 PM, Pig_ofgold said: Im making a hard challange character that has some really solid upsides and i want the big flailing drawback to them to be they cant wear a helmet. I know its possible since there are some older characters on the workshop that already have this feature. Looking through them though i cant seem to find the tag that prevents it. And i dont know how to go about making the feature from scratch. Any help? I also would like some feedback from people who dont neccisarily have to be advanced at modding because i want to know if there is some big thing im missing that i will need to adress that makes not being able to wear armor prevent progress in the story. As far as i know everything that is benifit from wearing a helmet (like the moonstorm) doesent acctually need you to its just really helpful I actually have a character that isn't able to wear anything except for specific items that I made a while back, I can share an edited version of my code here. Spoiler -- Inside character's prefab file, inside master_postinit inst.components.inventory.Equip = function(self, item, old_to_active) if not item or not item.components.equippable or not item:IsValid() then return end if item.components.equippable.equipslot == EQUIPSLOTS.HEAD then if inst and inst.components.talker then inst.components.talker:Say("I can't wear this.") end return end return OldEquip(self, item, old_to_active) end If you'd like to make it so that they can only wear specific items, the code would like more like this: Spoiler -- Inside character's prefab file, inside master_postinit inst.components.inventory.Equip = function(self, item, old_to_active) if not item or not item.components.equippable or not item:IsValid() then return end if item.components.equippable.equipslot == EQUIPSLOTS.HEAD and not (item.prefab == "deserthat") -- Change "deserthat" to whatever or keep it as the desert goggles then if inst and inst.components.talker then inst.components.talker:Say("I can't wear this.") end return end return OldEquip(self, item, old_to_active) end One problem with this though as that your character won't be able to pick up hat items and put it in their inventory if its on the ground, which I'm not sure how to fix Link to comment https://forums.kleientertainment.com/forums/topic/172172-preventing-wearing-a-helmet/#findComment-1871982 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