Talk:Res

From Valve Developer Community
Jump to: navigation, search

Wouldn't it be good to make an instruction how to make a *.res file ? Like this?

If you use textures, sounds or other files in your map that don't belong to the standard files you need a resource file to tell your server, that the clients might not have that files but they need them to play. You have to name your resource file as you named your map. You might have called your map "mymap.bsp" then your resource file would have the name "mymap.res" .

A resource file looks like this

 "Resources" 
 { 
 	"materials/materialsubfolder/material name.vmt"	"file" 
 	"materials/materialsubfolder/material name.vtf"	"file" 
 } 

In the beginning is "Resources" to tell that the file tells the server things about resources

The "{" & "}" show where that part begins and ends


every line has two parameters

the first is the RELATIVE filepath

the second is the Filetype (usually you write "file" here)

--Scienci 06:04, 19 May 2008 (PDT)

RES-files has other purposes to

RES-files are also used to define the GUI in source-based games. Stuff like font-size, border-colour and what font to use where are all defined in RES-files. // Sertion 09:20, 6 Oct 2008 (PDT)


Filetype?

In the above example (and in all Resource files I've seen), 'Filetype' is always set to "File". The fact that it is there, however, suggests that there are other options available, but I've never seen any documentation on it. Are there any other options available where "file" would normally go? Can one specify a particular compressed archive for multiple files (eg, .mdl, .phy, .dx80, .dx90 all in a single .bz2? This would be very convenient if so!)?--Darkhand 21:37, 28 Nov 2008 (PST)