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] Pain limits ignore painkiller effects #72882

Closed
MelacholicMimic opened this issue Apr 7, 2024 · 6 comments · Fixed by #72938 or #72939
Closed

[MoM] Pain limits ignore painkiller effects #72882

MelacholicMimic opened this issue Apr 7, 2024 · 6 comments · Fixed by #72938 or #72939
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@MelacholicMimic
Copy link

Describe the bug

The pain thresholds introduced by #72737 check against your total pain, not the pain you're currently feeling.

Attach save file

N/A

Steps to reproduce

  1. Set pain to 50
  2. Eat 2 Codein
  3. Wait 15 mins
  4. Try to cast power

Expected behavior

Check against pain the PC is actually experiencing.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.4170 (22H2)
  • Game Version: 9fc88ad [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Mind Over Matter [mindovermatter]
    ]

Additional context

No response

@MelacholicMimic MelacholicMimic added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Apr 7, 2024
@GuardianDll
Copy link
Member

There is no such thing as "total pain vs pain you're currently feeling", it is the same thing.
Painkillers start to work after digestion, 30 minutes after consuming

@MelacholicMimic
Copy link
Author

MelacholicMimic commented Apr 7, 2024

Then the UI is effectively lying to the player. The basic effect of the PR is you can't use power if pain is over 40. I so far had 3 separate occasions where the sidebar was telling me I had 0 to 10 (=minimal) pain, yet powers were inaccessible due to pain apparently >=40. Whatever the cause, it doesn't feel like that's what should be happening.

Edit: Redid the steps to reproduce, it will put you at minimal pain, which should be between 10-20 pain yet the debug menu shows a pain of 46. As far as im concerned that is "total pain vs pain you're currently feeling".

@Standing-Storm
Copy link
Contributor

Standing-Storm commented Apr 7, 2024

Hmm

image
image
image

There's definitely something going on. I used u_pain() in the EoC to get the pain from the character, but in the screenshot, the character has Mild Pain (below the threshold, they should be fine to use their powers) but u_pain() is returning a value where they can't use their powers.

Another odd thing:

image

This is with the Spacebar UI. The pain says mild pain, as expected, but the separators are light red, which the code reads should only apply when "condition": { "and": [ { "math": [ "u_pain()", ">=", "40" ] }, { "math": [ "u_pain()", "<", "60" ] } ] } Mild pain is between 10 and 20, but the separators don't reflect that.

So something is going on.

get_perceived_pain() and get_pain() are separate. Does u_pain() only return the results from get_pain(), not get_perceived_pain()?

@GuardianDll
Copy link
Member

GuardianDll commented Apr 7, 2024

u_pain return pain_cur(), which is indeed return only get_pain(). What's the difference between two?

@Standing-Storm
Copy link
Contributor

Standing-Storm commented Apr 7, 2024

On my phone, but in looking here:

int Creature::get_perceived_pain() const

apparently there’s no difference (get_perceived_pain() just calls get_pain() ). Hmm.

Edit: Oh, it’s virtual. Found it (thank you limited GitHub web search). It’s actual pain - painkiller:

int Character::get_perceived_pain() const

Maybe I can replicate that, since EoCs can get the painkiller level too.

@GuardianDll
Copy link
Member

i recommend you to make vanilla math function for this, and use it in MoM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
3 participants