[Not a bug] [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Project Dark Fox » Fri Aug 28, 2020 8:21 am

Full title: "Upgrading Maximum Health is not reflected in the Mugshot, if the original maximum was not 100"
Also not working in 4.4.2.
Full details are in this thread from Editing [HERE].

I have enclosed a cut down sample of what's going on that doesn't even require a custom SBARINFO, let alone any of my custom graphics. At the very least I'm asking for a solution to what is, at worst, a cosmetic problem, whether that may be a bug fix, a workaround, or a 'deal with it, can't fix', since the logic is.... well.

EDIT, Usage instructions: Player has 50 HP, max. Recolored Soulsphere provides a cap boost of 25, but does not increase the health to go with it, so your health should be 50/75, meaning your mugshot SHOULD be in some sort of damage state. A medikit is in front to pick up.
You do not have the required permissions to view the files attached to this post.
User avatar
Project Dark Fox
Married Furry Anxiety Bucket
 
Joined: 14 Jul 2005
Location: Louisville, KY USA
Twitch ID: ProjectDarkFox
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Graf Zahl » Sat Sep 26, 2020 12:57 pm

This is not a bug. The mugshot's default is to treat 100 as fully healthy. If you need something different you need to change the player's MugshotMaxHealth member variable to the intended cap.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Project Dark Fox » Sun Sep 27, 2020 7:18 am

This line, right here, right?
Code: Select allExpand view
   Player.MugShotMaxHealth -1 // Defines the value that is considered to be max health for the status bar mugshot. Negative values use the player's max health as the mug shot max health [...] -Wiki
User avatar
Project Dark Fox
Married Furry Anxiety Bucket
 
Joined: 14 Jul 2005
Location: Louisville, KY USA
Twitch ID: ProjectDarkFox
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Graf Zahl » Sun Sep 27, 2020 7:20 am

Yes, from looking at the code that should do it.
Or you set it to a positive value for an explicit cap - but then you need some scripting if you want to modify it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Project Dark Fox » Sun Sep 27, 2020 7:23 am

Well, the line there is present complete with the -1 as its setting.
This is the other piece, which our max health booster in the example WAD above does successfully modify.
Code: Select allExpand view
   Player.MaxHealth 50 // The maximum health reachable by using normal health items. -Wiki

So I am under the impression that I've introduced some sort of conflict, and I really don't know how to truly fix it.
User avatar
Project Dark Fox
Married Furry Anxiety Bucket
 
Joined: 14 Jul 2005
Location: Louisville, KY USA
Twitch ID: ProjectDarkFox
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Blue Shadow » Mon Sep 28, 2020 11:00 am

Graf Zahl wrote:This is not a bug. The mugshot's default is to treat 100 as fully healthy. If you need something different you need to change the player's MugshotMaxHealth member variable to the intended cap.

From my understanding of the issue the OP has, the mugshot code doesn't account for stamina and BonusHealth when calculating player's max health.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Graf Zahl » Mon Sep 28, 2020 11:06 am

In default mode it indeed does not and that's totally intentional. The default is to treat 100 as fully healthy, even with upgrades.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Blue Shadow » Mon Sep 28, 2020 11:26 am

Yes, in default mode (MugShotMaxHealth = 0), 100 is always the max, but setting MugShotMaxHealth to -1, so that player's maximum health is used as opposed to a constant value of 100, still ignores upgrades.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Graf Zahl » Mon Sep 28, 2020 1:05 pm

Then we need a -2 mode, too.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [<4.1.3] Upgrading MaxHP Not Reflected in Mugshot

Postby Project Dark Fox » Fri Aug 27, 2021 4:48 pm

Updated to 4.6.1, this hasn't yet been addressed. Should this be moved to Feature Suggestions?
User avatar
Project Dark Fox
Married Furry Anxiety Bucket
 
Joined: 14 Jul 2005
Location: Louisville, KY USA
Twitch ID: ProjectDarkFox
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests