NotJustin / SkillAutoBalance

12 stars 3 forks source link

NC RPG Formula #13

Closed WhyFaust closed 4 years ago

WhyFaust commented 4 years ago

After talking to the creator of the plugin, it turns out that a long time ago he was making a balance plugin himself, but stopped doing it because he could not achieve the desired result. In general, he said that it's better and more correct to do a check not on the level, but on the skills, about this I did in my repository: https://github.com/baferpro/SkillAutoBalance/blob/b3d68cd6b9f917329688ae9bd48979ff4708a61d/scripting/skillautobalance.sp#L755 What do you say?

NotJustin commented 4 years ago

It is hard for me to say. I do not know what levels are and I do not know what skills are.

My plugin assumes that players with highest score are best. If you think taking the sum of all NCRPG skills does this better, I can change it.

If I understood NCRPG skills I could help more.

NotJustin commented 4 years ago

I implemented it. Very small difference from yours, let me know if it works the same.

NotJustin commented 4 years ago

I am an idiot and only just pushed the latest files now, in case you tried since I commented 40 minutes ago.

WhyFaust commented 4 years ago

Look, it's kind of a yes, it's clear. There is only one thing, but when you connect a player, your plugin doesn't have time to get the skill levels, because the NC RPG core hasn't yet had time to pull the levels out of the database, so I made a timer at my place to work correctly.

NotJustin commented 4 years ago

In short, you can ignore the problem if most players on your server are in your database. It is only a problem on the first balance, and even then, you can still ignore unless a lot of players fail to get a score again when the plugin tries updating scores before a balance.

Okay. I understand, but I do not think it is a problem. I will try to explain, by first asking both you and myself a question.

Why am I getting the score when players connect? I already update the scores before doing the balance anyway. What is the purpose?

The answer is, when the plugin fails to retrieve a score for a player, I still need to give them something. I give them the average score of players on the server. The average is determined by the previous time a balance occurred. If a balance did not occur before, it means these player(s) are given a score of 0. This is a problem IF you have a lot of players on your server who have no ranking. If it is only a small amount, those players should(?) be treated as outliers, which is normal.

Whether or not they will be treated as outliers depends on a couple of things.

  1. What score your "average" player will have.
  2. How big is the difference between the average, the lowest player, and the highest player.
  3. What you set sab_scale to.
WhyFaust commented 4 years ago

Yeah, I figured you could use this:

forward NCRPG_OnClientLoaded(int client, int count);

But I don't fully understand how maybe you can do it :3.

NotJustin commented 4 years ago

Okay, I will make a new issue for this so I can do it later.