Harvest Settings - SubnauticaModding/Nautilus GitHub Wiki
How does the game handle Harvesting items?
There are 3 Values that control harvesting of an item:
HarvestType: the game has a built-in enum called HarvestType which is shown below.
HarvestOutput: this is the TechType you want to GET when you have harvested.
HarvestFinalCutBonus: bonus amount you get when what your harvesting dies/breaks.
public enum HarvestType
{
None = 0,
Break = 1,
Pick = 2,
DamageAlive = 3,
DamageDead = 4,
Click = 5
}
How can I change an item's harvest type?
To edit an item's harvest type, you need to call the CraftDataHandler.SetHarvestType() method sitting in the SMLHelper.V2.Handlers namespace
Overloads
There is only one overload for this method:
CraftDataHandler.SetHarvestType([TechType] techType, [HarvestType] harvestType);
Parameters
[TechType] techTypeis the item that you want to modify the harvest type for. This can be both an existing or a custom item.
Example: TechType.Creepvine
[HarvestType] harvestTypeis the harvest type to set for the item.
Example: HarvestType.Click
Usage
This will make it so you harvest creepvine samples via clicking on it instead of cutting it.
CraftDataHandler.SetHarvestType(TechType.Creepvine, HarvestType.Click);
How can I change an item's harvest output?
To edit an item's harvest output, you need to call the CraftDataHandler.SetHarvestOutput() method sitting in the SMLHelper.V2.Handlers namespace
Overloads
There is only one overload for this method:
CraftDataHandler.SetHarvestOutput([TechType] techType, [TechType] harvestOutput);
Parameters
[TechType] techTypeis the item that you want to modify the harvest output for. This can be both an existing or a custom item.
Example: TechType.Creepvine
[TechType] harvestOutputis the harvest type to set for the item. This can be both an existing or a custom item.
Example: TechType.Copper
Usage
This will make it so that harvesting creepvine will give copper instead of creepvine peice.
CraftDataHandler.SetHarvestOutput(TechType.Creepvine, TechType.Copper);
How can I change an item's harvest final cut bonus?
To edit an item's harvest final cut bonus, you need to call the CraftDataHandler.SetHarvestFinalCutBonus() method sitting in the SMLHelper.V2.Handlers namespace
Overloads
There is only one overload for this method:
CraftDataHandler.SetHarvestFinalCutBonus([TechType] techType, [int] bonus);
Parameters
[TechType] techTypeis the item that you want to modify the harvest final cut bonus for. This can be both an existing or a custom item.
Example: TechType.Creepvine
[int] bonusis the number of bonus items to harvest on the final cut.
Example: 5
Usage
This will make it so that harvesting creepvine will give 5 instead of 1 on the final cut.
CraftDataHandler.SetHarvestFinalCutBonus(TechType.Creepvine, 5);