Realistic_Stamina_System
by ViVi141
2.17.0
## [2.17.0] - 2026-01-20
### 新增
- **Python模拟器完整优化(Python Simulator Complete Optimization)**
- **地形因素影响系统**:
- 铺装路面(1.0x)、碎石路(1.1x)、高草丛(1.2x)、重度灌木丛(1.5x)、软沙地(1.8x)
- 地形影响因子直接作用于体力消耗率
- **环境因素影响系统**:
- 温度影响:基于时间段的热应激计算(10:00-18:00,正午14:00达到峰值)
- 风速影响:顺风减少消耗(最多10%),逆风增加消耗(最多5%)
- 表面湿度影响:湿地趴下时的恢复惩罚(15%)
- **动作成本计算系统**:
- 跳跃消耗:3.5%体力(单次),连续跳跃50%惩罚(2秒窗口)
- 攀爬消耗:1%/秒(持续攀爬)
- **特殊运动模式系统**:
- 游泳消耗:静态踩水(25W基础)+ 动态v³阻尼
- 静态站立消耗:Pandolf静态项(1.5·W_body + 2.0·(W_body + L)·(L/W_body)²)
- **高级修正模型系统**:
- Santee下坡修正:陡峭下坡(>15%)的修正系数(0.5-1.0)
- Givoni-Goldman跑步模型:高速跑步(>2.2 m/s)的能量消耗
- **战斗负重系统**:
- 战斗负重百分比计算(基于30kg阈值)
- 战斗负重阈值判断(超过30kg触发)
- **模拟器参数扩展**:
- 新增地形类型参数(terrain_type)
- 新增温度参数(temperature_celsius)
- 新增风速参数(wind_speed、is_tailwind)
- 新增表面湿度参数(surface_wetness)
- 新增姿态参数(is_prone)
- 新增时间参数(current_hour)
- 新增室内参数(is_indoor)
### 改进
- **模拟器函数签名更新**:
- `calculate_stamina_drain()`:新增8个环境参数
- `simulate_stamina_system()`:新增6个环境参数
- `plot_trends()`:新增6个环境参数
- `calculate_temperature_factor()`:新增热应激时间计算
- **测试用例扩展**:
- 示例1:Run模式,无负重,平地,铺装路面,正午
- 示例2:Run模式,无负重,平地,软沙地,正午
- 示例3:Run模式,无负重,平地,铺装路面,上午
- **测试结果验证**:
- 正午+铺装路面:体力降至50%需要7.86分钟
- 正午+软沙地:体力降至50%需要4.40分钟(地形影响显著)
- 上午+铺装路面:体力降至50%需要10.10分钟(热应激影响显著)
### 代码统计
- **simulate_stamina_system.py**:新增12个函数(约450行)
- `calculate_terrain_factor()` - 地形影响因子
- `calculate_temperature_factor()` - 温度影响因子(含热应激)
- `calculate_wind_factor()` - 风速影响因子
- `calculate_surface_wetness_factor()` - 表面湿度影响因子
- `calculate_jump_cost()` - 跳跃体力消耗
- `calculate_climb_cost()` - 攀爬体力消耗
- `calculate_static_standing_cost()` - 静态站立消耗
- `calculate_swimming_drain()` - 游泳体力消耗
- `calculate_santee_downhill_correction()` - Santee下坡修正
- `calculate_givoni_goldman_running()` - Givoni-Goldman跑步模型
- `calculate_combat_encumbrance_percent()` - 战斗负重百分比
- `is_over_combat_encumbrance()` - 战斗负重判断
## [2.17.0] - 2026-01-20
### Added
- **Python Simulator Complete Optimization**
- **Terrain Factor Influence System:**
- Paved road (1.0x), gravel road (1.1x), tall grass (1.2x), dense bushes (1.5x), soft sand (1.8x)
- Terrain influence factor directly affects stamina consumption rate
- **Environmental Factor Influence System:**
- Temperature influence: Heat stress calculation based on time period (10:00-18:00, peaking at 14:00)
- Wind speed influence: Tailwind reduces consumption (up to 10%), headwind increases consumption (up to 5%)
- Surface humidity influence: Recovery penalty when lying down on wet ground (15%)
- **Action Cost Calculation System:**
- Jumping consumption: 3.5% stamina (per jump), 50% penalty for consecutive jumps (2-second window)
- Climbing consumption: 1%/second (continuous climbing)
- **Special Movement Mode System:**
- Swimming consumption: Static treading water (25W base) + dynamic v³ damping
- Static standing consumption: Pandolf static term (1.5·W_body + 2.0·(W_body + L)·(L/W_body)²)
- **Advanced Correction Model System:**
- Santee downhill correction: Correction coefficient (0.5-1.0) for steep downhill slopes (>15%)
- Givoni-Goldman running model: Energy consumption for high-speed running (>2.2 m/s)
- **Combat Load System:**
- Combat load percentage calculation (based on 30kg threshold)
- Combat load threshold judgment (triggered when exceeding 30kg)
- **Simulator Parameter Expansion:**
- Added terrain type parameter (terrain_type)
- Added temperature parameter (temperature_celsius)
- Added wind speed parameters (wind_speed, is_tailwind) - Added surface wetness parameter (surface_wetness)
- Added posture parameter (is_prone)
- Added time parameter (current_hour)
- Added indoor parameter (is_indoor)
### Improvements
- **Simulator function signature updates:**
- `calculate_stamina_drain()`: Added 8 environmental parameters
- `simulate_stamina_system()`: Added 6 environmental parameters
- `plot_trends()`: Added 6 environmental parameters
- `calculate_temperature_factor()`: Added heat stress time calculation
- **Test case expansion:**
- Example 1: Run mode, no load, flat ground, paved surface, noon
- Example 2: Run mode, no load, flat ground, soft sand, noon
- Example 3: Run mode, no load, flat ground, paved surface, morning
- **Test result verification:**
- Noon + paved surface: Stamina drops to 50% in 7.86 minutes
- Noon + soft sand: Stamina drops to 50% in 4.40 minutes (terrain effect is significant)
- Morning + paved surface: Stamina drops to 50% in 10.10 minutes (heat stress effect is significant)
### Code Statistics
- **simulate_stamina_system.py**: Added 12 functions (approximately 450 lines)
- `calculate_terrain_factor()` - Terrain influence factor
- `calculate_temperature_factor()` - Temperature influence factor (including heat stress)
- `calculate_wind_factor()` - Wind speed influence factor
- `calculate_surface_wetness_factor()` - Surface wetness influence factor
- `calculate_jump_cost()` - Jumping stamina cost
- `calculate_climb_cost()` - Climbing stamina cost
- `calculate_static_standing_cost()` - Static standing cost
- `calculate_swimming_drain()` - Swimming stamina drain
- `calculate_santee_downhill_correction()` - Santee downhill correction
- `calculate_givoni_goldman_running()` - Givoni-Goldman running model
- `calculate_combat_encumbrance_percent()` - Calculates combat encumbrance percentage
`is_over_combat_encumbrance()` - Checks if combat encumbrance limit is exceeded- Game Version
- 1.6.0.108
- Created
- Mon, 19 Jan 2026 22:51:37 GMT
- Last Modified
- Mon, 19 Jan 2026 22:52:14 GMT
2.16.0
## [2.16.0] - 2026-01-20 ### 新增 - **休息时间累积修复(Rest Time Accumulation Fix)** - 修复时间单位错误:`GetWorldTime()` 返回毫秒,需要除以1000转换为秒 - 使用 idle 状态判断是否休息(静止时间 ≥ 1秒) - 避免速度波动导致休息时间频繁重置 - **虚拟气温曲线(Simulated Diurnal Temperature)** - 使用余弦函数模拟昼夜温度变化,峰值出现在 14:00 - 清晨(05:00):最低温 3°C - 正午(14:00):最高温 27°C - 基于虚拟气温计算热应激,而非固定时间段 - **热应激阈值优化(Heat Stress Threshold)** - 将热应激挂钩到阈值(26°C),而非线性时间(10:00-18:00) - 只有当虚拟气温超过 26°C 时,才开始计算热应激 - 倍数 = 1.0 + (虚拟气温 - 阈值) * 0.02 - **静态消耗优化(Static Consumption Optimization)** - 降低 `PANDOLF_STATIC_COEFF_1` 从 1.5 到 1.2(降低20%) - 降低 `PANDOLF_STATIC_COEFF_2` 从 2.0 到 1.6(降低20%) - 30KG站立总消耗从 0.000543/0.2s 降低到约 0.00035/0.2s - **跳跃和攀爬冷却拦截(Jump/Vault Cooldown Interception)** - 跳跃冷却:2秒冷却时间,冷却期间拦截跳跃输入 - 攀爬冷却:5秒冷却时间,冷却期间拦截攀爬输入 - 通过设置 `m_bJumpInputTriggered = false` 阻止游戏引擎执行动作 ### 改进 - **调试信息优化** - 更新环境因子调试信息,显示虚拟气温 - 格式:`虚拟气温=22°C | 热应激=1.0x | 降雨湿重=0kg | 风速=6.4m/s`## [2.16.0] - 2026-01-20 ### Added - **Rest Time Accumulation Fix** - Fixed time unit error: `GetWorldTime()` returns milliseconds, which needs to be divided by 1000 to convert to seconds. - Uses idle state to determine rest (stationary time ≥ 1 second). - Prevents frequent resetting of rest time due to speed fluctuations. - **Simulated Diurnal Temperature** - Uses a cosine function to simulate diurnal temperature changes, with the peak at 14:00. - Early morning (05:00): Minimum temperature 3°C - Noon (14:00): Maximum temperature 27°C - Calculates heat stress based on simulated temperature, not fixed time periods. - **Heat Stress Threshold Optimization** - Links heat stress to a threshold (26°C), rather than a linear time period (10:00-18:00). - Heat stress is only calculated when the simulated temperature exceeds 26°C. - Multiplier = 1.0 + (Simulated Temperature - Threshold) * 0.02 - **Static Consumption Optimization** - Reduced `PANDOLF_STATIC_COEFF_1` from 1.5 to 1.2 (20% reduction). - Reduced `PANDOLF_STATIC_COEFF_2` from 2.0 to 1.6 (20% reduction). - Total consumption for a 30KG standing person reduced from 0.000543/0.2s to approximately 0.00035/0.2s. - **Jump and Vault Cooldown Interception** - Jump cooldown: 2-second cooldown, jump input is intercepted during the cooldown period. - Vault cooldown: 5-second cooldown, vault input is intercepted during the cooldown period. - Prevents the game engine from executing the action by setting `m_bJumpInputTriggered = false`. ### Improved - **Debug Information Optimization** - Update environmental factor debugging information, displaying virtual temperature: - Format: `Virtual Temperature = 22°C | Heat Stress = 1.0x | Rainfall Wet Weight = 0kg | Wind Speed = 6.4m/s`
- Game Version
- 1.6.0.108
- Created
- Mon, 19 Jan 2026 22:16:42 GMT
- Last Modified
- Mon, 19 Jan 2026 22:17:27 GMT
2.15.0
- Game Version
- 1.6.0.108
- Created
- Mon, 19 Jan 2026 20:36:43 GMT
- Last Modified
- Mon, 19 Jan 2026 20:37:36 GMT
2.13.0
## [2.13.0] - 2026-01-19 ### Added - **Deep Physiological Suppression Recovery System** - Core Concept: Changed from "Net Increase" to "Metabolic Net Value" - Final Recovery Rate = (Base Recovery Rate × Posture Modifier) - (Load Suppression + Oxygen Debt Penalty) - **Recovery Cooldown (RECOVERY_COOLDOWN)** - The system completely stops processing recovery for 5 seconds after stopping exercise. - Medical Basis: In the first 10-15 seconds after stopping strenuous exercise, the body is in a state of extreme oxygen deficit. - Game Purpose: To eliminate the guerrilla-style gameplay of "running a few steps, stopping, and instantly recovering health." - **Static Load Penalty Mechanism for Recovery (LOAD_RECOVERY_PENALTY)** - Penalty Formula: Penalty = (Current Total Weight / Body Tolerance Baseline)^2 × 0.0004 - Test Results: - 0kg load: Standing recovery 4.2 minutes - 30kg load: Standing recovery 20.0 minutes (almost no recovery), prone recovery 0.6 minutes - 40kg load: Standing recovery 20.0 minutes (almost no recovery), prone recovery 0.7 minutes - Tactical Intent: To force heavy-armored soldiers to lie down (to offset the load penalty through posture bonuses). - **Marginal Effect Decay Mechanism (MARGINAL_DECAY)** - When stamina > 80%, Recovery Rate = Original Recovery Rate × (1.1 - Current Stamina Percentage) - Test Results: - Stamina below 80%: Recovery rate 0.86-1.13%/second - Stamina above 85%: Recovery rate 0.16-0.21%/second (approximately 20-25% of the original) - Tactical Intent: Players will often be in a "sub-healthy" state of 80%-90% stamina. - **Minimum Stamina Threshold Limit (MIN_RECOVERY_STAMINA_THRESHOLD)** - When stamina is <20%, recovery will only begin after remaining stationary for 10 seconds. - Test results: When stamina is <20% and rest time is <10 seconds, the recovery rate is 0. - Tactical intent: To prevent players from rapidly recovering stamina by "running a few steps and then stopping" when extremely fatigued. ### Improvements - **Comprehensive adjustment of recovery system parameters** - BASE_RECOVERY_RATE: 0.0005 → 0.0003 (Base recovery time extended from 6.6 minutes to 11 minutes) - RECOVERY_STARTUP_DELAY_SECONDS: 1.5 → 5.0 (Breathing difficulty period extended from 1.5 seconds to 5 seconds) - STANDING_RECOVERY_MULTIPLIER: 1.0 → 0.4 (Standing recovery efficiency reduced from 100% to 40%) - CROUCHING_RECOVERY_MULTIPLIER: 1.3 → 1.5 (Crouching recovery efficiency increased from 130% to 150%) - PRONE_RECOVERY_MULTIPLIER: 1.7 → 2.2 (Prone recovery efficiency increased from 170% to 220%) ### Technical Improvements - Implemented breathing difficulty period logic (minimum stamina threshold limit) - Implemented static penalty mechanism for weight on recovery (square penalty model) - Implemented diminishing marginal returns mechanism (recovery speed significantly reduced when stamina > 80%) - Implemented minimum stamina threshold limit (10 seconds of rest required when stamina < 20%) - Updated Python trend graph script to reflect new recovery parameters - Created a deep physiological suppression recovery system test script
- Game Version
- 1.6.0.108
- Created
- Mon, 19 Jan 2026 15:23:33 GMT
- Last Modified
- Mon, 19 Jan 2026 15:24:33 GMT
2.12.0
[2.12.0] - 2026-01-19 Added Comprehensive Debug Information System Added bilingual (English and Chinese) debug information output for all key functional modules. Vehicle Detection Debugging: Displays vehicle status and stamina recovery information. Speed Calculation Debugging: Outputs current speed information every 5 seconds. Exhaustion Status Debugging: Outputs prompts when entering/exiting the exhausted state. Jumping/Vaulting Debugging: Displays stamina consumption information. Stamina Consumption Parameter Debugging: Displays complete parameters such as type, speed, load, slope, terrain coefficient, posture, heat stress, efficiency, fatigue, and sprint multiplier. Stamina Recovery Debugging: Displays pre- and post-recovery status, recovery rate, rest time, and heat stress impact. EPOC Latency Debugging: Displays EPOC state changes. Indoor Detection Debugging: Displays indoor/outdoor status, number of hit points, and hit rate. Environmental Factor Debugging: Displays heat stress multiplier, rainfall wet weight, and rainfall status changes. Native System Interference Detection: Detects and warns of interference with the native stamina system. Improvements Optimized Debug Information Output Frequency Most debug information is limited to outputting once every 5 seconds to avoid excessive logs. Immediate output when state changes occur (e.g., exhaustion, EPOC, rainfall, etc.). Balanced the completeness of debug information and the readability of logs. Extended Debug Display Module All formatting functions in the SCR_DebugDisplay.c module support bilingual (English and Chinese) output. Slope information, sprint information, and status information uniformly use bilingual (English and Chinese) format. Improved internationalization support. Technical Improvements Implemented a comprehensive debug information output system. Unified debug information format (bilingual English and Chinese). Optimized debug information output frequency mechanism. Enhanced system observability and troubleshooting capabilities.
- Game Version
- 1.6.0.108
- Created
- Mon, 19 Jan 2026 13:32:06 GMT
- Last Modified
- Mon, 19 Jan 2026 13:32:59 GMT
2.11.0
- Game Version
- 1.6.0.108
- Created
- Mon, 19 Jan 2026 10:23:38 GMT
- Last Modified
- Mon, 19 Jan 2026 10:24:16 GMT
Showing 1 to 6 of 6 results
Rows per page
Showing 1 to 6 of 6 results
Rows per page