Chivalry server - Web communication



  • Hello all,

    I’ve searched some, found some ideas and documents but couldnt make my brain clear. So I’ve decided to ask it here.

    Is there a way to send “a server’s player’s stats” to a mysql database. If there is, I’ll try to make a simple php based web page to show the stats and probably I’ll share it here to improve with new ideas.

    Have a nice day all.



  • I don’t think you can query a database directly from a gameserver with merely unrealscript. You probably have to implement the database driver for MySql first, similar to what PDO in PHP uses to connect to MySql.

    Since you want to use PHP you have to set up a webserver anyway, so let it handle the DB. I suppose you want to use an external web-hoster or do you want to use the gameserver for that too? Probably not a good idea to let e.g. apache and stuff run alongside the game. What is a more common solution is to send requests from your gameserver to the webserver via http (using sockets more or less directly with TCP or UDP requires open ports other than 80 on your webserver wich is disallowed for almost all free webhosters).

    There are several ways to send http requests with uscript: either use tcpLink or HttpFactory. The latter is used by TB but I could not get POST parameters to work and it relies on a ready implementation referenced in the configuration.
    TcpLink certainly works in all ways if implemented accordingly.



  • Brazil servers have some similar implementation with lots of cool details. AFAIK Coldfir3 (server owner and dev of a set of RCON tools) uses a 3rd party tool to read the kill feed and post it elsewhere. It’s got pretty cool features and you can even poll your stats in-game with some custom RCON commands.

    http://coldfir3.net/Default.aspx

    And for example, these are the recorded stats for a rank 60 BR guy: http://coldfir3.net/player.aspx?id=76561198028796153



  • Thank you guys for the information,

    I think I have to search more about this topic and then decide what kind of a way I will try to use. It should be simple and useful.

    If you find a simple way to send data to mysql database, please tell me. And if I do some work about this topic I’ll share it with you.



  • I’ve found a tutorial at here http://www.alexander-fisher.com/?p=159

    I dont know about UDK scripting and I wonder if this tutorial is the right thing that I need to achieve my goal.

    And also, Is it possible to do “UDK scripting” on the “Chivalry-ded-server” ?



  • @Alphonse:

    Brazil servers have some similar implementation with lots of cool details. AFAIK Coldfir3 (server owner and dev of a set of RCON tools) uses a 3rd party tool to read the kill feed and post it elsewhere. It’s got pretty cool features and you can even poll your stats in-game with some custom RCON commands.

    http://coldfir3.net/Default.aspx

    And for example, these are the recorded stats for a rank 60 BR guy: http://coldfir3.net/player.aspx?id=76561198028796153

    There’s no third party tool, everything is done via RCON, added a plugin on my rcon tool (that will not be released, way too much work to make it stable enough) that saves the kills, deaths and so on to a DB, the killfeed just queries the last 25 kills recorded, the most complex thing on that site is the server stats that’s updated via SignalR.

    But other than that it’s pretty much vanilla Asp .net, some Telerik Controls (graphs, grid and menu) and SignalR for the updating of the server status.

    The rank info is queried from the steam API and converted using the equations posted some time ago on this forum.



  • Yeah,

    I have found a project called “Steam-condenser” and I think I can use it to achieve my goal.

    I’ll fetch the data from Steam Condenser project and then send it to mysql database then read the data from mysql to show it at the webpage. But first of all, I need to learn if it is possible to execute a php file everytime “when a map ends at chivalry-medieval-ded-server” ? Because I need to fetch the data from Steam-Condenser everytime “when a map ends”

    Can anyone help me ?



  • which rcon tool do you use?



  • @onesizefitsall:

    There’s no third party tool, everything is done via RCON, added a plugin on my rcon tool (that will not be released, way too much work to make it stable enough) that saves the kills, deaths and so on to a DB, the killfeed just queries the last 25 kills recorded, the most complex thing on that site is the server stats that’s updated via SignalR.

    But other than that it’s pretty much vanilla Asp .net, some Telerik Controls (graphs, grid and menu) and SignalR for the updating of the server status.

    The rank info is queried from the steam API and converted using the equations posted some time ago on this forum.

    So what RCON tool are you using? It is quite impressive use of stats and putting it web based. Surely there is a simple user friendly tool for remote admin and stats for server owners to emplament without needing a degree in programming.



  • @Retsnom:

    So what RCON tool are you using? It is quite impressive use of stats and putting it web based. Surely there is a simple user friendly tool for remote admin and stats for server owners to emplament without needing a degree in programming.

    Honestly, I DO have a degree in something similar, as far as I’m aware, it’s either do it yourself, or nothing at all since Chivalry’s RCON protocol is completely custom and follows no standard whatsoever, but the documentation for developing something is not so bad.
    https://tornbannerjira.atlassian.net/wiki/display/CHIVCOM/RCon+Protocol

    (Check my name and the RCON tool thread, I’m the original developer, I redid most of the tool but I’m not releasing, the web part depends on licensed controls that I can’t distribute, and the tool itself is quite a pain to configure the first time and I don’t have time to do a documentation on how to do it)



  • @onesizefitsall:

    Honestly, I DO have a degree in something similar, as far as I’m aware, it’s either do it yourself, or nothing at all since Chivalry’s RCON protocol is completely custom and follows no standard whatsoever, but the documentation for developing something is not so bad.
    https://tornbannerjira.atlassian.net/wiki/display/CHIVCOM/RCon+Protocol

    (Check my name and the RCON tool thread, I’m the original developer, I redid most of the tool but I’m not releasing, the web part depends on licensed controls that I can’t distribute, and the tool itself is quite a pain to configure the first time and I don’t have time to do a documentation on how to do it)

    I know man…. I had tried to contact you several times about releasing the updated version of the Chiv Rcon Tool. If you release it for free there is no profit so why would there be any licensing issues? I am the one that posted a link so that others could at least use your old version after the original link was removed. Please release the latest version, I can figure out how to config it if it is set up like the original. Yeah it would be nice to have a web interface but really the remote admin is far more important.

    I do I.T. support but I am not a programmer unless you think HTML is programming… hehe. That is about the extent of my programming minus Basic and Cobal, back in the 80’s


Log in to reply