Jump to content

[HELP] Change the harvested amount of reeds


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!

Link to comment
Share on other sites

     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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...