New cvar for custom map downloads.


Trp. Jed
03-01-2004, 03:04 PM
Found this on VERC today, thought I'd pass it on. Might be of interest to custom mappers.

http://collective.valve-erc.com/index.php?news=1078093753-84291500

Have you ever spent months perfecting a map just to have it ignored because of slow server downloads? Have you ever intentionally used default textures rather than superior custom ones just to minimize filesize? Hopefully those days are over.

Steam has implemented a server cvar named sv_downloadurl that allows the player to download maps from a http server rather than the gameserver.

Here's how it works:
1: Upload the map and all its associated files somewhere, keeping the directory structure intact.

2: (optional) You may place a 340x56 image named banner.gif in http://.../gfx/ and it will be displayed in the download dialog in Steam while a player is downloading the files.

3: Set the cvar sv_downloadurl to your http server. eg:
if http://www.whatever.com/myserver/maps contained the server maps, and
if http://www.whatever.com/myserver/models contained the models, and so on, then you would set:
sv_downloadurl http://www.whatever.com/myserver

In the past the slow "trickle" method of gameserver map distribution has prevented large custom maps from being played. Admins have been afraid to run custom maps since players are not willing to wait for ridiculously long downloads. This cvar, if used widely by server admins, could breathe more life into custom maps, so admins go forth and use sv_downloadurl!

- Jed

skdr
03-01-2004, 03:12 PM
We're using this feature in our server and I found out that custom maps are getting much more attention now.

Its great.

Insta
03-01-2004, 03:18 PM
That's awesome, its cool to see Valve doing these things to support the mapping community!

Gorbachev
03-01-2004, 04:04 PM
Awesome.

Mortar
03-01-2004, 04:16 PM
That's great, it's a really important step ahead towards the mapping community. btw... just for the protocol i have suggested it about 2 months ago in the suggestion forum.

Sly Assassin
03-01-2004, 04:19 PM
Thats pretty kewl that the dod team have included this cvar so that the mapping community can get our maps played more widely and more often :) Hopefully this will see alot of the better custom maps played more often :)

Shane
03-01-2004, 04:26 PM
Mike's Maruaders is setup w/ this as well.

I expect to do it for CoJ in the near future, but we're likely moving to a new box so I want to wait until after that's happened.

There was a problem where it did not allow things to be uploaded if they were in the .../day of defeat/dod directory. I'm probably not explaining that correctly, but if any of you know what I'm saying... how did you get around that?

I'd like to see some samples of the banner.gif's that any of you might be using.

piiing!!!
03-01-2004, 04:49 PM
If you specify the file you wish to upload in the .res file for the map it will be uploaded.
Here is a example of dod_tobruk_b1.res that I use on my server.
If you look at the last entry you will see "dod_tobruk_b1.cfg" which is in the /day of defeat/dod directory.

maps/dod_tobruk_b1.res
maps/dod_tobruk_b1.txt
maps/dod_tobruk_b1.bsp
gfx/env/dusty_morningup.tga
gfx/env/dusty_morningdn.tga
gfx/env/dusty_morninglf.tga
gfx/env/dusty_morningrt.tga
gfx/env/dusty_morningft.tga
gfx/env/dusty_morningbk.tga
models/tobruk/desertarmored88.mdl
models/tobruk/dK_table.mdl
models/tobruk/f_schrank.mdl
models/tobruk/flo_bush.mdl
models/tobruk/flo_chair.mdl
models/tobruk/flo_grass.mdl
models/tobruk/flo_haenger02.mdl
models/tobruk/flo_hawk_opel_wueste.mdl
models/tobruk/flo_komode02.mdl
models/tobruk/flo_komode.mdl
models/tobruk/flo_radio.mdl
models/tobruk/flo_sandbags.mdl
models/tobruk/forts_sand.mdl
models/tobruk/hedgehog_bal1.mdl
models/tobruk/hk_gebladung.mdl
models/tobruk/hk_marder_IIIc_dead_africa.mdl
models/tobruk/hk_marder_IIIr_africa.mdl
models/tobruk/hk_mortar_tan.mdl
models/tobruk/mortar_tan_destroyed.mdl
models/tobruk/palme_test3.mdl
models/tobruk/panzerIV_africa_bal1.mdl
models/tobruk/stuka_dive_desert.mdl
overviews/dod_tobruk_b1.bmp
overviews/dod_tobruk_b1.txt
sound/dod_tobruk_materials.txt
sound/tobruk/bl_metex02.wav
sound/tobruk/bl_tob_ambi_bgl.wav
sound/tobruk/bl_tob_ambi_bgr.wav
sound/tobruk/bl_tob_ambst.wav
sound/tobruk/bl_tob_crash2.wav
sound/tobruk/bl_tob_dist1.wav
sound/tobruk/bl_tob_ex02.wav
sound/tobruk/bl_tob_flak1.wav
sound/tobruk/bl_tob_flyby2.wav
sound/tobruk/bl_tob_plane_down1.wav
sound/tobruk/bl_tob_tstr.wav
sound/tobruk/bl_wpf01.wav
sound/tobruk/bleimortlaunch.wav
sound/tobruk/bleishootnblow01.wav
sound/tobruk/bleitank.wav
sound/tobruk/bllargefire01.wav
sound/tobruk/brits_win_l.wav
sound/tobruk/brits_win_r.wav
sound/tobruk/de_win_l.wav
sound/tobruk/de_win_r.wav
sound/tobruk/ro_to_lu.wav
sound/tobruk/to_fly.wav
sound/tobruk/to_siren.wav
sprites/obj_icons/dod_tobruk_b1/icon_obj_custom1_allies.spr
sprites/obj_icons/dod_tobruk_b1/icon_obj_custom1_axis.spr
sprites/obj_icons/dod_tobruk_b1/icon_obj_custom2_allies.spr
sprites/obj_icons/dod_tobruk_b1/icon_obj_custom2_axis.spr
sprites/tobruk/hk_gebladung.spr
sprites/tobruk/hk_putgebladung.spr
sprites/tobruk/puff2.spr
sprites/tobruk/soldier_gebladung.spr
sprites/tobruk/tob_expl.spr
sprites/tobruk/zerogxplode.spr
dod_tobruk_b1.cfg

Here is my banner.gif {340X56 Pixels}

CptMuppet
03-02-2004, 06:15 AM
Sweet!

Now all we have to do, is to press valve to stick everything in zip files (a la Quake 3/MOH/etc).

Piiiing, I think you're getting a bit confused.

Felion
03-02-2004, 07:12 AM
I guess RESGEN (http://www.unitedadmins.com/resgen.php) would be a nice tool to run in conjunction with this?!

piiing!!!
03-02-2004, 10:36 AM
@ CptMuppet

How so? Confused, what do you mean by that?

CptMuppet
03-02-2004, 12:20 PM
^ Yes RES files are a must for custom maps (directory structure, etc, I understand how they work).

BUT- this topic is about a new gizmo which servers can use to get players to D/L maps faster (IE from a URL in ZIP form).


Relating back to the original point - will mappers have to update D/L's to reflect an increase in download sites for their maps? Its quite usual after a good map release, for Website A to say "this is a great map.... heres a download mirror" and Websites B, C, D... say the same.

IS Steam picky about types of files to download (are ZIPs or EXEs preferred?); and does steam automatically install the maps (with directory structures intact? If not, do the RES files sort this out).

piiing!!!
03-02-2004, 06:37 PM
This is exactly what I'm talking about. I have the sv_downloadurl c_var configured on one of my servers.

The files are on my game server. When a client connects or is connected and does not have the current map they are disconnected and sent to my web server {sv_downloadurl} where they download the map at their max internet connection speed then are re-connected after all the files have been downloaded. It is much faster than the trickel method used by game servers. That is if your on broadband, 56k'ers will still be a little slow due to their connection.

You need the .res file on the game server to tell the clients what to download and which directory to put each file in.

It won't work if the map files are zipped, that assumes that all clients have a unzip application installed and can somehow tell it to unzip the maps when downloaded while in-game. I don't think that is going to happen anytime soon. Unless Valve creates an application for the engine that will do that.

The regular game server DL method does not send the files zipped they DL each file as needed one by one.

I posted the .res file to show how to get a file that belongs in the client's dod\ directory to download, Shane had mentioned that it was a problem here in this thread. The banner.gif does not work presently but I remember reading that it would be fixed soon. The banner.gif goes on the web server in the dod\gfx directory and will be displayed in the content provided by box in the download dialogue screen.

EDIT: Changed location of res files to Game server only not web server. It works better.

Regards,
piiing!!!

CptMuppet
03-03-2004, 07:23 AM
Oh, OK, its me :p.

I take it then, this is more of a thing to stop slowdown on custom map servers? Maybe 56k-ers should be given links to the ZIP/EXE files so they can download them faster (???).

Sorry about that!

piiing!!!
03-03-2004, 10:46 AM
I agree, 56k'ers would be better off getting them in .zip or .exe format from a website.

I provide that service as well on my website. I have 97 custom maps for download in the download section in .exe format which is really just a winRAR self-extracting compressed file. Some folks don't have a unzip application is the reason for the .exe format. All you need to do is use the browse button to find your dod directory and click install.

If any of you mappers out there have a map on my website and I did not give due credit to please let me know so I can correct it. I have tried to find all the creators but some didn't have the creator listed.

@Felion

Resgen in a good tool but it lists files that are not used in the map. So the smart thing to do is to use resgen to create a pre-res file then check the actual files associated with the custom map to see which ones are actually required.

When a mapper begins to create a map they list files that they may or may not use in the map. When the map is compiled the files are listed as a resource even if the resource was not used in the creation of the map or the resource was embedded in the map and is not required as a seperate file.

Shane
03-03-2004, 11:09 AM
piiing, thanks for the great info. Once I get around to getting this running, I will definitely refer to this thread.

Thanks again to you (and other contributors in this thread). Appreciated. :)

lofantasy
03-04-2004, 12:36 PM
piiing!!!, does the banner work for you? (im at work. so i cant test it out). and if so. do u mind if i borrow ur banner? im not a graphics person. and would probally make a lame one.
also, question for you. when doing the download. do you notice it downloading the .bsp file twice? (once at the start and once at the end)

but this feature works good. i am setting my domain up to handle this. and i could offer some webspace to hold the maps or to be a mirror of someones current setup. if anyone is interested pm me. and we can talk bout it. =)

Lo

Viking
03-04-2004, 03:38 PM
Ok I'm trying to set this up also. Got most of it running maps will download the I get his error.

Could not download sound/weapons/explode4.wav.wav:Files does not exist.

Of course it does not exist it not even a real file extension. I have tried 2 different maps and get the same problem on both. Any ideas?

lofantasy
03-04-2004, 04:28 PM
Viking, do you have a .res file for it? (ive basically done a find and put it into a dod_NAME.res). and if not. thats whats happening. in the bsp file it has that reference and so it cant dl that file. (im pretty sure its that. correct me if im wrong =))

ive run into problems like that before with overviews. no res file it trys to get overview.tga insted of .bmp.

so try out the .res and see if that fixes your problem.

Lo

piiing!!!
03-04-2004, 05:48 PM
Yes, I would check the res file for the map or maps in question. The res file is what is telling the client what to download.


@ lofantasy

No, not at present but I have read that Valve will be fixing it soon so when they do I'll be ready. Right now it's just a black box.

As far as the banner.gif goes, I'll post a generic one that anyone can have. I'm not real good with the graphics either. I just wanted something that would let players know what was going on when they were disconnected.

Here is the generic banner.gif {340X56}


@ lofantasy
I removed the .res files from my web server and only have them on the game server.

Viking
03-04-2004, 07:13 PM
Yea I have the .res file for the maps. I do think I found what is causing it, but will not know tomorrow. Forgot that it would try to download sound from amx mod also :eek:

Will let you know once I get a chance to try it.

Viking

ReutherMonkey
03-04-2004, 09:07 PM
for those of you with any extra questions, check this thread I made in servers on the 12th...

http://www.dayofdefeat.net/forums/showthread.php?s=&threadid=28169

Shane
03-05-2004, 02:35 AM
what level of the dir does the dod_mapname.res file go for this to work? edit: I see it, it goes in the map dir. :)

piiiin, if I'm reading you correctly, the .res should only be in the location you want to d/l from and not in the server files?

Maybe we could start posting .res files that are known to be correct since not all custom maps have them?

lofantasy
03-05-2004, 06:00 AM
@piiing!!!, i will try that. i know i have the .res file in both locations. good thing i have plenty of bandwidth. =P didnt try to remove the res from the game machine. i will when i get home. was trying to fix a minimap problem im having

@Viking, it defently does the sounds from other plugins (anything that precaches info). i ran into that problem too.

and ReutherMonkey's thread is defently worth reading. it has alot of info about this cvar.

Lo

piiing!!!
03-05-2004, 12:04 PM
Yea,
I posted dod_tobruk_b1 in this thread feel free to validate and add it to a list if it's correct. I took my good ol time creating my res files because I wanted them to be correct.

@Shane

EDIT: I have switched the .res files to game server only it works better from there.

If you create a sticky thread with the title of something like "Custom Map .res files" I will add the ones I have done.

I like cooperation...

VoodooChild
03-05-2004, 12:16 PM
could you guys tell me a little bit on what a .res file is and does. IM not too familiar with them and Im very interested to know what they can do.


edit: should maps be released with a .res file, or is it generally web/server admins who do this stuff?

Ty

CptMuppet
03-05-2004, 01:02 PM
The aforemention RESGEN will make .res files for you (but be sure to cut out repeated models, sprites, sounds).

RES files hold the ALL information about WAV, MDL and SPR files for a specific map, so that when a player joins a server running a map they don't have, the map and all its associated files are downloaded and stored in the correct locations.

RES files must have the same name as the bsp (eg dod_ryan.res).


Its generally a good idea to supply a RES file, unless you aren't using any custom sprites, models or wavs (which you would include in the original ZIP file for your download).


Hope that makes sense! If not just use resgen, and plonk the produced file in the ZIP dowload of your map.

piiing!!!
03-06-2004, 12:44 AM
Shane
Here are some res files in a .zip file. Check them out and see if you like. It is true I have the .res files on my web server only and it works great. Below is a list of the .res files included.

EDIT:
Remove the mapname.res line from all the res files and put the res files on your game server only.

dod_adrenalin4.res
dod_bocage.res
dod_campagne.res
dod_cherbourg.res
dod_enemy.res
dod_falaise.res
dod_kampf.res
dod_northbound.res
dod_oslo.res
dod_push.res
dod_saints.res
dod_seine2.res
dod_snowcity_b4.res
dod_steinburg.res
dod_stuka_v1.res
dod_thunder.res
dod_tobruk_b1.res
dod_verdun_final.res
dod_zafod.res

Thank You Mappers...:D

Shane
03-06-2004, 12:23 PM
piiinng, tx, I'll check them out later. :)

FYI, 1 thing I learned today is:

1. sv_allowdownload 1 (must be on)
2. "sv_allowdownload" MUST be BEFORE sv_downloadurl or the server won't look to the webserver download.

ok, check that, 2 things.

piiing!!!
03-06-2004, 01:20 PM
Oh,

Great info.

Good work...

Ragman
03-06-2004, 05:14 PM
Well, we got it running on Crowbars now.
Works lovely. Just gotta set all the .res files up.

Wouldn't it be an idea to post this into the server forum to make it more widely known? Since most of the server forum readers rarely come into the mapping forums.


dod_belgiumx2.res

dod_belgiumx2.cfg
maps/dod_belgiumx2.bsp
maps/dod_belgiumx2.txt
sound/ambience/bben1.wav
sound/ambience/burning1.wav
sound/ambience/creak.wav
sound/ambience/drips.wav
sound/ambience/piano.wav
sound/mapsounds/fountain.wav
sprites/fire.spr
sprites/flare1.spr
sprites/glow01.spr

piiing!!!
03-07-2004, 08:48 AM
Well after some testing I have found that the res files work best if they are on the GAME SERVER ONLY.

Also do not put the mapname.res file in your map res file as a downloadable file if it's only on the Game Server it will not be at the download location to be downloaded.

I have switched to this method on both of my servers and the results are indeed better. At times the other method would miss some files especially minimap/overviews.

Viking
03-07-2004, 02:32 PM
Yea I just got mine to work today. Why do you need sv_alloweddownload even on? I have it turn off and the maps download fine for me. If you are wondering it was amx mod precacheing stuff on me.

Viking

lofantasy
03-09-2004, 07:59 AM
i has returned. note about the res files. dont include hte .bsp file in the res file. i was having a problem where it would download the .bsp file twice. and it was in the .res file. so once the connect started. and it got the res file. it dl'ed the bsp file. then as the last thing to do it dl'ed the bsp file again

also, piing, it seemed on the windows server i have. i had to have the .res file in both places. else it would only get a the bsp. and nothing else. could be just me..again =)

Lo

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.