Level System MFPS

Add-Ons for MFPS.
User avatar
Nerbs
Member
Member
Posts: 10
Joined: Fri Feb 02, 2018 7:52 pm

In the in-game scoreboard it just shows everyone as having the same level (it's whatever level the player is). I'm sure I can figure it out, but seeing as it's advertised in the asset, I'd like to see the level of each player on the scoreboard. Ideas?
User avatar
Lovatto
Admin
Admin
Posts: 1558
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Nerbs wrote:In the in-game scoreboard it just shows everyone as having the same level
You are right, I have check and fix it, please download again the package from the web site,
but also require modify some lines in MFPS scripts:

in bl_RoomSettings.cs add this:

Code: Select all

#if ULSP && LM
         Hashtable PlayerTotalScore = new Hashtable();
         PlayerTotalScore.Add("TotalScore", bl_DataBase.Instance.LocalUser.Score);
         PhotonNetwork.player.SetCustomProperties(PlayerTotalScore);
#endif
after this lines: (line 96 for default)

Code: Select all

 PhotonNetwork.player.SetCustomProperties(PlayerRole);
and in bl_PlayerScoreboardUI.cs replace these lines: (40 and 59)

Code: Select all

 LevelIcon.sprite = bl_LevelManager.Instance.GetLevel().Icon;
with this:

Code: Select all

  LevelIcon.sprite = bl_LevelManager.Instance.GetPlayerLevelInfo(cachePlayer).Icon;
User avatar
Oggy
Contributor
Contributor
Posts: 80
Joined: Fri Oct 13, 2017 2:53 am

:( I have a problem, score have reach new level, in Lobby Scene, new icon rank be changed but NewLevelNotifier UI not enable!
User avatar
slthompson
Contributor
Contributor
Posts: 17
Joined: Mon Jul 01, 2019 7:11 am

I can't seem to get it to display the level progression info by clicking on the level icon next to the player name in the Lobby.
User avatar
Lovatto
Admin
Admin
Posts: 1558
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Can you please confirm if the button is interactable, I mean check that the button is not blocked,
you can simply check if there is a little color transition when pass the mouse over or click on it.
User avatar
slthompson
Contributor
Contributor
Posts: 17
Joined: Mon Jul 01, 2019 7:11 am

There's no color indication.
User avatar
BigA
New Member
New Member
Posts: 1
Joined: Wed Mar 11, 2020 6:39 am

i have problem!

why player cant see ranking each other?
how to fix that?
User avatar
Lovatto
Admin
Admin
Posts: 1558
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Version 1.4

Improve: Rank icons.
Improve: Setup 78 levels with custom icons for each.
Improve: Lobby level progress window UI.
Improve: Now the level scroll list will automatically scroll to the current level of the player.
User avatar
stanimirp
New Member
New Member
Posts: 1
Joined: Sun Dec 01, 2019 12:43 pm

Hello, i have noticed that with the latest version the slider doesnt accurately represent the progress of the levels, this problem didnt exist in previous versions.

As you can see on the screenshot, i currently have 500 experience which should be exactly 50% between rank3 and rank4 but it shows it like 85%, this is true for all ranks aswell, none of them are accurately represented

Image
User avatar
Lovatto
Admin
Admin
Posts: 1558
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Is not an inacurracity, what is happening is that percentage is from the total player score / the score needed for the next level, from your screenshot it is:
500 / 600 = 83%

I understand your confusion, you was expecting the percentage from the current level to the next level, but you can change this by:
in bl_LevelPreview.cs -> CalculateLevel() -> change this line:

Code: Select all

 ProgressSlider.value = ((float)score / (float)nl.ScoreNeeded);
with this:

Code: Select all

float r = score - cl.ScoreNeeded;
            float t = nl.ScoreNeeded - cl.ScoreNeeded;
            if(r == 0 || t == 0) ProgressSlider.value = 0;
             else ProgressSlider.value = (r / t);
Post Reply