[Prop Hunt] Suggestion: Maps display only if enough players to play on them



Prop Hunt, though it might apply to other Gmod modes

Issue or Suggestion


Description of problem

I’ve noticed often (and it is especially exacerbated with the lack of players during the summer) that the map vote list shows very large maps even when there are too few players to reasonably play them. This can become a bit of a nightmare, because the small amount of players means each vote has disproportionate weight, leading to someone picking a large map by accident (or as a troll), and the remainder of players just quitting. Add that to the fact that the probability a player will leave the server increases superlinearly with decreasing total player count, and you get an exacerbation of the “no players during the summer” effect.

This problem has occurred in other games, and one solution I’m aware of involves setting some sort of minimum player count to be associated with each map (or just create a set of map lists: small, medium, large; and then associating a minimum player count with each category), and the mapvote only displaying those maps fitting the minimum player count criteria.

Upon examining the source for PropHunt-Enhanced, it appears the solution may not be terribly difficult to implement. The key would be to add a few lines to:

within the definition of MapVote.Start(). For the case of setting a minimum player count per map, one could read in a file with two columns: map filename, and minimum player count (0 if any number is enough), say insert that file.Read() call around line 162, then add local player_count = player.GetCount() after that, then assuming that the aforementioned file was read in as a table, if (table.hasValue(map_min_players, map) and map_min_players[map] > player_count) then continue end can be added after line 166.

I haven’t looked exhaustively at the source for other places that might need adjustment, but unless there’s something very wonky with the code structure, this should be just about the only place that is affected. And I’m not good enough in LUA to be comfortable forking their repo and making a pull request.

Anyways, feel free to ignore this. It’s just a thought that came across today, with several of the new PH maps being rather large, especially for <= 4 players.


This would be something Nys would have to explain, because when adding maps I simply add them to the workshop collection and then put them in a queue. I’m not really sure how to edit the actual files for them for things such as map vote player amounts.


It’s something I’ve been wanting to do, actually. I held off since I was bad at actually programming but my original idea sounds a lot like yours

This is definitely something I do want to look into so I’ll keep that in mind