-
Notifications
You must be signed in to change notification settings - Fork 36
Harvest Settings
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
}
To edit an item's harvest type, you need to call the CraftDataHandler.SetHarvestType()
method sitting in the SMLHelper.V2.Handlers
namespace
There is only one overload for this method:
CraftDataHandler.SetHarvestType([TechType] techType, [HarvestType] harvestType);
-
[TechType] techType
is 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] harvestType
is the harvest type to set for the item.
Example: HarvestType.Click
This will make it so you harvest creepvine samples via clicking on it instead of cutting it.
CraftDataHandler.SetHarvestType(TechType.Creepvine, HarvestType.Click);
To edit an item's harvest output, you need to call the CraftDataHandler.SetHarvestOutput()
method sitting in the SMLHelper.V2.Handlers
namespace
There is only one overload for this method:
CraftDataHandler.SetHarvestOutput([TechType] techType, [TechType] harvestOutput);
-
[TechType] techType
is 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] harvestOutput
is the harvest type to set for the item. This can be both an existing or a custom item.
Example: TechType.Copper
This will make it so that harvesting creepvine will give copper instead of creepvine peice.
CraftDataHandler.SetHarvestOutput(TechType.Creepvine, TechType.Copper);
To edit an item's harvest final cut bonus, you need to call the CraftDataHandler.SetHarvestFinalCutBonus()
method sitting in the SMLHelper.V2.Handlers
namespace
There is only one overload for this method:
CraftDataHandler.SetHarvestFinalCutBonus([TechType] techType, [int] bonus);
-
[TechType] techType
is 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] bonus
is the number of bonus items to harvest on the final cut.
Example: 5
This will make it so that harvesting creepvine will give 5 instead of 1 on the final cut.
CraftDataHandler.SetHarvestFinalCutBonus(TechType.Creepvine, 5);
If there is something missing or ambiguous, please create an issue or contact us on the Subnautica Modding Discord using our tags:
- PrimeSonic:
@PrimeSonic#0667
- Metious:
@Metious#3682
Please note that some pages are under construction and the links to them will be enabled as they are completed
[Adding]
- Items/GameObjects using Asset Classes
- Asynchronous loading for ModPrefab
- [Custom Scanner Unlocks]
- Items/GameObjects to the Spawning System
- [Recipes to uncraftable items]
- [Custom Mouse Click Actions]
[Editing]
- Background Type
- Crafting Time
- Equipment Type
- Quick Slot Type
- Size in Inventory
- [Recipes for craftable items]
- Harvest Settings
- BioReactor Fuel Values
- [Scanning Count/Time]
- [Spawning (Where/How often/How many)]
[General Utilities]
- In-Game Options Menu
- Adding crafting recipes for other mods items
- Using items from other mods
- Texture/Sprite Utilities
- [Adding/Playing Audio]
- Config Files using Abstract Json Config class
- Custom Console Commands
- [Registering OnSave/OnQuit Actions]
[Language]