Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced Fatigue - Increased performance factor reduces stamina recovery rate. #6163

Closed
Coryf88 opened this issue Feb 22, 2018 · 14 comments · Fixed by #9714
Closed

Advanced Fatigue - Increased performance factor reduces stamina recovery rate. #6163

Coryf88 opened this issue Feb 22, 2018 · 14 comments · Fixed by #9714
Assignees
Labels
Milestone

Comments

@Coryf88
Copy link

Coryf88 commented Feb 22, 2018

Arma 3 Version: 1.80 (stable)
CBA Version: 3.6.1 (stable)
ACE3 Version: 3.12.0 (stable)

Mods:

- CBA_A3
- ace

Description:
Increasing performance factor reduces stamina recovery rate.

Performance factor increases the rate at which anFatigue recovers, however anReserve uses anFatigue ^ 2 as a multiplier. So, a higher performance factor also reduces the anReserve recovery rate.

Steps to reproduce:

  1. Take note of the amount of time it takes to recover stamina.
  2. Increase performance factor, repeat step 1.
  3. Observe increased stamina recovery time with a higher performance factor.

Where did the issue occur?
Dedicated / Self-Hosted Multiplayer / Editor (Singleplayer) / Editor (Multiplayer)

Placed Modules:
None

RPT log file:
N/A

@Coryf88 Coryf88 changed the title Advanced Fatigue - Stamina Recovery Advanced Fatigue - Increased performance factor reduces stamina recovery rate. Feb 22, 2018
@BaerMitUmlaut
Copy link
Member

According to the original documentation I think everything is correct here, though they mention (0.057 / GVAR(peakPower)) being a "constant". I'm wondering if it is actually a constant in the sense that it doesn't adjust to the peakPower, which results in the expected behaviour. I'll patch it like that for the next release.

@ulteq
Copy link
Contributor

ulteq commented Mar 23, 2018

Performance factor increases the rate at which anFatigue recovers

No. The performance factor decreases the rate at which anFatique increases.

@PabstMirror PabstMirror added this to the 3.12.2 milestone Apr 2, 2018
@PabstMirror PabstMirror modified the milestones: 3.12.2, 3.13.0 Apr 11, 2018
@PabstMirror PabstMirror modified the milestones: 3.13.0, Ongoing Nov 28, 2018
@NyteMyre
Copy link

NyteMyre commented Mar 8, 2021

Sorry for kicking up this 2 year old ticket, but last weekend I hosted a mission where i wanted to increase the stamina/recovery for the players since they had a lot of walking to do. So i set the following in ACE Advanced Fatigue options:

rd2nzh8yxrl61

In the debrief, people complained about having worse stamina than usual and that recovery seemed to take longer than before

@SekiAlpha
Copy link

Yeah, I noticed this as well however I thought it was intentional. Though this should be changed, atm I find it quite difficult to adjust stamina to what I want it.

@MicrosoftWord12
Copy link

Yeah I am getting the same as well. Anyone know a work around to this? Or the fix for that matter? Sorry for bringing it up again

@dedmen
Copy link
Contributor

dedmen commented May 18, 2021

That would also explain the Adv Fatigue issues I had since ever that I couldn't figure out.
My unit disabled Fatigue for a couple years now after trying multiple times and experiencing the same issues of basically no recovery every time.

@NyteMyre
Copy link

NyteMyre commented May 18, 2021

image

I did some very non-scientific testing with various settings, but I couldn't really find the issues that people were talking about. Even when i used the same settings i had in the mission, people shouldn't have ever reached 0% stamina as the recovery rate was faster than it would drain with running.

@WonderDeer
Copy link

WonderDeer commented May 24, 2021

There is definitely a bug of some sort is in here. I did some testing today and these are the results.

NOTE: any change in the performance factor only kicks in after mission restart while changes in recovery factor kick in immediately. Not knowing this might lead to false conclusions.

Tests were done in Eden editor with an AT rifleman.

Performance-1 / Recovery-1
Fully Deplete - 48s
Fully Recover - 120s

Performance-1 / Recovery-5
Fully deplete - 48s
Fully Recover 1st run - 54s
Fully Recover 2nd run - 26s
(for some reason the recovery time after one full deplete-recover cycle is much shorter. I don't know if this is intentional or not)

Performance-3 / Recovery-5
Fully deplete - 3m18s
Fully Recover - Stopped counting after 10 minutes when only the 4th out of the 5 bars was (almost) full. Must be taking about 20-25 mins to fully recover

It might happen that the recovery time normalizes after one full deplete-recover cycle like we saw above but it's practically impossible to do a full cycle. At least not with normal use cases. And we are still only at 3 performance factor. At 5 it's impossible to deplete the bars to test but it can easily take an hour or more to fully recover based on what I've seen so far.

This is definitely not how it's supposed to work.

@batydoo
Copy link

batydoo commented Jun 28, 2021

I have this issue too, keen for a fix.

@NoOneOfConsqnce
Copy link

Having the same issue as NyteMyre almost exactly.
I specifically noticed that when I loaded the mission in editor after our session locally I have enhanced performance for my settings - I can do a solid amount of exertion and it takes a concerted effort to reduce my max stamina.
However, my players and I when on the dedicated server suffer horrifically reduced maximum stamina with minimal exertion - no sprinting, weapons lowered, and some players are reduced to maximum 1-bar of stamina in less than an hour of play, including rests. Stamina also seemed to deplete much faster than in my local testing under all conditions.
Mostly anyone who is injured is significantly impacted, but even uninjured players do not align with the expected/tested on local performance.
(Just for clarity, mission settings are set to overwrite clients, too)

This is honestly a pretty massive issue. It makes the game borderline unplayable when stamina suffers from this bug. Zeus ACE Full Heal also doesn't alleviate the issue at all.

Given this was originally reported more than 3 years ago and is still/is again being reported, surely it needs to be something of a priority for patching?
If a long-term fix cannot be reached, how about a Zeus function like Full Heal but for stamina? At least that would allow the worst of the effects to be eliminated even if it requires regular application.

Sorry for the long post but hoping some of the added context might help narrow down the cause, and this is a pretty frustrating bug to suffer from.

@BaerMitUmlaut
Copy link
Member

This bug does not occur if you use default settings. I understand your frustration, but that's the most simple workaround for now. AF is not related to medical, so full heal doesn't do anything.

I agree that this issue should be fixed by now, but AF is quite complex code with a good chunk of math. It's really hard to find what's wrong.

@severgun
Copy link
Contributor

severgun commented Sep 25, 2021

It is hard to understand and debug this formulas. If i did python script correctly then I found some fun(not really) facts:
Script was set for 30kg unit and 3.89 velocity(regular run)

  1. Recovery factor should not be 0. Or you will end up without stamina.
  2. Recovery time after first run is much longer than all next runs because anFatigue not 0. WTF? (perf: 1, rec: 1, load: 1)
    So if you relax and drop anFatigue back to 0 that is worse than run after run after run.
    EXCEL_zSVBLLHkbk
  3. Seems like with some parameters anReserve formula can not hit value 2300. So you will never fully recover.
  4. Performance factor over 2.1 can lead to situation when full recovery of anReserve can not be achieved without extremely high recovery factor values.
perf rec
2,2 176
2,3 185
2,4 192
2,5 202
2,6 212
2,7 222
2,8 231
2,9 242
3 252
  1. With performance factor over 3.1 anReserve have 2 states. Never recover(with low recovery factor) or always at AN_MAXRESERVE (with high recovery factor)
  2. Performance factor 2.0 gives 150 sec of run time and require a lot of time to recover after first run (2300->0)
rec time to full
0,3 13250
0,5 8023
0,7 8023
1 4107
2 2150
3 1498
4 1172
5 977

So if there is no way to fix it I would suggest to at least hardcode limits and limit sliders or remove them at all.
perf 0-2
rec 0.1-5

Better would be to rewrite all math without reference to realism but to gameplay experience.
Actually there was alternative PR but I did not check it

@Quailsnap
Copy link

Quailsnap commented Oct 18, 2023

Strong hunch this is from ace_advanced_fatigue_ae2reserve draining and being unable to replenish anreserve. Some casual tests (details below) seem to confirm this. Can someone reproduce this issue and help verify?

Monitor:
ace_advanced_fatigue_anfatigue (0 -> 1)
ace_advanced_fatigue_anreserve (2300 -> 0)
ace_advanced_fatigue_ae1reserve (4e6 -> 0)
ace_advanced_fatigue_ae2reserve (84000 -> 0)

Casual testing with a soldier carrying 23kg up and down light hills on a performance factor of 5.0, other settings default, showed that the bar would be difficult to ever deplete, but when it did, it would take forever to refill. Monitoring the values revealed that ae2reserve had depleted while constantly refilling anreserve.

Am I missing something here?

Relevant code:
https://github.com/acemod/ACE3/blob/master/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf#L56
https://github.com/acemod/ACE3/blob/master/addons/advanced_fatigue/functions/fnc_mainLoop.sqf#L45

Running a PFH that constantly maxes ae1reserve, ae2reserve, and zeroes out muscledamage seems to make it so that anreserve always refills normally (in 1-2 min with perf factor 5.0, recovery 1.0).

[{
   ace_advanced_fatigue_ae1reserve = 4000000;
   ace_advanced_fatigue_ae2reserve = 84000;
   ace_advanced_fatigue_muscledamage = 0; 
},
180,
[]] call CBA_fnc_addPerFrameHandler;
  • Correction -- there's also a fundamental problem with ace_advanced_fatigue_anfatigue. anreserve refills faster if anfatigue is HIGH (close to 1), but a high performance factor seems to make anfatigue grow much slower, leaving players with an empty anreserve but a low anfatigue, causing anreserve to refill extremely slowly.

So, additionally:

[{
   ace_advanced_fatigue_anfatigue = 0.8; // 0.6 - 0.9, higher regenerates faster
},
1,
[]] call CBA_fnc_addPerFrameHandler;

@johnb432
Copy link
Contributor

See #9714.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.