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

Implementation of Issue 479 (EXP bar and pop ups work with mastery) #568

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

djuniah
Copy link

@djuniah djuniah commented Jun 18, 2024

I had found this issue/feature request (I came here looking to make the same request): #479

and decided to try and implement it myself. This bit of code should get the XP text over the player's head functioning past level 25 (which is apparently what the game code considers max overall level before mastery). It also implements the other portion of the feature request about the graph showing progress on the current mastery Level.

There are 3 things I wanted to note that are still "TODO" items:
1) I tried making the color of the bar match the color that was used on the mastery progress bar in the main UI but i can't seem to get the color right no matter what I do. It seems to be over-saturating anything I put in.
2) UI Info suite seems to have some way of accessing the game's icons through a rect based system (I assume tied to a sprite sheet). I don't know where this sheet is or what the coordinates would be for a "star" icon, so i used the luck icon for now since that was already implemented and is currently unused.
3) Due to the amount of EXP needed for mastery levels, it overflows the bar quite easily. I tried bumping up the "MaxBarWidth" value in DisplayedExperienceBar.cs but it didn't seem to affect anything. I have noticed it overflowing during normal gameplay before, so i'm not sure if this is a dealbreaker for this pull request or not.

djuniah added 3 commits June 17, 2024 20:41
Added an icon
Made the bar slightly wider to accommodate longer XP numbers
Refactored some code to be a little cleaner
@djuniah
Copy link
Author

djuniah commented Jun 18, 2024

Ok, i actually addressed all 3 of those issues in my main comment in my latest commit: djuniah@6a0708f

The only potential issue i could see is that I made the exp bar a little wider. I don't know if the old size was chosen for any particular reason (to work on mobile for example), but it wasn't wide enough to hold the larger XP numbers that the mastery system uses. Otherwise, I tested it a bit and it seems to be working fine.

EDIT: One other thing i wanted to note. I ran into an issue with the color of the bar where it was showing up incorrectly (usually a super bright green or teal no matter what values i had in there. Turns out that the color values were being treated as floats which uses the constructor with values that go from 0->1 instead of the int constructor which has values go from 0->255. It might be worth looking into the old color values to make sure that they're actually rendering as intended. Might be an old bug in the mod.

@djuniah djuniah changed the title Implementation of Issue 478 (EXP bar and pop ups work with mastery) Implementation of Issue 479 (EXP bar and pop ups work with mastery) Jun 18, 2024
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

Successfully merging this pull request may close these issues.

1 participant