🪶 Dev Log — 22 - Importer Overhaul
18–19 September 2025
Milestone: Phoenix Reset — Drag Logic Restored, HUD Modularized
✅ Core Fixes
Finalized and tested drag‑and‑drop logic across all inventory panels (gear panels now work via click methods).
Rebound InventoryItemInteraction for prefab obedience and runtime interactivity.
Patched InventorySlotUI to reinitialize dropped items with full drag/select logic.
Extended PlayerHUD (previously minimal) to include text fields and areas for all HUD sprites: condition icons, health, stamina, blood level, blood type, etc.
Modularized HUD fields into UI containers with interchangeable sprites.
Synced EnvironmentalPlayerStatsCalculator and GameSceneManager with the new HUD signature.
Added BloodLevel and BloodType accessors to PlayerStats (clamped setters, prefab‑safe defaults).
🧠Design Notes
Condition system now supports dual text + icon feedback.
Blood system prepared for decay, transfusion, and injury logic.
All systems prefab‑safe, runtime‑obedient, and aligned for future expansion.
🧪 Next Steps (Deferred)
Wire blood level decay and transfusion logic.
Expand condition severity overlays and icon tinting.
Auto‑fade HUD icons when conditions clear.
Modularize stat decay loops tied to environment and time.
🧱 Milestone: Liquid Archive Finalization
I had overlooked liquid items/containers outside the cooking/food categories (they were grouped with environmental liquid states). To resolve this, I split the database into two parts, converted the liquid items (inventory type) into JSON, and imported them via LiquidItemImporter.cs. Created LiquidItem.cs to hold the data, then generated .asset files for all items.
Objective: Finalize and prefab‑proof the full JSON archive of liquid items for runtime import via Unity’s JsonUtility. Ensure all entries are structurally valid, sprite‑ready, slot‑safe, and extensible.
✅ Tasks Completed
Format Correction → Rewrapped all entries inside { "items": [...] } to satisfy Unity’s parser.
Prefab‑Safe Field Injection → Applied consistent fields: spritePath, isReusable, isFillable, isStackable, maxStackSize, slotWidth, slotHeight, canBeBoiledForPurification, usedInCookingLiquid, etc.
Lore Integrity → Preserved IDs, display names, hydration values, toxicity profiles, and brand variants (Gremlin XP, Fecks, Sipsi, etc).
Manual Conversion → Converted C# LiquidEntry blocks to JSON, removed float suffixes (1f → 1.0), and cleaned trailing commas.
🧨 Issues
Unity parse failure on raw arrays.
Trust breakdown from earlier formatting mismatch.
Manual validation slowed progress and added grind fatigue.
🧠Lessons
Automate future conversions via editor tool/pipeline.
Consider sprite auto‑tagging and hydration lore injection.
Validate slot footprint logic across archive.
Optionally refactor LiquidType enum for subclassing.
Status: ✅ Archive complete | 🟡 Sprite paths pending | 🟡 Lore tags optional | 🟢 Ready for runtime import
🧱 Milestone: General Importer (Tag: Elephant)
🔧 What Was Built
GeneralItemImporter.cs — prefab‑safe, content‑routed importer for all item types.
Supports Unity + Newtonsoft JSON.
Flat folder output to Assets/ItemAssets/ZImportFolder.
Manual sprite assignment.
Debug tagging via Elephant.
Runtime routing by item content (not filename).
Graceful fallback for missing/malformed entries.
🧪 Test Item
Tool_MatchesBox routed correctly as ToolItem (box of matches).
Functions: Ignite, Firestarting, Cook.
isReusable = true, usageCount = 20.
Sprite path assigned, manual linking confirmed.
Importer auto‑wraps raw arrays, sanitizes filenames, creates folder structure if missing.
🧠Fixes
Replaced deprecated FindObjectsOfType with FindObjectsByType in SlotGridNudger.
Patched importer to route by content instead of filename.
Corrected JSON for matches (description, functions, flags).
Added usageCount for reusable consumables.
Resolved type mismatches (LiquidItem, MedicalItemAsset).
🧰 Modular Gains
Routing logic via CreateAssetByContent(JObject obj).
Validator hooks per item type.
Standardized debug tagging.
Flat folder output for manual sorting.
Firestarter logic extensible via functions, usageCount, isReusable.
🎨 Asset & Discord Progress
Added 30 new item sprites, linked to ScriptableObjects.
Cloud pipeline: generate off‑machine → download/sort → drop into Unity.
Began populating a new Discord server for future use.
Links to all Dev Logs included.
Created 10 modular channels (dev logs, bug reports, asset previews, lore drops, alpha feedback, etc.).
Preloaded with early Assets screenshots + Alpha 1.0 gameplay screenshots.
Server mirrors async philosophy: clear dev/player separation, prefab‑safe pinned onboarding.
Invite code will be added to future dev log , and likely placed into my dev.to profile for anyone interested to see some progress, give any ideas, or just have a lurk in the background.
Will continue with slow and steady progress.
Top comments (0)