Parsing of replay data / detecting game state in spads

Parsing of replay data / detecting game state in spads

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

Post Reply
User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Parsing of replay data / detecting game state in spads

Post by Jools » 02 Mar 2015, 23:56

I don't really know where to write, in spads or in replay site, as this is a combination of the two.

I'm looking for way to mark certain games with a tag, for example if the game desyncs it would be tagged as desynced (and some stuff could be done automatically like copying infolog etc). Or if the game has a luacallin error, or similar stuff.

Would the best bet to use the endgamecommand to launch a shell process that parses replay file for these things? But endgamecommand is already in use for uploading replays, so one has to make a plugin to use the same event instead? This one: onGameEnd(\%endGameData)

I know the replay site does something to this end...
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: Parsing of replay data / detecting game state in spads

Post by bibim » 03 Mar 2015, 00:15

If you want to use the endGameCommand feature to run several processes (replay upload script + your specific script), I think you can just configure it to run a shell script which would in turn run these several processes (passing arguments).

But in the desync detection case, I don't think you need to parse the replays. Normally SPADS detects the desyncs (based on the spring-dedicated exit code) so you could directly use this information from a plugin. However currently I don't think this information is easily available from plugins, maybe I should add a callback.

If you want to check if your SPADS instance correctly detects unsynced games, you can look for "Spring server detected sync errors during game" warnings in your main SPADS log file.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: Parsing of replay data / detecting game state in spads

Post by Jools » 03 Mar 2015, 00:18

Ah, that's smart. As I was going to parse the console text in the game anyway to detect those.
0 x

dansan
Server Owner & Developer
Posts: 1191
Joined: 29 May 2010, 23:40

Re: Parsing of replay data / detecting game state in spads

Post by dansan » 03 Mar 2015, 08:40

Currently desyncs are not detected on the replay site. Should be no problem to find the console text in the demofile and then tag the replay. I'll add it as a feature request myself :)
0 x

Post Reply

Return to “SPADS AutoHost”

cron