Recipe Cook Time

Zaddo

Active member
Hi @Sangemdoko,

I have just started playing with recipe's. A feature that I think would be nice is cook time (in milliseconds). Alternatively some way to enter a custom property on the recipe.

It would be fantastic if this could be added to your roadmap at some point ;-)

Thx.
Tony
 
Have you checked this documentation page?
It explains how to create custom recipe types and extend functionality.

You can also extend the Crafting Menu to allow for other use cases.

We left the crafting quite simple preciselly such that the community can cusotmize and create their own crafting mecanics. There are so many ways to craft items it is impossible for us to take into account all possibilities.

That being said I do believe there are things we can do to improve our crafting system to make it easier to extend. But it will take a while before I'll be able to work on that.
 
The custom Crafting processors are really flexible.

The thing I am missing, is the ability to store additional information against the recipe. Currently I utilise the Item attribute system to store the cook-time. The limitation is; if I have an Item that can be made from two different recipes, both recipes have the same cook-time.

If the recipe system was enhanced with custom attributes, I think this would greatly enhance the flexibility of the system. It would make it easy to store any type of meta data directly against a recipe. eg: Skill Level to craft, Tools to craft (eg: workbench), cook time, etc.

Of course, there are other ways to store this information outside of UIS, but then maintaining the information becomes complicated.

I do understand that you have a tonne of other features you are working on and this is a low priority
 
Last edited:
If the recipe system was enhanced with custom attributes, I think this would greatly enhance the flexibility of the system. It would make it easy to store any type of meta data directly against a recipe. eg: Skill Level to craft, Tools to craft (eg: workbench), cook time, etc.
I completely agree, I really don't know why I didn't think of that on the first implementation...

Right now the way you can add custom data to recipes is by making a custom RecipeType.
The RecipeType is defined on the CraftingCategory. And then the serialized fields will appear in the "Other" tab.

Check out this thread. I think it explains things quite well
 
THANKYOU !!!! I am ecstatic :) That works perfectly. I missed that thread.

This is better than the recipe attributes I suggested. This makes it very easy to extend the recipes. (and I was pleasantly surprised that enums work in the editor :) )

For anyone else wanting to do similiar, just add a script like the one below into the UIS assembly.

C#:
namespace Opsive.UltimateInventorySystem.Crafting.RecipeTypes
{
    using Opsive.Shared.Utility;
    using Opsive.UltimateInventorySystem.Crafting.IngredientsTypes;
    using Opsive.UltimateInventorySystem.Utility;
    using UnityEngine;

    public class AdvancedCraftingRecipe : CraftingRecipe
    {

        public enum CraftingEquipment { None, Workbench, Cooking, Kiln }

        [LabelOverride("Craft Time")]
        [SerializeField] protected float m_CraftTime;
        public float CraftTime => m_CraftTime;

        [LabelOverride("Category Level")]
        [SerializeField] protected int m_CategoryLevel;
        public int CategoryLevel => m_CategoryLevel;

        [LabelOverride("Crafting Equipment")]
        [SerializeField] protected CraftingEquipment m_Equipment;
        public CraftingEquipment Equipment => m_Equipment;


    }
}

1647514073717.png
 
Last edited:
Top