Open pablonieto0981 opened 2 years ago
Once again with a wonderful set of functions! Everything looks good, it's just a matter of figuring out where to place it. I'll get to this over the coming days.
Might make sense to allow for custom color, marker and annotation functions in general in the plot_round
function. They should just default to what is currently there.
try: # Sometimes "attackerName" gives None, this is to manage the exception
kills_dict[kill['attackerName']] = kills_dict[kill['attackerName']] + 1
except:
pass
This should probably be an explicit None
check i think.
Hi there,
Based on some testing and needs from my CSGO team (a bunch of GN2/GN1...), I have made the following changes locally, which you might want to implement in the code:
1. Accumulated kills function
I might be mistaken, but I think there is no entry in the parsed data to track total kills by a player at any given round start. I created a function for that, as we thought understanding behavior of player by skill ("or who is just having a good day") might be interesting.
Here below is the function:
This adds the accumulated number of kills at round start for each round in the demo.
Other changes I have made locally are an option to plot player colors over the default T or CT marker in the round plot, and to add annotations on top of each player. See below (2. and 3. all go into plot.py):
2. Function to plot annotations
3. Plot round function with annotations and color input for players and color choice for the bomb
Note that _player_namescolors is a dictionary that should take the exact names used by the players in the game, and a color of choice for each. Here below is an example from Saturday's match:
player_names_colors={'Glaurung':'blue','0_o Draco':'orange','Peluche81 [I CH]':'green',"Tum Tu'pabs":'yellow','R0x0r':'purple','mig2504':'purple','labuguresti':'orange','Hammood taking 1taps':'blue','cascasvelos.PT':'yellow','99p.exe':'green'}
If the function kill_stats={}, the annotations are the health points; if player_names_colors is empty, then no colors are given, and only red / cyan outer marker is used.
An option to decide the color of the bomb is given, and I have made the bomb a Y marker, as it layers well with the team and player color markers.
And here is the function...
...yes, we lost the game.