Making 'Prop' Entities: Difference between revisions
Springheel (talk | contribs) No edit summary |
Springheel (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
Prop entities are stored in tdm_prop_wearable_items.def and tdm_prop_items.def. 'Wearable_items' are things an AI might wear (headgear, belt-buckles, etc), while 'prop_items' are for things an AI would carry or attached to a belt (weapons, torches, keys, potions, etc). | ''written by Springheel'' | ||
Prop entities are stored in '''tdm_prop_wearable_items.def''' and '''tdm_prop_items.def'''. 'Wearable_items' are things an AI might wear (headgear, belt-buckles, etc), while 'prop_items' are for things an AI would carry or have attached to a belt (weapons, torches, keys, potions, etc). | |||
An entity definition for a prop item looks like this: | An entity definition for a prop item looks like this: | ||
Line 7: | Line 9: | ||
"model" "models/darkmod/props/wearables/spectacles.ase" | "model" "models/darkmod/props/wearables/spectacles.ase" | ||
"joint" "Head" | "joint" "Head" | ||
"origin" "4 -5.5 0" | "origin" "4 -5.5 0" | ||
"angles" "85 -85 3" | "angles" "85 -85 3" | ||
"remove" "0" | "remove" "0" | ||
} | } | ||
Now, here's what each line means. | |||
entityDef prop_spectacles { | |||
This is where you name your entity. You should use the prefix 'prop' for all attachable objects. | |||
"inherit" "func_static" | |||
This just sets the entity as a func_static, so it won't fall off the AI. | |||
"model" "models/darkmod/props/wearables/spectacles.ase" | |||
This line points to the model you want to attach. You include the path and filename of the actual model. If you want to use an alternate skin, you can do that, but you'll need to make a separate entity for that, with a "skin" "[skin name]" line. | |||
"joint" "Head" | |||
This sets the joint you want to attach to. For headgear, obviously you'd use the head. "RightHips_Dummy" is a good one for putting things on a belt. You may need to experiment for other places. Remember the object will move the same way the joint moves. | |||
"origin" "4 -5.5 0" | |||
"angles" "85 -85 3" | |||
These two lines position the object relative to the joint you choose. "Origin" moves the object around, and "angles" tilts it. It's best to play with these values in game so that you can see where the object is. See [[AI Attachment Ingame Editing]] for more info. These values will apply to all AI unless you add some tweaked for specific AI. See [[Adding Offset Values for Specific AI]] for more info. | |||
"remove" "0" | |||
If these is set to "1" then the object will fall off the AI when it is killed/KO'd. A value of "0" means it stays attached. Generally only things held in the hand should fall off when the AI is KO'd. AI can notice strange objects lying around, and it isn't fun for the player to have to clean up three or four pieces of clothing every time they KO an AI. | |||
There are other things you can include in a prop def, but this is enough to get you going. | |||
[[Category:Editing]] | [[Category:Editing]] |
Revision as of 14:01, 21 June 2007
written by Springheel
Prop entities are stored in tdm_prop_wearable_items.def and tdm_prop_items.def. 'Wearable_items' are things an AI might wear (headgear, belt-buckles, etc), while 'prop_items' are for things an AI would carry or have attached to a belt (weapons, torches, keys, potions, etc).
An entity definition for a prop item looks like this:
entityDef prop_spectacles { "inherit" "func_static" "model" "models/darkmod/props/wearables/spectacles.ase" "joint" "Head" "origin" "4 -5.5 0" "angles" "85 -85 3" "remove" "0" }
Now, here's what each line means.
entityDef prop_spectacles {
This is where you name your entity. You should use the prefix 'prop' for all attachable objects.
"inherit" "func_static"
This just sets the entity as a func_static, so it won't fall off the AI.
"model" "models/darkmod/props/wearables/spectacles.ase"
This line points to the model you want to attach. You include the path and filename of the actual model. If you want to use an alternate skin, you can do that, but you'll need to make a separate entity for that, with a "skin" "[skin name]" line.
"joint" "Head"
This sets the joint you want to attach to. For headgear, obviously you'd use the head. "RightHips_Dummy" is a good one for putting things on a belt. You may need to experiment for other places. Remember the object will move the same way the joint moves.
"origin" "4 -5.5 0" "angles" "85 -85 3"
These two lines position the object relative to the joint you choose. "Origin" moves the object around, and "angles" tilts it. It's best to play with these values in game so that you can see where the object is. See AI Attachment Ingame Editing for more info. These values will apply to all AI unless you add some tweaked for specific AI. See Adding Offset Values for Specific AI for more info.
"remove" "0"
If these is set to "1" then the object will fall off the AI when it is killed/KO'd. A value of "0" means it stays attached. Generally only things held in the hand should fall off when the AI is KO'd. AI can notice strange objects lying around, and it isn't fun for the player to have to clean up three or four pieces of clothing every time they KO an AI.
There are other things you can include in a prop def, but this is enough to get you going.