Talk:Active effect time imprecision bug

From the CreationKit Wiki
Revision as of 09:27, 3 March 2020 by imported>DavidJCobb (does this bug only affect the player?)
Jump to navigation Jump to search

Credit goes to meh321 for discovering the precise nature of the problem, and for providing me with the code offset that I needed to investigate further and get some more exact details on how the passage of in-game time relates to real-time effect durations. I realize the name of the article is kinda butt, but it's the only thing I could think of that's fully accurate, given that this bug isn't exclusive to abilities or conditions. DavidJCobb (talk) 2020-03-03T08:57:53 (EST)

Affected actors

After doing a bit more digging, I think only the player is affected?

ActiveEffect::AdvanceTime is called in the following places:

  • ActiveEffect::Subroutine00657160 (always passes zero as the time)
  • MagicTarget::sub00663DF0 (always passes zero as the time)
  • MagicTarget::AdvanceTime (passes its own argument)
    • This function is only called in four places. Two are player-exclusive; one is for "non-actor magic targets;" and the remainder is Actor::AdvanceTime, which passes its own argument.
      • Actor::AdvanceTime is only ever passed a non-zero value when it's called on the player.
  • call near 0x00667588 (always passes zero as the time)
  • ActiveEffect::Subroutine006675C0 (always passes zero as the time)

If ActiveEffect::AdvanceTime is told to pass zero seconds, then it forces conditions to be re-checked. If I'm not mistaken, this means that the only time it ever receives a non-zero value (i.e. the only time it might ever not re-check conditions) is when it's called on the player. This would suggest that the time imprecision bug only affects the player. Has anyone seen it affect abilities on an NPC? DavidJCobb (talk) 2020-03-03T09:27:04 (EST)