Jump to content

Recommended Posts

     I'm trying to create myself a mod that changes the amount of harvested reeds from 1 to 2. I looked at the lua script for the mod Don't Farm, http://steamcommunity.com/sharedfiles/filedetails/?id=225976053 and I believe it's changing the amount of harvested items from twigs by this code:

function saplingpostinit(inst)    inst.components.pickable.numtoharvest = 3endAddPrefabPostInit("sapling", saplingpostinit)

     I tried replicating a mod with similar code that changes the reeds harvested from 1 to 2 with this code:

function reedspostinit(inst)    inst.components.pickable.numtoharvest = 2endAddPrefabPostInit("reeds", reedspostinit)

    Unfortunately this isn't doing anything to the reeds I harvest, I still only get 1 from them.
Somebody tell me what I've done wrong and how I can fix it!

     I'm trying to create myself a mod that changes the amount of harvested reeds from 1 to 2. I looked at the lua script for the mod Don't Farm, http://steamcommunity.com/sharedfiles/filedetails/?id=225976053 and I believe it's changing the amount of harvested items from twigs by this code:

function saplingpostinit(inst)    inst.components.pickable.numtoharvest = 3endAddPrefabPostInit("sapling", saplingpostinit)

     I tried replicating a mod with similar code that changes the reeds harvested from 1 to 2 with this code:

function reedspostinit(inst)    inst.components.pickable.numtoharvest = 2endAddPrefabPostInit("reeds", reedspostinit)

    Unfortunately this isn't doing anything to the reeds I harvest, I still only get 1 from them.

Somebody tell me what I've done wrong and how I can fix it!

 

All I can say is: Go into the prefabs of the ORIGINAL game and find it's references.

Happy Modding

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
×
  • Create New...