Loadouts
com.n3plugins.sdk.loadouts declares what a character should carry and wear.
A loadout is a target state, not an action - it is handed to the bank and
production workflow builders, which reconcile the live game against it.
Types:
LoadoutItem- one immutable item requirement (id, amount, slot, flags).InventoryLoadout- the 28-slot inventory target.EquipmentLoadout- the worn-equipment target.Loadout- shared base of both.ItemDepletionListener- optional callback when a required item runs out.
Declare vs assert
Loadouts pair with InventoryPlan (see inventory-plan.md) but answer a
different question:
| Type | Question | Used by |
|---|---|---|
InventoryPlan | Assert - "does the inventory satisfy this right now?" | a guard before a step |
InventoryLoadout | Declare - "inventory should contain this after a bank run" | BankWorkflowBuilder.withdraw/reconcile, ProductionWorkflowBuilder.bankAndRestock |
EquipmentLoadout | Declare - "this should be worn after restocking" | BankWorkflowBuilder.equip/reconcile |
InventoryPlan reads; a loadout is a goal the builders drive toward.
Building items
LoadoutItem is immutable and built fluently. builder(int itemId) is the only
entry point; every other field has a default.
LoadoutItem logs = LoadoutItem.builder(ItemID.YEW_LOGS)
.amount(27)
.build();
LoadoutItem natures = LoadoutItem.builder(ItemID.NATURE_RUNE)
.amount(100)
.stackable(true) // omit to let ItemMetadataResolver decide from client metadata
.build();
LoadoutItem staff = LoadoutItem.builder(ItemID.STAFF_OF_FIRE)
.slot(EquipmentInventorySlot.WEAPON) // required for equipment loadouts
.build();
Builder fields: amount(int) (default 1), optional(boolean), noted(boolean),
stackable(boolean) (auto-resolved when unset), slot(EquipmentInventorySlot).
slot comes from net.runelite.api.EquipmentInventorySlot.