Austermann Posted August 31, 2022 Share Posted August 31, 2022 Hey guys I came to share a way to change the EXP label to % with decimals. Some players know how anoying and frustrating when you get lv and it's show 315171737819273171312751358109131 of exp to next Lv. So, i changed that to show in % with decimals, you can change many as you want.  How to do that! Go to: Intersect.Client Interface Game EntityPanel Open EntityBox.cs Find: private void UpdateXpBar(float elapsedTime, bool instant = false) Add:         var percent = targetExpWidth * 100;         ExpLbl.Text =  percent == 0 ? $"{percent}%" : $"{percent:0.0000}%"; This one have four number 0 after the first number, like: 0,0000% I just disabled the:          ExpLbl.Text = Strings.EntityBox.expval.ToString(            ((Player) MyEntity)?.Experience, ((Player) MyEntity)?.GetNextLevelExperience()          ); just putting /* before and */ after Because if i want to change back, just delete the last 2 lines and enable "ExpLbl.Text" again Look how it is. Before: Spoiler After: Spoiler Look how it's appear at my game. (the private void) Spoiler     private void UpdateXpBar(float elapsedTime, bool instant = false)     {       float targetExpWidth = 1;       if (((Player) MyEntity).GetNextLevelExperience() > 0)       {         targetExpWidth = (float) ((Player) MyEntity).Experience /                  (float) ((Player) MyEntity).GetNextLevelExperience();         /*          ExpLbl.Text = Strings.EntityBox.expval.ToString(            ((Player) MyEntity)?.Experience, ((Player) MyEntity)?.GetNextLevelExperience()          );         */         var percent = targetExpWidth * 100;         ExpLbl.Text =  percent == 0 ? $"{percent}%" : $"{percent:0.0000}%";       }  That's it!  MaximkaGoodok, Castiel, Artheios and 2 others 2 3 Link to comment Share on other sites More sharing options...
Arufonsu Posted August 31, 2022 Share Posted August 31, 2022 This is actually pretty easy to port over to the base engine, if you open a feature request for it (if there isn't one already for it), i could work around it to make it configurable (within the client's config) during this week, that way people won't need to edit the source code but instead, they will be able to simply change a boolean from false to true within the client's config (or game settings -> interface) in order to have this feature thanks for sharing! Kamus, Artheios and Austermann 1 2 Link to comment Share on other sites More sharing options...
Austermann Posted August 31, 2022 Author Share Posted August 31, 2022 9 minutes ago, Arufonsu said: this is actually pretty easy to port over to the base engine, if you open a feature request for it (if there isn't one already for it), i could work around it to make it configurable (within the server's config) during this week, that way people won't need to edit the source code but instead, they will be able to simply change a boolean from false to true within the server's config in order to have this feature thanks for sharing! Cool, i can do that ofc. That's no problem, i know how depressing is see you current exp is low and the exp to next lv is a really astronomic number, that's make me really bored, that's why i make this xD Artheios 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now