MDL functions (Vanilla)
Functions to tweak animation and other model related settings.
Functions
Mdl_ApplyOverlayMDS
Mdl_ApplyOverlayMDS
Apply an animation overlay with overlay_name for the specified npc
Parameters
- var c_npc npc
 NPC to apply the overlay to
- var string overlay_name
 Name of the animation overlay
Mdl_ApplyOverlayMDSTimed
Mdl_ApplyOverlayMDSTimed
Apply an animation overlay with overlay_name for the specified npc for duration milliseconds
Parameters
- var c_npc npc
 NPC to apply the overlay to
- var string overlay_name
 Name of the animation overlay
- var float duration
 Overlay duration in milliseconds
Mdl_RemoveOverlayMDS
Mdl_RemoveOverlayMDS
Remove the animation overlay overlay_name from specified npc 
Parameters
- var c_npc npc
 NPC to remove the overlay from
- var string overlay_name
 Name of the animation overlay
Mdl_ApplyRandomAni
Mdl_ApplyRandomAni
Assign a random animation ani2 to random animation list of animation ani1
Parameters
- var c_npc npc
 NPC owning the animation
- var string ani1
 The animation to assign random animation to
- var string ani2
 Animation to be assigned
Mdl_ApplyRandomAniFreq
Mdl_ApplyRandomAniFreq
Sets the random animation frequency for animation ani1
Parameters
- var c_npc npc
 NPC owning the animation
- var string ani1
 The animation to set the random frequency
- var float frequency
 Number of seconds between random animations
Mdl_SetModelFatness
Mdl_SetModelFatness
Set the procedural model fatness
Parameters
- var c_npc npc
 NPC to apply the fatness to
- var float fatness
 Fatness value
Mdl_SetModelScale
Mdl_SetModelScale
Set model scale per axis
Parameters
- var c_npc npc
 NPC to apply the scale to
- var float x
 Scale along the x-axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90%
- var float y
 Scale along the y-axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90%
- var float z
 Scale along the z-axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90%
Mdl_SetVisualBody
Mdl_SetVisualBody
Sets up the visual of an NPC
Parameters
- var instance npc
 NPC to be affected
- var string body_mesh
 Mesh to be used as the body e.g.- HUN_BODY_NAKED0
- var int body_tex
 Body texture assigned to this body mesh
- var int skin
 Body texture variant
- var string head_mesh
 Head mesh
- var int head_tex
 Head texture
- var int teeth_tex
 Teeth texture
- var int armor_inst
 Armor (- C_ITEMinstance) to be equipped or- -1for no armor
Mdl_SetVisual
Mdl_SetVisual
Set the animation set (also dictates models you can set using the Mdl_SetVisualBody)
Parameters
- var instance npc
 NPC to apply the animation set to
- var string animation_set
 Name of the MDS file that contains the animation set
Mdl_StartFaceAni
Mdl_StartFaceAni
Start a face animation
Parameters
- var c_npc npc
 NPC to apply the animation to
- var string name
 Animation name
- var float intensity
 Intensity of the animation 0.0 to 1.0
- var float holdtime
 How long should the animation be held for- -2will use the MMS defined value, '-1' will make the hold time infinite
Mdl_ApplyRandomFaceAni
Mdl_ApplyRandomFaceAni
Start a random face animation
Parameters
- var c_npc npc
 NPC to apply the animation to
- var string name
 Animation name
- var float timemin
 Minimum time after which the ani should be started (in seconds)
- var float timeminvar
 Minimum boundary variation (in seconds)
- var float timemax
 Maximum time after which the ani should be started (in seconds)
- var float timemaxvar
 Maximum boundary variation (in seconds)
- var float probmin
 Probability (0.0 to 1.0) to choose the lower boundary time