2013-03-04

Update of dynamic custom maps list

I have updated the dynamic generation of custom maps list.
See here
Now nearly all is automated.
It uses a MySQL database now.
The URLs to the maps are currently extracted from the VPKs itself and they may not always point to the correct location. The map creators seem not to care about this URL sometimes.
So soon I will fix the URLs by hand.
But you can always search on l4dmaps.com for the campaign name by yourself.

The dynamic generation now takes also care about the maplist files used in the votmap plugin.
So these files are now generated automatically too.
 Just one step is missing atm.
I will integrate the dynamic generation to our server start/stop scripts so that everything is automated.

So now it should be as easy as this:
  • Add a new VPK to some servers addons folder
  • Add the meta data (campaign name, map name, vpk name, gametype,..) to the MySQL database (has to be done only once for a new VPK)
  • Stop the server with the script (has to be done anyway for each new VPK)
  • Start the server with the script. This will execute the following:
    • scan the servers addons folder
    • update some data in the MySQL database
    • generate the maplist files (maplist.txt, mapkick, maplist_sv.txt)
  • Now the list shown with !votemap in game shows the currently installed maps
  • And the dynamic list of maps web site shows the same list with links for download (this list is generated from the MySQL database and is way faster than the approach I have used before)
  • Now the VPK can be copied (better hard linked to save hard disk space) to any other servers addon folder
  • After stop/start of these other servers everything is updated automatically too (no need for manual MySQL edit of meta data. This has to be done only once for each new map. Delete in MySQL is not needed when a VPK is deleted. This entry can stay in the database and does not hurt.)
Also easy is deactivating a VPK:
  • Delete the VPK from a servers addon folder (or just rename from e.g. "2ee.vpk" to "2ee.vpk_" to deactivate the VPK)
  • Stop server with script
  • Start server with script
  • Done! The map should now no longer be in the !votemap list and it is not visible anymore in the dynamic list of maps web site.
So the players should now be able to see exactly what custom maps are installed on which server on the dynamic list of maps web site and the in game !votemap list should show exactly the same.

And the server admins now only have very little to do when adding or removing a custom map (VPK)

No comments:

Post a Comment