diff --git a/CHANGELOG.md b/CHANGELOG.md index d4192d7..9587029 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,77 @@ All notable changes to Peril Dice will be documented in this file. +## [2.8.4] - 2025-09-14 + +### 🔍 **System-Wide Verbose Logging Toggle** +- **Universal Debug Control**: Implemented comprehensive verbose logging system across all 14 game modules + - **Owner Menu Integration**: Added "Toggle Verbose Logs" option in Troubleshooting menu for easy access + - **Real-Time Toggle**: Instantly enable/disable detailed debug messages without script restart + - **System-Wide Sync**: One toggle affects all modules simultaneously for consistent logging state + - **Modules Updated**: Main Controller, Game Manager, Floater Manager, Bot Manager, Roll Module, NumberPicker Handler, Message Handler, Game Calculator, System Debugger, Memory Controller, Scoreboard Manager, Leaderboard Communication, Dice Bridge + - **Clean Production Mode**: When disabled, only essential error messages and public announcements remain + - **Full Debug Visibility**: When enabled, shows internal operations, sync messages, state changes, and diagnostic info + +### 🔧 **Disconnect/Reconnect Recovery System** +- **Smart Player Return Detection**: Fixed major issue where disconnected players couldn't resume their turn + - **Issue**: Players who disconnected during number picking (like Nooser) would get wrong menu when returning + - **Before**: Disconnect → Return → Ready menu shown → Required kick to continue game + - **After**: Disconnect → Return → "Welcome back! Restoring your number picking dialog..." → Game continues normally +- **Enhanced State Recovery**: Automatic detection and repair of corrupted game state from disconnections + - Compares expected picker (from pick queue) with current picker state + - Automatically fixes `currentPicker` corruption when players reconnect + - Works for both number picking and dice rolling phases +- **Owner Emergency Recovery**: If game gets completely stuck, owner can touch board to force-resume +- **Debug Visibility**: Verbose logging shows state detection and recovery actions for troubleshooting + +### 🎯 **Number Picker Dialog Protection System** +- **Stale Dialog Prevention**: Enhanced dialog validation to prevent outdated number selections + - **Protection Against**: Players clicking cached dialog buttons after game state changed + - **Validation Layers**: Session validation, player validation, number availability checking + - **Smart Filtering**: Automatically rejects selections for numbers already picked by others +- **Enhanced Dialog Recovery**: Improved system for restoring number picking dialogs after disconnections +- **Session Management**: Better tracking of active dialog sessions to prevent conflicts + +### 🔍 **Number Detection & Shield Logic Fixes** +- **Fixed "Numbers Not Showing" Issue**: Resolved major bug where system couldn't see numbers players had picked + - **Issue**: Game would show "NO SHIELD!" even when players had actually picked the rolled number + - **Root Cause**: Pick data synchronization issues between modules causing invisible player selections + - **Solution**: Enhanced pick data validation and sync message reliability across all game modules + - **Impact**: Shield detection now works correctly - proper "PLOT TWIST!" and shield mechanics restored + +### 🛡️ **Game State Desynchronization Fixes** +- **Sync Message Reliability**: Fixed various state sync issues that could cause game confusion +- **Pick Queue Protection**: Enhanced pick queue management to prevent corruption during disconnections +- **Display Consistency**: Fixed cases where different parts of the system showed conflicting game state +- **Race Condition Prevention**: Added proper sequencing for state updates during player disconnections + +### 🐛 **Critical Bug Fixes** +- **LSL Syntax Corrections**: Fixed multiple mid-block variable declaration errors that prevented script compilation + - **Issue**: LSL doesn't support variable declarations in middle of code blocks + - **Fixed Files**: Main Controller, Floater Manager, Bot Manager, Roll Module, Game Manager, NumberPicker Handler, Message Handler, Game Calculator, System Debugger, Memory Controller, Leaderboard modules + - **Solution**: Replaced problematic ternary operators and mid-block declarations with proper conditional statements +- **Ternary Operator Removal**: LSL doesn't support `condition ? value1 : value2` syntax - converted to if/else statements +- **Compilation Success**: All scripts now compile without syntax errors + +### 🎮 **User Experience Improvements** +- **Seamless Reconnection**: Players can disconnect and return without disrupting game flow +- **Clear Status Messages**: Better feedback when verbose logging is toggled ("ENABLED"/"DISABLED" confirmations) +- **Graceful Recovery**: No more need to kick players just because they disconnected at wrong time +- **Owner Control**: Easy debug toggle access through familiar menu system + +### 🔬 **Developer Experience Enhancements** +- **Comprehensive Debug Coverage**: Every major system component now supports verbose logging +- **Consistent Logging Format**: Standardized debug message format across all modules +- **Real-Time Diagnostics**: Live visibility into game state, sync operations, and recovery actions +- **Troubleshooting Tools**: Enhanced ability to diagnose and fix game state issues + +### 🎯 **Impact Summary** +- **Before**: Player disconnections could break games, requiring kicks and manual intervention +- **After**: Players disconnect/reconnect seamlessly, games continue automatically +- **Debug Control**: One-click verbose logging for production vs development modes +- **Stability**: Major reduction in game-breaking state corruption issues +- **Developer Productivity**: Rich diagnostic information available on demand + ## [2.8.3] - 2025-09-01 ### 🚨 **CRITICAL BUG FIXES** - Major Game Logic Issues Resolved diff --git a/CHANGELOG_Notecard.txt b/CHANGELOG_Notecard.txt index e237996..a088e57 100644 --- a/CHANGELOG_Notecard.txt +++ b/CHANGELOG_Notecard.txt @@ -3,6 +3,74 @@ PERIL DICE CHANGELOG All notable changes to Peril Dice are documented in this file. +[2.8.4] - 2025-09-14 +==================== + +🚨 DISCONNECT RECOVERY & DEBUG SYSTEM + +🔍 SYSTEM-WIDE VERBOSE LOGGING TOGGLE +- Universal Debug Control: Implemented comprehensive verbose logging system across all 14 game modules + * Owner Menu Integration: Added "Toggle Verbose Logs" option in Troubleshooting menu for easy access + * Real-Time Toggle: Instantly enable/disable detailed debug messages without script restart + * System-Wide Sync: One toggle affects all modules simultaneously for consistent logging state + * Modules Updated: Main Controller, Game Manager, Floater Manager, Bot Manager, Roll Module, NumberPicker Handler, Message Handler, Game Calculator, System Debugger, Memory Controller, Scoreboard Manager, Leaderboard Communication, Dice Bridge + * Clean Production Mode: When disabled, only essential error messages and public announcements remain + * Full Debug Visibility: When enabled, shows internal operations, sync messages, state changes, and diagnostic info + +🔧 DISCONNECT/RECONNECT RECOVERY SYSTEM +- Smart Player Return Detection: Fixed major issue where disconnected players couldn't resume their turn + * Issue: Players who disconnected during number picking (like Nooser) would get wrong menu when returning + * Before: Disconnect → Return → Ready menu shown → Required kick to continue game + * After: Disconnect → Return → "Welcome back! Restoring your number picking dialog..." → Game continues normally +- Enhanced State Recovery: Automatic detection and repair of corrupted game state from disconnections + * Compares expected picker (from pick queue) with current picker state + * Automatically fixes currentPicker corruption when players reconnect + * Works for both number picking and dice rolling phases +- Owner Emergency Recovery: If game gets completely stuck, owner can touch board to force-resume +- Debug Visibility: Verbose logging shows state detection and recovery actions for troubleshooting + +🎯 NUMBER PICKER DIALOG PROTECTION SYSTEM +- Stale Dialog Prevention: Enhanced dialog validation to prevent outdated number selections + * Protection Against: Players clicking cached dialog buttons after game state changed + * Validation Layers: Session validation, player validation, number availability checking + * Smart Filtering: Automatically rejects selections for numbers already picked by others +- Enhanced Dialog Recovery: Improved system for restoring number picking dialogs after disconnections +- Session Management: Better tracking of active dialog sessions to prevent conflicts + +🔍 NUMBER DETECTION & SHIELD LOGIC FIXES +- Fixed "Numbers Not Showing" Issue: Resolved major bug where system couldn't see numbers players had picked + * Issue: Game would show "NO SHIELD!" even when players had actually picked the rolled number + * Root Cause: Pick data synchronization issues between modules causing invisible player selections + * Solution: Enhanced pick data validation and sync message reliability across all game modules + * Impact: Shield detection now works correctly - proper "PLOT TWIST!" and shield mechanics restored + +🛡️ GAME STATE DESYNCHRONIZATION FIXES +- Sync Message Reliability: Fixed various state sync issues that could cause game confusion +- Pick Queue Protection: Enhanced pick queue management to prevent corruption during disconnections +- Display Consistency: Fixed cases where different parts of the system showed conflicting game state +- Race Condition Prevention: Added proper sequencing for state updates during player disconnections + +🐛 CRITICAL BUG FIXES +- LSL Syntax Corrections: Fixed multiple mid-block variable declaration errors that prevented script compilation + * Issue: LSL doesn't support variable declarations in middle of code blocks + * Fixed Files: Main Controller, Floater Manager, Bot Manager, Roll Module, Game Manager, NumberPicker Handler, Message Handler, Game Calculator, System Debugger, Memory Controller, Leaderboard modules + * Solution: Replaced problematic ternary operators and mid-block declarations with proper conditional statements +- Ternary Operator Removal: LSL doesn't support condition ? value1 : value2 syntax - converted to if/else statements +- Compilation Success: All scripts now compile without syntax errors + +🎮 USER EXPERIENCE IMPROVEMENTS +- Seamless Reconnection: Players can disconnect and return without disrupting game flow +- Clear Status Messages: Better feedback when verbose logging is toggled ("ENABLED"/"DISABLED" confirmations) +- Graceful Recovery: No more need to kick players just because they disconnected at wrong time +- Owner Control: Easy debug toggle access through familiar menu system + +🎯 IMPACT SUMMARY +- Before: Player disconnections could break games, requiring kicks and manual intervention +- After: Players disconnect/reconnect seamlessly, games continue automatically +- Debug Control: One-click verbose logging for production vs development modes +- Stability: Major reduction in game-breaking state corruption issues +- Developer Productivity: Rich diagnostic information available on demand + [2.8.3] - 2025-09-01 ==================== diff --git a/README.md b/README.md index 45fc028..a0598f2 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # 🎲 Peril Dice — Professional Single Linkset Game System for Second Life **Created by Rebecca Nod and Noose the Bunny** -**Current Version: 2.8.3 - Critical Shield Detection & Initialization Fixes** +**Current Version: 2.8.4 - Disconnect Recovery & System-Wide Debug Control** ## Overview Peril Dice is a multiplayer elimination game where each player selects numbers before a die is rolled. If the peril player's number is rolled, they lose a life. Players are eliminated when they reach zero lives. -**🚨 NEW in v2.8.3**: **CRITICAL BUG FIXES** - Fixed major shield detection logic error causing incorrect "NO SHIELD!" messages when shields were actually provided, plus complete initialization system overhaul eliminating the need for manual script reset after rezzing. +**🚨 NEW in v2.8.4**: **DISCONNECT RECOVERY & DEBUG SYSTEM** - Revolutionary disconnect/reconnect recovery system eliminates need to kick players who disconnect during their turn, plus comprehensive system-wide verbose logging toggle for production vs development modes. + +**NEW in v2.8.3**: **CRITICAL BUG FIXES** - Fixed major shield detection logic error causing incorrect "NO SHIELD!" messages when shields were actually provided, plus complete initialization system overhaul eliminating the need for manual script reset after rezzing. **NEW in v2.8.2**: Fixed critical scoreboard spam bug caused by eliminated players, plus re-fixed peril status display on floaters and elimination heart updates to show 0 hearts before player removal. @@ -15,7 +17,74 @@ Peril Dice is a multiplayer elimination game where each player selects numbers b **NEW in v2.7.0**: Complete architectural overhaul featuring consolidated single linkset design (74 prims total) with bulletproof link message communication, eliminating all channel conflicts and deployment complexity. -## Major v2.8.3 Improvements 🚨 +## Major v2.8.4 Improvements 🚨 + +### 🔍 **System-Wide Verbose Logging Toggle** +- **One-Click Debug Control**: Comprehensive verbose logging system across all 14 game modules + - **Easy Access**: Added "Toggle Verbose Logs" in Owner Menu → Troubleshooting for instant access + - **Real-Time Toggle**: Enable/disable detailed debug messages instantly without script restart + - **Universal Sync**: One toggle affects all modules simultaneously for consistent logging state + - **Production Mode**: When disabled, only essential errors and public announcements shown + - **Development Mode**: When enabled, shows internal operations, sync messages, state changes, diagnostics +- **Complete Coverage**: Main Controller, Game Manager, Floater Manager, Bot Manager, Roll Module, NumberPicker Handler, Message Handler, Game Calculator, System Debugger, Memory Controller, Scoreboard Manager, Leaderboard Communication, Dice Bridge + +### 🔧 **Revolutionary Disconnect/Reconnect Recovery** +- **The Nooser Problem - SOLVED**: Fixed major issue where disconnected players broke games + - **Before**: Player disconnects during turn → Game stuck → Return shows wrong menu → Requires kick to continue + - **After**: Player disconnects during turn → Return automatically restores correct dialog → Game continues seamlessly +- **Smart State Recovery**: Automatic detection and repair of corrupted game state + - **Intelligent Detection**: Compares who SHOULD be picking with who system THINKS is picking + - **Auto-Repair**: Fixes `currentPicker` corruption when players reconnect + - **Universal Coverage**: Works for both number picking and dice rolling phases +- **"Welcome Back" Experience**: Clear feedback when players return ("Welcome back! Restoring your number picking dialog...") +- **Owner Emergency Recovery**: If game gets completely stuck, owner touch forces resume +- **No More Kicks**: Eliminates need to kick players just because they disconnected + +### 🎯 **Enhanced Dialog Protection System** +- **Stale Dialog Prevention**: Advanced validation prevents outdated number selections + - **Multi-Layer Protection**: Session validation, player validation, number availability checking + - **Smart Rejection**: Automatically blocks selections for numbers already picked by others + - **Race Condition Prevention**: Protects against players clicking cached dialog buttons after state changes +- **Improved Dialog Recovery**: Better system for restoring dialogs after disconnections +- **Session Management**: Enhanced tracking prevents dialog conflicts and confusion + +### 🔍 **Number Detection & Shield Logic Fixes** +- **Fixed "Numbers Not Showing" Issue**: Resolved major bug where system couldn't see numbers players had picked + - **Problem**: Game would show "NO SHIELD!" even when players had actually picked the rolled number + - **Root Cause**: Pick data synchronization issues between modules causing invisible player selections + - **Solution**: Enhanced pick data validation and sync message reliability across all game modules + - **Impact**: Shield detection now works correctly - proper "PLOT TWIST!" and shield mechanics restored + +### 🛡️ **Game State Stability Improvements** +- **Sync Message Reliability**: Fixed various state synchronization issues causing game confusion +- **Pick Queue Protection**: Enhanced management prevents corruption during disconnections +- **Display Consistency**: Fixed cases where different systems showed conflicting game state +- **Race Condition Prevention**: Proper sequencing for state updates during player disconnections + +### 🐛 **Critical Compilation Fixes** +- **LSL Syntax Corrections**: Fixed multiple script compilation errors + - **Issue**: Mid-block variable declarations and ternary operators not supported in LSL + - **Files Fixed**: All 14 game modules corrected for proper LSL syntax + - **Solution**: Converted problematic code to proper LSL conditional statements +- **100% Compilation Success**: All scripts now compile without errors + +### 🎮 **Seamless User Experience** +- **No More Game Breaking**: Player disconnections no longer disrupt game flow +- **Graceful Recovery**: Players return to exactly where they left off +- **Clear Feedback**: Status messages show when debug logging is toggled +- **Owner Control**: Easy debug access through familiar menu system +- **Professional Operation**: Clean, reliable gameplay for all participants + +### 📈 **Before vs After v2.8.4** +| **Before** | **After** | +|------------|----------| +| ❌ Player disconnects → Game breaks | ✅ Player disconnects → Returns seamlessly | +| ❌ Must kick disconnected players | ✅ Auto-recovery, no kicks needed | +| ❌ Debug info always on or always off | ✅ One-click verbose logging toggle | +| ❌ State corruption from disconnections | ✅ Automatic state detection and repair | +| ❌ Compilation errors in multiple scripts | ✅ All scripts compile successfully | + +## Major v2.8.3 Improvements ### 🛡️ **Shield Detection Logic - CRITICAL BUG FIX** - **MAJOR ISSUE FIXED**: Shield detection was incorrectly reporting "NO SHIELD!" when shields were actually provided diff --git a/README_Notecard.txt b/README_Notecard.txt index 8a69de2..f207355 100644 --- a/README_Notecard.txt +++ b/README_Notecard.txt @@ -2,12 +2,14 @@ ======================================================== CREATED BY REBECCA NOD AND NOOSE THE BUNNY -CURRENT VERSION: 2.8.3 - CRITICAL GAME LOGIC FIXES +CURRENT VERSION: 2.8.4 - DISCONNECT RECOVERY & DEBUG CONTROL OVERVIEW -------- Peril Dice is a multiplayer elimination game where each player selects numbers before a die is rolled. If the peril player's number is rolled, they lose a life. Players are eliminated when they reach zero lives. +NEW IN V2.8.4: Revolutionary disconnect/reconnect recovery system eliminates need to kick players who disconnect during their turn, plus comprehensive system-wide verbose logging toggle for production vs development modes. + NEW IN V2.8.3: Fixed critical shield detection bug that incorrectly reported "NO SHIELD!" when players had picked the rolled number, plus complete initialization system overhaul ensuring games are immediately playable after rezzing without manual script reset. KEY FEATURES @@ -92,6 +94,70 @@ Player Count | Dice Type 5–6 | d20 7–10 | d30 +RECENT IMPROVEMENTS (V2.8.4) +============================ + +🚨 DISCONNECT RECOVERY & DEBUG SYSTEM + +🔍 SYSTEM-WIDE VERBOSE LOGGING TOGGLE +- Universal Debug Control: Comprehensive verbose logging system across all 14 game modules +- Owner Menu Integration: Added "Toggle Verbose Logs" option in Troubleshooting menu +- Real-Time Toggle: Enable/disable detailed debug messages instantly without script restart +- Production Mode: When disabled, only essential errors and public announcements shown +- Development Mode: When enabled, shows internal operations, sync messages, diagnostics +- Complete Coverage: All major game components support unified debug control + +🔧 DISCONNECT/RECONNECT RECOVERY SYSTEM +- The Nooser Problem - SOLVED: Fixed major issue where disconnected players broke games + * Before: Player disconnects during turn → Game stuck → Return shows wrong menu → Requires kick + * After: Player disconnects during turn → Return automatically restores dialog → Continues seamlessly +- Smart State Recovery: Automatic detection and repair of corrupted game state + * Compares who SHOULD be picking with who system THINKS is picking + * Automatically fixes currentPicker corruption when players reconnect + * Works for both number picking and dice rolling phases +- "Welcome Back" Experience: Clear feedback when players return to active games +- Owner Emergency Recovery: If completely stuck, owner touch forces resume +- No More Kicks: Eliminates need to kick players just because they disconnected + +🎯 NUMBER PICKER DIALOG PROTECTION +- Stale Dialog Prevention: Enhanced validation prevents outdated number selections +- Multi-Layer Protection: Session validation, player validation, availability checking +- Smart Filtering: Automatically rejects numbers already picked by others +- Enhanced Dialog Recovery: Better system for restoring dialogs after disconnections + +🔍 NUMBER DETECTION & SHIELD LOGIC FIXES +- Fixed "Numbers Not Showing" Issue: Resolved major bug where system couldn't see numbers players had picked + * Problem: Game would show "NO SHIELD!" even when players had actually picked the rolled number + * Root Cause: Pick data synchronization issues between modules causing invisible player selections + * Solution: Enhanced pick data validation and sync message reliability across all game modules + * Impact: Shield detection now works correctly - proper "PLOT TWIST!" and shield mechanics restored + +🛡️ GAME STATE STABILITY IMPROVEMENTS +- Sync Message Reliability: Fixed state synchronization issues causing confusion +- Pick Queue Protection: Enhanced management prevents corruption during disconnections +- Display Consistency: Fixed conflicting game state between different systems +- Race Condition Prevention: Proper sequencing for state updates during disconnections + +🐛 CRITICAL BUG FIXES +- LSL Syntax Corrections: Fixed compilation errors in all 14 game modules +- Ternary Operator Removal: LSL doesn't support condition ? value1 : value2 syntax +- Mid-Block Variable Fix: LSL requires variable declarations at function/state start +- 100% Compilation Success: All scripts now compile without syntax errors + +🎮 USER EXPERIENCE REVOLUTION +- Seamless Reconnection: Players disconnect/return without disrupting game flow +- Graceful Recovery: Players return to exactly where they left off +- Clear Status Messages: Better feedback for debug logging toggle +- Owner Control: Easy debug access through familiar menu system +- Professional Operation: Clean, reliable gameplay for all participants + +📈 IMPACT SUMMARY +- Before: Player disconnections broke games, requiring kicks and manual intervention +- After: Players disconnect/reconnect seamlessly, games continue automatically +- Debug Control: One-click verbose logging for production vs development modes +- Stability: Major reduction in game-breaking state corruption issues +- Developer Productivity: Rich diagnostic information available on demand + RECENT IMPROVEMENTS (V2.8.3) ============================