home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / models / weapons / bar.tik next >
Encoding:
Text File  |  2002-10-21  |  10.0 KB  |  350 lines

  1. TIKI
  2.  
  3. setup
  4. {
  5.     scale 0.52            // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  6.     path models/weapons/BAR
  7.     skelmodel BAR.skd
  8.     surface bar1 shader bar
  9.     surface bar3 shader bar
  10.     surface bar4 shader barclip
  11. }
  12.  
  13. init
  14. {
  15.     server
  16.     {
  17.     //========================================//
  18.     //        WEAPON NAME          //
  19.     //========================================//
  20.  
  21.         classname        Weapon
  22.         weapontype        mg
  23.         name            "BAR"
  24.         rank            410 410
  25.  
  26.     //========================================//
  27.     //        WEAPON ACCURACY       //
  28.     //========================================//
  29.  
  30. //        BAR: Max Eff. Range is 500 yds with a muzzle velocity of 2650 ft/s. (30-06 Springfield)
  31.  
  32.         sp bulletrange        4000             //the range at which bulletspread is applied
  33.         sp bulletspread    11 11 45 45     //minpitch minyaw maxpitch maxyaw original 11 11 60 60
  34.         sp firespreadmult    0.38 0.61 200 0.6        //add falloff cap maxtime - was 0.38 0.68 200 0.8
  35.  
  36.         dm bulletrange        4000
  37.         dm bulletspread        12 12 52 52        //10 10 54 54    //10 10 62 62    //fourth run 10 10 99 99    //third run 8 8 90 90     //second run 12 12 60 60    //original 14 14 75 75 
  38.  
  39. //        dm firespreadmult    0.38 0.68 200 1.5        //add(%) falloff(%/sec) cap maxtime //1st run (too accurate, whoa, probably no spread)
  40. //        dm firespreadmult    0.4 0.4 200 0.8        //add(%) falloff(%/sec) cap maxtime //2nd run Carl (a bit too accurate, but usable) 
  41. //        dm firespreadmult    0.55 0.45 200 0.9        //add(%) falloff(%/sec) cap maxtime //3rd run Steve (too inaccurate, back to 2nd) Oct. 25
  42. //        dm firespreadmult    0.475 0.425 200 0.8    //add(%) falloff(%/sec) cap maxtime //4th run Steve (adjusted to between 2nd and 3rd runs, slightly too inaccurate)    
  43. //        dm firespreadmult    0.4 0.6 175 0.7        //add(%) falloff(%/sec) cap maxtime //5th run Steve (need to compensate for the slow rate of fire more)
  44.         dm firespreadmult    0.35 0.65 160 0.7        //add(%) falloff(%/sec) cap maxtime //6th run Steve 
  45.  
  46.         // Realism Attributes
  47.         realism bulletrange        4000
  48.         realism bulletspread        9 9 50 50        //10 10 54 54    //10 10 62 62    //fourth run 10 10 99 99    //third run 8 8 90 90     //second run 12 12 60 60    //original 14 14 75 75 
  49.         realism firespreadmult    0.35 0.65 160 0.7        //add(%) falloff(%/sec) cap maxtime //6th run Steve 
  50.  
  51.     //========================================//
  52.     //        DAMAGE / RATE OF FIRE      //
  53.     //========================================//
  54.  
  55.         sp bulletdamage        60
  56.         sp firedelay        0.12
  57.  
  58.         dm bulletdamage        35    //28    //third run 32    //second run 40     //original 35
  59.         dm firedelay        0.12
  60.  
  61.         realism bulletdamage    42    //28    //third run 32    //second run 40     //original 35
  62.         realism firedelay        0.12
  63.  
  64.         realism throughwood        24
  65.         realism throughmetal        8
  66.  
  67.     //========================================//
  68.     //        PLAYER MOVEMENT          //
  69.     //========================================//
  70.  
  71.         sp movementspeed    0.9
  72.         dm movementspeed    0.85  //orig 0.76
  73.         realism movementspeed    0.85
  74.  
  75.     //========================================//
  76.     //        RIFLE BUTT / SECONDARY FIRE//
  77.     //========================================//
  78.  
  79.         secondary firetype        melee
  80.         secondary ammotype        none
  81.         secondary ammorequired        0
  82.         secondary meansofdeath        bash
  83.         secondary bulletknockback    50
  84.         secondary quiet
  85.  
  86.         sp secondary bulletrange    64
  87.         sp secondary bulletdamage    60
  88.  
  89.         dm secondary bulletrange    96
  90.         dm secondary bulletdamage    60
  91.  
  92.         realism secondary bulletrange    96
  93.         realism secondary bulletdamage    60
  94.  
  95.     //========================================//
  96.     //        AMMO              //
  97.     //========================================//
  98.  
  99.         firetype        bullet
  100.         ammotype        "mg"
  101.         meansofdeath    bullet
  102.         bulletcount        1
  103.         clipsize        20
  104.         ammorequired    1
  105.         bulletlarge        1
  106.  
  107.         sp startammo    20
  108.         dm startammo    160
  109.         sprealism startammo    20
  110.         dmrealism startammo    100
  111.  
  112.         // Additional DM loadout
  113.         dm additionalstartammo "grenade" 2
  114.         dm additionalstartammo "smokegrenade" 1
  115.         dm startitem "items/binoculars.tik"
  116.  
  117.         // Additional DM Realism loadout
  118.         dmrealism additionalstartammo "grenade" 2
  119.         dmrealism additionalstartammo "smokegrenade" 1
  120.         dmrealism startitem "items/binoculars.tik"
  121.  
  122.     //========================================//
  123.     //        CROSSHAIR, ZOOM, TRACERS  //
  124.     //========================================//
  125.  
  126.         sp tracerfrequency     3 //original 0
  127.         dm tracerfrequency     0
  128.  
  129.         sprealism tracerfrequency     3
  130.         dmrealism tracerfrequency     0
  131.  
  132.         crosshair            1
  133.  
  134.     //========================================//
  135.     //        SOUND, AI, OTHER      //
  136.     //========================================//
  137.  
  138.         pickupsound        bar_snd_pickup
  139.         ammopickupsound    bar_snd_pickup_ammo
  140.         noammosound        bar_snd_noammo
  141.  
  142.         // Holstering info
  143. //        holstertag        "Bip01 Spine2"
  144. //        holsteroffset    "8.0 -7.75 6.5"
  145. //        holsterangles    "0 185 -25"
  146. //        holsterScale    1.0
  147.  
  148.         // AI animation group info
  149.         weapongroup        bar
  150.         airange            short
  151.  
  152.         // this is attached to the player during reload
  153.         cache models/ammo/bar_clip.tik
  154.     }
  155.     client
  156.     {
  157.         cache tracer.spr
  158.         cache muzsprite.spr
  159.         cache models/ammo/rifleshell.tik
  160.         cache models/fx/muzflash.tik
  161.         cache corona_util.spr
  162.         cache vsssource.spr
  163.     }
  164. }
  165.  
  166. animations
  167. {
  168.     idle    bar.skc
  169.     reload     reload_bar.skc
  170.     {
  171.         server
  172.         {
  173.             18 surface bar4 +nodraw
  174.             46 surface bar4 -nodraw
  175.             last idle
  176.         }
  177.         client
  178.         {
  179.             entry sound bar_snd_reload
  180.         }
  181.  
  182.     }
  183.     secondaryfire     bar.skc
  184.     {
  185.         server
  186.         {
  187.             entry shoot secondary
  188.         }
  189.     }
  190.     fire    fire_bar.skc
  191.     {
  192.         server
  193.         {
  194.             entry shoot
  195.         }
  196.         client
  197.         {
  198.             entry stopaliaschannel bar_snd_fire
  199.             entry sound bar_snd_fire
  200.  
  201.             // By now, the server has already fired the weapon, so it's
  202.             // ok to apply the view kick apon entry to avoid problems
  203.             // with multiple application on single frame animations.
  204.  
  205.             ////////////////////////////////////////////////////////////////////////////////////////
  206.             // View Kicking
  207.             //
  208.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  209.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  210.             // will be explained.
  211.             // Scatter Patterns:
  212.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  213.             // "T" - the T shape. The gun has a tendency to push in a paticular direction.
  214.             //
  215.             //
  216.             //                     +-------------------------------------------- Scatter Pitch Min
  217.             //                      |    +--------------------------------------- Scatter Pitch Max
  218.             //                      |    |       +------------------------------- Scatter Yaw Min
  219.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  220.             //                     |    |       |   |     +--------------------- The Recentering speed in degrees per second
  221.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  222.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  223.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  224.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  225.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  226.             //                      |    |       |   |     |    |     |  | |      purely random.
  227.             //                V    V       V   V     V    V     V  V V
  228.             entry viewkick          -1.96 -1.96  -1.2 1.2   3.2  "T" 10 0.60 12.0
  229.  
  230. //            entry viewkick          -2.0 -2.0  -1.32 1.35   3.2  "T" 10 0.60 12.0 (latest)
  231. //            entry viewkick         -2.0 -2.0    -0.2 0.05   2.5  "T"   12 0.2 2.2 //(StG/MP-44)
  232. //            entry viewkick -3.5 -4.0   -1.0 1.0
  233.  
  234.             //muzzle flash
  235.             entry tagdlight tag_barrel 0.25 0.2 0.15 150 0.11
  236.             entry tagspawnlinked tag_barrel
  237.             (
  238.                 count 1
  239.                 model models/fx/muzflash.tik
  240.                 color 1.00 1.00 1.00
  241.                 scale 0.60
  242.                 life 0.05
  243.                 offsetalongaxis -3 0 0 //orig -5 0 0
  244.                 fade
  245.                 randomroll
  246.             )
  247.  
  248.             entry tagspawnlinked tag_barrel
  249.             (
  250.                 count 1
  251.                 model muzsprite.spr
  252.                 alpha 0.70
  253.                 color 1.00 1.00 1.00
  254.                 scale 0.60
  255.                 life 0.05
  256.                 offsetalongaxis 1 0 0 //orig 3 0 0
  257.                 fade
  258.                 randomroll
  259.             )
  260.  
  261.             entry tagspawnlinked tag_barrel
  262.             (
  263.                 count 1
  264.                 model corona_util.spr
  265.                 color 1.00 1.00 1.00
  266.                 scale 0.10
  267.                 life 0.05
  268.                 scalerate 11.00
  269.                 fade
  270.                 randomroll
  271.             )
  272.  
  273.             entry tagspawn tag_barrel
  274.             (
  275.                 spawnrate 1.00
  276.                 model vsssource.spr
  277.                 alpha 0.40
  278.                 color .70 .70 .70
  279.                 spritegridlighting
  280.                 scale 0.45
  281.                 life 0.30 //orig 1.0
  282.                 scalerate 10.00
  283.                 velocity 200.00 //orig 60.00
  284.                 //randvel range 20 -60 crandom -40 range 20 -60
  285.                 offsetalongaxis 10 0 0
  286.                 friction 6.00 //orig 7.00
  287.                 fade
  288.                 randomroll
  289.             )
  290.             
  291.             // shell eject
  292.             entry commanddelay 0.1 tagspawn tag_eject
  293.             (
  294.                 count 1
  295.                 model models/ammo/rifleshell.tik
  296.                 spawnrange 1024
  297.                 scale .75 //orig 1.0
  298.                 velocity 70
  299.                 randvel crandom 10 crandom 10 random 20
  300.                 emitterangles 0 0 0
  301.                 avelocity crandom 90 crandom 90 0
  302.                 accel 0 0 -800
  303.                 physicsrate 20
  304.                 life 2.0
  305.                 fadedelay 1.7
  306.                 collision
  307.                 bouncefactor 0.2
  308.                 bouncesoundonce snd_rifle_shell
  309.             )
  310.     
  311.             //chamber smoke
  312.             entry commanddelay 0.01 tagspawn tag_eject
  313.             (
  314.                 //count 1 //orig 2
  315.                 spawnrate 1
  316.                 model vsssource.spr
  317.                 alpha 0.30
  318.                 color 0.50 0.50 0.50
  319.                 spritegridlighting
  320.                 scale 0.10
  321.                 life 0.30 /orig 1.00
  322.                 scalerate 10.00
  323.                 velocity 60.00
  324.                 randvel range 20 -60 crandom -40 range 20 -60
  325.                 friction 5.00
  326.                 fade
  327.                 randomroll
  328.             )
  329.  
  330.             // smoke puff
  331. //            entry commanddelay 0.05 tagspawn tag_barrel
  332. //            (
  333. //                volumetric
  334. //                model gun            // sets the type of smoke
  335. //                life 5                // amount of smoke
  336. //                scale 1.5            // radius
  337. //                alpha 0.2            // density
  338. //                color 0.7 0.7 0.7        // RBG color of the smoke
  339. //                velocity 2            // base velocity away from the surface
  340. //                randvelaxis random 6 0 0    // velocity offset
  341. //                offsetalongaxis random 4 0 0    // positional offset
  342. //                collision             // turn on collision detection
  343. //            )
  344.         }
  345.     }
  346. }
  347.  
  348. /*QUAKED addon_playerweapon_allied_bar (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  349. Weapon - Browning Automatic Rifle - US machine gun.
  350. */