weapon modding, complete server-side?

Started by Marlboro, January 12, 2006, 10:31:01 AM

Previous topic - Next topic

Marlboro

Hi guys,

   

   first of all long time no spoken, how are you guys, all had good holidays? :D :p

   

   second: a simple question.

   

   I'm workin on my new webbie and i was making some new mods......the only thing i need to know is this: when changing weapon .tik files,

    and changing allot of numbers, like smoke scale, smoke color, ammo, weapon's name, is it COMPLETE Server-side then?

   

   ty for the answer :satisfied

   

   Marlboro

Cobra {sfx}

Dont know about weapon name but the rest should be
Sleep? What is that?

habsey

Weapon name isnt however the rest u listed is as cobra said..
1[sky] Man[/sky]
1 Job
[pink]1[/pink][yellow] Vision[/yellow]

Marlboro

ty, my and a pal tested it, all works fine, even weapon name (Bar = BIG MARLBORO GUN) hehe

Marlboro

i've got a prob, after a lot of fun playing with the mod i thought was server side i noticed that all execpt changing smoke was working server side....

   my script for a bar can been seen under this tekst (it has blue smoke) BTW: i used all scopes mod script to change smoke,

   so the blue smoke works perfect but not server side, and i want it to make it serverside..

   sooo could you guys please help me out a bit? ty!

   

   here is the code located in models/weapons/bar.tik
TIKI
   setup
   {
      scale 0.52         // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
      path models/weapons/BAR
      skelmodel BAR.skd
      surface bar1 shader bar
      surface bar3 shader bar
      surface bar4 shader barclip
   }
   
   init
   {
      server
      {
         classname      Weapon
         weapontype      mg
         name         "Bar"
         rank         410 410
   
         pickupsound      bar_snd_pickup
         ammopickupsound   bar_snd_pickup_ammo
         noammosound      bar_snd_noammo
   
         // Holstering info
   //      holstertag      "Bip01 Spine2"
   //      holsteroffset      "8.0 -7.75 6.5"
   //      holsterangles      "0 185 -25"
   //      holsterScale      1.0
   
         // Primary fire type info
         firetype      bullet
         ammotype      "mg"
         meansofdeath      bullet
         bulletcount      1
         clipsize      50
         startammo      50
         ammorequired      1
         firedelay      0.15
         zoom         70
   
         //========================================//
         //      WEAPON ACCURACY MODELLING   //
         //========================================//
   
   //      BAR: Max Eff. Range is 500 yds with a muzzle velocity of 2650 ft/s. (30-06 Springfield)
   
         bulletrange      9999          //the range at which bulletspread is applied
         bulletspread      11 11 45 45    //minpitch minyaw maxpitch maxyaw original 11 11 60 60
   //      firespreadmult      0.38 0.68 200 0.8      //add falloff cap maxtime
         firespreadmult      0.38 0.61 200 0.6      //add falloff cap maxtime
         bulletdamage      10
   
         tracerfrequency    3 //original 0
   
         crosshair      1
   
         movementspeed   2
   
         // AI animation group info
         weapongroup      bar
   
   //      airange         short
   
         // DM Attributes
         dmbulletcount      1
         dmstartammo      800
         dmammorequired      1
         dmfiredelay      0.15
         dmbulletrange      9999
         dmbulletspread      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
   
   //      dmfirespreadmult   0.38 0.68 200 1.5      //add(%) falloff(%/sec) cap maxtime //1st run (too accurate, whoa, probably no spread)
   //      dmfirespreadmult   0.4 0.4 200 0.8      //add(%) falloff(%/sec) cap maxtime //2nd run Carl (a bit too accurate, but usable)
   //      dmfirespreadmult   0.55 0.45 200 0.9      //add(%) falloff(%/sec) cap maxtime //3rd run Steve (too inaccurate, back to 2nd) Oct. 25
   //      dmfirespreadmult  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)
   //      dmfirespreadmult  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)
         dmfirespreadmult  0.35 0.65 160 0.7      //add(%) falloff(%/sec) cap maxtime //6th run Steve
   
   
         dmbulletdamage      10         //28   //third run 32   //second run 40    //original 35
   
         dmcrosshair         1
   
         dmmovementspeed      2  //orig 0.76
   
         // this is attached to the player during reload
         cache models/ammo/bazooka_shell.tik
      }
      client
      {
         cache tracer.spr
         cache muzsprite.spr
         cache models/ammo/rifleshell.tik
         cache models/fx/muzflash.tik
         cache corona_util.spr
         cache vsssource.spr
      }
   }
   
   animations
   {
      idle   bar.skc
      reload    reload_bar.skc
      {
         server
         {
            18 surface bar4 +nodraw
            46 surface bar4 -nodraw
            last idle
         }
         client
         {
            entry sound bar_snd_reload
         }
   
      }
      fire   fire_bar.skc
      {
         server
         {
            entry shoot
         }
         client
         {
            entry stopaliaschannel bar_snd_fire
            entry sound bar_snd_fire
   
            // By now, the server has already fired the weapon, so it's
            // ok to apply the view kick apon entry to avoid problems
            // with multiple application on single frame animations.
   
            ////////////////////////////////////////////////////////////////////////////////////////
            // View Kicking
            //
            // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
            // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
            // will be explained.
            // Scatter Patterns:
            // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
            // "T" - the T shape. The gun has a tendency to push in a paticular direction.
            //
            //
            //                   +-------------------------------------------- Scatter Pitch Min
            //                    |    +--------------------------------------- Scatter Pitch Max
            //                    |    |       +------------------------------- Scatter Yaw Min
            //                   |    |       |   +--------------------------- Scatter Yaw Max
            //                   |    |       |   |     +--------------------- The Recentering speed in degrees per second
            //                    |    |       |   |     |    +---------------- The Scatter Pattern
            //                    |    |       |   |     |    |     +---------- The absolute pitch min/max
            //                    |    |       |   |     |    |     |  +------- The absolute yaw min/max
            //                    |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
            //                    |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
            //                    |    |       |   |     |    |     |  | |      purely random.
            //            V    V       V   V     V    V     V  V V
            entry viewkick         0 0   0 0   0  "T" 0 0 0
   
   //         entry viewkick         -2.0 -2.0  -1.32 1.35   3.2  "T" 10 0.60 12.0 (latest)
   //         entry viewkick        -2.0 -2.0    -0.2 0.05   2.5  "T"   12 0.2 2.2 //(StG/MP-44)
   //         entry viewkick -3.5 -4.0   -1.0 1.0
   
            //muzzle flash
            entry tagdlight tag_barrel 0.25 0.2 0.15 150 0.11
            entry tagspawn tag_barrel
            (
               count 1
               model models/fx/muzflash.tik
               color 1.00 1.00 1.00
               scale 0.60
               life 0.05
               offsetalongaxis -3 0 0 //orig -5 0 0
               fade
               randomroll
            )
   
            entry tagspawn tag_barrel
            (
               count 1
               model muzsprite.spr
               alpha 0.70
               color 1.00 1.00 1.00
               scale 0.60
               life 0.05
               offsetalongaxis 1 0 0 //orig 3 0 0
               fade
               randomroll
            )
   
            entry tagspawn tag_barrel
            (
               count 1
               model corona_util.spr
               color 1.00 1.00 1.00
               scale 0.10
               life 0.05
               scalerate 11.00
               fade
               randomroll
            )
   
            entry tagspawn tag_barrel
            (
               spawnrate 1.00
               model vsssource.spr
               alpha 0.40
               color .70 .70 .70
               spritegridlighting
               scale 0.45
               life 0.30 //orig 1.0
               scalerate 10.00
               velocity 200.00 //orig 60.00
               //randvel range 20 -60 crandom -40 range 20 -60
               offsetalongaxis 10 0 0
               friction 6.00 //orig 7.00
               fade
               randomroll
            )
   
            // shell eject
            entry commanddelay 0.1 tagspawn tag_eject
            (
               count 1
               model models/ammo/panzer_shell.tik
               spawnrange 1024
               scale 1 //orig 1.0
               velocity 5
               randvel crandom 10 crandom 10 random 20
               emitterangles 0 0 0
               avelocity crandom 90 crandom 90 0
               accel 0 0 -800
               physicsrate 20
               life 1
               fadedelay 1.7
               collision
               bouncefactor 0.2
               bouncesoundonce snd_rifle_shell
            )
   
            //chamber smoke
            entry commanddelay 0.01 tagspawn tag_eject
            (
               //count 1 //orig 2
               spawnrate 1
               model vsssource.spr
               alpha 0.30
               color 0 0 1
               spritegridlighting
               scale 0.75
               life 1 /orig 1.00
               scalerate 10.00
               velocity 60.00
               randvel range 20 -60 crandom -40 range 20 -60
               friction 5.00
               fade
               randomroll
            )
   
            // smoke puff
            entry commanddelay 0.05 tagspawn tag_barrel
            (
               volumetric
               model gun         // sets the type of smoke
               life 500            // amount of smoke
               scale 5         // radius
               alpha 0.2         // density
               color 0 0 1      // RBG color of the smoke
               velocity 2         // base velocity away from the surface
               randvelaxis random 6 0 0   // velocity offset
               offsetalongaxis random 4 0 0   // positional offset
               collision          // turn on collision detection
            )
         }
      }
   }
   
   /*QUAKED playerweapon_allied_bar (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
   Weapon - Browning Automatic Rifle - US machine gun.
   */
   

Cobra {sfx}

Well id say you just need to locate the tik it uses and add that (modified) to your mods pk3
Sleep? What is that?

Marlboro

so do you mean that i must make for example: mohdm1.scr and there i put: exec models/weapons/bar.tik and all other weapons too?

Cobra {sfx}

No - i mean the smoke must come from a tik file - locate it and add it to your mod pk3
Sleep? What is that?

Marlboro

ooohh i see, i just changed the standard smoke in the .tik file...like rgb color normal is 0.70 0.70 0.70 and i maked it 0 0 1 (blue)