Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Help creating custom weapons.  (Read 1285 times)

0 Members and 1 Guest are viewing this topic.

Offline minmi96

  • *
  • *
  • +7% chance to make useful post
  • minmi96 is working their way up.minmi96 is working their way up.minmi96 is working their way up.
    • www.titsassesanddicks.cum
Help creating custom weapons.
« on: February 20, 2015, 09:44:32 AM »
Hi I tried remaking the arsenal of SMOD: Outbreak, I started with the Shotgun first and I ran into a few problems with it.

First Problem: I set the clip capacity to be the same as the original one, it won't let me reload after I fired a single shot at all unless I swap to another weapon, and it will only fire one round and won't reload.

Second Problem: when I get hit by an enemy at clise rage my screen shifts sideways.

Please tell me how to fix these, the weapon script is below.
Quote
// Pistol

WeaponData
{
   // Weapon data is loaded by both the Game and Client DLLs.
   "printname"         "spas" //Name.
   "viewmodel" "models/weapons/v_spas.mdl"
   "playermodel" "models/weapons/w_spas.mdl"
   "anim_prefix"      "shotgun" //Animations for NPCs.
   "weapon_type"      "shotgun" //Weapon Type.
   "bucket"         "2" //The category this will go into.
   "bucket_position"   "8" //The slot this will go into.
   "bucket_360"         "0"
   "bucket_position_360"   "0"

   "clip_size"         "12"   //Clip 1 size
   "clip2_size"      "-1"   //Clip 2 size

   "default_clip"      "18"   //The amount this will have in Clip 1 when spawned by default.
   "default_clip2"      "-1"   //The amount this will have in Clip 2 when spawned by default.
   
   "primary_ammo"      "buckshot"   //Primary ammo type.
   "secondary_ammo"   "None"      //Secondary ammo type.

   "weight"      "15"      //How much NPCs want to pick this up.
   "rumble"      "1"      //Rumble setting for controllers.
   "item_flags"      "0"      //Flags for the weapon.
   
   "BuiltRightHanded"       "0" //Check to see if this is Left-Handed. Useful for CSS weapons.
   "AllowFlipping"       "1" //Check to see if we can use flipping.
   "MagazineStyledReloads"      "0" //Check to see if we can use Magazine-Styled Reloads.
   "UseMuzzleSmoke"      "1" //Check to see if we can use Muzzle Smoke.
   "useironsights"      "1"   //Check if we can use Ironsights.
   "LowerWeapon"         "0" //Check if we can lower the weapon while sprinting. Disable this if your viewmodel does not have a lowering animation.
   
   //Ironsight settings
   IronSight
   {
      "fov" "-25"
      "adjustaccuracy" ".5"
      "right" "2.62"
      "forward" "-0.40"
      "up" "1.53"
      "roll" "-0.20"
      "pitch" "-1.20"
      "yaw" "0"
   }

   // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
   SoundData
   {

      "empty" "weapon_shotgun.empty"
      "reload" "weapon_shotgun.reload"
      "special1" "weapon_xm1014.cock"
      "single_shot" "weapon_shotgun.single"
      "reload_npc" "weapon_shotgun.npc_reload"
      "single_shot_npc" "weapon_shotgun.npc_single"
   }

   // Weapon Sprite data is loaded by the Client DLL.
   TextureData
   {
      "weapon"
      {
         "file"      "sprites/hud_icons_weapons"
         "x"      "0"
         "y"      "192"
         "width"      "64"
         "height"   "32"
      }
      "weapon_s"
      {
         "file"      "sprites/hud_icons_weapons"
         "x"      "0"
         "y"      "192"
         "width"      "64"
         "height"   "32"
      }
      "ammo"
      {
         "font"      "WeaponIcons"
         "character"   "p"
      }
      "ammo2"
      {
         "font"      "WeaponIcons"
         "character"   "t"
      }
      "crosshair"
      {
         "font"      "Crosshairs"
         "character"   "Q"
      }
      "autoaim"
      {
         "file"      "sprites/crosshairs"
         "x"         "0"
         "y"         "48"
         "width"      "24"
         "height"   "24"
      }
   }
   //The "meat" of the weapon.
   "WeaponSpec"
   {
      "WeaponOptions"
      {
         "CanReloadSingly" "0" //Check if we can reload 1 round at a time.
      }
   
      //Stuff that we will do on primary fire. Remove if you do not need primary fire (if you want night vision binoculars).
      "PrimaryFire"
      {   
         "FireRate" "55" //How fast this fires
         "IronsightFireRate"   "55" //How fast this fires when ironsighted.
         "ZoomFireRate"   "55" //How fast this fires when zoomed in.
         "InfiniteAmmoPerk" "1" //Check to see if we can use this with the Infinite Ammo Perk. Disable "InfiniteAmmo" to stop conflicts.
         "InfiniteAmmo" "0" //Check to see if we can use this with Infinite Ammo by default. Disable "InfiniteAmmoPerk" to stop conflicts.
         "MinRange"   "0"   //The minimum amount of range that this weapon would fire at.
         "MaxRange"   "3072" //The maximum amount of range that this weapon would fire at.
         "CanFireUnderwater"   "0"   //Can we use this underwater?
         //Bullet Settings. Remove if you do not want bullets.
         "Bullet"
         {
            "Damage"   "3" //Amount of damage we will do.
            "ShotCount"   "14" //How many shots we will fire at once.
            "Spread"
            {
               //Spread (in degrees)
               "x"   "12"
               "y"   "12"
               "z"   "12"
            }
            "IronsightSpread"
            {
               //Spread when ironsighted (in degrees)
               "x"   "12"
               "y"   "12"
               "z"   "12"
            }
            "ZoomSpread"
            {
               //Spread when zoomed in (in degrees)
               "x"   "12"
               "y"   "12"
               "z"   "12"
            }
         }
« Last Edit: February 20, 2015, 09:48:43 AM by minmi96 »


Let's Get Some Pussy Tonight.

Offline Bitl

  • *
  • *
  • +7% chance to make useful post
  • Bitl is working their way up.Bitl is working their way up.Bitl is working their way up.
Re: Help creating custom weapons.
« Reply #1 on: February 20, 2015, 12:36:36 PM »
The custom weapons system doesn't really support shotguns as of yet, however that should be added in the future.
FIREFIGHT RELOADED: GET IT NOW ON STEAM! http://store.steampowered.com/app/397680

Visit my Discord here: https://discord.gg/chfVwk2

crack tales, ooo-ooo

My Blog

"They are rage, brutal, without mercy. But you. You will be worse. Rip and tear, until it is don

Offline minmi96

  • *
  • *
  • +7% chance to make useful post
  • minmi96 is working their way up.minmi96 is working their way up.minmi96 is working their way up.
    • www.titsassesanddicks.cum
Re: Help creating custom weapons.
« Reply #2 on: February 20, 2015, 01:08:25 PM »
The custom weapons system doesn't really support shotguns as of yet, however that should be added in the future.
I see.
Also can you possibly add a script that allows to overwrite default weapons.


Let's Get Some Pussy Tonight.

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: Help creating custom weapons.
« Reply #3 on: February 20, 2015, 02:03:49 PM »
Did you try messing with "CanReloadSingly" ?
Wouldn't that help for shotguns?

Offline minmi96

  • *
  • *
  • +7% chance to make useful post
  • minmi96 is working their way up.minmi96 is working their way up.minmi96 is working their way up.
    • www.titsassesanddicks.cum
Re: Help creating custom weapons.
« Reply #4 on: February 21, 2015, 07:42:02 AM »
Did you try messing with "CanReloadSingly" ?
Wouldn't that help for shotguns?
I did actually try that, but still no good results. :-\


Let's Get Some Pussy Tonight.

Offline Samorrdo

  • *
  • +1% chance to make useful post
  • Samorrdo has no influence.
Re: Help creating custom weapons.
« Reply #5 on: August 17, 2015, 07:27:18 AM »
I read it, my mind will be applied accordingly.