Jump to content

How to add new forage-able items?


blackteapie

Recommended Posts

This is the lua code from my mod that adds items to foraging. It should give you an idea of how it works

require "Farming/ScavengeDefinition";local RustyKnife = {};RustyKnife.type = "littering.RustyKnife";RustyKnife.minCount = 1;RustyKnife.maxCount = 1;RustyKnife.skill = 3;local Plasticbag = {};Plasticbag.type = "Base.Plasticbag";Plasticbag.minCount = 0;Plasticbag.maxCount = 1;Plasticbag.skill = 1;local Wire = {};Wire.type = "Base.Wire";Wire.minCount = 1;Wire.maxCount = 1;Wire.skill = 4;local Nails = {};Nails.type = "Base.Nails";Nails.minCount = 1;Nails.maxCount = 1;Nails.skill = 4;local Screws = {};Screws.type = "Base.Screws";Screws.minCount = 0;Screws.maxCount = 1;Screws.skill = 6;local Paperclip = {};Paperclip.type = "Base.Paperclip";Paperclip.minCount = 1;Paperclip.maxCount = 1;Paperclip.skill = 6;local WaterBottleEmpty = {};WaterBottleEmpty.type = "Base.WaterBottleEmpty";WaterBottleEmpty.minCount = 0;WaterBottleEmpty.maxCount = 1;WaterBottleEmpty.skill = 1;table.insert(scavenges.forestGoods, RustyKnife);table.insert(scavenges.forestGoods, Plasticbag);table.insert(scavenges.forestGoods, Wire);table.insert(scavenges.forestGoods, Screws);table.insert(scavenges.forestGoods, Nails);table.insert(scavenges.forestGoods, Paperclip);table.insert(scavenges.forestGoods, WaterBottleEmpty);


If you want to mod the existing items take a look at ScavengeDefinition.lua located at gamedirectory\media\lua\server\Farming

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