ShadowGX Posted September 16, 2015 Share Posted September 16, 2015 ...or other select items, like honey too maybe? That would be the extent of it. Always bugged me that meat eaters can't eat frozen water... I'm in the process of re-coloring an existing mod and, thanks to the tutorial, I found where but not how I might add things like this. It currently says this in the scripts\prefabs\character.lua: inst.components.eater.strongstomach = true local caneat = inst.components.eater.caneat for i, v in ipairs(caneat) do inst:RemoveTag((type(v) == "table" and v.name or v).."_eater") end inst.components.eater.caneat = {FOODTYPE.MEAT} inst.components.eater.preferseating = {FOODTYPE.MEAT} inst:AddTag(FOODTYPE.MEAT.."_eater") I don't see anywhere else that food is mentioned (yet, am exploring the different files still), so I might assume this is where I would change it, yes or no? I'm brand new to modding for this game and am not skilled with textures, so the most I will ever be doing is re-coloring existing mods and maybe tweaking other things like this. There was another mod I asked the author to make tweaks like this on, but if I can figure it out with your help I could do it myself. Thanks for any replies. ^^ Link to comment Share on other sites More sharing options...
GLERMZ Posted September 16, 2015 Share Posted September 16, 2015 I mean i can understand the ICE part since you can always use it too cool you down if you have loads of it in the fridge but you can always combine it, as-well the honey and all other vegies to make the meat recipes.So i understand the concept you trying to achiv but i still don't se a problem with the current one But that is just my opion.Best Regards Link to comment Share on other sites More sharing options...
Lumina Posted September 16, 2015 Share Posted September 16, 2015 I suppose that the purpose is to be able to refresh yourself in summer. And except in mod, you don't have recipe like ice cream with meat. I don't know how to do what you want to do. But if it can help, there is this line in the "inv_rock_ice.lua" (prefab for ice) inst.components.edible.foodtype = "GENERIC" So maybe adding a tag for "generic" food will be enough ? Link to comment Share on other sites More sharing options...
ShadowGX Posted September 16, 2015 Author Share Posted September 16, 2015 I suppose that the purpose is to be able to refresh yourself in summer. And except in mod, you don't have recipe like ice cream with meat. I don't know how to do what you want to do. But if it can help, there is this line in the "inv_rock_ice.lua" (prefab for ice) inst.components.edible.foodtype = "GENERIC" So maybe adding a tag for "generic" food will be enough ? Indeed, the purpose would be a quick on the fly fix for overheating. The only fixes without allowing ice would be specially crafted items which I would need to keep on me at all times when there's any danger of overheating. If I add that tag in, would that make anything not labeled veggie or meat edible? Am not really sure what that might include. The wiki doesn't have a list, just a picture where I can only guess what some stuff is... Might break the balance of the character if he could eat all of those "other" type food things. But I guess it's not possible to add just one food item? Link to comment Share on other sites More sharing options...
Lumina Posted September 16, 2015 Share Posted September 16, 2015 Hmm, it's probably possible, but i don't know how to do. Link to comment Share on other sites More sharing options...
Maris Posted September 17, 2015 Share Posted September 17, 2015 Trylocal oldTestFoodfunction newTestFood(self,food,...) if food.prefab == "ice" then return true end return oldTestFood(self,food,...)endlocal oldPrefFoodfunction newPrefFood(self,food,...) if food.prefab == "ice" then return true end return oldPrefFood(self,food,...)endAddPrefabPostInit("wathgrithr",function(inst) oldTestFood = inst.components.eater.CanEat inst.components.eater.CanEat = newTestFood oldPrefFood = inst.components.eater.PrefersToEat inst.components.eater.PrefersToEat = newPrefFoodend Link to comment Share on other sites More sharing options...
ShadowGX Posted September 17, 2015 Author Share Posted September 17, 2015 ^ That crashed the mod when I added it. 3: Link to comment Share on other sites More sharing options...
Maris Posted September 17, 2015 Share Posted September 17, 2015 So fix it. And don't forget to put the code in server side section of your mod. Link to comment 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