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

[MoM] Metabolic Hyperefficiency causes major lag spikes with higher intelligence #72781

Closed
MoonlightKitty26 opened this issue Apr 1, 2024 · 9 comments · Fixed by #73591
Closed
Assignees
Labels
EOC: Effects On Condition Anything concerning Effects On Condition Mechanics: Character / Player Character / Player mechanics Mods: Mind Over Matter Mods Issues related to mods or modding (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@MoonlightKitty26
Copy link

Describe the bug

At about 20 intelligence, actions like moving/eating/waiting start to lag noticeably, and the higher intelligence you have the nastier the lagging becomes. Because using the power also makes you too weary for 'stop concentration' and toggling the power off, the only way to turn it off is to fall asleep, which depending on how tired you are, can take forever due to the lagging.

Attach save file

Everest-trimmed.tar.gz

Steps to reproduce

  1. Walk around, wait, eat/drink, etc. to understand game performance before power toggle
  2. Toggle the "Metabolic Hyperefficiency" power (should be in favorites menu)
  3. Repeat step 1's actions

Expected behavior

I expected the lagging to not exist.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.4170 (22H2)
  • Game Version: d2b51fd [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Bionic Professions [package_bionic_professions],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    Mythical Martial Arts [MMA],
    <color_yellow>Mythical Martial Arts - Mods Extension [MMA_Mods_Extension],
    Bombastic Perks [bombastic_perks],
    Magiclysm [magiclysm],
    Magiclysm Revamp and Additions [magicrevamp],
    Miscellaneous Magiclysm Expansions [demon_spider_a],
    Magiclysm No Class Limit [magiclysm_no_class_limit],
    Aftershock [aftershock],
    Xedra Evolved [xedra_evolved],
    No Bionic Slots [no_cbm_slots],
    Mind Over Matter [mindovermatter],
    Mind Over Matter: <color_magenta>Remove Random Delay Before Learning New Powers [mom_no_power_learn_delay],
    Mind Over Matter: <color_magenta>Remove Concentration Limit [mom_infinite_concentration],
    Mind Over Matter: <color_magenta>Awakenings Are Always Successful [mom_always_awaken],
    Mind Over Matter: <color_magenta>No Negative Nether Attunement Effects [mom_no_negative_nether_attunement],
    Mind Over Matter: <color_magenta>Feral Psions Always Drop Crystals [mom_feral_psions_always_crystals],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills],
    Extended Freeform [Extended_freeform],
    Japanese Folklore [Jap_folklore]
    ]

Additional context

No response

@MoonlightKitty26 MoonlightKitty26 added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Apr 1, 2024
@RenechCDDA
Copy link
Member

image

(First set of ingame hours: Your save, 2 intelligence. Second set: Your save, 25 intelligence.)

Unable to reproduce with in-repo mods

  • OS: Windows
    • OS Version: Windows 10 (22H2)
  • Game Version: 0.G-8389-g1b170f1cae-dirty [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Bionic Professions [package_bionic_professions],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    Mythical Martial Arts [MMA],
    Bombastic Perks [bombastic_perks],
    Magiclysm [magiclysm],
    Aftershock [aftershock],
    Xedra Evolved [xedra_evolved],
    Mind Over Matter [mindovermatter],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills]
    ]

@Standing-Storm
Copy link
Contributor

#72773 should at least cause high levels of weariness to turn off your powers.

@Standing-Storm
Copy link
Contributor

Well, I loaded up the save using in-repo mods and activated Metabolic Hyperefficiency. One step immediately dropped me to Extremely Weary, and:
image

Also, the character was freezing to death for some reason.

  • OS: Windows
    • OS Version: 10.0.19045.4170 (22H2)
  • Game Version: 4808268 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Bionic Professions [package_bionic_professions],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    Mythical Martial Arts [MMA],
    No name () [],
    Bombastic Perks [bombastic_perks],
    Magiclysm [magiclysm],
    No name () [],
    No name () [],
    No name () [],
    Aftershock [aftershock],
    Xedra Evolved [xedra_evolved],
    No name () [],
    Mind Over Matter [mindovermatter],
    No name () [],
    No name () [],
    No name () [],
    No name () [],
    No name () [],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills],
    No name () [],
    No name () []
    ]

@RenechCDDA
Copy link
Member

Well, I loaded up the save using in-repo mods and activated Metabolic Hyperefficiency. One step immediately dropped me to Extremely Weary, and:

I updated to 4aef748 which includes your new PR mentioned above and I'm still not able to reproduce on MSVC (have not tried other versions).

2024-04-01.22-40-47.mp4

@RenechCDDA
Copy link
Member

PEBKAC: Triage(me) forgot to follow the reproduction steps.

image

@RenechCDDA RenechCDDA added (S2 - Confirmed) Bug that's been confirmed to exist Mods Issues related to mods or modding Mechanics: Character / Player Character / Player mechanics EOC: Effects On Condition Anything concerning Effects On Condition Mods: Mind Over Matter and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Apr 2, 2024
@Standing-Storm
Copy link
Contributor

Out of curiosity, I loaded up the save again, debugged in Stones' Fortitude (an Earthshaper spell from Magiclysm that reduces your metabolism, among other things), and got this:

image

So, just extra-confirming the above.

@GuardianDll
Copy link
Member

Probable reason: same as #72255; while the zero metabolism do not hang the game anymore, values close to zero still can cause a lot of slowdown due the loop Ren posted before.
Nota bene: should check what happens when enchantment falls below zero

@ghost
Copy link

ghost commented Apr 30, 2024

Bumping this issue. I experienced this bug and being an 18 Int Snail Mutant with a Recycler CBM was enough to completely break my game/save file. That makes it a base game save-breaking bug that would tend to kick in on files that had time to establish Light Eater+Recycler. I had to edit out the Recycler CBM to continue playing. It's bad.

(Thanks to the discord server for helping me troubleshoot and esp @GuardianDll )

@RenechCDDA
Copy link
Member

index 2796a2039f..70a9341a4c 100644
--- a/src/consumption.cpp
+++ b/src/consumption.cpp
@@ -715,7 +715,9 @@ float Character::metabolic_rate_base() const
 {
     static const std::string hunger_rate_string( "PLAYER_HUNGER_RATE" );
     float hunger_rate = get_option< float >( hunger_rate_string );
-    return enchantment_cache->modify_value( enchant_vals::mod::METABOLISM, hunger_rate );
+    const float final_hunger_rate = enchantment_cache->modify_value( enchant_vals::mod::METABOLISM,
+                                    hunger_rate );
+    return std::clamp( final_hunger_rate, 0.0f, float_max );
 }
 
 // TODO: Make this less chaotic to let NPC retroactive catch up work here

The basic issue is that Character::metabolic_rate_base() comes back negative so Character::weariness_level() gets stuck in the while loop constantly incrementing the amount higher and higher (because threshold is negative due to negative bmr) until it overflows to negative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EOC: Effects On Condition Anything concerning Effects On Condition Mechanics: Character / Player Character / Player mechanics Mods: Mind Over Matter Mods Issues related to mods or modding (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants