$includemodel: Difference between revisions
Jump to navigation
Jump to search
Note:$includemodel only points to the MDL file containing the animations to be used. It does not copy animations from that model and paste it into yours.
If the model used in the $includemodel line does not exist, the game cannot take animations from it and your MDL will not have animations.
(→Example: added a bit more clarification to the note about what happens when the includemodel mdl is missing) |
(→Example: rewrote section with a better example and better worded note.) |
||
Line 8: | Line 8: | ||
== Example == | == Example == | ||
* This | * This creates a viewmodel for the {{l4d2}} [[l4d2|Left 4 Dead 2]] boomer, while taking the animations from ''anims_v_claw_Boomer.mdl''. | ||
{{note|[[$includemodel]] only points to the [[MDL]] file containing the animations to be used. It does not copy animations from that model and paste it into yours.<br> | |||
If the model used in the $includemodel line does not exist, the game cannot take animations from it and your MDL will not have animations.}}<syntaxhighlight lang=text highlight=3> | |||
$modelname "v_models\weapons\v_claw_Boomer.mdl" | |||
{{note| | $model "hands" "v_Boomer_Hands_l4d2.smd" | ||
$includemodel "v_models/weapons/anims_v_claw_Boomer.mdl" | |||
</syntaxhighlight> | |||
[[Category:QC Commands|i]] | [[Category:QC Commands|i]] |
Revision as of 13:24, 3 November 2021
The $includemodel QC command is used to add an MDL file that this model will include at run-time. All new sequences and animations will be appended to the model.
- Animations and sequences are processed in-order, so subsequent animations/sequences that have name conflicts will be ignored, and any references to .mdl local entry by the same name will be overwritten with the reference to a first one declared.
- Included .mdl’s can have different bone ordering, but they need to have the same bone hierarchy and ikchain declarations. Currently there’s no run-time checking to verify they match.
- Only animations and sequences are used from included .mdls. Currently models, textures, faces, attachments, etc. are ignored.
Example
- This creates a viewmodel for the
Left 4 Dead 2 boomer, while taking the animations from anims_v_claw_Boomer.mdl.

If the model used in the $includemodel line does not exist, the game cannot take animations from it and your MDL will not have animations.
$modelname "v_models\weapons\v_claw_Boomer.mdl"
$model "hands" "v_Boomer_Hands_l4d2.smd"
$includemodel "v_models/weapons/anims_v_claw_Boomer.mdl"