Mining System Dev Updates

Mining System V2 Update: 11/11/2025
Focus: Smelting Configuration โ€ข Debug Logging โ€ข Consumable System ๐ŸŽ‰ Major Features - Configurable smelt times for 8 ore types (FurnaceTimes in FMS_Crafting.json) - Furnace now auto-adjusts smelt timing to fastest loaded ore - Two-tier logging system (Normal + Debug with EnableDebug toggle) - Consumable locking & depletion (Propane, Wheel, Hammer) ๐Ÿ› ๏ธ Enhancements - Improved logging (debug tier includes craft comparisons, depletion, timestamps) - Cleaner logs with consistent formatting + new FreezeMiningDebug logs - Refined config architecture: 3 new settings in FMS_Settings.json ๐Ÿ”ง Technical Changes - New server architecture methods: ScheduleNextSmelt, per-recipe state control - Slot locking logic ensures no mid-craft item removals - Improved recipe validation (CanDo/Do, consumables, state sync) - All configs restructured; ingots moved to AnvilTimes ๐Ÿ“š Documentation - Added README.md, SETTINGS.md, CHANGELOG.md, examples & troubleshooting guide โš ๏ธ Breaking Changes - Config structure changed (FurnaceTimes now uses SmeltXXX) - Legacy configs must be updated or deleted for regeneration - Debug logging now off by default ๐Ÿ”„ Migration Notes - Delete old FMS_Crafting.json; retain and update FMS_Settings.json with: "EnableDebug": 0, "PropaneCanisterUsage": 1.0, "GrindingWheelUsage": 1.0, "AnvilHammerDamage": 0.5 - Restart server, validate each crafting station, tune timers Full change log: Major Features Added Configurable Furnace Smelt Times Added individual smelt time configuration for all 8 ore types Furnace now uses the fastest loaded ore's smelt time New FurnaceTimes section in FMS_Crafting.json: SmeltStone, SmeltCopper, SmeltGold, SmeltSilver SmeltTin, SmeltIron, SmeltSulphur, SmeltUranium Each ore type can have different smelting durations Furnace automatically reschedules based on loaded ores Two-Tier Logging System Normal Logs (EnableLogs): Server startup and initialization Config loading summaries Critical errors and player connections Debug Logs (EnableDebug): Craft time comparisons (Config vs Actual) Consumable depletion details (hammer, wheel, propane) Furnace state changes and ore processing Individual crafting events with timestamps Debug logs are SERVER-ONLY (client never creates debug logs) Added EnableDebug setting to FMS_Settings.json Enhanced Player Prevention Protection Implemented slot locking on all crafting stations Furnace: Propane canister + pipe locked when furnace is on Grinding Stone: Grinding wheel locked during gem cutting Anvil: Hammer locked during forging Prevents item removal during active crafting Server-authoritative state management with network sync Consumable Management System Furnace: Requires propane canister (quantity-based) + propane pipe Configurable depletion rate: PropaneCanisterUsage Auto-shutdown when propane depleted Grinding Stone: Requires grinding wheel (quantity-based) Configurable depletion rate: GrindingWheelUsage Depletes per gem cut Anvil: Requires blacksmith hammer (durability-based) Configurable damage rate: AnvilHammerDamage Hammer becomes ruined when health reaches 0 โœจ Improvements Logging Enhancements Moved repetitive logs to debug tier: Hammer damage logs (previously spammed normal logs) Grinding wheel depletion Propane canister depletion Furnace auto-shutdown events Added config vs actual time tracking for all recipes Improved log formatting with consistent prefixes Separate debug log files: FreezeMiningDebug_*.log Code Cleanup Removed all legacy CONFIG_PATH constants from gem recipes Deleted unused GemCuttingConfig class from Jade recipe Consolidated all settings into single FMS_Settings.json Removed duplicate client-side config files Improved code consistency across all recipes Configuration Added 3 new settings to FMS_Settings.json: EnableDebug - Toggle debug logging PropaneCanisterUsage - Furnace fuel consumption rate GrindingWheelUsage - Grinding wheel depletion rate AnvilHammerDamage - Hammer damage per craft Reorganized FMS_Crafting.json: Moved ingot recipes from FurnaceTimes to AnvilTimes Added FurnaceTimes for ore smelting (SmeltXXX recipes) All 58+ recipes now properly categorized ๐Ÿ› Bug Fixes Recipe Logic Fixed Sulphur Powder recipe backwards logic (was checking for empty anvil slot) Fixed Adamantite bar recipe incorrect ingredient check Corrected all anvil recipes to properly validate hammer presence Fixed ingot crafting not appearing when hammer attached Consumable Checks Fixed hammer health check using IsRuined() instead of GetHealth() > 0 Corrected propane setup validation in furnace activation Fixed grinding wheel quantity checks in gem recipes Configuration Fixed config file references (removed legacy paths) Corrected recipe naming in default config generation Fixed FurnaceTimes section (was listing ingots, now lists ores) ๐Ÿ”ง Technical Changes Server Architecture Implemented ScheduleNextSmelt() for dynamic furnace timing Added per-recipe consumable management methods Network synchronized crafting states (m_FurnaceState, m_IsGrinding, m_IsForging) Server-side state validation for all crafting actions Recipe System All recipes now include: Prerequisite checks (CanDo()) Server-side state management (Do()) Debug logging with config validation Slot locking during crafting Consumable depletion/damage Added 6 ingot recipes to anvil system Added 8 gem recipes to grinding stone system Added 1 general recipe (sulphur powder) to anvil system Logging Infrastructure Separate log file streams for normal and debug logs Server-only debug log creation (client check added) Automatic log cleanup respects both log types Improved timestamp parsing for log retention ๐Ÿ“š Documentation Created comprehensive README.md with features, installation, quick start Added complete SETTINGS.md with all configuration options explained Created CHANGELOG.md (this file) with detailed version history Added configuration examples and recommended settings Included troubleshooting guide for common issues โš ๏ธ Breaking Changes FMS_Crafting.json structure changed: Ingot recipes moved from FurnaceTimes to AnvilTimes FurnaceTimes now uses SmeltXXX naming convention Old configs will need regeneration or manual update Debug logging now requires explicit enable in settings Client-side legacy config files removed (GemCuttingConfig.json, settings.json) ๐Ÿ”„ Migration Notes From V2.0 to V2.1: Backup your existing config files Delete old configs (will regenerate with new structure): profiles/FreezeMining/Mining/FMS_Crafting.json Keep your FMS_Settings.json (add new settings manually): "EnableDebug": 0, "PropaneCanisterUsage": 1.0, "GrindingWheelUsage": 1.0, "AnvilHammerDamage": 0.5 Restart server to generate new configs Test all crafting stations thoroughly Adjust timers as needed
Mining System Dev Update: 03/11/2025
Focus: Configurable Crafting โ€ข Slot Locking โ€ข Debug Logging Major Additions - Configurable Furnace Smelt Times - New FurnaceTimes section in FMS_Crafting.json - Each ore type (Stone, Copper, Gold, Silver, Tin, Iron, Sulphur, Uranium) now has its own smelt duration. - Furnace automatically adjusts timing based on loaded ores. Two-Tier Logging System - Normal Logs: Startup, config loads, errors, player connections - Debug Logs: Craft time checks, item depletion, furnace state changes - Controlled via new EnableDebug setting in FMS_Settings.json - Debug logs are server-only Slot Locking System - All crafting stations now lock consumable slots during crafting - Furnace: Propane + pipe locked - Grinding Stone: Wheel locked - Anvil: Hammer locked - Prevents removal mid-craft and ensures full server authority Consumable Management System - Furnace: Propane usage + auto shutdown on depletion - Grinding Stone: Wheel quantity depletion - Anvil: Hammer durability loss (ruins at 0 health) - All rates configurable in FMS_Settings.json Improvements & Fixes - Moved spammy logs to debug tier - Unified all recipe checks and timing logic - Fixed multiple recipe validation issues (Sulphur Powder, Adamantite, etc.) - Cleaned up unused configs and legacy paths - Added per-craft logging with consistent formatting Technical & Config Changes - New settings in FMS_Settings.json: EnableDebug, PropaneCanisterUsage, GrindingWheelUsage, AnvilHammerDamage - FMS_Crafting.json restructured โ€” ores moved to FurnaceTimes, ingots moved to AnvilTimes - Server architecture updated for dynamic smelt scheduling and state sync
Mining System Dev Update: 31/10/2025
Focus: Code Structure โ€ข Crafting System โ€ข Maintainability ๐Ÿงฑ Major Overhaul - Complete file + class renaming using FMS_ prefix - Fully reorganized folder structure to modern DayZ standards - Split monolithic code into logical modules for clarity โš™๏ธ New Crafting Time System - Server-controlled crafting durations via new FMS_Crafting.json - Configurable per recipe (real seconds) - RPC-synced crafting times (server โ†’ client) - Formula: 1 real sec = 0.25 animation units ๐Ÿช“ Recipe & Bug Fixes - Fixed all CallLater timing bugs (7 recipes affected) - Fixed early item drops + animation desyncs - Unified all recipe logic (58 recipes updated) ๐Ÿงฉ File & Structure Changes - Added Static.c for global variables - Renamed & organized 47 files total - Added new config: FMS_Crafting.json - Assets now organized under /FMS_Data/ โšก Performance & Quality - Centralized crafting lookups via global map - Single server config load (cached in memory) - O(1) access for recipe times - Better naming, documentation, and maintainability
Mining System Dev Update: 30/10/2025
Focus: Stability โ€ข Performance โ€ข Architecture Cleanup ๐Ÿงฉ Core Fixes - Eliminated client crash loop caused by ~2,520 checks/sec (60 FPS ร— 42 calls) - Removed all frame-based config loading from ActionCondition + OnActionInfoUpdate - Client no longer loads or writes config files (server-only responsibility) - Stripped redundant GetGame().IsClient() || !GetGame().IsMultiplayer() checks โš™๏ธ Config Architecture - Server loads once from $profile:FreezeMining/Mining/FMS_Probabilities.json - Config pushed to clients via RPC โ†’ stored in global g_FreezeMiningClientConfig - All file ops gated behind if (GetGame().IsServer()) - FreezeCraftingSettings + GemCuttingConfig merged into unified FMS_Settings.json - All configs renamed with FMS_ prefix and relocated to Mining/ ๐Ÿชต Spawn Manager (NEW) - FreezeSpawnManager handles node spawns server-side - Config: FMS_SpawnManager.json (16 node types) - Supports randomized counts, respawn timers, ยฑ2 m variance - Tracks depletion and auto-respawns after delay ๐Ÿชจ Vanilla Rock System (NEW) - Added FreezeVanillaRockConfig + FMS_VanillaRock.json - Controlled via EnableVanillaRockMining in settings - Separate probability logic for 17 vanilla items ๐Ÿงพ Logging - Timestamped logs (FreezeMining_YYYY_MM_DD_HH_MM_SS.log) in /Logs/ - Configurable EnableLogs + KeepLogDays (default = 7) - Auto-cleanup on restart ๐Ÿง  Client Optimization - Simplified all checks โ†’ !GetGame().IsDedicatedServer() - Removed redundant config loaders, cached vars, and CallLater sound logic - Client now only handles RPC data + visuals ๐Ÿ”ง File Changes - Total: 28 files - Includes: freezspawnmanager.c, vanillarockconfig.c, LoggingUtility.c, all recipe + placement kit updates - All sound operations simplified with null checks and unified logic โšก Performance Impact - Client checks: ~2,520/sec โ†’ ~0/sec - Client I/O: Removed - Server-only ops: Implemented - Memory & CPU usage: Significantly reduced (~85โ€“90% gain)