Advertisement
Guest User

Model.cfg

a guest
Apr 20th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.29 KB | None | 0 0
  1. class CfgSkeletons
  2. {
  3. class Test_Weapon
  4. {
  5. pivotsModel="";
  6. isDiscrete = 0;
  7. skeletonInherit = "";
  8. skeletonBones[] =
  9. {
  10. "trigger", "", /// not in this model, but good to use
  11. "bolt", "",
  12. "bolt_catch", "",
  13. "magazine", "",
  14. "safety", "",
  15. "muzzleFlash", "",
  16. "OP", "",
  17. "ForeSight", "",
  18. "BackSight", ""
  19. };
  20. };
  21. class Test_Bipod
  22. {
  23. pivotsModel="";
  24. isDiscrete = 0;
  25. skeletonInherit = "";
  26. skeletonBones[] =
  27. {
  28. "bipod_legs", "",
  29. "bipod_leg_L", "bipod_legs",
  30. "leg_L", "bipod_leg_L",
  31. "bipod_leg_R", "bipod_legs",
  32. "leg_R", "bipod_leg_R"
  33. };
  34. };
  35. };
  36. class CfgModels
  37. {
  38. class Default;
  39. class Optic: Default
  40. {
  41. sections[]=
  42. {
  43. "zasleh"
  44. };
  45. };
  46. class Weapon: Default
  47. {
  48. sections[]=
  49. {
  50. "zasleh"
  51. };
  52.  
  53. htMin = 1; // Minimum half-cooling time (in seconds)
  54. htMax = 600; // Maximum half-cooling time (in seconds)
  55. afMax = 0; // Maximum temperature in case the model is alive (in celsius)
  56. mfMax = 0; // Maximum temperature when the model is moving (in celsius)
  57. mFact = 1; // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
  58. tBody = 100; // Metabolism temperature of the model (in celsius)
  59.  
  60. skeletonName="Weapon";
  61. class Animations
  62. {
  63. class zaslehROT
  64. {
  65. type="rotation";
  66. source="clockMinute";
  67. sourceAddress="loop";
  68. selection="zasleh";
  69. begin="usti hlavne";
  70. end="konec hlavne";
  71. memory=1;
  72. minValue=0.0166665;
  73. maxValue=0.016666666666666666666666666666667;
  74. angle0="rad 0";
  75. angle1="rad 360";
  76. };
  77. class magazine_hide
  78. {
  79. type="hide";
  80. source="reloadMagazine";
  81. sourceAddress="mirror";
  82. selection="magazine";
  83. minValue=0.0;
  84. maxValue=0.4;
  85. hideValue=0.5;
  86. };
  87. class reload_ammobelt_hide: magazine_hide
  88. {
  89. selection="ammo_belt";
  90. };
  91. class reload_ammobelt_bottom_hide: magazine_hide
  92. {
  93. selection="ammo_belt_bottom";
  94. };
  95. class ammobelt_hide: magazine_hide
  96. {
  97. source="isEmpty";
  98. selection="ammo_belt";
  99. minValue=0.000000;
  100. maxValue=1.000000;
  101. hideValue=1.000000;
  102. };
  103. class ammobelt_bottom_hide: ammobelt_hide
  104. {
  105. selection="ammo_belt_bottom";
  106. };
  107. /// Hiding of magazine if weapon has none
  108. class no_magazine
  109. {
  110. type="hide";
  111. source="hasMagazine";
  112. selection="magazine";
  113. minValue=0.000000;
  114. maxValue=1.00000;
  115. hideValue=0.5;
  116. unhideValue = -1.0;
  117. };
  118. };
  119. };
  120. class Rifle: Weapon
  121. {
  122. skeletonName="Rifle";
  123. class Animations: Animations
  124. {
  125. class magazine_hide:magazine_hide
  126. {
  127. sourceAddress="mirror";
  128. minValue=0.0;
  129. maxValue=0.56;
  130. hideValue=0.36;
  131. };
  132. class bolt_empty
  133. {
  134. type="translation";
  135. source="isEmpty";
  136. selection="bolt";
  137. axis="bolt_axis";
  138. memory=1;
  139. minValue=0.000000;
  140. maxValue=0.500000;
  141. offset0=0;
  142. offset1=0.5;
  143. };
  144. class bullet_cover
  145. {
  146. type="rotation";
  147. source="reload";
  148. sourceAddress="mirror";
  149. selection="bullet_cover";
  150. axis="bullet_cover_axis";
  151. memory=1;
  152. minValue=0.0;
  153. maxValue=0.5;
  154. angle0=0;
  155. angle1=-0.4;
  156. };
  157. class bolt_fire_begin
  158. {
  159. type="translation";
  160. source="reload";
  161. selection="bolt";
  162. axis="bolt_axis";
  163. memory=1;
  164. minValue=0.000000;
  165. maxValue=0.300000;
  166. offset0=0;
  167. offset1=0.5;
  168. };
  169. class bolt_fire_end:bolt_fire_begin
  170. {
  171. minValue=0.500000;
  172. maxValue=1.000000;
  173. offset0=0;
  174. offset1=-0.5;
  175. };
  176. class bolt_reload_begin
  177. {
  178. type="translation";
  179. source="reloadMagazine";
  180. selection="bolt";
  181. axis="bolt_axis";
  182. memory=1;
  183. minValue=0.1;
  184. maxValue=0.15;
  185. offset0=0;
  186. offset1=0.5;
  187. };
  188. class bolt_reload_end:bolt_reload_begin
  189. {
  190. minValue=0.980000;
  191. maxValue=1.000000;
  192. offset0=0;
  193. offset1=-0.5;
  194. };
  195. };
  196. };
  197. class Test_WeaponBase: Rifle
  198. {
  199. skeletonName = "Test_Weapon";
  200. sectionsInherit = "";
  201. sections[] = {"muzzleFlash","Camo"};
  202. class Animations
  203. {
  204. class trigger /// not in this model, but good to use
  205. {
  206. type = "rotation";
  207. source = "reload";
  208. sourceAddress = "clamp";
  209. selection = "trigger";
  210. axis = "trigger_axis";
  211. minValue = 0;
  212. maxValue = "1";
  213. angle0 = "0";
  214. angle1 = "rad -30";
  215. };
  216.  
  217. class bolt
  218. {
  219. type = "translation";
  220. source = "reload";
  221. sourceAddress = clamp;
  222. selection = "bolt";
  223. axis = "bolt_axis";
  224. minValue = 0.5;
  225. maxValue = 1;
  226. offset0 = 0;
  227. offset1 = 0.3;
  228. };
  229. class bolt_2: bolt
  230. {
  231. minValue = 0;
  232. maxValue = 0.5;
  233. offset0 = 0;
  234. offset1 = 0.7;
  235. };
  236. class bolt_empty: bolt{
  237. source = "isEmptyNoReload";
  238. minValue = 0;
  239. maxValue = 1;
  240. offset0 = 0;
  241. offset1 = 1;
  242. };
  243. class bolt_reload_move_1: bolt_empty {
  244. source="reloadMagazine"; // z: should work like that only if weapon is empty
  245. minValue=0;
  246. maxValue=0.00001;
  247. };
  248. class bolt_reload_move_2: bolt_reload_move_1 {
  249. source="reloadMagazine"; // z: should work like that only if weapon is empty
  250. minValue=0.78;
  251. maxValue=0.80;
  252. offset1 = -1;
  253. };
  254. class bolt_catch: bolt {
  255. selection = "bolt_catch";
  256. axis = "bolt_catch_axis";
  257. };
  258. class bolt_catch_2: bolt_2 {
  259. selection = "bolt_catch";
  260. axis = "bolt_catch_axis";
  261. };
  262. class bolt_catch_empty: bolt_empty {
  263. selection = "bolt_catch";
  264. axis = "bolt_catch_axis";
  265. };
  266. class bolt_catch_reload_move_1: bolt_reload_move_1 {
  267. selection = "bolt_catch";
  268. axis = "bolt_catch_axis";
  269. };
  270. class bolt_catch_reload_move_2: bolt_reload_move_2 {
  271. selection = "bolt_catch";
  272. axis = "bolt_catch_axis";
  273. };
  274. class magazine_hide
  275. {
  276. type="hide";
  277. source="reloadMagazine";
  278. selection="magazine";
  279. minValue=0.000000;
  280. maxValue=1.00000;
  281. hideValue=0.188;
  282. unhideValue = 0.550;
  283. };
  284. class no_magazine
  285. {
  286. type="hide";
  287. source="hasMagazine";
  288. selection="magazine";
  289. minValue=0.000000;
  290. maxValue=1.00000;
  291. hideValue=0.5;
  292. unhideValue = -1.0;
  293. };
  294. class magazine_reload_move_1
  295. {
  296. type = "translation";
  297. source = "reloadMagazine";
  298. selection = "magazine";
  299. axis = "magazine_axis";
  300. minValue = 0.145;
  301. maxValue = 0.170;
  302. offset0 = 0.0;
  303. offset1 = 0.5;
  304. };
  305. class magazine_reload_move_2: magazine_reload_move_1
  306. {
  307. minValue = 0.573;
  308. maxValue = 0.602;
  309. offset0 = 0.0;
  310. offset1 = -0.5;
  311. };
  312.  
  313. class muzzleFlashROT
  314. {
  315. type="rotationX";
  316. source="ammoRandom"; //use ammo count as phase for animation
  317. sourceAddress="loop"; //loop when phase out of bounds
  318. selection="muzzleFlash"; //selection we want to rotate
  319. axis=""; //no own axis - center of rotation is computed from selection
  320. centerFirstVertex=true; //use first vertex of selection as center of rotation
  321. minValue=0;
  322. maxValue=4; //rotation angle will be 360/4 = 90 degrees
  323. angle0="rad 0";
  324. angle1="rad 360";
  325. };
  326. class OP_ROT
  327. {
  328. type="rotation";
  329. source="zeroing2"; // use second muzzle zeroing for rotation
  330. sourceAddress="loop"; // loop when phase out of bounds
  331. selection="OP"; // selection we want to rotate
  332. axis="OP_axis"; // has its own axis
  333. minValue=0;
  334. maxValue=3;
  335. angle0="rad 0";
  336. angle1="rad 65";
  337. };
  338. class BackSight_optic
  339. {
  340. type="rotation";
  341. source="hasOptics";
  342. selection="BackSight";
  343. axis="BackSight_axis";
  344. memory=1;
  345. minValue=0.0000000;
  346. maxValue=1.0000000;
  347. angle0=0.000000;
  348. angle1=(rad 90);
  349. };
  350. class ForeSight_optic: BackSight_optic
  351. {
  352. selection="ForeSight";
  353. axis="ForeSight_axis";
  354. angle1=(rad 90);
  355. };
  356.  
  357. // Rotation of fire mode switch
  358. class safety_mode_rot
  359. {
  360. type = rotation;
  361. source = weaponMode;
  362. selection = "safety";
  363. axis = "safety_axis";
  364. memory = 1;
  365. minValue = 0;
  366. maxValue = 0.25;
  367. angle0 = 0;
  368. angle1 = (rad -52);
  369. };
  370. };
  371. };
  372. class m39lc_blk: Test_WeaponBase {};
  373.  
  374. class test_bipod_01_F
  375. {
  376. skeletonName = "Test_Bipod";
  377. sectionsInherit = "";
  378. sections[] = {"bipod_leg_L","bipod_leg_R","bipod_legs"};
  379.  
  380. class Animations
  381. {
  382. class leg_L
  383. {
  384. type = rotation;
  385. source = bipod_legs;
  386. sourceAddress = clamp;
  387. selection = "bipod_leg_L";
  388. axis = "bipod_leg_L_axis";
  389. minValue = 0;
  390. maxValue = 1;
  391. angle0 = (rad -5);
  392. angle1 = (rad 18);
  393. };
  394.  
  395. class leg_R: leg_L
  396. {
  397. selection = "bipod_leg_R";
  398. axis = "bipod_leg_R_axis";
  399. };
  400. class legs: leg_L
  401. {
  402. selection = "bipod_legs";
  403. axis = "bipod_legs_axis";
  404. angle0 = (rad 0);
  405. angle1 = (rad 90);
  406. };
  407. class Leg_L_move
  408. {
  409. type = translation;
  410. source = bipod_legs_length;
  411. selection = "Leg_L";
  412. axis = "Leg_L_axis";
  413. memory = 1;
  414. minValue = 0;
  415. maxValue = 1;
  416. offset0 = 0;
  417. offset1 = 10;
  418. };
  419. class Leg_R_move: Leg_L_move
  420. {
  421. selection = "Leg_R";
  422. axis = "Leg_R_axis";
  423. };
  424. };
  425. };
  426. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement