Workshop Map Loader
Advanced Workshop Map Loader and Game Type Adjuster
Description
This plugin searches for workshop maps in your servers map directory and assists the admin in handling those. It will also ensure that the current game mode will get automatically adjusted, if requested by the admin.
The plugin was developed for CS:GO and will not work in other games.
Features
Admin menu
The Top-Level menu is dynamically built depending on your servers' workshop maps and their community tags:
Each category hosts the corresponding map:
Note, that a map may appear in multiple categories depending of it's tags.
Vote menu
It's possible to interact with the stock MapChooser plugin or the MapChooser Extended plugin.
Commands
sm_wml brings up the map list (for Admins with at least changemap-Permissions)
sm_wml_reload refreshes the map list (useful to be triggered by the admin after the server has downloaded new workshop maps)
sm_wml_vote_now requests an instant next map vote
sm_wml_nominate_random_maps will nominate a given amount of random maps from the database for the next vote. It's behavior is controlled by the sm_wml_nominate_* Cvars.
Cvars
This plugin generates it's config file in csgo/cfg/sourcemod/wml.cfg after first load.
sm_wml_version returns current plugin version
sm_wml_changemode will change the game mode corresponding to the selected category <1 = Enabled/Default, 0 = Disabled>
sm_wml_autoreload defines if the database content should be refreshed on plugin reload. It's recommended to turn it off after the first successful load for performance reasons <1 = Enabled/Default, 0 = Disabled>
sm_wml_armsrace_weapon defines the weapon in Armsrace mode where voting shall pop up if the first player acquired it <awp = Default>
sm_wml_nominate_all_maps defines if all maps shall be allowed to get into vote nomination rather than only maps matching the current game mode (e.g. in Casual there won't be Armsrace maps nominated) <1 = Enabled, 0 = Disabled/Default>
sm_wml_override_mapcycle creates and sets a custom mapcycle file on each mapchange with workshop maps matching the current game mode. This will allow excellent automated interaction with stock map management plugins <1 = Enabled/Default, 0 = Disabled>
Translations
English
German
Russian
Romanian
Plans/TODOs
Suggestions welcome!
More translations
Add map blacklist to exclude "broken" map IDs
Changelog
Spoiler
2014-02-16
* Moved developer notes and changelog to Github
2014-01-11
* Sorting works again
* No API key needed
2014-01-09
* Fixed memory leaks in menus
* Implemented map change listener
* Implemented API Key validation
* Fixed plugin version cvar showing up in config file
2014-01-08 (v0.1.0)
* Top-Level Map Category Menu implemented
* Fetching additional map info from SteamWorks online implemented
Important: this plugin can't be compiled on the Forum, please use the provided download link to get the ready-to-use plugin or source code to compile by yourself.
Demonstration
A small unspectacular demo video showing WML doing it's job:
Last edited by Nefarius; 01-18-2015 at 15:34.
Reason: Updated version
Outstanding... was such a PITA to manually update the map files when we changed up our collection. This is going on my CS:GO servers STAT. Thank you!
...:: TnT Edit ::...
If only Valve offered some sort of xml page that had info on the collection (map names, update date, file size, mapId, etc). Then we could grab the list from that site with a different command so the list is populated with only maps from the collectionId
Thank you kindly, I already shipped the first update It fixes the "Unknown command: sm_wml_reload" client error message. I also added an example snippet for the admin menu in my first post.
Well, Valve indeed offers a lot through their Web API, I'll have a look...
Cool, hopefully one exists. The updated .sp still has version 0.0.1
Quote:
Originally Posted by Prechan
... A first menu with map type (like ar_, de_, ze_ ...) could be a good idea ...
+1
...:: TnT Edit ::...
Actually, you could just look at the information from the collectionIds site (http://steamcommunity.com/sharedfile...ollection#Here), it has all information in there. Tells you how many maps are in the collection
As for the suggestion: oh no, nested menus! Well, grouping the maps needs an unique identifier within the map name like the de_, cs_ and so on prefixes. This would imply that the workshop maintainer uses "standardized" names; everything else would reside in a sub menu like "Other". Any suggestions for the top menu item names? Like:
Arms Race Maps
Demolition Maps
Casual Maps
etc.
Is there a finite amount of "map types"? If so, would you please submit them?
With a valid Web API Auth Key we can submit a request and get the following:
So far so good, I'll let this information flow into the further improvement of the plugin. Sadly I haven't yet found out where the supported Game Mode is stored, as it would make a nice criterion for categorizing the maps.
EDIT: Sleep suxx so I'm still on it and finally got rewarded for my patience it seems Here comes the real deal:
Well well well... It seems I got stuck at a pretty silly step: how does SourceMod networking work? I tried several extensions like Steamtools which refused to load complaining it couldn't find libvstdlib_srv.so plus the author doesn't support CS:S/GO. Then there is the cURL implementation, which complains I didn't pass a valid URL but couldn't find any obvious errors of mine. The provided example self test fails too. The Sockets extension has a bad reputation and would need to re-invent an HTTP client from zero. I'm running