-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add Log menu to admin ttt_weightlogs #15
Comments
How is the player weight being calculated? Sorry if that's a stupid question but I've never looked that much inside the code. And what do you mean by "[a player] who was given more for group permission"? Thanks. :) |
Players weights are just added or removed depending what role they get chosen to be. If they are selected as traitor it sets them back to a default weight. If they are not selected they get a regular amount of weight added, if the The way it selects the person to be traitor is it shuffles a table of all players and their weights, adds all their weights together and selects a random number between 1 and all the weight. If a persons weight causes the random number to equal 0 or go under 0 it will choose them to be a traitor, so a person with 75 weight while everyone else has 10 will give him a much higher chance to become traitor, but not give him a 100% chance. The code for it is here For example: Player 1 has 10 weight, Player 2 has 20, and player 3 has 50. Multiple scenarios could happen. So if the So just because you have a higher weight doesn't mean you will be selected as traitor, there is still a randomness to it that someone who just became traitor can be traitor again. Hope all that makes sense lol, so for the sense of this enhancement, in the admin weightlogs you would be able to something like "Player 1 was given 6 normal weight, 0 karma weight, and 3 group weight for a total of 9 extra weight. Putting him at 25 total weight." |
Anything to help with debugging, or just people complaining that they think they aren't getting 'heavier' sounds good to me :) |
Had an idea for the admin menu
Adding a "Logs" tab which gives information on how much weight was given to each user, and who was given more for group permissions. Which could help in debugging as well as see exactly what the addon is doing and how much weight people are getting. Could add the logs to the database for historical purposes. Giving admins extra information about what is happening.
This is just an idea and wondering what other peoples thoughts who have been using the addon.
The text was updated successfully, but these errors were encountered: