🧱 Dev Log: The Vulture Binding — Loot System Resurrection
📅 Sept–Oct 2025
🔹 Phase 1: Gear Registry Ritual & Archetype Injection Fix
📅 28 Sept 2025
🔧 Technical Milestones
✅ GearRegistryPopulator Refactor
Overwrites duplicates based on ItemID
Scans all gear assets in Assets/GearAssets
Replaces outdated entries with updated versions
Logs additions and overwrites for traceability
Menu item confirmed: Tools → Populate Gear Registry
✅ GameSceneManager Archetype Injection Fix
Removed invalid GetComponent() call
Injected via PlayerProfile.Instance.selectedArchetype
Restored prefab-safe gear injection flow
Confirmed runtime obedience in InjectStartingGear() coroutine
HUD sync and stat mutation confirmed post-injection
🧙♂️ Mythic Checkpoints
🧿 “Registry Reforged” — Gear database now overwrites echoes
🧬 “Archetype Obeys” — Injection path restored via persistent memory
🧱 “Prefab Integrity Confirmed” — No nulls, no ghosts
🧠 “Tools Tab Ritual” — Gear registry now summoned via top-level menu
🔹 Phase 2: Survival Consumption System Integration
📅 29 Sept 2025
✅ Completed Tasks
InventoryItem Schema Expansion
Added: healthRestore, staminaRestore, hungerRestore, hydrationRestore
Added: diseaseChance, diseaseID
Added: IsLiquid, IsReusableContainer, IsEmpty
PlayerStats.cs
Added ConsumeInventoryItem() method
Handles stat restoration, disease rolls, item disposal, HUD sync
Supports food, liquid, and reusable containers
PlayerInventoryManager.cs
Injects full InventoryItem data from IInjectableItem
Added RemoveItem() for runtime disposal
Refactored slot injection to support new fields
IInjectableItem.cs Interface
Added getters for survival stats, disease logic, liquid/container flags
Ensures prefab-safe injection and runtime compatibility
HUD Sync
Confirmed via OnStatsChanged
No changes needed to PlayerHUD.cs
🧠 Next Steps
Patch all missing IInjectableItem implementations
Add survival stat logic to all relevant item scripts
Validate runtime consumption across food, drink, and cursed relics
Log shrine unlocks and survivor notes triggered by consumption events
🔹 Phase 3: Inventory Logic & Asset Injection
📅 30 Sept 2025
✅ Completed Tasks
- Inventory Slot Refresh Ritual
Issue: Consumed items remained visible until inventory closed
Fix: RemoveItem() now calls InitializeInventory() immediately
Removed redundant refresh logic from PlayerStats.ConsumeInventoryItem()
Guarantees full grid rebuild and instant feedback
- Stat Effect Application + Disease Roll
Items apply survival stat effects on use
Disease chance roll triggers on consumption
Raw/suspicious items can apply conditions
Roll logic integrated into ApplyInjectableItem() and condition system
Items disappear after use—no infinite reuse
- Debug Tag Refactor
Replaced all [Dragon] tags with [Unicorn]
Ensures consistent traceability and schema clarity
- Slot-Level Trace Injection
Added [Unicorn] ⚠️ InitializeInventory() called — trace source.
Confirmed slot clearing and prefab obedience
🍖 Meat Tier Expansion
Added/Readjusted raw/cooked variants: boar, deer, human, fish
Added/Readjusted: meat_dried_generic, meat_burnt_generic
All assets implement IInjectableItem
Verified for prefab compatibility
Injected via InjectStartingItemsIntoLegs() and manual testing
Human meat accepted—cannibal tier unlocked
🧠 Observations & Ritual Learnings
Slot refresh must be centralized
Canvas.ForceUpdateCanvases() is insufficient
Full grid rebuild is the only reliable method
Disease roll adds meaningful risk
Item consumption now feels final, no ghosts, no confusion.
🔹 Phase 4: Loot System Resurrection
📅 Oct 2025
🔧 Phase 1: Core Schema Expansion
StoryNode.cs
Added List lootContainers
Enables dynamic scavenging UI per narrative beat
Supports time/faction/biome-based injection
LootContainerProfile.cs added.
🔧 Phase 2: UI Injection & Runtime Panel Management
LootPanelManager.cs
Refactored for tabbed injection (up to 3 panels)
lootPanels[], tabButtons[], tabLabels[] wired
InitializePanels(), ActivatePanel(), ClearAllPanels() confirmed
Proxy methods added: PopulateLootPanel(), ClearPanel()
🔧 Phase 3: Individual Panel Logic
LootPanel.cs
Handles slot injection and label display
Registry-driven binding via IInjectableItem
Slot visibility logic added—only occupied slots are active
Zebra logs confirm icon presence and slot activation
LootSlot.cs
Interface-driven binding
PopulateSlot(IInjectableItem)
ClearSlot()
Debug trace confirms prefab obedience
🔧 Phase 4: Node Loader Integration
StoryNodeLoader.cs
Injects loot containers at runtime
Iterates containers, injects label + item IDs
Activates relevant panels, clears unused
Compatible with legacy and tabbed systems
🔧 Phase 5: Schema Purity & Conflict Resolution
Removed mistakenly duplicated LootContainerProfile
Resolved [System.Serializable] duplication
Eliminated namespace conflicts
Ensured prefab-safe references across all scripts
🧪 Trial & Error Timeline
Step Status Notes
Initial injection ✅ Node injection confirmed via debug log
Panel activation ✅ Label and tab UI confirmed
Slot population ✅
Registry lookup and icon binding confirmed
Registry integration ✅
Replaced prefab-based loading with unified registry
Debug trace coverage ✅ Zebra bus added to all critical systems
Prefab independence ✅ No reliance on Resources.Load
Schema obedience ✅ All items now registry-faithful
🏁 Outcome
Loot system now fully operational
Registry-driven, prefab-safe, extensible
Supports 1324 injectable assets
UI panels dynamically bind story-driven containers
Debug trace confirms every step
System sealed as The Vulture Binding
🧠 Lessons & Rituals
Prefab silence is schema betrayal — always trace references
Registry-first logic is mandatory — prefab loading is legacy
Debug buses are shrine gates — every log is a memory echo
Slot clearing is a symptom, not a solution — trace the breach, not the symptom
The loot system now reads directly from the story node activated, inside of the main game scene, and then shows lootable items in the vicinity directly inside of loot panels, inside of the player inventory canvas.
This makes for quick and easy looting per story node, directly inside of the player inventory screen.
Fully reactive to every possible story node, had a nightmare wiring all of this together , but now it is finally working as intended..
Next step to add , interactivity to the appearing loot items to make them either draggable directly to player inventory slots, or with a click method , or possibly both. Once this is complete, need to add a crafting/recipe grid where items can be combined together to make new items or recipes and then the player inventory system will be very close to being 100% completed.
Good yet slow progress, but it is all coming together.
Top comments (0)