Difference between revisions of "DEF"

From DoomWiki.org

[checked revision][checked revision]
m (grammar)
m (Sources: wiki fmt)
 
Line 124: Line 124:
  
 
==Sources==
 
==Sources==
{{idTech 4 ModWiki|{{PAGENAME}} (file format)}}
+
*{{idTech 4 ModWiki|{{PAGENAME}} (file format)}}
{{idTech 4 ModWiki|Declarations}}
+
*{{idTech 4 ModWiki|Declarations}}
 
[[Category:Doom 3 file formats]]
 
[[Category:Doom 3 file formats]]

Latest revision as of 03:51, 12 May 2020

DEF files, with the .def extension, are definition files for Doom 3. They are used to define, in plain ASCII, names for reusable assets that share a common set of properties.

Common definitions in Doom 3 include:

  • addondef
  • af
  • audio
  • email
  • entitydef
  • export
  • fx
  • mapdef
  • material
  • modeldef
  • particle
  • skin
  • sound
  • table
  • pda
  • video

Example[edit]

This is an abridged (incomplete) version of the def file for the tentacle commando. It is not functional as-is since many lines were removed, and only intended to illustrate the syntax.

/***********************************************************************

monster_zombie_commando

***********************************************************************/

export fred {
	options	-prefix ZCT_ -parent Tentacle Rhand -keep Lknee Rknee waist_orientation -parent waist_orientation Body2 -parent waist waist_orientation

	anim	maps/fred/delta2a/malzctcolumns.mb -dest models/md5/monsters/zct/delta2a_leapdown
	anim	maps/fred/monorail/raisecommando2.mb -dest models/md5/cinematics/monorail/zct

	addoptions -align All  -sourcedir models/monsters/zombie/zct/cycles -destdir models/md5/monsters/zct

	mesh	zct_mesh.mb	-dest zct
	anim	ZC_tent_INITIAL.mb -dest initial
	anim	ZC_tent_WALK.mb -dest walk1
	anim	run5.mb -dest zctrun5
	anim	zctleap1.mb -dest zctleap1
}

model monster_zombie_commando {
	mesh							models/md5/monsters/zct/zct.md5mesh

	channel torso					( *waist )
	channel legs					( *Hips origin Body2 waist_orientation )

	anim af_pose					models/md5/monsters/zct/initial.md5anim
	anim ik_pose					models/md5/monsters/zct/initial.md5anim

	anim teleport					models/md5/monsters/zct/teleportin.md5anim {

		frame 3							sound_body snd_footstep
		frame 4							sound_body snd_footstep
		frame 52						sound_voice snd_sight1
	}
	anim idle						models/md5/monsters/zct/zctidle.md5anim
	anim stand						models/md5/monsters/zct/zctidle.md5anim
	anim walk						models/md5/monsters/zct/walk1.md5anim {
		frame 12						sound_body snd_footstep
		frame 27						sound_body snd_footstep
		frame 45						sound_body snd_footstep
		frame 60						sound_body snd_footstep
	}
}

entityDef monster_zombie_commando {
	"inherit"						"zombie_default"
	"model"							"monster_zombie_commando"
	"ragdoll"						"monster_zombie_commando"
	"scriptobject"					"monster_zombie_commando_tentacle"
	"gib"							"0"
	//"offsetModel"					"-12 0 0"
	

	"size"							"48 48 80"
	"use_aas"						"aas48"
	"team"							"1"
	
	"burnaway"						"0.50"
	"smoke_burnParticleSystem"		"burn_imp.prt-chest"

	"blockedRadius"					"20"
	"blockedMoveTime"				"500"
	"blockedAttackTime"				"500"

	"ik_numLegs"					"2"
	"ik_footSize"					"0"
	"ik_waist"						"Body2"
	"ik_foot1"						"Ltoe_r"

	"damage_zone head"				"*loneck"
	"damage_zone chest"				"*waist -*Rshldr -*Lshldr -*loneck"

	"damage_scale head"				"2"

	"snd_tentacle_out"				"monster_zombie_commando_tentacle_out"
	"snd_tentacle_in"				"monster_zombie_commando_tentacle_in"
	"snd_sight1"					"monster_zombie_commando_sight1"
	"snd_sight2"					"monster_zombie_commando_sight2"

	// For Precache, include entitydefs that are referenced in script
	"def_tentacle"					"melee_commandoTentacle"
}

entityDef melee_commando_right {
	"damage"						"12"
	"kickDir"						"0 1 0"
	
	"mtr_blob"						"rightSmack"
	"blob_time"						"600"

	"knockback"						"55"

	"snd_hit"			"fist_impact_flesh"
	"snd_miss"			"fist_whoosh"
}

Sources[edit]