SPADS AutoHost

SPADS AutoHost

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

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

SPADS AutoHost

Post by bibim » 16 Dec 2008, 00:58

SPADS (Spring Perl Autohost for Dedicated Server) is a Perl autohost program for Spring, released under GPL v3 license. It has been designed from start for headless servers without any graphic interface, and is heavily customizable through various configuration levels.
Unfortunately, I haven't had time to write a real operating guide yet, but you should still be able to install it by following the instructions in the INSTALL file of the installation package. You should also be able to configure it quite easily by editing the various configuration files (I tried to give meaningful names to settings, and all settings are described here).

SPADS related links are gathered on SPADS wiki.

If you have any question/problem, feel free to contact me in the lobby or forum.



Requirements for Linux/UNIX:
  • Perl, Swig and g++ must be available (Swig and g++ are only used during installation)
    (all standard Perl core modules must be available, on some systems such as RedHat/Fedora/CentOS this requires installing a metapackage usually named "perl-core")
Requirements for Windows: Requirements for macOS:
  • Spring must be installed (including spring-dedicated binary) with at least 1 game/mod
  • Perl, Swig and g++ must be available (Swig and g++ are only used during installation)

Overview of the functionalities implemented in the beta version:
  • Persistent lobby connection: lobby disconnections don't affect running games (for example it auto-reconnects as "in-game" after network problems if a game is currently running)
  • Linux-type file structure (binaries and configuration files can be shared between multiple instances)
  • Dynamic configuration (configuration files can import other files, can contain macros, can be reloaded while running)
  • Auto-update (debian-like update system: stable/testing/unstable, can wait for empty battle and/or game-end before restarting)
  • All events/chats can be logged (each interface has its own log level)
  • Fully customizable rank-limits (upper rank-limits, lower rank-limits, auto-spec/auto-kick...)
  • Advanced commands right system (can be changed on-the-fly, any information available in lobby protocol can be used as command requirement: rank, admin-flag, cpu...)
  • Clear separation of SPADS settings (gathered in "presets"), Spring lobby settings (gathered in "hosting presets"), and Spring MOD options (gathered in "battle presets")
  • Allowed values for each SPADS/lobby/MOD setting can be restrained separately
  • Generic and automatic vote system (any command can be voted, and a vote is called automatically when you don't have sufficient rights to execute a command directly)
  • Each user can define his own autohost preferences (minRingDelay for example is the minimum delay before you can be rung another time by the autohost)
  • Lobby channel management (kick, ban...)
  • Output flood protection (no bot flag required, SPADS restrains itself from flooding according to server thresholds)
  • Input flood protection (battle lobby flooders are auto-kicked, command spammers are auto-ignored temporarily, recidivists are auto-banned temporarily...)
  • Multiple ban lists management with multiple levels of bans: auto-spec, battle auto-kick, channel auto-kick (any information available in lobby protocol can be used as ban filters, regexp can be used...)
  • Advanced automatic rotation (maps or presets can be rotated automatically, when battle is empty and/or after each game...)
  • Several map lists can be defined and applied on-the-fly, with include/exclude regexp filters
  • By-user vote-modes are detected automatically to speed up votes (auto-vote blank for away players)
  • Deep battle structure auto-management (SPADS can auto-manage any type of battle: 1v1, 4v4v4v4, 3x3 v 3x3 v 3x3 ...)
  • AutoSpecExtraPlayers can be used to prevent spectators from unspecting when battle is full from autohost point of view, or advanced autoLock mode can be used to auto unlock the battle when this happens...
  • Optional auto-block teams/id/colors feature when teams are balanced/fixed
  • Map boxes auto-learning (different sets of start boxes can be saved for each map, according to the number of teams)
  • Can print detailed information about the current running game with the !status command (useful to guess if the current running game will end soon)
  • Unlock-for-spectators functionality
  • Ready for on-demand autohost service with temporary operators and auto-close when battle is empty
Last edited by bibim on 31 Dec 2013, 01:08, edited 9 times in total.
0 x

User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: SPADS AutoHost beta release

Post by Error323 » 16 Dec 2008, 14:51

Hey Bibim,

Thanks alot for the beta release, I just have to show my appreciation here. It's a job very well done! Works amazing and is nice and clean.
0 x

BaNa
Posts: 1561
Joined: 09 Sep 2007, 21:05

Re: SPADS AutoHost beta release

Post by BaNa » 17 Dec 2008, 13:05

upper rank-limits == win

# Input flood protection (battle lobby flooders are auto-kicked, command spammers are auto-ignored temporarily, recidivers are auto-banned temporarily...)


# Join/kick flood protection through random password system (non banned users can request the password with command !pass)


# Unlock-for-spectators functionnality

cool peas.
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 12 Mar 2009, 02:33

Windows support is now available, still in beta version though (first post updated). You must select "testing" release during installation for Windows support.

Lots of new features have been added since original post, among them:
  • Windows support with optional automatic binary updates for future spring versions (nothing to do to stay up to date)
  • Presets can be loaded automatically on map change (map-presets)
  • Intelligent automatic preset/map rotation (adapted to the number of players currently in battle)
  • Auto-force start when only unsynced or already in-game spectators are missing
  • Alert system for AutoHost administrators through lobby private messages
  • Detailed help for all modoptions is available through !help command
  • Spring archives can be reloaded automatically when new maps or mods are detected in the data directory
  • Regular expressions can be used for mod names, so that battles are automatically rehosted when a new version of current mod is available in data directory
  • Separate commands for balancing / rebalancing (!balance will always balance the same way until the game starts or !rebalance is used)
  • Ability to host a map without having the map archive locally on the server (ghost map hosting)
  • Maps can be learned automatically for ghost map hosting, by spying other battles dynamically, with optional host/map name filters
  • Autohost level authentication (usefull when lobby server is running in LAN mode)
Detailed changelog for each SPADS component is available here
Last edited by bibim on 17 Aug 2009, 00:43, edited 1 time in total.
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 26 Apr 2009, 23:33

Beginning with version 0.7.4, SPADS is able to generate an HTML documentation about all commands and settings. You just have to add "--doc" to the SPADS command line, and it will generate the documentation for your version in your SPADS dynamic data directory ("var" by default).

Here is an example for the current "unstable" release.

It should be quite usefull for AutoHost administrators who want to do advanced customizations (a lot easier than using !help for each setting at least).
Last edited by bibim on 17 Aug 2009, 03:43, edited 1 time in total.
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 24 May 2009, 02:09

To answer some questions I've been asked in lobby concerning SPADS and the Spring version upgrade, here is what you can do to upgade your autohost to new Spring version:



On Linux:
- Recompile Spring and install it somewhere (actually you just need to compile unitsync and spring-dedicated, and generate "gamedata" (Spring base files)).
- Update your LD_LIBRARY_PATH and the paths in spads.conf for new Spring version if needed
- update your SPADS installer script so that it contains the latest changes which could be required to recompile the unitsync interface from latest Spring sources: "./update.pl <spadsRelease> -a"
- launch the PerlUnitSync module generation: "./spadsInstaller.pl -g"



On Windows:
- update the "springDataDir" setting in spads.conf if you installed the new Spring version in a different place
- restart SPADS
Last edited by bibim on 25 Aug 2009, 16:16, edited 2 times in total.
0 x

Drezil
Posts: 33
Joined: 08 Mar 2007, 13:32

Re: SPADS AutoHost beta release

Post by Drezil » 18 Aug 2009, 09:52

Thanks for this bot.
The installer didnt work out of the box .. but i leeched the files manually, linked em correctly and after that it worked all fine :D

finally there is a 2nd nota-autohost running :D
0 x

YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: SPADS AutoHost beta release

Post by YokoZar » 20 Nov 2009, 07:03

bibim I haven't played in a while but I wanted to thank you for making an excellent autohost that made it possible
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 20 Nov 2009, 09:59

Thank you YokoZar, appreciated ;)
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 18 Jul 2012, 22:39

New major SPADS version (0.10.*) should now be available in "testing" release. As I didn't release major SPADS version since quite a long time now (more than 2 years I think), here is a small explanation:
Major version means it requires updating config files manually (mainly to add new settings), so SPADS doesn't update automatically. Instead, it logs a message explaining how to proceed and point you to this manual update documentation, so that you can do it when you have some time.

SPADS 0.10 comes with new functionnalities, for example:
- mid-game join as new player
- full spring-headless compatibility for automatic server-side AI bots management
- easy integration of external programs for demo files management (*)
- balance algorithm more customizable for TeamFFA
- team statistics management (end-game awards...)

Detailed changelog for each SPADS component is available here.

(*) Thanks to Dansan who developped a replay upload script in Python, it is now very easy to upload replays automatically from SPADS. Here is the short version of his "howto":
* log in once with a Spring account which will be the "owner" of the uploaded replays: http://replays.springrts.com/login/
* update endGameCommand, endGameCommandEnv and endGameCommandMsgsettings in spads.conf as follows (replace <owner> by the actual Spring account used in previous step):

Code: Select all

endGameCommand:python replay_upload.py -v -r %result -d %gameDuration "%type on %map" "autouploaded" "%type,%structure" "%demoFile" "<owner>"

endGameCommandEnv:XMLRPC_USER=%ahName;XMLRPC_PASSWORD=%ahPassword

endGameCommandMsg:(0)Demo file uploaded to http://replays.springrts.com/replay/%gameId|(1-9)Failed to upload demo file!
* WARNING: this configuration will send your autohost password to the replay site for authentication. If you don't want this to happen, you can create a new Spring account just to upload the replays (replace %ahName and %ahPassword by this account name and password in previous step)
* restart SPADS
If you want more information about how to use this script, full documentation is available here. If you still have questions concerning this script or the Spring replays site, I guess you can contact Dansan.

I encourage to use this script on your SPADS autohosts for automatic replay upload so that we provide content to the Spring replays site.
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 02 Mar 2013, 03:20

  • New major SPADS version (0.11.*) should now be available in "testing" release.

    "Major version" means it requires updating config files manually (mainly to add new settings). Consequently, SPADS doesn't update automatically. Instead, it logs a message explaining how to proceed and point you to this manual update documentation, so that you can do it when you have some time.
  • SPADS 0.11 comes with 2 major new functionalities:
    1. Built-in TrueSkill support for battle auto-balancing
      The built-in TrueSkill is totally different and independant from the TrueSkill computed on the replay site. It uses a slightly modified version of TrueSkill to handle some particularities of RTS games and to take into account inactivity penalties. For each game (BA, ZK...), 4 independant ratings are computed: Duel, FFA, Team and TeamFFA (+ 1 global rating which isn't used for balancing, but for global ranking only). Anyone can check his TrueSkill ranking for all games by saying "!ranking" to the bot named "SLDB" in the lobby.

      AutoHosts using built-in TrueSkill will also benefit from a better smurf detection algorithm. Currently, following Spring games can use SPADS built-in TrueSkill service: Balanced Annihilation, Zero-K, Tech Annihilation, NOTA, XTA, Evolution RTS, Spring: 1944, and Kernel Panic. By default, TrueSkill is disabled in SPADS, to enable it you have to set your skillMode preset setting to "TrueSkill" in spads.conf.
    2. Plugin interface for "easy" SPADS customization
      This plugin interface is based on callbacks called by SPADS core + a dedicated API to make it easier to manipulate SPADS data and SPADS interfaces. The plugins can be reloaded dynamically while SPADS is running, so plugin development is quite easy as you don't need to restart SPADS each time you modify the code. Plugins can have their own config files, define new commands, define handlers for all SPADS interfaces (SpringServer, LobbyServer), alter balancing algorithms, change !status output..., all this reusing SPADS core functionalities so it requires minimal coding.
      I plan to write some doc soon, and maybe some plugin examples as tutorials.
  • Minor new functionalities and fixes are also included

    Detailed changelog for each SPADS component is available here.
0 x

User avatar
Silentwings
Moderator
Posts: 3590
Joined: 25 Oct 2008, 00:23

Re: SPADS AutoHost beta release

Post by Silentwings » 02 Mar 2013, 11:05

Wow, great work. Those are two huge improvements in my opinion.
0 x

muckl
Posts: 151
Joined: 30 Aug 2010, 07:18

Re: SPADS AutoHost beta release

Post by muckl » 03 Mar 2013, 16:34

thanks to all contributors regarding the trueskill implementation :P
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 10 Mar 2013, 16:54

bibim wrote:Plugin interface for "easy" SPADS customization
I plan to write some doc soon, and maybe some plugin examples as tutorials.
I have initialized the SPADS plugin API documentation, and written a tutorial for a simple SPADS plugin.
Don't hesitate to ask if you need any more information.
0 x

User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: SPADS AutoHost beta release

Post by danil_kalina » 19 Mar 2013, 12:20

SPADS autohosts ( in contrast to Springie ) let lobbies to validate GameHash and MapHash. Nice !
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 26 Mar 2013, 16:17

Starting with version 0.11.7, SPADS prints the players skills values (used for balancing) in the startscript, and sends them in the battle lobby using SETSCRIPTTAGS commands:
  • In the lobby
    Lobby clients will receive the following new script tag for each player in the battle lobby, containing the corresponding skill value:

    Code: Select all

    game/players/<lowerCasePlayerName>/skill=<skillValue>
    This script tag is sent whenever a player joins the battle, but also whenever a player skill value changes (due to !chrank or TrueSkill rating change for example). These new script tags allow lobby clients to show skill values used by SPADS for balancing, directly in the battle lobby window as a new column for example. This should improve SPADS balance transparency a lot, and players shouldn't need to type !status every time they want to understand current team balance, or check smurfs etc.
  • In the startscript
    SPADS writes the skill values as a new tag named "Skill", in the "PLAYER<N>" sections:

    Code: Select all

    [GAME]
    {
      ...
      [PLAYER<N>]
      {
        ...
        Skill=<skillValue>;
        ...
      }
      ...
    }
    That way, LUA scripts can now access skill values directly from game, which should be much better than lobby ranks for skill evaluation purpose (advanced player list etc.). Also, this makes it possible to check the skill values used for balancing retroactively, just by opening the corresponding replay/demo file.
  • Skill values
    The skill values used by SPADS for balancing can have different origins, depending on SPADS configuration.
    They are formated differently, depending on this origin (same format rules as in !status output):
    • For skill values estimated from lobby ranks (directly or through IP rank or chrank), the value is an integer between parentheses, example: "(25)".
    • For skill values obtained from TrueSkill service, the value is either the exact TrueSkill value if the player has no privacy mode enabled (example: "32.56"), either the rounded TrueSkill value prefixed with "~" if the player uses privacy mode (example: "~30").
0 x

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

Re: SPADS AutoHost beta release

Post by dansan » 27 Mar 2013, 10:31

bibim wrote:allow lobby clients to show skill values used by SPADS for balancing, directly in the battle lobby window as a new column
bibim wrote:advanced player list
bibim wrote:replay/demo file
bibim wrote:They are formated differently, depending on this origin
WOW - yes baby! This finally means total integration! Very thorough job! Thank you bibim!!!

And also thx to aegis and abma for REMOVESCRIPTTAGS.
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 01 Sep 2013, 20:03

Since version 0.11.9, SPADS also writes the players' skill uncertainties in the startscript and sends them in the battle lobby using SETSCRIPTTAGS commands, as it already does for skills values (cf this post). The name of the tag is "skilluncertainty", it takes integer values from 0 (skill value confidence is high) to 3 (skill value confidence is very low).

I've modified a bit the SimplePlayerList widget from BrainDamage to directly show the Skill values in a new column of the players table and to adjust the skill color according to the skill uncertainty (green => skill is accurate, light green/yellow => skill is quite accurate, orange => skill is approximate, red => skill is very approximate).
Thanks BrainDamage for fixing and including these changes in the standard version of the widget, available here.
Don't forget to enable the "showSkillColumn" option in the widget tweak mode (Ctrl-F11 in game).

Image

These TrueSkill values with uncertainty information (and using anti-smurf system from SLDB) should be much more usefull than rank values to know which allies you can trust, which allies you may need to help, which ennemies are dangerous, where are the weak spots etc.

If you want your exact skill value to appear in the player list (instead of a rough value prefixed by '~'), remember you can disable the privacy mode by saying "!set privacyMode 0" to the bot named "SLDB" in Spring lobby (cf this post for more info).
0 x

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

Re: SPADS AutoHost beta release

Post by dansan » 01 Sep 2013, 20:34

<3

Now only the lobbies are left, to display this, instead of time-ranks.
0 x

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

Re: SPADS AutoHost beta release

Post by bibim » 12 Sep 2013, 12:23

With version 0.11.10, SPADS now automatically uses multi-engine lobby protocol extension when needed.

New plugin callbacks are also added to make SPADS more customizable (cf SPADS Plugin API documentation).
0 x

Post Reply

Return to “SPADS AutoHost”

cron