th3-z / kf2-magicked-admin

:spider: Mutator-free management, statistics, and in-game bot for ranked Killing Floor 2 servers
https://kf2-ma.th3-z.xyz
MIT License
32 stars 7 forks source link

[FEATURE] Change map automatically when the server is empty #178

Open Yakonche opened 3 years ago

Yakonche commented 3 years ago

Integrate this functionality : https://github.com/Seimax/AMC So that when there is no one on the server, the map is automatically changed every x seconds according to a pre-defined list. Because sometimes nobody joins a server because the current map is not interesting, this mod allows to correct this problem. We could use the magicked_admin.conf file to define this list, but the admin user used in the .conf file (username =) would have to have permissions to change the map.

Example :

[magicked_admin]
language = fr_FR

[Zedternal]
game_password = JoinInGame
refresh_rate = 3
address = http://127.0.0.1:8080
username = Admin
password = ThePasswordOfAdminWhoCanChangeMap
maps = KF-AshwoodAsylum , KF-Biolapse , KF-Desolation , KF-Farmhouse , KF-Nuked , KF-Sanitarium , KF-SteamFortress
switch = 600

maps = The list of maps that will be chosen to be loaded automatically when the server is empty, they will load every 600 seconds.

Example : The last player leaves the server on the KF-HostileGrounds map, the server will then automatically load the next map in the MapCycle šŸ‘ KF-InfernalRealm, 600 seconds later, the KF-AshwoodAsylum map will be loaded. (and after 600 seconds => KF-Biolapse, if nobody joined the server of course )