Page 1 of 1

Q4 - Addon Paks ... is this how to release custom maps?

Posted: Wed Feb 22, 2006 7:36 pm
by Johnny Law
I wasn't in on any of the Doom 3 custom map scene, so maybe (well, probably) this issue has already been worked over. But for the benefit of me and anyone else who is similarly ignorant:

I was looking at the notes for the next Q4 patch and saw that they were adding support for Addon Paks like Doom 3 has. This didn't mean anything to me so I bopped over to check out the description of Addon Paks at http://zerowing.idsoftware.com/linux/doom/AddonPaks.

So, this really looks like the proper way to release custom maps. Yes/no? I'm assuming/hoping that this won't prevent the map being used with unpatched Q4, since presumably unpatched Q4 would just ignore the addon.conf file and be happy.

I don't completely understand the notes at the bottom of that wiki page directed toward server operators? Will server operators need to do anything special (i.e. fiddle with net_serverReloadEngine) in order to use addon pak custom maps?

Anyway... commentary welcome.

Posted: Thu Feb 23, 2006 3:57 am
by Hex
I was about to make a post about this myself. My findings:

I put this txt into an addon.conf and put it in the root of my c345.pk4:
____________________
addonDef {

}
mapDef c345 {
"name" "addon - Canyonland Playgrounds"
"Deathmatch" "1"
"Team DM" "1"
"Tourney" "1"
}
____________________

I setup autoDL on the dedicated linux server and setup a rotation of mp/q4dm1 and c345. I start the server.

I remove c345.pk4 from my clients q4base. I join the server and walla! I'm in. (the server is on mp/q4dm1) SO apparantly something is going right. It didn't make me go get the c345.pk4.

However, when I servernextmap from the server, the client looses connection. Probably OK, I don't have the map. (a message to that effect would be nice.) Then reconnect and the autoDL tells me I have to dl c345. I say OK and it downloads and lets me join up.

Seems to be working.

edit: removed stuff about not being votable. pk4s with addon.conf are votable.

Posted: Thu Feb 23, 2006 5:19 am
by Kat
So in the tradition of not overwriting files :p , do we need to name the config file "addon.conf", or can we name it "hexdm1.conf" or "katdm2.conf" and it'll still work because of the 'addonDef{' entry inside the file itself?

Posted: Thu Feb 23, 2006 6:33 am
by Hex
Tried that. When named c345.conf, it wasn't votable, and the server made me download it even though it wasn't currently active. So no.

Not sure why it doesn't create conflicts, but it seems to work. I put in multiple pk4s with their own addon.conf in their root and it behaved exactly as advertised. I even left out the def/<mapname>.def file completely. Put its info into the addon.conf like this:
(this example's mapname is c348)


addonDef {}
mapDef c348{
"name" "c348"
"DM" "1"
"Team DM" "1"
"Tourney" "1"
"CTF" "0"
"Arena CTF" "0"
"Gametype_Deathmatch" "1"
"Gametype_TeamDeathmatch" "1"
"Gametype_Tournament" "1"
"Gametype_CaptureTheFlag" "0"
"Gametype_ArenaCaptureTheFlag" "0"
"loadimage" "gfx/guis/loadscreens/c348"
"mp_thumb" "gfx/guis/loadscreens/c348"
}

SO it seems like its up to the mappers to do it right.

(/goes to d3 server to see if this was working the same way for d3 and we just didn't figure it out...)

Posted: Thu Feb 23, 2006 6:39 am
by Kat
Good bit of detective work there Watson!

Looking at what you've got there, that looks pretty much like a normal .def file for a map so I guess it's no supprise that it works?

We'll need to have this topic archived once the patch goes 'live'.

Posted: Fri Feb 24, 2006 2:32 am
by Method
Good info. I wonder if it'll be able to update the final versions of released levels and add that .conf file.

-Method

Posted: Fri Feb 24, 2006 4:49 am
by Kat
So do we now basically replace the map.def file with addon.conf? Or are we ok to leave both in place?

Posted: Fri Feb 24, 2006 8:29 am
by Johnny Law
I'm tempted to do both, just so that the map can be used with unpatched Q4. (Assuming I don't end up using any textures from the new maps...)

Posted: Fri Feb 24, 2006 4:45 pm
by Hex
I don't know if the addon.conf has anything to do with the 1.1 patch or not. It may have been working before the patch.

Anyway, if you put both the def/name.def AND the addon.conf in the pk4 then the map will show up twice in the vote list... Selecting either entry works.

So far I don't think the def/name.def is necessary at all anymore...

Here's the "gotcha" - When the pk4s that are in rotation have the proper addon.conf in there, the autodownload will only give you the currently active pk4. So when the scriptcfg changes to another you don't have - it kicks you again, so you reconnect to again download only the currenly active pk4. Ok, well thats not so bad. I'd rather dl all the custom pk4s on a server before joining, but thats my opinion. (also would rather _have_ an autodl, than not have one at all)

If there is no addon.conf in some of the custom pk4s, then the autodl will give you all those custom pk4s before you are allowed to connect at all.

If there is a mixture of custom pk4s - some with addon.conf and some without - then your initial connect will autodownload all custom pk4s that do not have the addon.conf. When the custom pk4 WITH the addon.conf becomes the currently active map - you're kicked to go reconnect and autodl.


So the good old-fashioned method of downloading custom pk4s for your favorite servers BEFORE joining is still the best way to go.


Not totally lost in all this is a fix - You can now have a bunch of custom pk4s in the servers q4base that aren't in rotation and the client won't be forced to download them. (IF these custom pk4s have the addon.conf) Previously the client had to have all the same pk4s even if they weren't in rotation.

Posted: Thu Mar 16, 2006 8:23 am
by Johnny Law
Nice post on esreality where SyncError lays it all out:

http://esreality.com/?a=post&id=1033966

In case that goes away, here it is preserved for posterity:
Okay here is the secret combination to get your maps compatible as an AddonPak for the 1.1 final patch:

All custom maps must be created as addonpaks. To make your map an addonpak you must add an addon.conf file in the root of your .pk4 file. You must also still have a .def file in the def/ directory, however, the contents of that file will change.

The addonpak must now contain the "name" and gametype flags that were previously in your .def file and your def file must now only possess the loadimage and mp-thumb vars. Other combinations can lead to the loading image not showing up or the map being defined twice and being present in the GUI list multiple times.

Let's use an example to help everyone understand fully.

The newly released 1.1 compatible 14dm1x:

addon.conf contents:


addonDef {

}
mapDef mp/l4dm1x {
"name" "GALANG by LUKIN [1.1 test]"
"DM" "1"
"Team DM" "0"
"Tourney" "1"
"CTF" "0"
"Arena CTF" "0"
"Gametype_Deathmatch" "1"
"Gametype_TeamDeathmatch" "0"
"Gametype_Tournament" "1"
"Gametype_CaptureTheFlag" "0"
"Gametype_ArenaCaptureTheFlag" "0"
}

def/l4dm1x.def contents:


mapDef mp/l4dm1x {
"loadimage" "gfx/guis/loadscreens/l4dm1x"
"mp_thumb" "gfx/guis/mainmenu/l4dm1x"
}

This is the proper way to setup your map paks that they may be used in a pureserver or autodownload environment.
Personally I'm a little confused about why there is both a key "DM" and also a key "Gametype_Deathmatch" (for example), but, whatever works.

Also, in a different post talking about naming pk4s, he says "Custom maps should be named map_<mapname>.pk4." This doesn't have anything to do with addon paks, just thought I'd mention it. :)

Posted: Thu Mar 16, 2006 1:15 pm
by Hex
(not intending to confuse the issue - syncerrors position is certainly trump)

KungFuSquirrel gives another tip in the sticky in quake4discussion

mp_thumb is for xbox. And it appears you can safely leave out the gametype* tags. (maybe for xbox also? - unknown)


http://www.quake3world.com/forum/viewtopic.php?t=17787

Posted: Thu Mar 16, 2006 4:43 pm
by KungFuSquirrel
as posted in the other thread, all the info combined into one big mega entry: http://www.iddevnet.com/quake4/LevelEditor_MPMapDefs

(I also confirmed this morning that the gametype_* keys are 360-only, so yay for that. :) )

Posted: Thu Mar 16, 2006 5:13 pm
by d3mol!t!on
On the ESReality forums, someone asked "can we take our PC pk4s and simply load them up on an xbox?"... can anyone answer that? And in that case, would it be a good idea to include the information for that is xbox-360 only (such as the mp_thumb (and what resolution an image for that would have to be))?

Posted: Thu Mar 16, 2006 10:27 pm
by Johnny Law
I would bet that it's not possible, or at least not feasible, especially for third-party maps. Interesting question though.

Posted: Thu Mar 16, 2006 10:44 pm
by KungFuSquirrel
Not going to happen, I'm afraid. We had to do crazy custom mini-builds just to test a single map on the hardware, let alone get the entire game on there. :) Quite a few things are set up differently from the PC version.

Posted: Thu Mar 16, 2006 11:10 pm
by Kat
So hang on a second then.... does that mean that XBox owners are basically on a 'locked' system? Can Xboxers and PC gamers combat together on the same server? (I don't own any consoles so I don't know how the setup works).

Basically maps built for use online by PC gamers are only compatable with PC installations of the game? I'm not sure I'm mixing things up here...
:confused:

Posted: Fri Mar 17, 2006 2:03 am
by Hex
Kat, looks like thats a fact. (I say with absolutely no authority at all) No custom pk4s developed for the PC will work on xbox as-is.

OR if so, I sure hope they tell us now. Because we should just go ahead and include the "xbox-only" tags in the def files. This IS what syncerror lays out at the esreality post...

KungFuSquirrel - I know it , you know it, and most everybody here probably knows it but the iddevnet explanation for Q4 addon.conf it doesn't tell the user where to put the two files. Surely to be asked about by somebody soon. (def\mapname.def and addon.conf in the root of the pk4)

Posted: Fri Mar 17, 2006 1:00 pm
by d3mol!t!on
Another question is, can the xbox users create their own maps? All the advertising I used to see about it said it would have a lot of editing capability, depending on the game. Though I suppose the editor wouldn't be particularly usable with a controller.

Posted: Fri Mar 17, 2006 5:08 pm
by KungFuSquirrel
Arg! I don't know how I missed that in my proofreading runs... I'll get that fixed sometime today. Thanks for pointing it out.

As for the xbox/PC stuff, nothing made custom for the PC can be ported to the xbox, at least not without a devkit and the build process.

Posted: Thu Apr 13, 2006 2:42 pm
by Goofos
I have seen some addon.conf's with the quakemas pk4's in it. I'm not sure this is a good idea because you dont know wether they change the pk4's in a patch :)

Posted: Thu Apr 13, 2006 6:30 pm
by Johnny Law
Seems like an unnecessary thing to do anyway, since addon.conf doesn't work without the 1.1 patch, and 1.1 includes those maps.