Skip to content

Crafting Time

MrPurple6411 edited this page Jul 27, 2020 · 2 revisions

How can I edit an item's crafting time?

To edit an item's crafting time, you need to call CraftDataHandler.SetCraftingTime(), a method sitting in the SMLHelper.V2.Handlers namespace

Overloads

There is only one overload for this method

CraftDataHandler.SetCraftingTime([TechType] techType, [float] time);

Parameters

  • [TechType] techType is the item for which you want to modify the crafting time. This can be both an existing or a custom item.

Example: TechType.TitaniumIngot

  • [float] time is the desired crafting time of the item.

Example: 0.01f

Usage

Using this knowledge, if we wanted to add make Titanium Ingots craft faster, we could do this:

CraftDataHandler.SetCraftingTime(TechType.TitaniumIngot, 0.01f);

Congratulations! You have enabled fast-craft for titanium ingots!