Aruu Posted October 27, 2022 Share Posted October 27, 2022 Okay so as the title says, I want to figure out how to make a wearable object grant lunacy/enlightenment when worn, but the thing is... the equippable thingy doesn't have the same stuff as the parameters that player characters can use. see this is what I use on my character to give them lunacy by default inst.components.sanity:EnableLunacy(true, "Default") the only thing I can think of is to give a tag and have a seperate function give anyone with that tag lunacy? But I'm not quite sure how to do such a thing Link to comment https://forums.kleientertainment.com/forums/topic/144116-enable-lunacy-through-equipment/ Share on other sites More sharing options...
Chesed Posted October 27, 2022 Share Posted October 27, 2022 (edited) Change "inst" to "owner" to target the character wearing the item. Quote owner.components.sanity:EnableLunacy(true, "Default") How you apply it is up to you, but I just shoved it in the OnEquip to test it and it worked. You'll have to turn it back off again in the OnUnequip though. I'm sure there's a more elegant way to do it (I am not a programmer), but that will get you started. Edited October 27, 2022 by Chesed Link to comment https://forums.kleientertainment.com/forums/topic/144116-enable-lunacy-through-equipment/#findComment-1604846 Share on other sites More sharing options...
Aruu Posted October 27, 2022 Author Share Posted October 27, 2022 36 minutes ago, Chesed said: Change "inst" to "owner" to target the character wearing the item. How you apply it is up to you, but I just shoved it in the OnEquip to test it and it worked. You'll have to turn it back off again in the OnUnequip though. I'm sure there's a more elegant way to do it (I am not a programmer), but that will get you started. OH! I forgot to change the owner things. Thanks! actually- how would I disable it? 1 Link to comment https://forums.kleientertainment.com/forums/topic/144116-enable-lunacy-through-equipment/#findComment-1604847 Share on other sites More sharing options...
Chesed Posted October 27, 2022 Share Posted October 27, 2022 Oh my goodness, I'm so sorry: I completely glazed over your other question. In case you haven't done it by now, put this in the OnUnequip: Quote owner.components.sanity:EnableLunacy(false, "Default") I don't know if this will have any other effects but it seems to play nice with the Lunar Island's enlightenment. Link to comment https://forums.kleientertainment.com/forums/topic/144116-enable-lunacy-through-equipment/#findComment-1604855 Share on other sites More sharing options...
Aruu Posted October 27, 2022 Author Share Posted October 27, 2022 It worked, thanks! The built in feature to specify sources of lunacy has been a lifesaver for this mod lemme tell ya Link to comment https://forums.kleientertainment.com/forums/topic/144116-enable-lunacy-through-equipment/#findComment-1604869 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