How to produce a stats logfile (kills, objectives etc)?



  • Hi all,

    Anyone know if it’s possible to make the server produce a logfile containing kills, gained objectives, wins/losses, etc?
    I’m trying to produce these stats from our games. First step would be a usable logfile, but I can’t get it to produce anything usefull.

    Thanks in advance for any input.



  • Today I decided to log some stuff for my map on my server as well. Specifically, the server should remember whenever a player achieves a certain difficult task, so I can put them in a ‘hall of fame’ on my map website later.

    So writing to a file can be done using the filewriter class.
    Here is the code inside a Kismet node I have so far:

        local FileWriter FW;
    
        FW = GetWorldInfo().Spawn(class'FileWriter');
        FW.OpenFile(file, FWFT_Log,,,);
        FW.Logf(txt);
        FW.CloseFile();
    

    There are some problems with this. When an already existing file is opened and closed, all the previously written text is overwritten. So what I will do is for every player I need to create a new file. Tell me if you find a way to append text even when the map/ server restarts.

    The file is written to: C:\Users[Username]\Documents\My Games\Chivalry Medieval Warfare\UDKGame\Logs
    This was tested on a local server and I wonder if it will work on my remote server. I can’t test right now because the server is full, but on monday morning I will deploy the new mapversion.

    Update: I loaded the map on my server but the log files are not created. It only seems to work on local servers. It’s a SimRai server.

    Update2: ok, this works: http://udn.epicgames.com/Three/ConfigurationFiles.html
    I just tested it.



  • So you have created a log file for a custom map you made? or You have created a logging system for a server to log for any map on the server? What are you doing with the log and are you spitting out that data in game? Will this lead to a ranking system for your server?



  • "So you have created a log file for a custom map you made? "
    Yes, for Horde Sandcastle. It is map specific and works with Kismet.

    “What are you doing with the log and are you spitting out that data in game?”
    I am logging players which achieve sth. Specifically, I log the time, player steam id, the name and some other map related stuff.

    It is for an external ranking on a website. The data is not accessable ingame. Just a little chat message outputs the data when it is written to the log. It is the dungeon clearer ranking: http://horde-sandcastle.github.io/server.html



  • What an extremely familiar server.



  • I would have guessed its just like using any stats program , feed the information into it regardless of game.
    http://www.cromctf.com/vsp/pub/themes/bismarck/index.php?config=crom_3w.php&skin=evilsmurfs

    click on a name after and each gamer has a second page of stats of everything, weapons, enemies, etc accuracy.

    To write one of these seems quite easy tbh.
    open> while true > compare > append etc.




Log in to reply