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

[Suggestion] Config options for Potion Core's hud rendering. #5

Open
SonicX8000 opened this issue Nov 21, 2021 · 6 comments
Open

[Suggestion] Config options for Potion Core's hud rendering. #5

SonicX8000 opened this issue Nov 21, 2021 · 6 comments

Comments

@SonicX8000
Copy link

SonicX8000 commented Nov 21, 2021

I noticed that you had Potion Core in this due to a fix for the magi shielding overlapping hunger... so I figure it might be worth an ask. Is there by any chance that some of the overlays can be disabled from Potion Core? Reason I ask is due to having some mods installed that add in some overlays, such as Overloaded Armor Bar & Toughness Bar.

There's a second armor bar that appears when you have more than 20 armor, but it only goes up to 40. I use Overloaded Armor Bar and this conflicts with that overlay.

Diamond Trim outlines appear when you have Toughness but it only goes up to 20. Also... I have Toughness Bar installed which shows some shield icons above your hunger bar.

Red Resistance borders that appear when having the Vanilla Resist Potion Effect & Potion Core's Resist attribute... however currently these stack together and throughout some testing it's kinda misleading as vanilla's resist & potion core's resist are different stats that reduces damage. Would it be possible to only have Potion Core's resist render in a way?

Finally... Magic Shielding render. Well... this one is fine but due to having the render disabled I can't see how much Magic Shielding that I have at times.

In short, was wondering if these could be toggled on/off individually.

EDIT
Alright, I took another look and Potion Core's Armor & Toughness Render is disabled when Overload Armor Bar renders... however Magic Shielding render doesn't show when Overloaded Armor Bar shows. The Red Resist border however... renders correctly. By any chance could the Magic Shielding Render regardless of what armor bar shows? Might be do-able seeing as the Resist Borders show.

@Charles445
Copy link
Owner

Sounds like a lot of funny things are happening with rendering and those two mods, lol
I'll look into making a few toggles, and maybe figure out why the two mods are conflicting

@SonicX8000
Copy link
Author

SonicX8000 commented Nov 22, 2021

I think Toughness Bar doesn't have any sort of conflict but the Overloaded Armor Bar does after doing some testing which I mentioned in the edit.

...also I know this is outside the scope but if somehow the Magic Shielding overlay can be displayed on the Toughness Bar that would be really neat. I think I recall asking the dev of Potion Core... back in 2019 if it could be do-able and he kept it in mind but that's... about it.

armortoughnessoverlay
This is the oldest image that I posted back then. Because Magic Shielding has a shiny custom render I only drew a mock-up purple-pink border around the Toughness Shield Icons for the Magic Shielding.

@Charles445
Copy link
Owner

Charles445 commented Nov 25, 2021

Okay, so here's how it works internally, in this order:

PotionCore renders resistance red outlines
Toughness Bar renders toughness
Overloaded Armor Bar renders armor
PotionCore renders an empty armor bar, armor, extra gold armor, toughness, magic shielding (all at once)
Overloaded Armor Bar renders armor (again)

So the reason you can see the red resistance outlines is because that's the only part that Overloaded Armor Bar isn't covering up.
I'm thinking the best solution for all of this (and to keep it very simple) would be to do what you suggested and render magic shielding over the toughness bar.

EDIT: The toughness bar goes away if you don't have any toughness, right? That might not be good, since magic shielding sticks around
I'll see if there's something else doable, maybe I'll try to draw it on top of overloaded armor bar instead

@Charles445
Copy link
Owner

Looking good
overbarcompat

@SonicX8000
Copy link
Author

SonicX8000 commented Nov 26, 2021

EDIT: The toughness bar goes away if you don't have any toughness, right? That might not be good, since magic shielding sticks around

There's a config option in the Toughness Bar to render it even if it's at 0, same with the Armor Bar where you can have it render at 0.

Sorry for the late reply, Thanksgiving & such wore me out and I pretty much went to bed the moment I got home.

EDIT:
I checked the update out. Looks like everything renders correctly although I feel that Vanilla Resist & Potion Core's Resist shouldn't render them stacked together but that's prob just me.

whatIseefortherendering
For the red resist border I have Resist II Potion Effect which is about 40% and... I think around 8% Potion Core Resist. Is it possible to only have the red resist border show for only Potion Core's Resist attribute? Only because... say if you have Resist III (60%) somehow and you have 40% Potion Core Resist attribute... the outline will show it being full as if you had 100% Resist... but because vanilla resist & potion core's resist are different stats/attributes it wouldn't really be a 100% damage reduction but it prob goes Vanilla Resist and then PC Resist or the other way around in terms of reducing damage.

@Charles445
Copy link
Owner

Honestly I'm not entirely sure what's going on under the hood, it's all a little bit messy
As far as I can tell, if you have Resistance II (40%) and Potion Core Resistance 10%, then it ends up working like this:
Potion Core's HUD will show itself as 50% (40% + 10%), it just adds the two together

AS FAR AS I CAN TELL, they're actually multiplied individually
So if you take 100 damage, Potion Core's 10% Resistance makes it 90 damage
which then goes to vanilla resistance 40% which makes that 54 damage.

So your HUD shows 50% damage resistance, but really it's only 46% damage resistance

In your example, if you had Resistance III (60%) and Potion Core 40%, the real resistance would be 76%, I think

I'd need to rewrite the potion core resistance display completely to reflect this I think, which might not be too bad.

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

No branches or pull requests

2 participants