ReverendV92

Proper .qc Example

Jul 9th, 2012
1,938
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $modelname "bloocobalt\citizens\male_09.mdl" // path/of/compiled/model.mdl
  2. $model "male_09" "male_09_reference.smd" { // "Name of Model" "name_of_mesh.smd"
  3. $include "standardflex_xsi_09.qci" //this is the file for facial flexes
  4. // bodygroups start with studio
  5. // use blank if it's supposed to be empty
  6. // This model's main mesh is only the head, so we can't use blank on the body parts
  7. $bodygroup torso
  8. {
  9. studio citizen_torso_1.smd
  10. studio citizen_torso_2.smd
  11. studio refugee_torso_1.smd
  12. studio refugee_torso_2.smd
  13. studio refugee_torso_green.smd
  14. studio rebel_torso_1.smd
  15. studio rebel_torso_2.smd
  16. studio medic_torso_1.smd
  17. studio medic_torso_2.smd
  18. studio hostage_torso_1.smd
  19. studio hostage_torso_2.smd
  20. }
  21. $bodygroup legs
  22. {
  23. studio citizen_legs.smd
  24. studio refugee_legs.smd
  25. studio rebel_legs_1.smd
  26. studio rebel_legs_2.smd
  27. studio medic_legs.smd
  28. studio hostage_legs.smd
  29. }
  30. $bodygroup hands
  31. {
  32. studio hands.smd
  33. studio hands_glove.smd
  34. studio hands_glove_w.smd
  35. }
  36. $bodygroup beanies
  37. {
  38. blank // this means they will have nothing here by default
  39. studio beanie_09_blue.smd
  40. studio beanie_09_green.smd
  41. }
  42. // these are picky so be careful or you WILL have purple + black
  43. // First group must be the default texture .vmt's, but all after it can be any name.
  44. // The textures they are replacing are in accordance with the original, i.e.
  45. // First texture in first group is replaced by first texture in the following groups.
  46. $texturegroup skinfamilies
  47. {
  48. { "erdim_facemap" , "eyeball_r" , "eyeball_l" }
  49. { "erdim_facemap2" , "eyeball_r" , "eyeball_l" }
  50. { "erdim_facemap3" , "eyeball_r" , "eyeball_l" }
  51. { "erdim_facemap4" , "eyeball_r" , "eyeball_l" }
  52. { "erdim_facemap" , "eyeball_r_blue" , "eyeball_l_blue" }
  53. { "erdim_facemap2" , "eyeball_r_blue" , "eyeball_l_blue" }
  54. { "erdim_facemap3" , "eyeball_r_blue" , "eyeball_l_blue" }
  55. { "erdim_facemap4" , "eyeball_r_blue" , "eyeball_l_blue" }
  56. { "erdim_facemap" , "eyeball_r_green" , "eyeball_l_green" }
  57. { "erdim_facemap2" , "eyeball_r_green" , "eyeball_l_green" }
  58. { "erdim_facemap3" , "eyeball_r_green" , "eyeball_l_green" }
  59. { "erdim_facemap4" , "eyeball_r_green" , "eyeball_l_green" }
  60. }
  61. // include paths to material folders
  62. // hex them into your own folder
  63. // If you're not changing textures, just use your .vmt's that tell them to use the textures originally on the model
  64. // i.e. humans/group01/male09.mdl uses the same textures as player/male09.mdl
  65. $cdmaterials "models\bloocobalt\citizens"
  66. $cdmaterials "models\bloocobalt\citizens\facemaps"
  67.  
  68. // Don't mess with this unless you know what you're doing
  69. $hboxset "default"
  70. $hbox 1 "ValveBiped.Bip01_Head1" -1.250 -6.500 -3.190 8.250 3.500 3.310
  71. $hbox 4 "ValveBiped.Bip01_L_UpperArm" 0.000 -2.750 -2.750 12.510 1.750 2.250
  72. $hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000 -2.190 -2.380 13.000 1.810 1.620
  73. $hbox 4 "ValveBiped.Bip01_L_Hand" 0.060 -2.000 -1.500 4.060 1.000 2.500
  74. $hbox 5 "ValveBiped.Bip01_R_UpperArm" 0.000 -3.000 -2.250 12.390 2.000 2.750
  75. $hbox 5 "ValveBiped.Bip01_R_Forearm" -0.500 -2.200 -1.550 12.500 1.800 2.450
  76. $hbox 5 "ValveBiped.Bip01_R_Hand" 0.060 -2.000 -2.500 4.060 1.000 1.500
  77. $hbox 6 "ValveBiped.Bip01_L_Thigh" 0.000 -3.750 -3.250 17.850 3.750 3.250
  78. $hbox 6 "ValveBiped.Bip01_L_Calf" 0.000 -3.510 -3.280 15.640 3.490 2.720
  79. $hbox 6 "ValveBiped.Bip01_L_Foot" -1.070 -2.000 -2.840 5.040 5.000 2.160
  80. $hbox 6 "ValveBiped.Bip01_L_Toe0" -0.500 -3.000 -2.190 2.500 0.000 2.460
  81. $hbox 7 "ValveBiped.Bip01_R_Thigh" 0.000 -3.750 -3.250 17.850 3.750 3.250
  82. $hbox 7 "ValveBiped.Bip01_R_Calf" 0.000 -3.510 -2.820 15.640 3.490 3.180
  83. $hbox 7 "ValveBiped.Bip01_R_Foot" -1.060 -2.010 -2.280 5.050 4.990 2.720
  84. $hbox 7 "ValveBiped.Bip01_R_Toe0" -0.500 -3.000 -2.600 2.500 0.000 2.100
  85. $hbox 3 "ValveBiped.Bip01_Pelvis" -7.500 -5.500 -6.000 7.500 8.500 5.000
  86. $hbox 2 "ValveBiped.Bip01_Spine2" -2.500 -2.500 -7.000 14.500 7.500 7.000
  87.  
  88. // This is a list of the textures the model uses.
  89. // A trick to find out the missing textures of a model
  90. // is to decompile it and look for ones that are missing
  91.  
  92. // Model uses material "mouth.vmt"
  93. // Model uses material "eyeball_r.vmt"
  94. // Model uses material "citizen_sheet.vmt"
  95. // Model uses material "eyeball_l.vmt"
  96. // Model uses material "erdim_cylmap.vmt"
  97. // Model uses material "grn_pupil_r.vmt"
  98. // Model uses material "glint.vmt"
  99. // Model uses material "grn_pupil_l.vmt"
  100.  
  101. // These are attachments on the models, used for various things.
  102. // i.e. the Combine Soldiers have one called 'zipline' that is used in the zipline animations
  103. $attachment "eyes" "ValveBiped.Bip01_Head1" 3.79 -3.78 0.01 rotate 0.00 -80.10 -90.00
  104. $attachment "mouth" "ValveBiped.Bip01_Head1" 1.00 -5.70 -0.00 rotate 0.00 -80.00 -90.00
  105. $attachment "chest" "ValveBiped.Bip01_Spine2" 5.00 4.00 -0.00 rotate 0.00 90.00 90.00
  106. $attachment "forward" "ValveBiped.forward" 0.00 -0.00 0.00 rotate 0.00 0.00 -0.00
  107. $attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" -0.00 -0.00 -0.00 rotate -90.00 -90.00 0.00
  108. $attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" -0.00 0.00 -0.00 rotate -90.00 -90.00 0.00
  109. $attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" -0.00 0.00 -0.00 rotate -90.00 -90.00 0.00
  110.  
  111. // this is where you add animation files
  112. // DO NOT MIX THE CITIZEN & PLAYERS; YOU WILL HAVE CONFLICTS
  113.  
  114. // citizen set
  115. //$includemodel "humans/male_shared.mdl"
  116. //$includemodel "humans/male_ss.mdl"
  117. //$includemodel "humans/male_gestures.mdl"
  118. //$includemodel "humans/male_postures.mdl"
  119.  
  120. // combine
  121. //$includemodel "combine_soldier_anims.mdl"
  122.  
  123. // gmod player set
  124. $includemodel "m_anm.mdl" // Male Animations
  125. //$includemodel "f_anm.mdl" // Female Animations
  126. //$includemodel "z_anm.mdl" // Zombie Animations
  127.  
  128. // custom
  129. $includemodel "jessev92/custom_anm.mdl"
  130.  
  131. // Type of base composition of the model
  132. // Humans are flesh, snowmen are snow, etc
  133. // https://developer.valvesoftware.com/wiki/Material_surface_properties
  134. $surfaceprop "flesh"
  135.  
  136. $eyeposition -0.000 0.000 70.000 // don't touch this
  137.  
  138. // This controls when the model goes into shadow.
  139. // If this point on the model goes into shadow, the whole model goes.
  140. // Place it inside the model where nothing will touch it.
  141. $illumposition 0.637 0.000 36.119
  142.  
  143. // "name of sequence" "name_of_smd.smd"
  144. // All ragdolls require one of these
  145. $sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
  146.  
  147. // Don't touch these - Advanced Only!
  148. $ikchain rhand ValveBiped.Bip01_R_Hand knee 0.707 0.707 0.000
  149. $ikchain lhand ValveBiped.Bip01_L_Hand knee 0.707 0.707 0.000
  150. $ikchain rfoot ValveBiped.Bip01_R_Foot knee 0.707 -0.707 0.000
  151. $ikchain lfoot ValveBiped.Bip01_L_Foot knee 0.707 -0.707 0.000
  152. // $collisionjoints = Ragdolls
  153. // $collisionmodel = props
  154. $collisionjoints "phymodel.smd" { // name of physics model
  155.  
  156. $mass 90.0 // Mass in KG of the model
  157. $inertia 10.00
  158. $damping 0.01
  159. $rotdamping 1.50
  160. $rootbone "valvebiped.bip01_pelvis"
  161. $jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"
  162.  
  163. // Editing the constraints below control how flexible the model is.
  164. // The Enhanced Citizens have the best flexibility, so if you're using Valve Biped you could just copy these settings
  165.  
  166. $jointconstrain "valvebiped.bip01_spine2" x limit -70.00 70.00 0.00
  167. $jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 0.00
  168. $jointconstrain "valvebiped.bip01_spine2" z limit -65.00 95.00 0.00
  169.  
  170. $jointconstrain "valvebiped.bip01_l_upperarm" x limit -40.00 40.00 0.00
  171. $jointconstrain "valvebiped.bip01_l_upperarm" y limit -115.00 150.00 0.00
  172. $jointconstrain "valvebiped.bip01_l_upperarm" z limit -135.00 135.00 0.00
  173.  
  174. $jointconstrain "valvebiped.bip01_l_forearm" x limit -30.00 30.00 0.00
  175. $jointconstrain "valvebiped.bip01_l_forearm" y limit -60.00 60.00 0.00
  176. $jointconstrain "valvebiped.bip01_l_forearm" z limit -140.00 30.00 0.00
  177.  
  178. $jointconstrain "valvebiped.bip01_r_upperarm" x limit -40.00 40.00 0.00
  179. $jointconstrain "valvebiped.bip01_r_upperarm" y limit -150.00 115.00 0.00
  180. $jointconstrain "valvebiped.bip01_r_upperarm" z limit -135.00 135.00 0.00
  181.  
  182. $jointconstrain "valvebiped.bip01_r_forearm" x limit -30.00 30.00 0.00
  183. $jointconstrain "valvebiped.bip01_r_forearm" y limit -60.00 60.00 0.00
  184. $jointconstrain "valvebiped.bip01_r_forearm" z limit -140.00 30.00 0.00
  185.  
  186. $jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00
  187. $jointconstrain "valvebiped.bip01_r_hand" y limit -60.00 60.00 0.00
  188. $jointconstrain "valvebiped.bip01_r_hand" z limit -70.00 70.00 0.00
  189.  
  190. $jointconstrain "valvebiped.bip01_l_hand" x limit -60.00 60.00 0.00
  191. $jointconstrain "valvebiped.bip01_l_hand" y limit -60.00 60.00 0.00
  192. $jointconstrain "valvebiped.bip01_l_hand" z limit -70.00 70.00 0.00
  193.  
  194. $jointconstrain "valvebiped.bip01_r_thigh" x limit -40.00 40.00 0.00
  195. $jointconstrain "valvebiped.bip01_r_thigh" y limit -90.00 55.00 0.00
  196. $jointconstrain "valvebiped.bip01_r_thigh" z limit -110.00 125.00 0.00
  197.  
  198. $jointconstrain "valvebiped.bip01_r_calf" x limit -30.00 30.00 0.00
  199. $jointconstrain "valvebiped.bip01_r_calf" y limit -12.00 12.00 0.00
  200. $jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 145.00 0.00
  201.  
  202. $jointconstrain "valvebiped.bip01_head1" x limit -70.00 70.00 0.00
  203. $jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 0.00
  204. $jointconstrain "valvebiped.bip01_head1" z limit -65.00 40.00 0.00
  205.  
  206. $jointconstrain "valvebiped.bip01_l_thigh" x limit -40.00 40.00 0.00
  207. $jointconstrain "valvebiped.bip01_l_thigh" y limit -55.00 90.00 0.00
  208. $jointconstrain "valvebiped.bip01_l_thigh" z limit -110.00 120.00 0.00
  209.  
  210. $jointconstrain "valvebiped.bip01_l_calf" x limit -30.00 30.00 0.00
  211. $jointconstrain "valvebiped.bip01_l_calf" y limit -12.00 12.00 0.00
  212. $jointconstrain "valvebiped.bip01_l_calf" z limit -12.00 145.00 0.00
  213.  
  214. $jointconstrain "valvebiped.bip01_l_foot" x limit -40.00 40.00 0.00
  215. $jointconstrain "valvebiped.bip01_l_foot" y limit -40.00 40.00 0.00
  216. $jointconstrain "valvebiped.bip01_l_foot" z limit -55.00 35.00 0.00
  217.  
  218. $jointconstrain "valvebiped.bip01_r_foot" x limit -40.00 40.00 0.00
  219. $jointconstrain "valvebiped.bip01_r_foot" y limit -40.00 40.00 0.00
  220. $jointconstrain "valvebiped.bip01_r_foot" z limit -55.00 35.00 0.00
  221.  
  222. $jointconstrain "valvebiped.bip01_l_toe0" x limit 0.00 0.00 0.00
  223. $jointconstrain "valvebiped.bip01_l_toe0" y limit 0.00 0.00 0.00
  224. $jointconstrain "valvebiped.bip01_l_toe0" z limit -46.00 46.00 0.00
  225.  
  226. $jointconstrain "valvebiped.bip01_r_toe0" x limit 0.00 0.00 0.00
  227. $jointconstrain "valvebiped.bip01_r_toe0" y limit 0.00 0.00 0.00
  228. $jointconstrain "valvebiped.bip01_r_toe0" z limit -46.00 46.00 0.00
  229. $animatedfriction 1.000 400.000 0.500 0.300 0.000
  230. }
RAW Paste Data