DEV Community

John
John

Posted on

Dev Log 26 - Weather System Overhaul

🧭 Dev Log β€” Weather System Overhaul & Survival Cost Integration

Focus: Weather logic expansion, sprite integration, and metabolic survival cost system

🌦 Weather System Overhaul
πŸ”§ EnvironmentManager.cs

Added missing weather types: Wind, Fog, Hail, Storm

Refactored ambient temperature logic to reflect wind chill and seasonal modifiers

Replaced raw season strings with SeasonType enum

Integrated Enum.TryParse for safe conversion

Fallback to SeasonType.Summer if parsing fails

Confirmed prefab-safe access to ZoneWeatherProfile and dynamic weather resolution

Added manual override via SetWeather(WeatherType newWeather)

Logged resolved weather per node and zone for debugging

🧠 WeatherTypeConverter.cs

Added fallback logic to default to WeatherType.Clear if JSON parsing fails

Ensured compatibility with Survival.Environment namespace

πŸ–ΌοΈ Sprite Integration
Scaled weather icons manually using OG Microsoft Paint

Confirmed visual clarity and sizing for HUD overlays

Assigned backgroundImageID to story nodes for visual transitions

Verified sprite alignment with weather types: fog, rain, sunshine, snow, etc.

πŸ“œ Story System Expansion & Reformat
πŸ”§ StoryNode.cs

Extended Outcome with:

actionType (e.g. "climb", "walk", "rest")

terrainType (e.g. "ridge", "shoreline", "snow")

gearChecks (e.g. "bareFeet", "outerFeetEquipped")

Optional overrides: staminaCost, hydrationCost, hungerCost

πŸ”§ StoryNodeLoader.cs

Hooked SurvivalCostResolver.ApplyDynamicCost(...) into ResolveOutcome

Applied survival cost after conditions and playerStates

Synced HUD after stat drain

Preserved weather resolution, time advancement, and variant matching logic

Confirmed prefab-safe integration with EnvironmentManager, PlayerStats, and GameSceneManager

πŸ§ͺ Survival Cost System
πŸ”§ PlayerStats.cs

Added ApplyStoryNodeCost(...) for dynamic stat drain

Integrated ReduceStamina, ReduceHydration, ReduceHunger with clamped values

Confirmed prefab-safe access to gear traits and slot checks

Extended trait-aware condition logic (HasCondition, HasTag)

Finalized gear slot helpers for waterproof, gas-resistant, and thermal checks

🧠 SurvivalCostResolver.cs (New)

Created modular resolver for dynamic survival cost

Calculates drain based on:

Action type

Terrain type

Gear penalties (missing traits)

Disease and Condition status

Manual overrides if defined

Logs final cost breakdown for debugging

🧠 Narrative Integration
Node node_0001 now supports:

Multiple outcomes with terrain, gear, and action tags

Dynamic stat drain based on barefoot climbing, fog walking, and gear-equipped movement

Weather-aware variants and condition triggers

Visual transitions via backgroundImageID

βœ… All Errors Resolved
SurvivalCostResolver not found β†’ added new script

ApplyStoryNodeCost missing β†’ added to PlayerStats

WeatherType parsing errors β†’ fixed via WeatherTypeConverter

Season string mismatch β†’ resolved via Enum.TryParse

Sprite scaling β†’ manually adjusted in Paint and confirmed in HUD

🧠 Dev Log β€” Disease System Refactor
Milestone: Modular Disease System Phase 1 Complete

βœ… Completed Changes

  1. Modular Data Structure

Refactored DiseaseAndInjuryData.cs to support:

HUD icons (Sprite hudIcon)

Stat drain modifiers (stamina, hydration, hunger, movement)

Progression chains, treatment hooks, suppression/prevention logic

Linked conditions and lore tags

  1. Runtime Manager Upgrade

DiseaseAndInjuryManager.cs now:

Pulls stat drain from disease + stage

Applies linked conditions automatically

Supports HUD icon retrieval

Logs all actions with [Impala] tags

  1. Active Disease Resolver

ActiveDiseaseAndInjury.cs now:

Resolves stat drain, movement penalty, and HUD icon

Checks for treatment, suppression, and prevention items

Exposes linked conditions and progression metadata

  1. Importer Pipeline

Refactored the generalimported into a solid universal importer

Read from Assets/StreamingAssets/Data/.... all json types

Created and expanded more assets in Assets/DiseaseAssets , Environmental Objects , Fish Assets.

Patch all fields including symptom stages, visual/audio cues, and icons

Log imports with [Impala] for traceability

Environmental objects now showing correct data sets, and have available fish assets able to be fished from water sources.

πŸ”§ Technical Milestones

βœ… GameSceneManager Purged & Rebuilt: Cleaned and rebuilt GameSceneManager.cs, resolving ambiguity, removing duplicate classes, and injecting test mutation logic.

βœ… PlayerStats Refactored: Fully modular, prefab-safe, and runtime-obedient. All stat mutation and restoration methods now trigger HUD sync.

βœ… Namespace Collision Resolved: Discovered 150+ compiler errors caused by duplicate scripts across Assets/Scripts/InGame. Purged the infestation.

βœ… SurvivalCostResolver Pipeline Confirmed: Mutation logic now flows from story node β†’ outcome β†’ stat impact β†’ HUD sync.

βœ… Runtime Truth Restored: Injected test mutations. HUD displayed correct values. Tooltip now full integrated and updated No crash. No silence. System obeyed.

🧠 Dev Log β€” Tooltip Revival & GearSlotUI Sync
Date: 28 Sept 2025
Focus: GearSlotUI restoration, tooltip expansion, and prefab-safe field injection

🧰 GearSlotUI Restoration
Refactored GearSlotUI.cs to support expanded field mapping

Injected runtime-safe bindings for equipped gear across all slot panels

Confirmed prefab integrity and slot visibility for all valid gear items

Verified injection logic with debug trace: no nulls, no skips, no ghosts

🧠 Tooltip Box Expansion
Rebuilt tooltip panel to support 7–8 new fields, including:

Armour

Thermal rating

Slot count

Weight

Durability

Rarity

Condition

Achieved full prefab-safe rendering across all equipped gear

Tooltip now dynamically reflects item stats and lore

Verified clarity and alignment across HUD overlays

πŸ–ΌοΈ Visual Confirmation
Tooltip box renders beautifully across all gear slots

Denim whispers, apples sparkle, and relics speak

No ceremony. Just runtime truth and modular obedience

🧠 Runtime Notes
All gear items now show correctly in slot panels

Tooltip logic confirmed across 154 slots

No filtering errors, no prefab breaks, no injection failures

HUD obeys. Tooltip sings. Grind rewarded.

Top comments (0)