Garry's Mod

Garry's Mod

评价数不足
How to configure MapVote / GamemodeVote [09th august 2025]
由 Psychotrickser 制作
This guide explains how to properly configure my MapVote/GamemodeVote addon
   
奖励
收藏
已收藏
取消收藏
TROUBLESHOOTING...
⠀⠀the Mapvote doesn't seem to work in one of my gamemodes
Not all gamemodes are compatible with ULX Mapvotes. Reconstructed Ultimate Chimera Hunt and Extreme Football Throwdown are some examples. That's why I publish new versions of those gamemodes that are compatible with ULX Mapvotes and especially with this Mapvote Addon. Have a look at my workshop addons if you want.
If a gamemode that you want to play is not yet compatible with this addon please leave a comment. I'll then look into it.
⠀⠀there is a conflict with another addon
Sadly I can't make this addon compatible with all other addons on the workshop and I won't try since it would be a lot of work.
⠀⠀I found a bug
If you believe that you found a bug leave a comment under this guide or on the addon's workshop page and I'll have a look
EXPLANATION
All of the following Options are accessible through the MapVotes GUI. You can open it up by typing !mvmenu in chat. Most stuff is self explanatory.
⠀⠀Config
AdminsHaveMoreVotePower: Sets whether administrators have more voting power
MapCooldown: Sets whether or not recently played maps may appear in a mapvote
GamemodeTimeLimit: Time in seconds a gamemode vote lasts
GamemodeVote: Sets whether to skip the gamemode vote and stick to the current one
MapLimit: The maximum amount of maps during a vote (doesn't apply to gamemodes)
MapsBeforeRevote: Sets the amount of maps to be played before a recently played map may appear in a mapvote again
ReplayMapButton: Sets whether or not there should be a button in the vote to replay the current map+gamemode
RTVPlayerPercent: A number in percent for how many players out of all players have to use !rtv to actually start a mapvote
SortMapsBy: Sets the criteria by which gamemodes and maps should be sorted (e.g. rating)
Statistics: Keep track of how often a gamemode or map has been played
MapvoteTimeLimit: Time in seconds a map vote lasts
PlayercountDependingGamemodes: Sets whether gamemodes should be disabled/enabled based on player count
PlayercountDependingMaps: Sets whether maps should be handled differently based on player count
handlePlayercountAffectedMaps: How to handle maps that are outside of recommended player count (either remove from mapvote or just display a warning)
GamemodesAndMapsHaveRatings: Sets whether gamemodes and maps should have ratings
SandboxCountdown: Time in seconds for switching from sandbox to a different gamemode (so people have time to save their creations)
StartMapvoteCooldown: Time in seconds for the cooldown phase after starting a map vote
FilterCSSMaps: Automatically blocks maps from Counter-Strike Source (not very useful anymore since CSS textures are now included in base Gmod)
RTVCooldownAfterMapChange: How long after a recent map change before the !rtv functionality is enabled again
ColorUnplayedMapsGray: Whether or not to display map/gamemode names that haven't been played at least once in a lighter gray

PlayersCanPingDuringVote: Whether or not to allow players to send out pings to attract other players attention for example a specific map


CooldownBetweenRTVs: How long for a player to use !rtv and revoke it using !unrtv again (prevents spamming)
advertisementText: Displays a custom text in the top right during the vote screen
RTVMinimumPlayersRequired: How many players have to use !rtv in order to actually trigger a mapvote
voteWinnerMode: Criteria based on which the winner of a vote is determined (can be random out of all voted, can be the one with the most votes etc.)
MapSelectionMode: Determines how maps are filtered if there are more maps than allowed by config
UseSteamRatings: Whether to use local gamemode and map ratings (will be saved on the server) or use the steam workshop rating (if accessible)
⠀⠀GamemodePrefixes

This Tab contains the gamemode prefixes (e.g. ttt_ for all ttt maps) for each gamemode. Most of them are already set by default through the gamemode file itself.

Through the button 'Assign Maps and Prefixes to Gamemodes' you can add more map prefixes or entire maps easily. This opens up a new menu:
There's several tabs, one for each installed gamemode showing all the available prefixes and maps. The 'All Maps' Tab shows all installed maps. This is also where you can mark maps and assign them to a gamemode by clicking on 'Assign to...'.
Unassign: Marked maps will be removed from all gamemodes they're assigned to.
Manual Add: Manually type in a prefix or mapname for an installed gamemode.
The 'ULX Blacklist' tab contains all maps that are blacklisted in the ULX addon's menu (!menu).

Switching to a gamemode tab you can take a look at all maps that match a prefix (here: xft_ or eft_) by rightclicking the prefix. Or you can mark the prefix with leftclick and click on 'Unassign' to remove it from the gamemode
⠀⠀GamemodesEnabler
Not the prettiest menu (I was in a rush) but it works.
Here you can enable or disable gamemodes which will either make them available to gamemode votes or unavailable:
⠀⠀PlayerCountDependingGameModes
This tab allows you to prevent gamemodes from appearing in a gamemode vote depending on whether or not there's enough or too many players. This is useful since there's gamemodes that require more or less players than others.
Double clicking an entry allows you to modify it:
⁣⁣⁣⁤⁢⁢⁢⁢⠀⠀PlayerCountDependingMaps
This tab contains player limits for maps. Since it would be too much of an effort to manually set limits for each installed map the data is collected from all servers that have this addon installed and player limits are calculated based on the amount of weapons that spawn on the map. Your server will refresh those map player limits every 3 days.
In the future I'm planning on collecting data for more gamemodes than just TTT which is why there's a 'gamemode' column.
The 'synchronize' column determines whether or not an entry should be automatically synchronized with the database every 3 days which would effectively overwrite manually set values.
By double clicking on an entry you can manually set those values. Make sure to set 'synchronize' to false in order to have your changes not be overwritten.
You can also manually add or remove maps with the buttons on the bottom. Make sure to click on 'Save' after editing the data:
⠀⠀GamemodesDesc
This tab lets you modify the gamemode descriptions that are displayed during a gamemode vote.
Choose a gamemode in the top, edit the text and click on 'Save' in the bottom:
⠀⠀MapPreviewHierarchy
This tab is for more advanced server owners who wanna provide their own custom map thumbnails. It sets the order in which file paths are searched through for a matching map thumbnail (e.g. ttt_minecraft_b5.png). The first found match is used as the map's thumbnail.
You can change the order with 'Move up' and 'Move down'. Add a path through 'Add Path' or remove it with 'Remove Path'. Make sure to save your changes with 'Save':
⠀⠀RatingResults
This tab contains local map/gamemode ratings (only if 'useSteamRatings' is disabled in config). It also allows you to modify the ratings:
⠀⠀Statistics
Here you can see how often gamemodes and maps have been played on your server (if 'Statistics' is enabled in config). You can also change those values by double clicking an entry:
⁣⁣⁣⁤⁢⁢⁢⁢⠀⠀RecentMaps
This Tab contains the Maps that are on Cooldown meaning they'll be excluded from MapVotes until a certain amount of other Maps have been played. This prevents players from picking the same map over and over again:
⁣⁣⁣⁤⁢⁢⁢⁢⠀⠀ConVa⁤rs⁤
This is where you can set round limits or time limits for gamemodes. In this example there's a time limit of 600 seconds for G-Surf and a round limit of 1 for Bug Boys:
⁣⁣⁣⁤⁢⁢⁢⁢⠀⠀Useful Addons
This Tab shows recommendations for addons to further optimize your multi-gamemode server:
⁣⁣⁣⁤⁢⁢⁢⁢⠀⠀InstalledAddons
This Tab contains a list of all installed Addons on the server. There's a search function and you can click on an image to open up the addon's Workshop page. Having a large amount of addons opening up this tab can take several seconds:
⁣⁣⁣⁤⁢⁢⁢⁢⠀⠀InstalledMaps
This Tab contains a list of all installed Maps on the server:
⁣⁣⁣⁤⁢⁢⁢⁢⠀⠀ConCommands
This Tab provides some useful Functions e.g. printing a list of all installed Addons to your console.
mapvote_getGamemodes: Prints information on all installed gamemodes to your console
mapvote_getMaps: Prints a list of all available maps on the server to your console
mapvote_writeAddonListToFile: exports a list of all you addons to the directory /data/mapvote/exported
mapvote_getCurrentGamemode: prints information on the current gamemode to your console
mapvote_genGamemodeNameList: prints a list with matching gamemode names and titles to your console
⁣⁣⁣⁤⁢⁢⁢⁢⠀⠀Cleanup
Over time data of maps and gamemodes that aren't installed on the server anymore can accumulate. To prevent your files from becoming too large this tab can generate a list of all that useless data and allows you to delete it:
HOW TO...
⠀⠀assign maps or map prefixes to gamemodes
Not all gamemodes have map prefixes on default.
Just switch to the 'Gamemode Prefixes' tab, manually add or tick maps and assign them to a gamemode.
⠀⠀create gamemode specific workshop collections
The more gamemodes your server has the longer it will take for players to join your server and download all necessary addons. To make life easier I made an addon which allows you to set up gamemode specific workshop collections to cut joining time to a fraction:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2965162101
⠀⠀disable a gamemode
Switch to the 'Gamemodes Enabler' tab and untick the gamemode
⠀⠀blacklist a map

Open up the ULX menu by typing in !menu in chat and switch over to settings>ULX Player Votemap List. Then click on the map that you wanna blacklist and click on 'remove'. Done
⠀⠀run specific commands automatically when a gamemode is loaded
(suggested by Vox Andrews)
Just create a text file with the gamemode's name in the data/mapvote folder. Call it ultimatechimerahunt.txt for example and type in the following lines:
sv_playermodel_selector_gamemodes 0
uch_roundtime 5

(Make sure to give each command a new line)
When the gamemode ultimatechimerahunt loads, the server automatically runs the console commands 'sv_playermodel_selector_gamemodes 0' to disable changing playermodels through the Playermodel Selector Addon and 'uch_roundtime 5' to set the round time to 5 minutes. This is just an example. You can type in whatever you want for whichever gamemode you want.

This will be reworked and added to the MapVote GUI.
⠀⠀create custom map previews

There are two ways to use custom Map Previews instead of the default ones. The first and easy way is by using my Super Map Icon Maker.

The second way is as follows:
Take a screenshot of the map and edit it in an image editor like GIMP.
Make it 512x512 big and convert it to a .png. The name of it is important. Make sure it's the same name as the map!
For the map ttt_minecraft_b5 the corresponding preview would be called ttt_minecraft_b5.png.

After you're done create a folder with any name you like. Inside that create a file called addon.json and put this in it:
{
"title" : "YOURCUSTOMADDONNAME",
"type" : "ServerContent",
"tags" : ["fun","realism"],
"ignore" :
[
"*.psd",
"*.vcproj",
"*.svn*"
]
}
Think of a name for your new map icons addon and replace 'YOURCUSTOMADDONNAME'.

Then inside that folder create another folder called 'maps'. Inside that folder create a folder called 'thumbs' and put all your map preview files in it.
Now you can convert your addon folder to a .gma file and upload it to the workshop so everyone can have the same previews or you move your folder to your /addons/ folder so that they only apply to your game client.
37 条留言
cd0m 3 月 28 日 下午 1:12 
Yeah I meant remove prefixes from a mapvote not adding them, only way it seems you can remove a prefix is by editing the file manually
Psychotrickser  [作者] 3 月 27 日 下午 5:35 
@cd0m Try the chat command !mvmenu
cd0m 3 月 27 日 下午 1:27 
A way to remove prefixes from a mapvote selection in the menu would be nice
MadMartin 3 月 21 日 下午 12:49 
Fixed it, the problem was that i had it disabled in the config for some reason.

It has worked until now, but somehow it stopped working today?
I'm trying to fix it rn.
Psychotrickser  [作者] 3 月 17 日 下午 11:35 
@Maffin Someone also requested a player count restriction for maps some time ago. Sadly there's no way of automatically determining what player count the map is best suited for. Since there's tens of thousands of maps on the workshop one would have to test them all and hardcode the player count limits. Something I did for the gamemodes of which there's only a few dozens

@MadMartin Are you playing on a dedicated or listened server?
Maffin - Talk for attention 3 月 17 日 上午 7:47 
So I see its possible to restrict gamemodes to player amounts, but why not maps? Like small maps should only be selectable on small player counts, and large ones only on big player counts. These definitions should be available as settings so they can be made at the owner'S discretion
MadMartin 3 月 15 日 上午 10:35 
I'm unable to GM vote for some gamemodes, for example TTT, throwing "lua/mapvote/cl_mapvote.lua:1261: attempt to call method 'SetImage' (a nil value)
" into the console....
Psychotrickser  [作者] 3 月 12 日 下午 2:34 
done
Psychotrickser  [作者] 3 月 12 日 下午 2:21 
Good point. I'll add a minimum player limit for RTVs
Mofker 3 月 12 日 下午 2:14 
Understood! Is there any way of preventing players from triggering a mapvote when the server only has a single person on it?