Make a new map section?

(I’m not sure if this goes in Lua, or somewhere else. I doubt it would be in “mapping” since that deals more with hammer than the placement of the maps, but there’s a better chance it’s done with Lua. If not, may a respectable admin please move it to the correct category?)

How would I go about making a new category for maps? There is the “Garry’s Mod” section with gm_construct and gm_flatgrass, and other valve games have their own sections, but I’ve seen custom sections somewhere before. How would I make one of my own?

Look in the Garry’s Mod Gcf, I know it tells how in there. I did it once but I don’t have the addon anymore.

In garrysmod/settings/maps/ you need to make a new text file with the same name as your map, then copy this in and change the relevant values:

			"Credits"	"CREDITS GO HERE"


I’m just guessing that this is how it is done.

Or if it is for a gamemode you can edit the gamemode’s “info.txt” file like so:

	"name"		""
	"version"	""

	"author_name"	""
	"author_email"	""
	"author_url"	""
	"info"		""
	"hide"		"0"

		"1"	"gm_"
		"2"	"rp_"

You seemed to have guessed wrong, though it was definitely worth a try. I have a feeling you were close.

You can make map sections for diff gamemodes example for sandbox its gm_
go in a gamemodes folder click on the info file and add this in. Change the “rp_” to whatever you want
[lua] “mappattern” //
“0” “^rp_”

It’s a regular expression. The ^ denotes that it must be at the beginning of the filename, so you don’t have a map called gm_clanrp_build and have it put into the RP section.

Guys, look in the Garry’s Mod beta code. There are lots of new sections, as well as the Space Build gamemode. That gives new sections for maps too.

Would this go is settings/maps, or autorun?


…and what would I title it?

it would be part of the info.txt that comes with every gamemode as in /gamemodes/<gamemodename>/info.txt

If I made a new gamemode folder with no variables or extra coding, would it just have default weapons and spawn menu? I JUST need a way to use my maps with a special section, with no extra gamemode options.

Put it in autorun is my only guess mate.

yes. you would just need to add the code to make it derived from sandbox. i can’t remember it sorry so if anybody else could post it…

go to your gamemodes/base and put that code in the info file