Schmidt Scout as a .22LR varmint rifle

PostNukeRP Gamemode Suggestions

Schmidt Scout as a .22LR varmint rifle

Postby TheMrFailz » Thu Aug 15, 2013 9:40 pm

For the lazy, go to the bottom.

I've been playing PNRP a bit now and I've noticed that there aren't too many weapons that are scoped (Well, to be more specific, no one has them.) This obviously is good in a sense because it keeps RDM'rs from camping up in a tower and murdering everyone or something along those lines but it makes it a pain in the ass when you have to kill something at range unless you have the materials to machine a Precision rifle which you may loose ten seconds after making.

I was thinking, what could fill the gap between short range pistols/shotguns/Assault rifles and the Precision rifle, but not be ridiculously overpowered/RDM'r friendly?

I thought for a minute and came up with the idea of making the Schmidt Scout, everyone's favorite ridiculously low damage sniper rifle from CS, into a .22LR varmint rifle. (A.K.A. A relatively low damage rifle mainly used for killing pests such as squirrels, rabbits, and what not which would be zombies and Antalions in our case)

Image

Ammo would be relatively cheap, only requiring 2 or so scrap and 2-5 chems. The ammo could be made by anyone, maybe not the same as the rifle, so that people wouldn't have to be constantly harping on Engineers for ammo. The scope's zoom would be semi-low, still a crap load better than iron sights but not nearly as nice as the Precision Rifle's. The magazine would have approximately 5 round max capacity and the firing speed (That means fire-rechamber-fire) would be slow compared to something like the BadLands rifle, but somewhat fast for a bolt action (We're talking about a tiny .22LR here).

You may be thinking, "FAILZ YOU IDIOT! THAT'S A HORRIBLE IDEA! Minges will just grab one of these and spam hip fire/scope with it!". We'll here's where things get interesting. On a body shot (I don't know if Source has/supports hit boxes other than the head and body), depending where it is on the body, will only do around 13 damage. On a head/critical shot it will do approximately 16 damage, the same as the current weakest weapon, the Lucky 57. This means it will be pretty much impossible to kill someone in a single magazine. I'm not saying you shouldn't try it, but it's not a good idea. Damage (Hopefully you can do this with your style of weapon coding) would drop off considerably after 150 feet or more. Accuracy would remain quite high though as to make this weapon even worth while to have.

Why would you even want to have this gun with those horrible weapon stats? Simple. Imagine you're in your base and you see a couple of Antalions headed your way (I swear these guys have eagle eyes), you don't want to waste good ammo from an assault rifle on them, but you don't want to loose health knifing them. If you had the Varmint rifle, you could just pull it out and weaken/kill them before they jumped your walls and started attacking you.


Additional info (AKA only the important stuff):

Name: .22LR Varmint Rifle
Weapon model would just be the source one. No need for going fancy and making custom models if you've already got one.
Ammo model (.22LR rounds): According to GMOD "models/props_lab/box01b.mdl" (HL2)
Damage: 13 on body shot 16 on critical. Feel free to adjust this.
Magazine: 5 rounds of .22LR
Firing speed: Medium-ish (Fire- rechamber - fire) I can't give you exact numbers.
Purpose: For long(ish) range NPC killing. (So you don't have to nigh die everytime a group of NPC baddies show up)
Cost to make (Rifle): 40 scrap (Again, feel free to adjust to make it fair compared to other weapons.), 15-30 small parts, 20 chems.
Cost to make (Ammo): 2 or so scrap and 5 chems. (This ammo does low low damage so you might as well get a good amount for your buck.)
Description: A low damage rifle for killing pesky antalions. And no, you probably won't kill someone with this.

Feel free to make suggestions and such. Having a hoard of antalions/zombies show up outside your house can be a pain in the ass if you aren't swimming in (Not fired at you) bullets so I suggested this.


---
edit: I just realized I sorta went from wanting a ultra cheap sniper rifle to a varmint rifle that does low damage in that post. o-o
I support using pulleys as an alternative to winches.
Rail travel: The better way to cross the wastes.
TheMrFailz
 
Posts: 24
Joined: Tue Aug 13, 2013 10:28 pm

Re: Schmidt Scout as a .22LR varmint rifle

Postby TheMrFailz » Tue Aug 20, 2013 9:36 am

MAAAAJOOOR UPDATE!

I've made the weapon now. The original base is by xOPTEKx but it has some coding hashed in from Wowzors zoom tutorial. I configured the damge, zoom, ammo etc.

I take no credit for the original base code and zoom coding.

----------------
Since I was bored... and wanted a .22 rifle.. And also thought that maybe, in some ultra ultra ultra slight chance, making the weapon I suggested could possibly make it more likely to get added, I created the .22 Rifle.

Features:
-Fires pistol rounds
-Has a 2x zoom scope (It zooms two times)
-Does 13 damage (Haven't determined what source makes 13 damage into on headshots)
-Pretty much a remade scout
-Only uses CS:S content. (Does not include said content as I like not being sued.)
-10 round magazine
-Relatively decent accuracy

Bugs:
-Not really a bug, but it doesn't have a scope overlay as I don't know how to add that.
-Bullets LOOK like they fall down at ranges over 300 feet ish. (As far as I know, they don't.)


Download:
http://www.mediafire.com/?ad26awne63u3o20
I support using pulleys as an alternative to winches.
Rail travel: The better way to cross the wastes.
TheMrFailz
 
Posts: 24
Joined: Tue Aug 13, 2013 10:28 pm

Re: Schmidt Scout as a .22LR varmint rifle

Postby bizzclaw » Wed Aug 21, 2013 2:42 pm

Being an unofficial dev of PNRP, I'll save the official devs the trouble of responding to this and tell you straight up that this probably won't get implemented because the PNRP weapons already have their own base which you're not following.. (well actually they have the base code written in to all of their weapons for some reason... but that's beside the point!) Anyways, this does't have the PNRP specific functions that are required to make it work properly in the gamemode; This weapon lacks any form of holstering, and most importantly it wouldn't work with the Weapon Handling Skill. If you're going to want to make weapons for PNRP, you should use their actual base, the shared.lua for one of their weapons looks like this, and you should be able to work from there.
Code: Select all
SWEP.Author      = "LostInTheWired"
SWEP.Contact      = "LostInTheWired@gmail.com"
SWEP.Purpose      = "The Badlands Rifle is a well engineered,\n  semi-auto rifle with a hell of a punch.\n  Uses .357 ammo."
SWEP.Instructions   = "Right click for iron sights.\nWALK-Right click to hold passive."

SWEP.ViewModel      = "models/weapons/v_rif_galil.mdl"
SWEP.WorldModel      = "models/weapons/w_rif_galil.mdl"

SWEP.Spawnable          = true
SWEP.AdminSpawnable    = true
SWEP.DrawCrosshair       = true

SWEP.Base             = "weapon_base"

SWEP.MuzzleAttachment      = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models
SWEP.ShellEjectAttachment   = "2" -- Should be "2" for CSS models or "1" for hl2 models

SWEP.Primary.Sound          = Sound("Weapon_Galil.Single")
SWEP.Primary.Recoil       = 2
SWEP.Primary.Damage       = 80
SWEP.Primary.NumShots       = 1
SWEP.Primary.Cone          = 0.005
SWEP.Primary.ClipSize       = 15
SWEP.Primary.ClipSize       = 15
SWEP.Primary.Delay          = 0.35
SWEP.Primary.DefaultClip    = 15
SWEP.Primary.Automatic       = false
SWEP.Primary.Ammo          = "357"

SWEP.Secondary.ClipSize    = -1
SWEP.Secondary.DefaultClip    = -1
SWEP.Secondary.Automatic    = false
SWEP.Secondary.Ammo       = "none"

SWEP.HoldType            = "ar2"

SWEP.IronSightsPos = Vector (-5.1685, 0, 2.2876)
SWEP.IronSightsAng = Vector (0, 0, 0)

function SWEP:Initialize()
   util.PrecacheModel( self.ViewModel )
   util.PrecacheModel( self.WorldModel )
   util.PrecacheSound(self.Primary.Sound)
   util.PrecacheSound("Weapon_Galil.Reload")
    self:SetWeaponHoldType(self.HoldType)
end

function SWEP:SetupDataTables()
   self:DTVar("Bool", 0, "Holsted")
   self:DTVar("Bool", 1, "Ironsights")
end

function SWEP:Equip()
   -- self.Weapon:SetNWBool("IronSights", false)
   -- self.Weapon:SetNWBool("IsPassive", false)
   self.Weapon:SetDTBool(0, false)
   self.Weapon:SetDTBool(1, false)
end

function SWEP:PrimaryAttack()

   if not self:CanPrimaryAttack() or self.Owner:WaterLevel() > 2 then return end
   if self.Weapon:GetDTBool(0) or self.Owner:KeyDown( IN_SPEED ) then return end
   
   self.Weapon:EmitSound(self.Primary.Sound)
   self:TakePrimaryAmmo(self.Primary.NumShots)
   
   self.Weapon:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
   
   local handlingSkill = self.Owner:GetSkill("Weapon Handling")
   
   if self.Weapon:GetDTBool(1) then
      self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil - (0.1 * handlingSkill)), math.Rand(-1,1) * ((self.Primary.Recoil - (0.1 * handlingSkill)) / 2), 0))
      self:ShootBullet(self.Primary.Damage, self.Primary.NumShots, (self.Primary.Cone - (0.0005 * handlingSkill)) / 2, (self.Primary.Recoil - (0.1 * handlingSkill)) / 2 )
   else
      self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil - (0.1 * handlingSkill)), math.Rand(-1,1) * (self.Primary.Recoil - (0.1 * handlingSkill)), 0))
      self:ShootBullet(self.Primary.Damage, self.Primary.NumShots, (self.Primary.Cone - (0.0005 * handlingSkill)), (self.Primary.Recoil - (0.1 * handlingSkill)) )
   end
   
   self.LastShoot = CurTime()
end

function SWEP:SecondaryAttack()
   if self.Owner:KeyDown( IN_WALK ) then
      -- local savedBool = (not self.Weapon:GetNWBool("IsPassive", false))
      local savedBool = (not self.Weapon:GetDTBool(0))
      
      if (SERVER) then
         self.Weapon:SetDTBool(0, (not self.Weapon:GetDTBool(0)))
         self.Owner:EmitSound("npc/combine_soldier/gear4.wav")
      end
      
      if savedBool then
         self:SetWeaponHoldType("normal")
         self.Owner:SetFOV( 0, 0.15 )
         self.Weapon:SetDTBool(1, false)
      else
         self:SetWeaponHoldType(self.HoldType)
      end
   else
      --if self.Weapon:GetNWBool("IsPassive", false) then return end
      if self.Weapon:GetDTBool(0) then return end
      -- local savedBool = (not self.Weapon:GetNWBool("IronSights", false))
      local savedBool = (not self.Weapon:GetDTBool(1))
      -- self.Weapon:SetNWBool("IronSights", (not self.Weapon:GetNWBool("IronSights", false)))
      self.Weapon:SetDTBool(1, (not self.Weapon:GetDTBool(1)))
      
      if savedBool then
         self.Owner:SetFOV( 50, 0.15 )
      else
         self.Owner:SetFOV( 0, 0.15 )
      end
   end
   self.Weapon:SetNextSecondaryFire(CurTime() + 0.5)
end

function SWEP:Reload()
   if self.Weapon:Clip1() < self.Primary.ClipSize then
      self.Weapon:SetDTBool(1, false)
      self.Owner:SetFOV( 0, 0.15 )
      
      -- self.Weapon:SetNextPrimaryFire(CurTime() + 1.5)
      -- self.Weapon:SetNextSecondaryFire(CurTime() + 1.5)
      
      self.Weapon:DefaultReload(ACT_VM_RELOAD)
      self.Weapon:EmitSound("Weapon_Galil.Reload")
      
   end
end

function SWEP:Deploy()

   self.Weapon:SendWeaponAnim( ACT_VM_DRAW )
   self.Weapon:SetDTBool(0, false)
   self.Weapon:SetDTBool(1, false)

   self.Weapon:SetNextPrimaryFire(CurTime() + 1)
   return true
end

function SWEP:Think()
   -- if self.Weapon:GetNWBool("IsPassive", false) or self.Owner:KeyDown( IN_SPEED ) then
      -- self:SetWeaponHoldType("passive")
   -- else
      -- self:SetWeaponHoldType(self.HoldType)
   -- end
end

-- Ironsights code, based on CSS Realistic
local IRONSIGHT_TIME = 0.15

function SWEP:GetViewModelPosition(pos, ang)
   
   if self.Weapon:GetDTBool(0) or self.Owner:KeyDown( IN_SPEED ) then
      ang = ang * 1
      ang:RotateAroundAxis(ang:Right(),       -37.2258)
      ang:RotateAroundAxis(ang:Up(),       1.7237)
      ang:RotateAroundAxis(ang:Forward(),    0)
      
      local Offset = Vector(1.6428, 0, 8.2286)
      local Right    = ang:Right()
      local Up       = ang:Up()
      local Forward    = ang:Forward()
      
      pos = pos + Offset.x * Right
      pos = pos + Offset.y * Forward
      pos = pos + Offset.z * Up
      return pos, ang
   end
   
   if (not self.IronSightsPos) then return pos, ang end

   local bIron = self.Weapon:GetDTBool(1)

   if (bIron != self.bLastIron) then
      self.bLastIron = bIron
      self.fIronTime = CurTime()
      
      if (bIron) then
         self.SwayScale    = 0.3
         self.BobScale    = 0.1
      else
         self.SwayScale    = 1.0
         self.BobScale    = 1.0
      end
   end

   local fIronTime = self.fIronTime or 0

   if (not bIron and fIronTime < CurTime() - IRONSIGHT_TIME) then
      return pos, ang
   end

   local Mul = 1.0

   if (fIronTime > CurTime() - IRONSIGHT_TIME) then
      Mul = math.Clamp((CurTime() - fIronTime) / IRONSIGHT_TIME, 0, 1)

      if not bIron then Mul = 1 - Mul end
   end
   
   local Offset   = self.IronSightsPos
   
   if (self.IronSightsAng) then
      ang = ang * 1
      ang:RotateAroundAxis(ang:Right(),       self.IronSightsAng.x * Mul)
      ang:RotateAroundAxis(ang:Up(),       self.IronSightsAng.y * Mul)
      ang:RotateAroundAxis(ang:Forward(),    self.IronSightsAng.z * Mul)
   end

   local Right    = ang:Right()
   local Up       = ang:Up()
   local Forward    = ang:Forward()

   pos = pos + Offset.x * Right * Mul
   pos = pos + Offset.y * Forward * Mul
   pos = pos + Offset.z * Up * Mul

   return pos, ang
end

function SWEP:ShootBullet( damage, num_bullets, aimcone, recoil )
   
   local bullet = {}
   bullet.Num       = num_bullets
   bullet.Src       = self.Owner:GetShootPos()   -- Source
   bullet.Dir       = self.Owner:GetAimVector()   -- Dir of bullet
   bullet.Spread    = Vector( aimcone, aimcone, 0 )      -- Aim Cone
   bullet.Tracer   = 4   -- Show a tracer on every x bullets
        bullet.TracerName = "Tracer" -- what Tracer Effect should be used
   bullet.Force   = 1   -- Amount of force to give to phys objects
   bullet.Damage   = damage
   bullet.AmmoType = "smg1"

   if SERVER then self.Owner:LagCompensation( true ) end
      self.Owner:FireBullets( bullet )
   if SERVER then self.Owner:LagCompensation( false ) end
   
   self:ShootEffects()
   
   if ((game.SinglePlayer() and SERVER) or (not game.SinglePlayer() and CLIENT)) then
      local eyeang = self.Owner:EyeAngles()
      eyeang.pitch = eyeang.pitch - recoil
      self.Owner:SetEyeAngles(eyeang)
   end
   
end

function SWEP:ShootEffects()

   self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )   -- View model animation
   self.Owner:MuzzleFlash()            -- Crappy muzzle light
   self.Owner:SetAnimation( PLAYER_ATTACK1 )      -- 3rd Person Animation

end
bizzclaw
 
Posts: 8
Joined: Sat Oct 23, 2010 10:25 pm

Re: Schmidt Scout as a .22LR varmint rifle

Postby TheMrFailz » Sun Aug 25, 2013 7:44 pm

Sorry I've been camping for the last week.

Any who,I wasn't thinking about the base when I made these. I'll remake them in the PNRP base.

--
Edit: Terribly sorry if I sounded like a d*** posting this. I'm legitimately sorry that I hadn't made these in the original base.
I support using pulleys as an alternative to winches.
Rail travel: The better way to cross the wastes.
TheMrFailz
 
Posts: 24
Joined: Tue Aug 13, 2013 10:28 pm


Return to PNRP Suggestions

Who is online

Users browsing this forum: No registered users and 6 guests

cron