Page cover

Unique Item Filter

To ensure the safe application of serail numbers for weapons in your inventory resource you can define items to be classed as unique within this script and this will only allow a max craft of 1. This ensures the inventory applies the correct serial numbers to the items if required

  • Ensure you have set PerRecipeFlag to true. This checks each recipe name against the list of items in the PreFixes and Names table and if it matches then sets the max craft to 1

  • In the Prefixes table you can define a list of item names with prefixes, for example weapon_ would then dictate that all item names that start with weapon_ are classed as unique and only allow a max craft of 1

  • In the Names table you can define a list of item names that are classed as unique for example weapon_pistol then dictates that item name is unique and will only allow a max craft of 1

UniqueItems = { -- unique item filters for weapons only 1 can be crafted at a time to ensure serials apply correctly and do not duplicate
    PerRecipeFlag = true, -- if recipe.unique == true then treat as unique
    Prefixes = { -- any item name starting with these is unique things like weapon_ or similair
        'weapon_',
    },
    Names = { -- exact item names that are unique like weapon_pistol or similair
        'weapon_pistol',
    },
},

Last updated