How to get maps to show up in list?


(Dev/Null) #1

Ok, I was tinkering around trying to make a simple multiplayer map. Nothing special, just a big cube with chainsaws in it to fool around with at a LAN party. I got it put together, tried to put all the files in their proper directories, and even managed to stuff everything into a single pk4. The map runs and all, but it won’t show up in the maplist when starting a server. I have to start a server with another map, the bring down the console and type the following: (the map is called “sawz”)

si_map game/mp/sawz
servermaprestart

After that, my map loads. Also, this only works if “Pure Server” is off (I’m assuming because of the “si_map” command).

Any one know how to get this to work?


(NoPLaCe2HiDe) #2

To get a map show up in the serverlist you have to edit the maps.def. So the first thing you should do is to unpack the /defs-directory from the pak000.pk4! Then open the maps.def and add the following lines:

mapDef game/mp/sawz {
“name” “My Map”
“Deathmatch” “1”
“Team DM” “1”
“Last Man” “1”
“Tourney” “1”
}

this example expects that your map is in the \maps\game\mp-directory… Now your map hopefully shows up in the serverlist… at least for me it worked:-))


(the_hat) #3

awesome, was just about to go searching for this.


(ildon) #4

Editing the maps.def sounds like a bad way to do it. :expressionless: Can’t you just do like mapname.def? Or no?


(Loffy) #5

pk4?
:slight_smile:


(Dev/Null) #6

Thanks! It worked just fine. I also discovered that if you leave the maps.def in the pk4, and also have an external one, the external one will take precedence.
I do hope there’s a better way, though. When there starts to be a lot of multiplayer maps released, people aren’t going to want to hand-edit a definition file for every map they download. In Quake III, the user could just drop a pk3 file into baseq3 and be done with it. Now, they have to drop in the pk4, and then start messing around with maps.def.


(chavo_one) #7

Someone needs to verify this method, because you should never modify any of the original files unless you are making a mod.


(Zombie13) #8

I made a .def file for my map, and it works fine just name it z13d3dm1.def, loaded fine in the MP menu.

Zombie


(Zombie13) #9

With some help from Arnout and Jared, I found out how to add levelshots to your Maps.

First look at the gui/map, there you will see the list of all maps, to make your own, make a .gui file with the same name as your map file to keep it clean I guess, then copy all the info from one of the .gui scripts there into your new .gui file, then goto gui/assets/splash and make a new .tga with the same name as your map, and it should load with an image in the MP menu.

Zombie


(NoPLaCe2HiDe) #10

yes for me it worked, too… just make .def file with the name your map. i think this is the better way to get your map show up in the servermaplist:-))


(the_hat) #11

yes, you shouldnt do it any other way then to make a new def file name


(Dev/Null) #12

Well, the .def file for individual maps is great news!

I made a splash screen and .gui file, but I can’t get the splash screen to show up as the loading screen backdrop. If you got this to work, could I see your .gui file?


(Zombie13) #13

I copied one of the other gui filesexactly in the gui/map dir, make sure the splash image is the same name as your map file, just as a test make sure your image is 512x512 tga.

Zombie


(Dev/Null) #14

My splash screen shows up just fine in the map choosing menu, and for people who are trying to join. I just can’t get custom graphics working in the “Loading…” screen. Did you get this to work, and if so, how?


(Zombie13) #15

I havent got custom graphics like map name etc done yet, I will try that a bit later, but I have the screenshot of the map displaying.

Zombie


(Zombie13) #16

yeah, you sure made a point there, trying to load a custom image isnt very easy, trying now to see how to get it done.

Zombie


(Zombie13) #17

Ok I have it sorted out, open your mapname.gui and look for this code right a the top:

windowDef Desktop
{
	menugui	1
	nocursor	1
	rect	0,0,640,480
	windowDef BackgroundImage
	{
		rect	0,0,640,480
		visible	1
		background	"guis/assets/splash/z13d3dm1.tga"
		matcolor	1,1,1,1
	}

See the path to that tga, well thats your map image, so change that to your tga filename, and that will load.

Next is the text at the bottom displaying the mapname, look for this code in your mapname.gui:

windowDef TextTitle
	{
		rect	16,447,610,30
		visible	1
		text	"Emotional Wreck - Z13"
		font	"fonts/micro"
		textscale	0.3
		forecolor	1,1,1,0
	}

Where it has text put your mapname in its place, then save the file and it should work fine :slight_smile:

Zombie


(Zombie13) #18

Oh, and I used textscale to make my text a bit smaller cause of the longer name :slight_smile:

Zombie


(Dev/Null) #19

Thanks! Now we can all start making real maps! Maybe this info should be stickied or something. “Official” documentation is a bit sparse.


(Zombie13) #20

Yeah this is a good idea, its been hard trying to figure this stuff out the past few days, but been good though, sharing it with other peeps :smiley:

Zombie