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

  1. TIKI
  2. setup
  3. {
  4.     scale 0.52            // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  5.     path models/weapons/KAR98sniper
  6.     skelmodel KAR98sniper.skd
  7.     surface KAR981 shader KAR98
  8.     surface KAR982 shader KAR98
  9.     surface scope shader k98scope
  10.     surface lens shader lens
  11. }
  12.  
  13. init
  14. {
  15.     server
  16.         {
  17.  
  18.     //========================================//
  19.     //        WEAPON NAME          //
  20.     //========================================//
  21.  
  22.         classname        Weapon
  23.         weapontype        rifle
  24.         name            "KAR98 - Sniper"
  25.         rank            240 240
  26.  
  27.     //========================================//
  28.     //        WEAPON ACCURACY       //
  29.     //========================================//
  30.  
  31. //        Kar98 Sniper: Max Eff. Range is 650 yds with a muzzle velocity of 2650 ft/s. (7.92 x 57mm Mauser)
  32.  
  33.         sp bulletrange        4000             //the range at which bulletspread is applied (original)
  34.         sp bulletspread        50 50 150 150     //minpitch minyaw maxpitch maxyaw
  35.         sp zoomspreadmult    0.055
  36.  
  37.         dm bulletrange        4000
  38. //        dm bulletspread        59 59 150 150
  39.         dm bulletspread        59 59 300 300    // further increased to encourage standing still while firing and to counteract the fact that you move slower with the weapon
  40.         dm zoomspreadmult    0.055
  41.  
  42.         realism bulletrange        4000
  43.         realism bulletspread        35 35 80 80
  44.         realism zoomspreadmult    0.055
  45.  
  46.     //========================================//
  47.     //        DAMAGE / RATE OF FIRE      //
  48.     //========================================//
  49.  
  50.         sp bulletdamage        100
  51.         dm bulletdamage        100
  52.         sprealism bulletdamage    100
  53.         dmrealism bulletdamage     100
  54.  
  55.         sp firedelay        1.74
  56.         dm firedelay        1.74
  57.         realism firedelay    1.74 
  58.  
  59.         realism throughwood    24
  60.         realism throughmetal    8
  61.  
  62.     //========================================//
  63.     //        PLAYER MOVEMENT          //
  64.     //========================================//
  65.  
  66.         sp movementspeed    0.88
  67.         sp zoommovement        0.5
  68.  
  69.         dm movementspeed    0.8    //was 0.77
  70.         dm zoommovement        0.5
  71.  
  72.         realism movementspeed    0.8    //was 0.77
  73.         realism zoommovement    0.5
  74.  
  75.     //========================================//
  76.     //        RIFLE BUTT / SECONDARY FIRE//
  77.     //========================================//
  78.  
  79.  
  80.     //========================================//
  81.     //        AMMO              //
  82.     //========================================//
  83.  
  84.         firetype        bullet
  85.         ammotype        "rifle"
  86.         meansofdeath    bullet
  87.         semiauto
  88.         bulletcount        1
  89.         clipsize        5
  90.         ammorequired    1
  91.         bulletlarge        1
  92.  
  93.         sp startammo    5
  94.         dm startammo    50
  95.         sprealism startammo    5
  96.         dmrealism startammo    50
  97.  
  98.         // Additional DM Loadout
  99.         dm additionalstartammo "grenade" 1
  100. //        dm additionalstartammo "smokegrenade" 1
  101.  
  102.         // Additional DM Realism Loadout
  103.         dmrealism additionalstartammo "grenade" 1
  104. //        dmrealism additionalstartammo "smokegrenade" 1
  105.  
  106.     //========================================//
  107.     //        CROSSHAIR, ZOOM, TRACERS  //
  108.     //========================================//
  109.  
  110. //        sp tracerfrequency     2
  111. //        dm tracerfrequency     0
  112.  
  113.         crosshair        1
  114.  
  115.         zoom            20
  116.  
  117.  
  118.     //========================================//
  119.     //        SOUND, AI, OTHER      //
  120.     //========================================//
  121.  
  122.  
  123.         pickupsound        kar98sniper_snd_pickup
  124.         ammopickupsound    kar98sniper_snd_pickup_ammo
  125.         noammosound        kar98sniper_snd_noammo
  126.  
  127.         // Holstering info
  128. //        holstertag        "Bip01 Spine2"
  129. //        holsteroffset    "8.0 -7.75 6.5"
  130. //        holsterangles    "0 185 -25"
  131. //        holsterScale    1.0
  132.  
  133.         // AI animation group info
  134.         weapongroup        rifle
  135.         airange            sniper
  136.  
  137.         // this is attached to the player during reload
  138.         cache models/ammo/springfield_clip_reload.tik
  139.     }
  140.     client
  141.     {
  142.         cache tracer.spr
  143.         cache muzsprite.spr
  144.         cache models/fx/snipesmoke.tik
  145.         cache models/ammo/rifleshell.tik
  146.     }
  147. }
  148.  
  149. animations
  150. {
  151.     idle        KAR98sniper.skc
  152. //    reload    reload_kar98sniper.skc
  153.     reload    reload_kar98sniper.skc // this is the start of the reloading sequence
  154.     {
  155.         client
  156.         {
  157.             entry sound kar98sniper_snd_reload_start
  158.         }
  159.     }
  160.     reload_single KAR98sniper.skc // this is the reload loop that loads in a single shell
  161.     {
  162.         client
  163.         {
  164.             entry sound kar98sniper_snd_reload_single
  165.         }
  166.     }
  167.     reload_end KAR98sniper.skc
  168.     {
  169.         server
  170.         {
  171.             last idle
  172.         }
  173.         client
  174.         {
  175.             entry sound kar98sniper_snd_reload_end
  176.         }
  177.     }
  178.     rechamber    rechamber_kar98sniper.skc
  179.     {
  180.         client
  181.         {
  182.             entry sound kar98sniper_snd_bolt item
  183.             18 tagspawn tag_eject 1024
  184.             (
  185.                 spawnrange 2048
  186.                 count 1
  187.                 model models/ammo/rifleshell.tik
  188.                 scale 1.0
  189.                 velocity 70
  190.                 randvel crandom 10 crandom 10 random 20
  191.                 emitterangles 0 0 0
  192.                 avelocity crandom 90 crandom 90 0
  193.                 accel 0 0 -800
  194.                 physicsrate 20
  195.                 life 2.0
  196.                 fadedelay 1.7
  197.                 collision
  198.                 bouncefactor 0.2
  199.                 bouncesoundonce snd_rifle_shell
  200.             )
  201.         }
  202.     }
  203.     fire        KAR98sniper.skc
  204.     {
  205.         server
  206.         {
  207.             entry shoot
  208.         }
  209.         client
  210.         {
  211.             entry stopaliaschannel kar98sniper_snd_fire
  212.             entry sound kar98sniper_snd_fire
  213.  
  214.             // By now, the server has already fired the weapon, so it's
  215.             // ok to apply the view kick apon entry to avoid problems
  216.             // with multiple application on single frame animations.
  217.  
  218.             ////////////////////////////////////////////////////////////////////////////////////////
  219.             // View Kicking
  220.             //
  221.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  222.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  223.             // will be explained.
  224.             // Scatter Patterns:
  225.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  226.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  227.             //
  228.             //
  229.             //                     +-------------------------------------------- Scatter Pitch Min
  230.             //                      |    +--------------------------------------- Scatter Pitch Max
  231.             //                      |    |       +------------------------------- Scatter Yaw Min
  232.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  233.             //                     |    |       |   |     +--------------------- The Recentering speed in fraction per second
  234.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  235.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  236.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  237.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  238.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  239.             //                      |    |       |   |     |    |     |  | |      purely random.
  240.             //                V    V       V   V     V    V     V  V V
  241.             entry viewkick         -5.0 -5.0    0.07 0.07   0.5  "V"   8.0 8.0 12.0
  242. //            entry viewkick         -1.2 -1.2    -0.2  0.2   1   "V"   3.0 1.0 1.6     (Colt .45 Pistol)
  243. //            entry viewkick -4.5 -5.0   -1.0 1.0                         (original)
  244.  
  245.             // muzzle flash
  246.             entry tagdlight tag_barrel 0.3 0.20 0.175 300 0.25 -1.0 -0.75 -0.2
  247.  
  248.             entry tagspawnlinked tag_barrel
  249.             (
  250.                 model muzsprite.spr
  251.                 count 1
  252.                 alpha 0.85
  253.                 color 1.00 1.00 1.00
  254.                 varycolor
  255.                 scale 1.5
  256.                 life 0.05
  257.                 scalerate 1.00
  258.                 velocity 4.00
  259.                 friction 3.00
  260.                 fade
  261.                 alignstretch 1.00
  262.                 randomroll
  263.             )
  264.             entry tagspawnlinked tag_barrel
  265.             (
  266.                 model muzsprite.spr
  267.                 count 1
  268.                 alpha 0.85
  269.                 color 1.00 1.00 1.00
  270.                 scale 1.0
  271.                 life 0.05
  272.                 scalerate 0.70
  273.                 velocity 17.00
  274.                 offsetalongaxis 5 0 0
  275.                 fade
  276.                 alignstretch 0.40
  277.                 randomroll
  278.             )
  279.  
  280.             entry tagspawnlinked tag_barrel
  281.             (
  282.                 model muzsprite.spr
  283.                 count 1
  284.                 alpha 0.85
  285.                 color 1.00 1.00 1.00
  286.                 scale 1.0
  287.                 life 0.05
  288.                 velocity 18.00
  289.                 offsetalongaxis 9 0 0
  290.                 fade
  291.             )
  292.  
  293.  
  294.  
  295.             entry commanddelay 0.020 tagspawn tag_barrel
  296.             (
  297.                 spawnrate 1.00
  298.                 model vsssource.spr
  299.                 count 1
  300.                 alpha 0.10
  301.                 color 1.00 1.00 1.00
  302.                 spritegridlighting
  303.                 scale 0.09
  304.                 life .9
  305.                 scalerate 23.00
  306.                 velocity 429.00
  307.                 accel 0.00 20.00 30.00
  308.                 friction 2.00
  309.                 fade
  310.                 offsetalongaxis random 4 0 0
  311.             )
  312.  
  313.             entry tagspawn tag_barrel
  314.             (
  315.                 count 1
  316.                 scale .7
  317.                 model models/fx/snipesmoke.tik
  318.             )
  319.         }
  320.     }
  321. }
  322.  
  323. /*QUAKED addon_playerweapon_german_kar98-sniper (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  324. German rifle - Mauser KAR98.
  325. */