For full field documentation on
ItemDefinitionSO,ItemEffectConfig, the stacking system, proc trigger types, GUIDs, and catalogue registration — see Item Asset Identifier SO Documentation.
This guide covers the code-side steps only: what to do when the effect type you need doesn’t exist yet and you have to write it from scratch.
Before you start
In the ItemEffectConfig section of your item SO, check what ItemEffect SOs already exist in Assets/Assets/Item Effects/. If one covers your needs, assign it directly and skip to the field reference in Item Asset Identifier SO Documentation.
If nothing fits, follow the steps below.
Step 1: Create an ItemEffect script
In Assets/Scripts/Item System/Effects/ create a new script inheriting from ItemEffect. Before the class definition, add a CreateAssetMenu attribute — replace EffectName with the name of your effect:
[CreateAssetMenu(fileName = "EffectName", menuName = "Items/Item Effects/Effect Name")]Your class must implement three abstract methods:
Execute(ref IProc proc)— main execution logic, called each time the effect triggers.OnStackChanged(uint newStackCount)— called whenever the item’s stack count changes; update any cached stack-dependent values here.Cleanup()— called when the item is removed from the unit; unsubscribe from events and release any state here.
Any values needed for scaling or configuration (damage amounts, multipliers, etc.) should come from effectParameters. These are defined in EffectParameters.cs. If the parameter type you need doesn’t exist, add it there. The concrete type is assigned to the ItemEffect in the Inspector.
Step 2: Create an ItemEffect ScriptableObject
In Assets/Assets/Item Effects/, create a new ItemEffect ScriptableObject via Create → Items → Item Effects → EffectName.
Creating a new Effect Condition
Effect Conditions are optional conditions that must pass before an item effect fires. If none of the existing conditions in Assets/Assets/Conditions/ cover your case, create a new one:
- In
Assets/Scripts/Item System/Conditions/, create a new script namedNameConditioninheriting fromEffectCondition. Add the attribute:
[CreateAssetMenu(fileName = "NameCondition", menuName = "Items/Conditions/Name Condition")]-
Implement
Initialize()andCheckCondition(IProc proc). -
In
Assets/Assets/Conditions/, create a new ScriptableObject via Create → Items → Conditions → Name Condition. -
Assign the SO to the
effectConditionfield on the relevantItemEffectConfig.