Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Cleanup end stats and add HiveSkill Graph #77

Merged
merged 2 commits into from
Mar 26, 2018
Merged

Cleanup end stats and add HiveSkill Graph #77

merged 2 commits into from
Mar 26, 2018

Conversation

peblpebl
Copy link

Right align table numbers.
Change numbers to show .00 to align table numbers.
Add hive skill graph to the end stats
Change server code to generate the hiveskill graph.

pebl added 2 commits February 26, 2018 03:43
Right align table numbers.
Change numbers to show .00 to align table numbers.
Add hive skill graph to the end stats
Change server code to generate the hiveskill graph.
@GhoulofGSG9 GhoulofGSG9 added this to the Build 378 milestone Mar 23, 2018
@GhoulofGSG9 GhoulofGSG9 self-assigned this Mar 23, 2018
@GhoulofGSG9
Copy link
Contributor

Sorry for the late response but I just didn't have time for this project until now.

Anyway thanks for the PR but please use tabs to indent your code next time instead of 2 spaces to match the projects code style.

I converted the spaces to tabs for this PR and also refactored the code a little so the hive skill of each player gets extracted for the team stats table and we don't have to save and send it another time.

Otherwise this PR has been merged into the Beta branch and will go out with the next ns2plus version ;)

@peblpebl
Copy link
Author

I considered saving the steamId only, but did not know how fast/when a new hiveskill was calculated/updated.

@GhoulofGSG9
Copy link
Contributor

The server caches the player's skill until a map change occurs. So even if the skill would change in between without clearing the cache or fetching the skill directly from the hive back-end currently a skill change wouidn't be recorded.

The probability that a player starts a round at one server then joins another to finish a round there while the first server's round is still continuing so that the player can rejoin it at the end is also so low it's not really worth considering imho.

@GhoulofGSG9 GhoulofGSG9 merged commit 908770d into Mendasp:master Mar 26, 2018
@peblpebl
Copy link
Author

Hmm, this does not work, as I was not aware of rr and spectate are 2 different teamNumbers.
I did not test with spectating.

@GhoulofGSG9
Copy link
Contributor

Additionally also all attempts to join a team are counted as teamjoins even if they fail. I'll fix the issues later today.

@peblpebl
Copy link
Author

If you do that could you also fix that the hive skill graph could start at -100 instead of 0

@peblpebl
Copy link
Author

CHUD_ServerStats.lua
local function CHUDResetStats()
...
if playerInfo.teamNumber ~= 0 then

I think the above line also fails to take teamNumber 3 into account, but perhaps it is not sent? as the network description says teamNumber is 1|2.

@peblpebl
Copy link
Author

I have just seen a match where at gametime = 0 there were too many on team 2.

if playerInfo.teamNumber ~= 0 then
table.insert(CHUDHiveSkillGraph, { gameMinute = 0, joined = true, teamNumber = playerInfo.teamNumber, steamId = playerInfo.steamId } )
end

I would have expected that
local kCHUDHiveSkillGraphMessage = {
gameMinute = "float (0 to 1023 by 0.01)",
joined = "boolean",
teamNumber = "integer (1 to 2)",
steamId = "integer",
}
would have prevented it to send the message? Or is the teamnumber converted (rounded or anded) to 2?

@peblpebl
Copy link
Author

peblpebl commented Mar 27, 2018

Doh another bug:

	maxHiveSkill = math.max(maxHiveSkill,hiveSkill[1]/curMaxPlayers,hiveSkill[2]/curMaxPlayers)
	minHiveSkill = maxHiveSkill

should be

	maxHiveSkill = math.max(maxHiveSkill,hiveSkill[1]/curMaxPlayers,hiveSkill[2]/curMaxPlayers)
	minHiveSkill = math.min(maxHiveSkill,hiveSkill[1]/curMaxPlayers,hiveSkill[2]/curMaxPlayers)

Otherwise the graph line can go under the graph
LastRoundStats - below graph.txt

@GhoulofGSG9
Copy link
Contributor

Ranged network parameters get clamped to the range if they are set to something outside the given range.

I'll fix the issue later today. Please open issue tickets for any further issues for proper documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants