Garry's Mod

Garry's Mod

Not enough ratings
Random Starting Map
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Fun
File Size
Posted
Updated
5.529 KB
4 Jul, 2023 @ 11:20pm
30 Jan, 2024 @ 8:59am
5 Change Notes ( view )

Subscribe to download
Random Starting Map

In 1 collection by The Stig
The Stig's TTT Mod List
286 items
Description
Don't like how Gmod servers only let you start on a single pre-defined map? Well, no longer!

Have your server start on a newly added map, or a completely random one with lots of filtering options with this mod!


How it works
1. You can use the settings below to tweak the list of maps available for your server to start on below.

2. Decide if you want the map chosen to be biased towards newly added maps (pick maps more newly added to the server more often).

3. Choose a map to be the designated map to switch from to a random map, i.e. the map you set your server to start on!


Settings/Convars
rsm_map_to_switch_from default: gm_flatgrass
This map cannot be played on and is automatically blacklisted and switched from to a random map when the server loads it, this should be the map your server starts on (Your server's '+map' parameter)

rsm_true_random default: 0
Whether the random starting map should be truly random (1), or try to pick new maps (0)

rsm_map_prefixes default: ttt_
What prefixes a map's name has to start with in order to be in the pool of random starting maps (unless on the blacklist/whitelist), separated by commas (E.g. the "ttt_" prefix is for maps made for the "Trouble in Terrorist Town" gamemode)

rsm_map_blacklist default: gm_flatgrass,gm_construct
What maps should be excluded in the pool of random starting maps regardless of its prefix, separated by commas (Takes precedent over the whitelist)

rsm_map_whitelist default: [nothing]
What maps should be included in the pool of random starting maps regardless of its prefix, separated by commas
10 Comments
The Stig  [author] 30 Jan, 2024 @ 9:00am 
@EntranceJew Should hopefully be fixed now
EntranceJew 14 Jan, 2024 @ 10:45pm 
[Random Starting Map] lua/autorun/server/random_starting_map.lua:91: attempt to index upvalue 'mapStats' (a nil value)
1. ChangeMap - lua/autorun/server/random_starting_map.lua:91
2. unknown - lua/autorun/server/random_starting_map.lua:116

Something strange going on.
Excentyl 7 Aug, 2023 @ 6:24am 
Thanks for making a fixed version :)
hashbrown pussy 25 Jul, 2023 @ 8:46pm 
Works! Brilliant, brilliant, thank you.
The Stig  [author] 25 Jul, 2023 @ 8:25pm 
@Dill I've updated the mod, let me know what happens. It is working for me again now after the update.
The Stig  [author] 25 Jul, 2023 @ 4:57am 
So I think I have fixed this by adding an extra attempt to change maps after the sever has loaded some more in case the first try fails for whatever reason. So hopefully it will work now.

Just have to wait for my internet to come back for me to upload the fix.
hashbrown pussy 24 Jul, 2023 @ 1:48pm 
When I start up my server, it says in the console:

Can't changelevel, not running server
Executing dedicated server config file server.cfg
Using map cycle file cfg/mapcycle.txt.
hashbrown pussy 24 Jul, 2023 @ 1:24pm 
It continues to load flatgrass regardless.
The Stig  [author] 7 Jul, 2023 @ 10:25pm 
@Dill Oh? Can you describe what happened? It is obviously working for me.
hashbrown pussy 7 Jul, 2023 @ 3:48pm 
This addon randomly decided to stop working lmao