Jump to content

Need help with vegetarian code without insects


Recommended Posts

I downloaded a few vegetarian characters from the steam workshop, but all of their characters don't mind eating butterflies. They show up as this.

FOODGROUP.OMNI_NOMEAT = {
    name = "OMNI_NOMEAT",
    types = {
        FOODTYPE.VEGGIE,
        FOODTYPE.INSECT,
        FOODTYPE.SEEDS,
        FOODTYPE.GENERIC
    }

I could compromise with the butter muffins, but I could think up some excuse. I tried removing insect and generic from the script on a few different tests, but neither seemed to work. It just doesn't consider insect as meat.

Link to comment
Share on other sites

it is because butterflywings is set as FOODTYPE.VEGGIE.

you have to hack the prefab by yourself with something like

AddPrefabPostInit("butterflywings",function(inst)

   if not TheWorld.ismastersim then return end

    inst.components.edible.foodtype = GLOBAL.FOODTYPE.MEAT

end)

in modmain

Link to comment
Share on other sites

16 hours ago, ptr said:

it is because butterflywings is set as FOODTYPE.VEGGIE.

you have to hack the prefab by yourself with something like

AddPrefabPostInit("butterflywings",function(inst)

   if not TheWorld.ismastersim then return end

    inst.components.edible.foodtype = GLOBAL.FOODTYPE.MEAT

end)

in modmain

Sorry, is there a specific place in the modmain I should put this? I put it separate from everything else, and when I killed a butterfly it crashed the game.

Link to comment
Share on other sites

5 hours ago, JackyHann said:

Sorry, is there a specific place in the modmain I should put this? I put it separate from everything else, and when I killed a butterfly it crashed the game.

GLOBAL.TheWorld.ismastersim

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...