DEM (file format): Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| Devicenull (talk | contribs) No edit summary | Devicenull (talk | contribs)  No edit summary | ||
| Line 1: | Line 1: | ||
| {{stub}} | {{stub}} | ||
| Note that it is not possible to edit what happens in a Source demo, it basically stores the packets right off the wire, and we don't know the packet format. | |||
| For the purpose of this, I will be referring to each collection of events as a frame.  This may or may not add up to the number of frames given by the header. | For the purpose of this, I will be referring to each collection of events as a frame.  This may or may not add up to the number of frames given by the header. | ||
Revision as of 22:33, 17 January 2007
Note that it is not possible to edit what happens in a Source demo, it basically stores the packets right off the wire, and we don't know the packet format.
For the purpose of this, I will be referring to each collection of events as a frame. This may or may not add up to the number of frames given by the header.
Demo Header
| Type | Field | Value | 
|---|---|---|
| String | Header | 7+NULL characters, should be "HL2DEMO" | 
| Int | Demo Protocol | Demo protocol version, should be '3' | 
| Int | Network Protocol | Network protocl version number | 
| String | Server name | 260 characters long | 
| String | Client name | 260 characters long | 
| String | Map name | 260 characters long | 
| String | Game directory | 260 characters long | 
| Float | Playback time | The length of the demo, in seconds | 
| Int | Ticks | The number of ticks in the demo | 
| Int | Frames | The number of frames in the demo | 
| Int | Sign on length | ? | 
Frame
Each frame begins with 0 or more of these commands: These are described in hl2sdk\utils\demoinfo\demoformat.h
| Type | Value | 
|---|---|
| dem_signon | 1 | 
| dem_packet | 2 | 
| dem_synctick | 3 | 
| dem_consolecmd | 4 | 
| dem_usercmd | 5 | 
| dem_datatables | 6 | 
| dem_stop | 7 | 
| dem_lastcommand | dem_stop |