Set Up Obtainables for Custom Item Acquisition
Understanding Obtainables
Obtainables are ShiftedLib's system for defining how players can acquire items through special conditions or actions, used by mods built on this library.
Two Trigger Types
On Use: Triggers when the player holds and uses specified items. Useful for tools, wands, or consumables that grant rewards.
On Damage: Triggers when a specific damage type is dealt. Useful for environmental hazards, boss mechanics, or special combat scenarios.
Adding Requirements
Beyond the trigger type, obtainables support:
- Special Conditions: Check world state, player inventory, biome, time of day, or other complex requirements
- Experience Level Requirement: Player must reach a minimum XP level before the obtainable activates
- Item Requirements: Player must hold or have specific items
Configuration
Obtainables are defined in mod configs (not ShiftedLib's main config). Check your specific mod's documentation for syntax. You can prevent certain obtainables from registering by adding their IDs to obtainablesToIgnore in shiftedlib.json.
This system enables progression gating and conditional rewards across mods.