Resource list (Source): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (RES moved to Resource list)
No edit summary
Line 1: Line 1:
{{stub}}
A '''Resource list''' (<code>.res</code> file) accompanies a map. When the map is running, it directs the server to push arbitrary files to connecting clients.


A [[RES]] file accompanies a [[BSP]] file when the map uses custom content.  The [[RES|RES's]] filename is the same as the map's and the only difference is its extension which is .res. It contains something like:
While it is generally preferable to achieve this by using [[BSPZIP]] to embed the files into the map itself, there are occasional situations where only loose files and a .res will work.


  "Resources"
{{note|A resource list must be located in the <code>\maps</code> folder with the same name as the associated BSP.}}
 
== Example ==
 
  Resources
  {  
  {  
  "materials/materialsubfolder/material name.vmt" "file"
  materials/vdc/some_material.vmt file
  "materials/materialsubfolder/material name.vtf" "file"
  materials/vdc/some_material.vtf file
  }
  }


{{note|You don't have to precache the [[BSP]], [[Wikipedia:.txt|.txt]], [[RES]], [[AIN]], or [[NAV]] file. They're already precached by the game automatically.}}
Remember to enclose any paths containing spaces with "quote marks" (e.g. <code>"materials/oh look some spaces/material.vtf" file</code>).
 
{{tip|.txt, .res, .ain and .nav files with the same name as the map are automatically pushed, and don't need to be included.}}


There's a couple of programs out there to help with this:
*{{todo|What data types are there beside <code>file</code>?}}
*{{todo|Can a .res be safely [[BSPZIP]]ped?}}


[[RESGen]] is a tool to create [[RES]] files for [[Half-Life]]: http://www.thezproject.org/projects.php?pid=2
== Tools ==


[[BSP2RES]] is a tool to create [[RES]] files for [[Counter Strike SOURCE]]:
<!-- dodgy site which tries to install an unwanted Firefox extension when you visit! [[BSP2RES]] is a tool to create [[RES]] files for [[Counter Strike SOURCE]]:
http://stas.mail15.com
http://stas.mail15.com -->
<!-- useless: won't work if there is more than one map present! [http://halflife2.filefront.com/file/HalfLife_2_CS_Source_ResMaker;34374 Resmaker]-->
*[http://forums.facepunchstudios.com/showthread.php?t=227769 www_mapadd.exe] automatically creates a resource list when a map is compiled, and can also upload both the map and textures to an FTP server.


[[ResMaker]]: http://halflife2.filefront.com/file/HalfLife_2_CS_Source_ResMaker;34374
== See also ==


[[www_mapadd.exe]] Automatically creates a resource file when you compile for custom textures. Can upload both the map and textures to an FTP server automatically as well.: http://forums.facepunchstudios.com/showthread.php?t=227769
*[[BSPZIP]]
*[[Pakrat]]


[[category:Level design]] [[category:Glossary]]
[[Category:Level Design]] [[Category:Glossary]]

Revision as of 12:47, 23 January 2009

A Resource list (.res file) accompanies a map. When the map is running, it directs the server to push arbitrary files to connecting clients.

While it is generally preferable to achieve this by using BSPZIP to embed the files into the map itself, there are occasional situations where only loose files and a .res will work.

Note.pngNote:A resource list must be located in the \maps folder with the same name as the associated BSP.

Example

Resources
{ 
	materials/vdc/some_material.vmt	file
	materials/vdc/some_material.vtf	file
}

Remember to enclose any paths containing spaces with "quote marks" (e.g. "materials/oh look some spaces/material.vtf" file).

Tip.pngTip:.txt, .res, .ain and .nav files with the same name as the map are automatically pushed, and don't need to be included.
  • Todo: What data types are there beside file?
  • Todo: Can a .res be safely BSPZIPped?

Tools

  • www_mapadd.exe automatically creates a resource list when a map is compiled, and can also upload both the map and textures to an FTP server.

See also