imjustglue Posted November 23, 2022 Share Posted November 23, 2022 if inst.components.eater ~= nil and TUNING.AISHA_IS_VEGETARIAN then inst.components.eater:SetDiet({ FOODGROUP.VEGETARIAN }, { FOODGROUP.VEGETARIAN }) end Trying to make a chracter vegetarian, u know like wurt, but doing it as its done in the wurt prefab just crashs the game, i stole this code from the Ceres Fauna mod, it runs, but dosnt work i can still eat meat Link to comment https://forums.kleientertainment.com/forums/topic/144831-how-to-mahe-someone-a-vegetarian/ Share on other sites More sharing options...
TemporarySolutn Posted November 23, 2022 Share Posted November 23, 2022 (edited) make sure its in your characters master_postinit, also actually reading the log would help and its also probably because TUNING.AISHA_IS_VEGETARIAN is either nil or false because you may have done something wrong Edited November 23, 2022 by TemporarySolutn Link to comment https://forums.kleientertainment.com/forums/topic/144831-how-to-mahe-someone-a-vegetarian/#findComment-1611711 Share on other sites More sharing options...
Mikrell Posted November 23, 2022 Share Posted November 23, 2022 (edited) 2 hours ago, imjustglue said: snip The Ceres Fauna mod has config options for player customization, one of them being her diet. If you made no config option for your character then what @TemporarySolutn said is correct: TUNING.AISHA_IS_VEGETARIAN is simply nil, therefore your if-statement is always false. The default, no frills way to simply change your character's diet to being vegetarian is: if inst.components.eater ~= nil then inst.components.eater:SetDiet({ FOODGROUP.VEGETARIAN }, { FOODGROUP.VEGETARIAN }) end Taken straight from wurt.lua Edited November 23, 2022 by Mikrell 1 Link to comment https://forums.kleientertainment.com/forums/topic/144831-how-to-mahe-someone-a-vegetarian/#findComment-1611729 Share on other sites More sharing options...
imjustglue Posted November 23, 2022 Author Share Posted November 23, 2022 16 hours ago, Mikrell said: The Ceres Fauna mod has config options for player customization, one of them being her diet. If you made no config option for your character then what @TemporarySolutn said is correct: TUNING.AISHA_IS_VEGETARIAN is simply nil, therefore your if-statement is always false. The default, no frills way to simply change your character's diet to being vegetarian is: if inst.components.eater ~= nil then inst.components.eater:SetDiet({ FOODGROUP.VEGETARIAN }, { FOODGROUP.VEGETARIAN }) end Taken straight from wurt.lua are u kidding me? i am not angry at you, but like, i tried just using wurt's code one or 2 months ago and it crashed my server, the same Ctrl + C, Ctrl + V code. It worked now, so thanks mate Link to comment https://forums.kleientertainment.com/forums/topic/144831-how-to-mahe-someone-a-vegetarian/#findComment-1611865 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