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
 
(22 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{stub}}
{{LanguageBar}}
{{tabs|Resource list|goldsrc=true|source=true}}
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"
{{warning|Clients can choose to not loose sound files, or not download any files except the BSP itself! Prefer using [[BSPZIP]] or similar to pack custom content into the map when possible.}}
 
== 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.}}
{{tip|.txt, .res, .ain, and .nav files with the same name as the map are automatically pushed, and don't need to be included.}}
 
{{tip|If a .mdl file is listed, .vvd, .ani, .dx80.vtx, .dx90.vtx, .sw.vtx, .phy, and .jpg files with the same name and path as the .mdl will also automatically be pushed.}}
There's a couple of programs out there to help with this:
{{todo|What data types are there beside <code>file</code>? It seems to not matter what type is specified, as long as the type definition isn't empty or absent.}}
{{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
== Files ==
A resource list must be located in the {{path|maps}} folder with the same name as the associated [[BSP]].


[[BSP2RES]] is a tool to create [[RES]] files for [[Counter Strike SOURCE]]:
==VGUI Resource Files==
http://stas.mail15.com
Some resource files can be found in your /resource folder. Most of them are for [[VGUI]]. For more information, see [[RES file (VGUI)]].


[[ResMaker]]: http://halflife2.filefront.com/file/HalfLife_2_CS_Source_ResMaker;34374
== See also ==
*[[VGUI2]]
*[[BSPZIP]]
*{{vide|4.1}}
*[[PackBSP]]
*[[Map Analyst]]
*[[Pakrat]]
*[[Map_Resource_Extractor]]


[[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
[[Category:Level Design]]


[[category:Level design]] [[category:Glossary]]
[[Category:File formats]]
[[Category:Files]]

Latest revision as of 21:03, 27 June 2025

English (en)中文 (zh)Translate (Translate)

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.

Warning.pngWarning:Clients can choose to not loose sound files, or not download any files except the BSP itself! Prefer using BSPZIP or similar to pack custom content into the map when possible.

Example

Resources
{ 
	"materials/vdc/some_material.vmt"	"file"
	"materials/vdc/some_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.
Tip.pngTip:If a .mdl file is listed, .vvd, .ani, .dx80.vtx, .dx90.vtx, .sw.vtx, .phy, and .jpg files with the same name and path as the .mdl will also automatically be pushed.
Todo: What data types are there beside file? It seems to not matter what type is specified, as long as the type definition isn't empty or absent.
Todo: Can a .res be safely BSPZIPped?

Files

A resource list must be located in the 🖿maps folder with the same name as the associated BSP.

VGUI Resource Files

Some resource files can be found in your /resource folder. Most of them are for VGUI. For more information, see RES file (VGUI).

See also