Jump to content

Insane Limits V0.8/R1: End of round player stats logging (not SQDM)


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

VERISON: 0.8/R1. Compiled, but not tested

NOTE: Revives tracking DOES NOT WORK.

Regarding:

 

Applied Revives is definitely a battlelog stat, which is why I thought I could get it.....is that possible_? A CSV that had:


Playername1,GUID,Team,Kills,Deaths,Headshots,Score  ,Revives
Playername2,GUID,Team,Kills,Deaths,Headshots,Score  ,Revives
etc
etc

would be a wet dream for me.  If I can't get revives then so be it --- the rest CSV'd and saved to a folder on the server would be worth quite a bit to me.
ACKNOWLEDGMENT: Thanks to Fruity for the foundation of this code.

As discussed in the other thread*, we can only make a guess at revives. In fact, the first round of Revive stats will be unknown. After the first round, the value of the Revive stats will be the current value of player.Revives minus the previous round's value of player. Revives. There is no guarantee that the number will accurately reflect the actual number of revives in the round -- it all depends on how often Battlelog stats get updated. Is that enough of a disclaimer for you? I'd hate for a close competitive match to come down to a guess at the number of Revives!

If a value is -1 in the CSV, it means the value is unknown or too early to tell.

The CSV file is deposited in the Procon/Logs/_/ folder.

The CSV files are numbered by round since the last time the plugin was enabled. It counts up from 001. The name of the map and mode is also encoded into the log file name. The template for the name is:

YYYYMMDD_RRR_MAP_MODE_eorstats.csv

Where:

YYYYMMDD: Date in Year, Month, Day form.

RRR: Round number since the last time the plugin was enabled, starting from 001.

MAP: Short name of map. For example, Strike at Karkand is called "Karkand".

MODE: CQ64 = ConquestLarge0, CQ = ConquestSmall0, CA64 = ConquestAssaultLarge0, CA = ConquestAssaultSmall0, CAS1 = ConquestAssaultSmall1, Rush = RushLarge0, SQR = SquadRush0, SQDM = SquadDeathMatch0, TDM = TeamDeathMatch0, CQD = Domination0, GM = GunMaster0, TDMC = TeamDeathMatchC0.

Example: 20120809_003_Metro_Rush_eorstats.csv

WARNING: If you disable and re-enable the limit, plugin or PRoCon during the same day, it is likely that a previously written CSV file may get appended to. It will be as if two separate logs get concatenated together. The HH:MM:SS time written into the first row of data should enable you to separate the two logs should this occur.

Inside the CSV, you will find a table of data with the following format:

Line 1: Column headers

Line 2: Player 0, dummy data row, where the Name field of the row contains general information about the round and all the other fields are -1

Line 3 up to 67: Each row are the end of round stats for a single named player

LIMITATIONS

  • Only works with two-team modes, does not work with Squad Deathmatch
  • Some values may be NaN (not a number)






Create a limit to evaluate OnRoundOver. Name it EOR Player Stats. Leave its Action set to None.

Set first_check to this Code:

Code:

/* VERSION V0.8/R1 */

String kRound = "EOR_round_up_counter"; // plugin.Data int
String kRevives = "EOR_player_revives"; // player.Data double

int numRound = 1;
if (plugin.Data.issetInt(kRound)) numRound = plugin.Data.getInt(kRound);

/* BF3 friendly map names, including B2K and CQ post R25 */
Dictionary<String, String> maps = new Dictionary<String, String>();
maps.Add("MP_001", "Bazaar");
maps.Add("MP_003", "Teheran");
maps.Add("MP_007", "Caspian");
maps.Add("MP_011", "Seine");
maps.Add("MP_012", "Firestorm");
maps.Add("MP_013", "Damavand");
maps.Add("MP_017", "Canals");
maps.Add("MP_018", "Kharg");
maps.Add("MP_Subway", "Metro");
maps.Add("XP1_001", "Karkand");
maps.Add("XP1_002", "Oman");
maps.Add("XP1_003", "Sharqi");
maps.Add("XP1_004", "Wake");
maps.Add("XP2_Factory", "Factory");
maps.Add("XP2_Skybar", "Skybar");
maps.Add("XP2_Palace", "Palace");
maps.Add("XP2_Office", "Office");

/* BF3 friendly game modes, including B2K and CQ post R25 */
Dictionary<String, String> modes = new Dictionary<String, String>();    
modes.Add("ConquestLarge0", "CQ64");
modes.Add("ConquestSmall0", "CQ");
modes.Add("ConquestAssaultLarge0", "CA64");
modes.Add("ConquestAssaultSmall0", "CA");
modes.Add("ConquestAssaultSmall1", "CAS1");
modes.Add("RushLarge0", "Rush");
modes.Add("SquadRush0", "SQ Rush");
modes.Add("SquadDeathMatch0", "SQDM");
modes.Add("TeamDeathMatch0", "TDM");
modes.Add("Domination0", "CQD");
modes.Add("GunMaster0", "GM");
modes.Add("TeamDeathMatchC0", "TDMC");

String mapName = (maps.ContainsKey(server.MapFileName)) _ maps[server.MapFileName] : server.MapFileName;
String modeName = (modes.ContainsKey(server.Gamemode)) _ modes[server.Gamemode] : server.Gamemode;

String logName = plugin.R("Logs/%server_host%_%server_port%/") + DateTime.Now.ToString("yyyyMMdd") + "_" + numRound.ToString("D3") + "_" + mapName + "_" + modeName + "_eorstats.csv";

String header = "Tag,Name,GUID,Team,Kills,Deaths,Headshots,Score,Revives,Tmp1,Tmp2,Tmp3";

String overall = "INFO,Round ended at " + DateTime.Now.ToString("HH:mm:ss") + "{Duration: " + (server.TimeRound/60).ToString("F1") + " mins, Round: " + (server.CurrentRound+1) + "/" + server.TotalRounds + ", Tickets: " + team1.RemainTickets + "/" + team2.RemainTickets + "},-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";

/* Create and initialize csv file */

plugin.Log(logName, header);
plugin.Log(logName, overall);

/* Build list of all players */

List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);
//if (team3.players.Count > 0) all.AddRange(team3.players);
//if (team4.players.Count > 0) all.AddRange(team4.players);

/* Write per player stats to the csv file */

int count = 0;
foreach (PlayerInfoInterface p in all) {
    // Build up the log line:
    String line = (String.IsNullOrEmpty(p.Tag) _ " " : p.Tag) + ",";
    line += p.Name + ",";
    line += p.EAGuid + ",";
    line += p.TeamId + ",";
    line += p.KillsRound + ",";
    line += p.DeathsRound + ",";
    line += p.HeadshotsRound + ",";
    line += p.ScoreRound + ",";

    // Guess at revives based on difference of Battlelog Stats
    double oldRevs = -1;
    if (p.Data.issetDouble(kRevives)) oldRevs = p.Data.getDouble(kRevives);
    double revs = -1;
    if (oldRevs != -1 && p.Revives != Double.NaN && p.Revives >= 0) {
        revs = p.Revives - oldRevs;
    }
    if (p.Revives != Double.NaN && p.Revives >= 0) p.Data.setDouble(kRevives, p.Revives);
    
    line += revs.ToString("F0") + ",";
    
    // spares
    line += "-1" + ",";
    line += "-1" + ",";
    line += "-1";

    // Log it
    plugin.Log(logName, line);
    ++count;
}

plugin.ConsoleWrite("^b[EOR STATS]^n " + logName + " saved with stats for " + count + " players!");

plugin.Data.setInt(kRound, numRound+1);

return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

NOTE: The code above uses the EA GUID. To use the PB GUID, find this line of code:

 

Code:

line += p.EAGuid + ",";
and change it to this:

 

Code:

line += p.PBGuid + ",";
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by chuckinbeast*:

 

Does it matter that this will be used on a private server? Obviously revive stats won't be sent back to DICE....nor any of the information for that matter.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Does it matter that this will be used on a private server? Obviously revive stats won't be sent back to DICE....nor any of the information for that matter.

I was wondering about that. If you are running an unranked server, the Revives calculation won't work, it should always be -1 or 0. Everything else should work fine.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by chuckinbeast*:

 

I was wondering about that. If you are running an unranked server, the Revives calculation won't work, it should always be -1 or 0. Everything else should work fine.

Well thank you so much for this anyways. As I promised, let me know what you need for this effort. Thanks!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

ssarg.png

 

I get no CSV file output.....arg.....what have I done wrong?

Did you run a full round on your server? The round has to end normally for a CSV to be generated.

 

In your console.log (that window on the bottom that has the [insane Limits] lines in it), did you see a line that looks like this?

 

[EOR STATS] Logs/req.game.nfoservers.com_47200/20120815_001_Bazaar_SQ Rush_eorstats.csv saved with stats for 1 players!

 

If you didn't see a line like that, either the limit is not working correctly or you didn't complete a round normally.

 

Did you look in the Logs folder under your server_port to see if there is a .csv file there?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by chuckinbeast*:

 

Did you run a full round on your server? The round has to end normally for a CSV to be generated.

 

In your console.log (that window on the bottom that has the [insane Limits] lines in it), did you see a line that looks like this?

 

[EOR STATS] Logs/req.game.nfoservers.com_47200/20120815_001_Bazaar_SQ Rush_eorstats.csv saved with stats for 1 players!

 

If you didn't see a line like that, either the limit is not working correctly or you didn't complete a round normally.

 

Did you look in the Logs folder under your server_port to see if there is a .csv file there?

I may have not let the round complete normally....I didn't see that line, no. I don't see a logs folder in either server or my machine where the procon is installed. Do you have to create the directory?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I may have not let the round complete normally....I didn't see that line, no. I don't see a logs folder in either server or my machine where the procon is installed. Do you have to create the directory?

It would be where your Procon client or layer would be installed. Should be right inside the top-level procon folder, procon/Logs/...

 

Oh, make sure you have turned on logging. Go to Tools, Options, Basics tab and in the Logging section check at least plugin logging. Personally, I check all of them. I'm not sure what the equivalent for a layer is. Are you using a layer?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by chuckinbeast*:

 

Ok I got it to work! Thanks a ton man! Where can I find a complete listing of all the variables available through RCON (not off the Dice public server info)?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Ok I got it to work! Thanks a ton man! Where can I find a complete listing of all the variables available through RCON (not off the Dice public server info)?

The latest admin docs are always here:

 

page1/index.html*

 

If you wait a few days, the R28 version docs are due to come out. Only slightly different from R25, though, which is the latest you can get at the moment.

 

You'll want the Protocol doc. Everything the server tells us is in the Server Events section and in the serverInfo, banList.list, mapList.list and admin.listPlayers (see Player info block) commands. There are also some punkbuster commands that give information, like punkBuster.pb_sv_command pb_sv_plist, which is how we get PB GUIDs.

 

Don't expect too much detail, they are pretty sparse.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by chuckinbeast*:

 

So getting individual weapon stats per player (pretty much just accuracy %) out of insane limits......too much effort? XPKiller's stat logger saves everything to a database, I don't necessarily want that as we will want to be able to pick and choose which rounds go into the database and manually do it.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

So getting individual weapon stats per player (pretty much just accuracy %) out of insane limits......too much effort? XPKiller's stat logger saves everything to a database, I don't necessarily want that as we will want to be able to pick and choose which rounds go into the database and manually do it.

Nobody has access to accuracy% in round. The data is just not in RCON. I can do kills, deaths by, and headshots, per weapon.

 

You'll also have to decide what you want. Hopefully, not a list of weapons per player, that's a pain to do in CSV. Top weapon is easy, even top 3 weapons is doable. You'll have to decide if you want the weapon and then each stat for that weapon in separate columns, or combine them all in one string that you can parse in post processing, for example:

 

weapon,kills,headshots, ... : e.g., P90,27,4,G36,12,5,M1911,3,0

 

vs.

 

weapon/kills/hs, ... : e.g., P90/27/4,G36/12/5,M1911/3/0

* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 year later...

Originally Posted by PapaCharlie9*:

 

hi,

 

all i get for revives stats is -1

 

please help

 

thanks

Are you sure that player has revives in Battlelog?

 

Did you check the value of player.StatsError? If it is True, something went wrong fetching that player's stats.

 

How long did you log? It takes time to fetch stats, sometimes as much as 20+ minutes per player.

 

Are you using the latest version of IL, 0.9.12.0? There were stats format changes that require the latest plugin.

 

Did you enable Battelog fetch and/or are you using BattlelogCache?

 

use_direct_fetch should be True.

 

use_slow_weapon_stats should be False.

 

If you are using BattlelogCache it should be enabled and configure correctly for your MySQL db.

 

EDIT: You can also try setting use_stats_log to True and set debug_level to 4 so you can see where the log is being written. All stats are written into that log, including Revives. I just tried it an got a log that looks like this:

 

Code:

[09:13:56] unbrik Battlelog player stats:
    Kdr:1.05, Kpm:0.76, Spm:257, Rank:26, Time:145234, Wins:49, Kills:1851, Score:622997, Skill:549.65, Deaths:1771, Losses:91, Repairs:17, Revives:19, Accuracy:15.06, ReconTime:47300, ResetTime:0, ResetWins:0, ScoreTeam:13470, ResetKills:0, ResetScore:0, Ressuplies:677, AssaultTime:7116, KillAssists:246, QuitPercent:36.94, ResetDeaths:0, ResetLosses:0, ScoreCombat:344097, SupportTime:28373, VehicleTime:NaN, EngineerTime:58026, ReconPercent:33.59, ScoreVehicle:6727, ResetShotsHit:0, AssaultPercent:5.05, ScoreObjective:8725, SupportPercent:20.15, VehiclePercent:NaN, VehiclesKilled:48, EngineerPercent:41.21, KillStreakBonus:14, ResetShotsFired:0
[09:13:58] Wishmazter Battlelog player stats:
    Kdr:0.84, Kpm:0.61, Spm:288, Rank:51, Time:658549, Wins:207, Kills:6725, Score:3134782, Skill:458.17, Deaths:7970, Losses:251, Repairs:234, Revives:984, Accuracy:14, ReconTime:231117, ResetTime:0, ResetWins:0, ScoreTeam:140558, ResetKills:0, ResetScore:0, Ressuplies:995, AssaultTime:116288, KillAssists:1238, QuitPercent:18.21, ResetDeaths:0, ResetLosses:0, ScoreCombat:1633582, SupportTime:58709, VehicleTime:NaN, EngineerTime:131425, ReconPercent:43, ScoreVehicle:174968, ResetShotsHit:0, AssaultPercent:21.63, ScoreObjective:76300, SupportPercent:10.92, VehiclePercent:NaN, VehiclesKilled:469, EngineerPercent:24.45, KillStreakBonus:15, ResetShotsFired:0
[09:14:01] -fX-JohnN Battlelog player stats:
    Kdr:1.49, Kpm:1.79, Spm:654, Rank:63, Time:544548, Wins:293, Kills:16284, Score:5927172, Skill:738.62, Deaths:10939, Losses:208, Repairs:60, Revives:2354, Accuracy:15.57, ReconTime:66654, ResetTime:140427, ResetWins:61, ScoreTeam:288590, ResetKills:2973, ResetScore:1207870, Ressuplies:281, AssaultTime:445480, KillAssists:2374, QuitPercent:41.47, ResetDeaths:3063, ResetLosses:53, ScoreCombat:2771472, SupportTime:4616, VehicleTime:NaN, EngineerTime:18141, ReconPercent:12.46, ScoreVehicle:9889, ResetShotsHit:16716, AssaultPercent:83.28, ScoreObjective:21625, SupportPercent:0.86, VehiclePercent:NaN, VehiclesKilled:221, EngineerPercent:3.39, KillStreakBonus:17, ResetShotsFired:133659
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by IceCold*:

 

hi,

all is set to how you say it should be.

but where is player.StatsError?

End of round player stats logging has been running for a day or so now.

all logs show revive stats as -1 or 0 same results on about 20 logs:-

 

Code:

Tag,Name,GUID,Team,Kills,Deaths,Headshots,Score,Revives,
INFO,Round ended at 15:50:19{Duration: 21.4 mins, Round: 1/2, Tickets: 0/68},-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
 ,misterke,EA_F247ECFA8858A96C3439EDC10053A928,1,32,33,7,7788,-1,
 ,Wariat102,EA_98529B72B37DA9083FD0CC848CCAF548,1,19,25,3,3968,-1,
 ,ZephyR_du_67,EA_2F14E6B3F0923B9F396AC287F3804018,1,9,27,0,2548,-1,
CN,BlubberLord,EA_C7E39BC5F600E9A8C1431A5FAFF50284,1,44,31,9,8112,-1,
 ,Piterox1991,EA_B402112696634C4CA92A6E6D6DB8F36A,1,12,36,2,3067,-1,
Cz,tomaska,EA_9733FC2E88F92804BB0B3052650E2747,1,36,48,5,8980,-1,
 ,Stoffelos,EA_618C229FBAAEB4338ECD2555FC8D8589,1,39,33,9,9952,-1,
 ,Joern_GER,EA_7EABA9A462618B179FF7E51EB841BEDF,1,4,21,1,1447,-1,
FIR,Infernal_Kill_38,EA_B3B18EF9E87966D1BBEEDB5942F5559E,1,13,9,2,2957,-1,
 ,Supermoro,EA_7C6060F3B48FBFB1DA08A7F51C3A10A5,1,7,19,0,2796,-1,
 ,iiiiiiiiNNNTTTER,EA_0E27344E697D0A916DC37D76595C347D,1,54,32,10,8523,-1,
BBCL,R0senkohl,EA_3A79B0E23F35C35C5751198D76C2465D,1,1,3,0,307,-1,
 ,HST-Blacky,EA_6343EC685A65E4C6D1D5854125B18340,1,7,14,2,2080,-1,
 ,Stigmaticbum,EA_6590990927088103DF74B18E08477DBC,1,21,27,5,6999,-1,
C9,S4rax0s,EA_D509005D0DBF336B3977A3F5FC7EBE7C,1,7,15,0,1763,-1,
 ,re3443re,EA_DFB2A4365B64B437184C18162773A25F,1,26,34,6,6022,-1,
HB,Biohazzy,EA_22888DD267D39296A7C946ACDE13AD3B,2,18,24,4,3815,-1,
 ,schumituu,EA_6F7C336036969A6424B9EFEB5ED59C57,2,27,39,6,4707,-1,
mFn,boye81,EA_1E8CE367F768030C332D23CE91206E41,2,37,33,5,9261,-1,
Felu,Nashorr,EA_2CB2D787B0D4527B2D27CA67D02D7E4C,2,21,10,1,3483,-1,
IF,labby007,EA_277F6A8DE03DF823758C9088E39A6D63,2,20,17,1,4530,-1,
HB,schmoox,EA_4124EB0508989081C31F8953567EF769,2,29,23,5,5876,-1,
KH,Robelibobban,EA_13472D98096DB55AE26BE205D5B0A016,2,39,22,9,9936,0,
MoW,CavaleiroII,EA_47037E469242D005AD22851E1735FC6F,2,18,11,4,2938,-1,
 ,IL4piiZI,EA_D07688537B48B010D7995CA377F890C6,2,24,22,5,3689,-1,
 ,thomas11kr,EA_B0234614EB51FFBBC02C830CA60A4470,2,7,33,2,2395,-1,
KH,Fraklarn,EA_0EA68C4BCD7594CA8390BA9B76D0B7A4,2,35,26,7,6732,0,
 ,wfroe48,EA_F881910FA7FC968CE23BD9B572FBC33D,2,16,11,3,2318,-1,
 ,lolo34710,EA_90779FEEA7E060D2C3976705C748FF05,2,37,30,3,10953,-1,
 ,Damtux,EA_4F21940619888A2562C1D738E8797C08,2,72,24,14,10382,-1,
 ,Alvaruss,EA_732B06187EC9345C32518EC742D4FB48,2,4,13,1,885,-1,
 ,Pfuit,EA_D83A013CA727F00E35C21746AEFFEE46,2,34,32,6,7808,-1,
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

hi,

all is set to how you say it should be.

but where is player.StatsError?

What's in your xxxx_battle.log, where xxxx is the date? That's the log file you get when you enable use_stats_log. It will be a good cross-check to see if you are getting stats correctly from Battlelog or the cache.

 

player.StatsError is in the same place that player.Revives is. You can add it to the log by using this version of the code:

 

Code:

/* VERSION V0.8/R1 + StatsError */

String kRound = "EOR_round_up_counter"; // plugin.Data int
String kRevives = "EOR_player_revives"; // player.Data double

int numRound = 1;
if (plugin.Data.issetInt(kRound)) numRound = plugin.Data.getInt(kRound);

/* BF3 friendly map names, including B2K and CQ post R25 */
Dictionary<String, String> maps = new Dictionary<String, String>();
maps.Add("MP_001", "Bazaar");
maps.Add("MP_003", "Teheran");
maps.Add("MP_007", "Caspian");
maps.Add("MP_011", "Seine");
maps.Add("MP_012", "Firestorm");
maps.Add("MP_013", "Damavand");
maps.Add("MP_017", "Canals");
maps.Add("MP_018", "Kharg");
maps.Add("MP_Subway", "Metro");
maps.Add("XP1_001", "Karkand");
maps.Add("XP1_002", "Oman");
maps.Add("XP1_003", "Sharqi");
maps.Add("XP1_004", "Wake");
maps.Add("XP2_Factory", "Factory");
maps.Add("XP2_Skybar", "Skybar");
maps.Add("XP2_Palace", "Palace");
maps.Add("XP2_Office", "Office");

/* BF3 friendly game modes, including B2K and CQ post R25 */
Dictionary<String, String> modes = new Dictionary<String, String>();    
modes.Add("ConquestLarge0", "CQ64");
modes.Add("ConquestSmall0", "CQ");
modes.Add("ConquestAssaultLarge0", "CA64");
modes.Add("ConquestAssaultSmall0", "CA");
modes.Add("ConquestAssaultSmall1", "CAS1");
modes.Add("RushLarge0", "Rush");
modes.Add("SquadRush0", "SQ Rush");
modes.Add("SquadDeathMatch0", "SQDM");
modes.Add("TeamDeathMatch0", "TDM");
modes.Add("Domination0", "CQD");
modes.Add("GunMaster0", "GM");
modes.Add("TeamDeathMatchC0", "TDMC");

String mapName = (maps.ContainsKey(server.MapFileName)) _ maps[server.MapFileName] : plugin.FriendlyMapName(server.MapFileName);
String modeName = (modes.ContainsKey(server.Gamemode)) _ modes[server.Gamemode] : plugin.FriendlyModeName(server.Gamemode);

String logName = plugin.R("Logs/%server_host%_%server_port%/") + DateTime.Now.ToString("yyyyMMdd") + "_" + numRound.ToString("D3") + "_" + mapName + "_" + modeName + "_eorstats.csv";

String header = "Tag,Name,GUID,Team,Kills,Deaths,Headshots,Score,Revives,StatsError,Tmp2,Tmp3";

String overall = "INFO,Round ended at " + DateTime.Now.ToString("HH:mm:ss") + "{Duration: " + (server.TimeRound/60).ToString("F1") + " mins, Round: " + (server.CurrentRound+1) + "/" + server.TotalRounds + ", Tickets: " + team1.RemainTickets + "/" + team2.RemainTickets + "},-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";

/* Create and initialize csv file */

plugin.Log(logName, header);
plugin.Log(logName, overall);

/* Build list of all players */

List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);
//if (team3.players.Count > 0) all.AddRange(team3.players);
//if (team4.players.Count > 0) all.AddRange(team4.players);

/* Write per player stats to the csv file */

int count = 0;
foreach (PlayerInfoInterface p in all) {
    // Build up the log line:
    String line = (String.IsNullOrEmpty(p.Tag) _ " " : p.Tag) + ",";
    line += p.Name + ",";
    line += p.EAGuid + ",";
    line += p.TeamId + ",";
    line += p.KillsRound + ",";
    line += p.DeathsRound + ",";
    line += p.HeadshotsRound + ",";
    line += p.ScoreRound + ",";

	// Guess at revives based on difference of Battlelog Stats
	double oldRevs = -1;
	if (p.Data.issetDouble(kRevives)) oldRevs = p.Data.getDouble(kRevives);
	double revs = -1;
	if (oldRevs != -1 && p.Revives != Double.NaN && p.Revives >= 0) {
		revs = p.Revives - oldRevs;
	}
	if (p.Revives != Double.NaN && p.Revives >= 0) p.Data.setDouble(kRevives, p.Revives);
	
	line += revs.ToString("F0") + ",";
        line += p.StatsError + ",";
	
	// spares
	//line += "-1" + ",";
	line += "-1" + ",";
	line += "-1";

    // Log it
    plugin.Log(logName, line);
    ++count;
}

plugin.ConsoleWrite("^b[EOR STATS]^n " + logName + " saved with stats for " + count + " players!");

plugin.Data.setInt(kRound, numRound+1);

return false;
If every log line says "True" after the -1 for Revives, that means you are not fetching Battlelog stats successfully.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by IceCold*:

 

battlelogs seem to be ok :-

 

Code:

[03:11:32] [PL]IceColdME Battlelog CACHED stats: 
    Kdr:1.25, Kpm:0.85, Spm:412, Rank:121, Time:2803670, Wins:1713, Kills:39655, Score:18663733, Skill:716.65, Deaths:31780, Losses:2079, Repairs:14, Revives:533, Accuracy:13.64, ReconTime:133956, ResetTime:0, ResetWins:0, ScoreTeam:152920, ResetKills:0, ResetScore:0, Ressuplies:56, AssaultTime:223485, KillAssists:5189, QuitPercent:20.74, ResetDeaths:0, ResetLosses:0, ScoreCombat:9861933, SupportTime:34415, VehicleTime:NaN, EngineerTime:1868040, ReconPercent:5.93, ScoreVehicle:627989, ResetShotsHit:0, AssaultPercent:9.89, ScoreObjective:669575, SupportPercent:1.52, VehiclePercent:NaN, VehiclesKilled:1672, EngineerPercent:82.66, KillStreakBonus:16, ResetShotsFired:0
[03:27:53] [AP]Fazerski Battlelog CACHED stats: 
    Kdr:0.62, Kpm:0.98, Spm:446, Rank:42, Time:195105, Wins:86, Kills:3189, Score:1428094, Skill:477.1, Deaths:5112, Losses:110, Repairs:39, Revives:587, Accuracy:9.77, ReconTime:28851, ResetTime:0, ResetWins:0, ScoreTeam:70280, ResetKills:0, ResetScore:0, Ressuplies:354, AssaultTime:52838, KillAssists:593, QuitPercent:48.69, ResetDeaths:0, ResetLosses:0, ScoreCombat:737494, SupportTime:25352, VehicleTime:NaN, EngineerTime:36497, ReconPercent:20.1, ScoreVehicle:85381, ResetShotsHit:0, AssaultPercent:36.81, ScoreObjective:30700, SupportPercent:17.66, VehiclePercent:NaN, VehiclesKilled:118, EngineerPercent:25.43, KillStreakBonus:8, ResetShotsFired:0
[03:29:45] [PL]IceColdME Battlelog CACHED stats: 
    Kdr:1.25, Kpm:0.85, Spm:412, Rank:121, Time:2803670, Wins:1713, Kills:39655, Score:18663733, Skill:716.65, Deaths:31780, Losses:2079, Repairs:14, Revives:533, Accuracy:13.64, ReconTime:133956, ResetTime:0, ResetWins:0, ScoreTeam:152920, ResetKills:0, ResetScore:0, Ressuplies:56, AssaultTime:223485, KillAssists:5189, QuitPercent:20.74, ResetDeaths:0, ResetLosses:0, ScoreCombat:9861933, SupportTime:34415, VehicleTime:NaN, EngineerTime:1868040, ReconPercent:5.93, ScoreVehicle:627989, ResetShotsHit:0, AssaultPercent:9.89, ScoreObjective:669575, SupportPercent:1.52, VehiclePercent:NaN, VehiclesKilled:1672, EngineerPercent:82.66, KillStreakBonus:16, ResetShotsFired:0
[04:21:21] leonardojcastro Battlelog CACHED stats: 
    Kdr:0.39, Kpm:0.3, Spm:160, Rank:34, Time:368866, Wins:153, Kills:1848, Score:964809, Skill:374.2, Deaths:4767, Losses:214, Repairs:40, Revives:203, Accuracy:10.9, ReconTime:141303, ResetTime:0, ResetWins:0, ScoreTeam:36650, ResetKills:0, ResetScore:0, Ressuplies:390, AssaultTime:59289, KillAssists:277, QuitPercent:23.54, ResetDeaths:0, ResetLosses:0, ScoreCombat:535009, SupportTime:53640, VehicleTime:NaN, EngineerTime:72473, ReconPercent:43.25, ScoreVehicle:27365, ResetShotsHit:0, AssaultPercent:18.15, ScoreObjective:48875, SupportPercent:16.42, VehiclePercent:NaN, VehiclesKilled:208, EngineerPercent:22.18, KillStreakBonus:8, ResetShotsFired:0
[04:39:38] [PL]IceColdME Battlelog CACHED stats: 
    Kdr:1.25, Kpm:0.85, Spm:412, Rank:121, Time:2803670, Wins:1713, Kills:39655, Score:18663733, Skill:716.65, Deaths:31780, Losses:2079, Repairs:14, Revives:533, Accuracy:13.64, ReconTime:133956, ResetTime:0, ResetWins:0, ScoreTeam:152920, ResetKills:0, ResetScore:0, Ressuplies:56, AssaultTime:223485, KillAssists:5189, QuitPercent:20.74, ResetDeaths:0, ResetLosses:0, ScoreCombat:9861933, SupportTime:34415, VehicleTime:NaN, EngineerTime:1868040, ReconPercent:5.93, ScoreVehicle:627989, ResetShotsHit:0, AssaultPercent:9.89, ScoreObjective:669575, SupportPercent:1.52, VehiclePercent:NaN, VehiclesKilled:1672, EngineerPercent:82.66, KillStreakBonus:16, ResetShotsFired:0
[04:43:56] [BA]JerrethePsycho Battlelog CACHED stats: 
    Kdr:1.08, Kpm:0.93, Spm:439, Rank:72, Time:1093870, Wins:490, Kills:16900, Score:7773702, Skill:587.76, Deaths:15615, Losses:492, Repairs:172, Revives:1038, Accuracy:19.21, ReconTime:74069, ResetTime:0, ResetWins:0, ScoreTeam:134048, ResetKills:0, ResetScore:0, Ressuplies:348, AssaultTime:239026, KillAssists:2012, QuitPercent:15.64, ResetDeaths:0, ResetLosses:0, ScoreCombat:4141902, SupportTime:92280, VehicleTime:NaN, EngineerTime:440457, ReconPercent:8.76, ScoreVehicle:536518, ResetShotsHit:0, AssaultPercent:28.26, ScoreObjective:438325, SupportPercent:10.91, VehiclePercent:NaN, VehiclesKilled:1470, EngineerPercent:52.07, KillStreakBonus:16, ResetShotsFired:0
[05:12:39] [PL]IceColdME Battlelog CACHED stats: 
    Kdr:1.25, Kpm:0.85, Spm:412, Rank:121, Time:2803670, Wins:1713, Kills:39655, Score:18663733, Skill:716.65, Deaths:31780, Losses:2079, Repairs:14, Revives:533, Accuracy:13.64, ReconTime:133956, ResetTime:0, ResetWins:0, ScoreTeam:152920, ResetKills:0, ResetScore:0, Ressuplies:56, AssaultTime:223485, KillAssists:5189, QuitPercent:20.74, ResetDeaths:0, ResetLosses:0, ScoreCombat:9861933, SupportTime:34415, VehicleTime:NaN, EngineerTime:1868040, ReconPercent:5.93, ScoreVehicle:627989, ResetShotsHit:0, AssaultPercent:9.89, ScoreObjective:669575, SupportPercent:1.52, VehiclePercent:NaN, VehiclesKilled:1672, EngineerPercent:82.66, KillStreakBonus:16, ResetShotsFired:0
i will try your latest code.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by IceCold*:

 

latest log from your new code :-

 

Code:

Tag,Name,GUID,Team,Kills,Deaths,Headshots,Score,Revives,StatsError,Tmp2,Tmp3
INFO,Round ended at 13:45:25{Duration: 19.0 mins, Round: 1/2, Tickets: 1/153},-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
 ,BussiTM,EA_E98C67F1E55212CAB89CBD6BE5BD34BA,1,22,8,3,4113,-1,False,-1,-1
 ,macnamara76fr,EA_951E04197B633885B700547A77005BAD,1,10,39,1,3455,0,False,-1,-1
URHO,ReverKeenan,EA_EB62834072302A8FD2673F94C6D497B9,1,53,37,13,11654,0,False,-1,-1
PL,pepegut,EA_7839C15320EFF73642E6121886ADF2C7,1,42,39,13,10967,0,False,-1,-1
 ,CrysisCZ1569,EA_570258AD1DA2C0807962185CD3E7B215,1,9,12,0,1742,-1,False,-1,-1
GSC,JackTheRussle,EA_41B14037AED3C8712C30358793A3D400,1,0,0,0,10,-1,False,-1,-1
 ,xXKampXx-Danmark,EA_78619ADEFFB485D9164F32F437FCC8D2,1,7,13,2,1642,-1,False,-1,-1
EGUK,NeiI101,EA_B310B3AD5BCEB2A36DD75DB82A28C321,1,47,18,8,7331,0,False,-1,-1
 ,pinnnnny,EA_87E52D689B034B43C29A8801E044C8F8,1,9,4,2,1558,-1,False,-1,-1
 ,gor2012,EA_EB4F2A6E03D89A75A59FCFBC6FF84E6D,1,11,4,1,1793,-1,False,-1,-1
GSC,xXSUPPR3SS1ONXx,EA_8526DB99E67B3D6BFE1D6820D2C342F4,1,2,3,0,668,-1,False,-1,-1
1337,Ma0rin,EA_17C5B0556C7ADC71A2F281A883821D34,1,30,31,9,5538,0,False,-1,-1
PL,IceColdME,EA_19DA630348007AAAA20B801379F4A746,1,31,31,4,6175,-1,False,-1,-1
 ,VakamaHU,EA_191669CD600B474229655E947BDAB772,1,14,27,3,2435,-1,False,-1,-1
 ,GreebRus,EA_7459214754317F72215838B45C71186F,1,33,40,8,7220,0,False,-1,-1
PL,hit0x,EA_E568B937C8D9F3CD57E10B962E05BDAB,2,47,25,8,10325,0,False,-1,-1
 ,DeepShait,EA_3CF0DCEA1DF8A1495B38F3F1919508E8,2,27,39,2,10701,0,False,-1,-1
 ,Shisha2Go,EA_F0DCA76B94C05E6A154A89D3E13B10D7,2,25,27,2,5007,-1,False,-1,-1
riSe,toxilox,EA_3A5EDA13DC1413017C50EF20BF481B04,2,56,16,8,11580,-1,False,-1,-1
 ,TomsCousin3,EA_7118D3496B13822D875DCABF8060371E,2,34,42,6,8393,0,False,-1,-1
 ,LordDimleX,EA_6F2CA7DCDE08E2B1C269E3B2E26721D6,2,6,7,1,1493,-1,False,-1,-1
 ,glanfer,EA_C5D82FFFEF0B1BD1432A6199BB0FA6D5,2,29,24,6,9495,0,False,-1,-1
BRO,sakit0s,EA_66DFF2CD0E45ED231057CD2E5CAD2886,2,25,27,3,5817,-1,False,-1,-1
 ,mlody3216,EA_07BB3ED4310016CC65BD909DB8B04743,2,19,28,5,3340,-1,False,-1,-1
GSC,LudwigLuemmel,EA_7FBBA24A0075ECE33C3BFB7A96A8C5B2,2,10,4,2,1643,-1,False,-1,-1
SNEL,Andreasfin92,EA_D2EBB4656507C38B2D05247BB024BA93,2,33,33,3,7101,0,False,-1,-1
rus,talik8222,EA_AB16A5056C74333E16B56BFC31BCF971,2,5,3,1,885,-1,False,-1,-1
FUB,Magnitudemus,EA_9C76E5559206178675F8DC2DF8546DD6,2,39,26,2,9293,0,False,-1,-1
 ,TerminatorDen,EA_DFC7B091552EBDD397DCA2104FA8197E,2,11,22,4,2947,-1,False,-1,-1
 ,Spingamer,EA_EF9FC1ECEC3D0D47AA344F78AE4C168E,2,25,33,4,5783,0,False,-1,-1
* Restored post. It could be that the author is no longer active.
Link to comment
  • 5 years later...

Originally Posted by IceCold*:

 

Nobody has access to accuracy% in round. The data is just not in RCON. I can do kills, deaths by, and headshots, per weapon.

 

You'll also have to decide what you want. Hopefully, not a list of weapons per player, that's a pain to do in CSV. Top weapon is easy, even top 3 weapons is doable. You'll have to decide if you want the weapon and then each stat for that weapon in separate columns, or combine them all in one string that you can parse in post processing, for example:

 

weapon,kills,headshots, ... : e.g., P90,27,4,G36,12,5,M1911,3,0

 

vs.

 

weapon/kills/hs, ... : e.g., P90/27/4,G36/12/5,M1911/3/0

what do i need to add to this script to get player weapon stats ?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by IceCold*:

 

you have to track every single kill for each player. something like this in LIMIT 2: myrcon.net/...insane-limits-live-server-stats-kills-by-country-clan-weapon-#entry52295

 

on round end you can put the collected kill log into the log file

i need the weapon name + kills with that weapon, per player

i was hoping some would have a script for that.

* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.



  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.