From 48e7f945e69a583fd2c2665d704ffb2c966e0aa8 Mon Sep 17 00:00:00 2001 From: Fesiug Date: Thu, 21 Mar 2024 01:48:42 -0400 Subject: [PATCH] G36 WIP --- .../common/attachments_bulk/uplp-f_g36.lua | 76 ++ lua/arc9/common/localization/uplp-f_en.lua | 15 +- lua/weapons/arc9_uplp-f_g36.lua | 769 ++++++++++++++++++ .../weapons/arc9/uplp-f/g36translucent.vmt | 17 + .../weapons/arc9/uplp-f/g36translucent.vtf | 3 + models/weapons/arc9/c_uplp-f_g36-7.dx90.vtx | 3 + models/weapons/arc9/c_uplp-f_g36-7.mdl | 3 + models/weapons/arc9/c_uplp-f_g36-7.phy | 3 + models/weapons/arc9/c_uplp-f_g36-7.vvd | 3 + sound/uplp_f/g36/chamber3.ogg | 3 + sound/uplp_f/g36/chgrab.ogg | 3 + sound/uplp_f/g36/chpull2.ogg | 3 + sound/uplp_f/g36/fire-01.ogg | 3 + sound/uplp_f/g36/fire-02.ogg | 3 + sound/uplp_f/g36/fire-03.ogg | 3 + sound/uplp_f/g36/fire-04.ogg | 3 + sound/uplp_f/g36/fire-05.ogg | 3 + sound/uplp_f/g36/fire-06.ogg | 3 + sound/uplp_f/g36/magin.ogg | 3 + sound/uplp_f/g36/magout.ogg | 3 + sound/uplp_f/g36/magtap.ogg | 3 + 21 files changed, 927 insertions(+), 1 deletion(-) create mode 100644 lua/arc9/common/attachments_bulk/uplp-f_g36.lua create mode 100644 lua/weapons/arc9_uplp-f_g36.lua create mode 100644 materials/models/weapons/arc9/uplp-f/g36translucent.vmt create mode 100644 materials/models/weapons/arc9/uplp-f/g36translucent.vtf create mode 100644 models/weapons/arc9/c_uplp-f_g36-7.dx90.vtx create mode 100644 models/weapons/arc9/c_uplp-f_g36-7.mdl create mode 100644 models/weapons/arc9/c_uplp-f_g36-7.phy create mode 100644 models/weapons/arc9/c_uplp-f_g36-7.vvd create mode 100644 sound/uplp_f/g36/chamber3.ogg create mode 100644 sound/uplp_f/g36/chgrab.ogg create mode 100644 sound/uplp_f/g36/chpull2.ogg create mode 100644 sound/uplp_f/g36/fire-01.ogg create mode 100644 sound/uplp_f/g36/fire-02.ogg create mode 100644 sound/uplp_f/g36/fire-03.ogg create mode 100644 sound/uplp_f/g36/fire-04.ogg create mode 100644 sound/uplp_f/g36/fire-05.ogg create mode 100644 sound/uplp_f/g36/fire-06.ogg create mode 100644 sound/uplp_f/g36/magin.ogg create mode 100644 sound/uplp_f/g36/magout.ogg create mode 100644 sound/uplp_f/g36/magtap.ogg diff --git a/lua/arc9/common/attachments_bulk/uplp-f_g36.lua b/lua/arc9/common/attachments_bulk/uplp-f_g36.lua new file mode 100644 index 0000000..d8ae901 --- /dev/null +++ b/lua/arc9/common/attachments_bulk/uplp-f_g36.lua @@ -0,0 +1,76 @@ +local ATT = {} +local iconfolder = "entities/uplp_attachements/" + +-- Barrels + +ATT = {} + +ATT.PrintName = "G36 18.9\" (480mm) Barrel" +ATT.CompactName = "480mm" +ATT.Description = "Full-length barrel for the G36." +ATT.Category = "uplp_g36_barrel" + +-- Positives +ATT.HeatCapacityMult = 1.24 + +ARC9.LoadAttachment(ATT, "uplp_g36_barrel_19") + +ATT = {} + +ATT.PrintName = "G36K 12.5\" (318mm) Barrel" +ATT.CompactName = "318mm" +ATT.Description = "Carbine-length barrel for the G36K." +ATT.Category = "uplp_g36_barrel" +ATT.Ignore = true -- This one is installed by default. + +ARC9.LoadAttachment(ATT, "uplp_g36_barrel_12") + +ATT = {} + +ATT.PrintName = "G36C 9\" (228mm) Barrel" +ATT.CompactName = "228mm" +ATT.Description = "Extremely compact barrel for the G36C. The extremely short barrel and reduced size of the gas system improves the cyclic rate of the weapon, but performs worse under pressure and heat." +ATT.Category = "uplp_g36_barrel" + +-- Positives +ATT.RPMMult = 1.18 +ATT.AimDownSightsTimeAdd = -0.03 +ATT.SprintToFireTimeAdd = -0.03 + +-- Negatives +ATT.HeatCapacityMult = 0.34 +ATT.RecoilUpMult = 1.35 +ATT.RecoilSideMult = 1.3 +ATT.RecoilAutoControlMult = 0.6 +ATT.SpreadAddHipFire = -0.01 + +ARC9.LoadAttachment(ATT, "uplp_g36_barrel_9") + +-- Stocks + +ATT = {} + +ATT.PrintName = "G36 Carbine Stock" +ATT.CompactName = "Carbine" +ATT.Description = "Shortened stock for G36C and used on later models of the G36K for its better handling while using body armor." +ATT.Category = "uplp_g36_stock" + +ATT.AimDownSightsTimeAdd = -0.1 +ATT.SprintToFireTimeAdd = -0.1 +ATT.SpreadAddHipFire = -0.01 +ATT.SpeedMultSights = 1.11 + +ATT.RecoilAutoControlMult = 0.8 + +ARC9.LoadAttachment(ATT, "uplp_g36_stock_carbine") + +-- Optic + +ATT = {} + +ATT.PrintName = "G36 Integrated Optic" +ATT.CompactName = "Integrated" +ATT.Description = "Integrated optic for the G36." +ATT.Category = "uplp_g36_optic" + +ARC9.LoadAttachment(ATT, "uplp_g36_optic_integrated") \ No newline at end of file diff --git a/lua/arc9/common/localization/uplp-f_en.lua b/lua/arc9/common/localization/uplp-f_en.lua index d28a4fc..5f530b4 100644 --- a/lua/arc9/common/localization/uplp-f_en.lua +++ b/lua/arc9/common/localization/uplp-f_en.lua @@ -3,4 +3,17 @@ L = {} //////////////////// MK23 L["uplp_weapon_mk23"] = "MK 23" -L["uplp_weapon_mk23_desc"] = "The \"USSOCOM MARK 23\", shortened MK 23, is a semi-automatic large frame handgun chambered in .45 ACP designed specifically to be an offensive pistol. Considered a match grade pistol, its accuracy is equal to that of the finest custom made handguns, yet exceeds the most stringent operational requirements ever demanded of a combat handgun. Endurance testing demonstrated a service life of over 30,000 rounds of +P ammunition." \ No newline at end of file +L["uplp_weapon_mk23_desc"] = "The \"USSOCOM MARK 23\", shortened MK 23, is a semi-automatic large frame handgun chambered in .45 ACP designed specifically to be an offensive pistol. Considered a match grade pistol, its accuracy is equal to that of the finest custom made handguns, yet exceeds the most stringent operational requirements ever demanded of a combat handgun. Endurance testing demonstrated a service life of over 30,000 rounds of +P ammunition." + +//////////////////// G36 +L["uplp_weapon_g36"] = "G36" +L["uplp_weapon_g36_desc"] = "The G36 melts in the desert. Bah, I'm just playing with you." + +L["uplp_weapon_g36_c"] = "G36C" +L["uplp_weapon_g36_c_desc"] = "Compact variant of the G36. The extremely short barrel and reduced size of the gas system improves the cyclic rate of the weapon, but performs worse under pressure and heat." + +L["uplp_weapon_g36_k"] = "G36K" +L["uplp_weapon_g36_k_desc"] = "Carbine variant of the G36. The short stroke piston allows for easier configuration of suppressors, and as such this weapon performs better with them." + +L["uplp_weapon_g36_sl8"] = "SL8" +L["uplp_weapon_g36_sl8_desc"] = "" \ No newline at end of file diff --git a/lua/weapons/arc9_uplp-f_g36.lua b/lua/weapons/arc9_uplp-f_g36.lua new file mode 100644 index 0000000..e0ec7a3 --- /dev/null +++ b/lua/weapons/arc9_uplp-f_g36.lua @@ -0,0 +1,769 @@ +AddCSLuaFile() +SWEP.Base = "arc9_uplp_base" +SWEP.Category = "ARC9 - Poly Arms" +SWEP.Spawnable = true + +---- FUNDAMENTALS + +SWEP.Slot = 2 -- Which slot the weapon is in; starts at 0 + +---- Name, Description, Class, Category and Trivia +SWEP.PrintName = ARC9:GetPhrase("uplp_weapon_g36_k") +SWEP.Description = ARC9:GetPhrase("uplp_weapon_g36_k_desc") + +SWEP.Class = ARC9:GetPhrase("uplp_class_weapon_ar") -- In the Customization Menu +SWEP.SubCategory = ARC9:GetPhrase("uplp_category_weapon_ar") -- In the Spawnmenu + +SWEP.Trivia = { + [ ARC9:GetPhrase( "uplp_realname" ) ] = ARC9:GetPhrase("uplp_weapon_g36_real"), + + [ ARC9:GetPhrase( "uplp_manufacturer" ) ] = ARC9:GetPhrase( "uplp_weapon_g36_manufacturer" ), + [ ARC9:GetPhrase( "uplp_caliber" ) ] = ARC9:GetPhrase( "uplp_caliber_5.56x45mm"), + [ ARC9:GetPhrase( "uplp_mechanism" ) ] = string.format( ARC9:GetPhrase("uplp_mechanism_3" ), + ARC9:GetPhrase( "uplp_mechanism_shortstroke" ), + ARC9:GetPhrase( "uplp_mechanism_closedbolt" ), + ARC9:GetPhrase( "uplp_mechanism_rotatingbolt" ) ), + [ ARC9:GetPhrase( "uplp_country" ) ] = ARC9:GetPhrase( "uplp_country_usa" ), + [ ARC9:GetPhrase( "uplp_year" ) ] = string.format( ARC9:GetPhrase("uplp_year_present"), "1964" ), +} + + +SWEP.Credits = { + [ ARC9:GetPhrase( "uplp_lua" ) ] = "Moka, 8Z", + [ ARC9:GetPhrase( "uplp_assets" ) ] = "TastyTony", + [ ARC9:GetPhrase( "uplp_animations" ) ] = "Partexedd", + [ ARC9:GetPhrase( "uplp_sounds" ) ] = "rzen1th", + [ ARC9:GetPhrase( "uplp_general" ) ] = "Darsu", +} + +SWEP.StandardPresets = { +} + +SWEP.DefaultBodygroups = "010111" +-- 0: Main +-- 0 +-- 1: Stock +-- 0 - C +-- 1 - R +-- 2 - +-- 2: Carryhandle +-- 0 - C Carryhandle +-- 1 - R Optic +-- 2 - +-- 3: Handguard +-- 0 - C +-- 1 - K +-- 2 - R +-- 3 - +-- 4: Break +-- 0 - C +-- 1 - K +-- 2 - R +-- 3 - +-- 5: Rails +-- 0 - C +-- 1 - + +---- Muzzle Effects, Shell Effects, Camera +SWEP.MuzzleParticle = "muzzleflash_3" +SWEP.MuzzleEffectQCA = 1 + +SWEP.TracerNum = 1 +SWEP.TracerSize = 1 + +SWEP.ShellModel = "models/weapons/arc9/uplp/shells/shell_556.mdl" +SWEP.ShellScale = 1.5 +SWEP.ShellPitch = 90 + +SWEP.CaseEffectQCA = 2 +SWEP.CamQCA = 3 +SWEP.CamOffsetAng = Angle(0, 0, 90) + +---- View & Worldmodel +SWEP.ViewModel = "models/weapons/arc9/c_uplp-f_g36-7.mdl" +SWEP.WorldModel = "models/weapons/arc9/w_uplp_ar15.mdl" + +SWEP.MirrorVMWM = true +SWEP.NoTPIKVMPos = true +-- SWEP.WorldModelMirror = "models/weapons/arc9/c_uplp_ar15.mdl" +SWEP.WorldModelOffset = { + Pos = Vector(-3.5, 3, -8), + Ang = Angle(0, 0, 180), + TPIKPos = Vector(-4.5, 2, -7), + TPIKAng = Angle(0, 0, 180), + Scale = 1 +} + +SWEP.ViewModelFOVBase = 70 + +SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 +SWEP.AnimReload = ACT_HL2MP_GESTURE_RELOAD_MAGIC + +---- Weapon Stats and Behaviour +-- Damage +SWEP.DamageMax = 25 -- Damage dealt point-blank +SWEP.DamageMin = 14 -- Damage dealt after maximum range +SWEP.DamageType = DMG_BULLET + +SWEP.Penetration = 15 -- Units of wood that can be penetrated +SWEP.ImpactForce = 2 -- How much kick things will have when hit + +-- Range +SWEP.RangeMin = 20 / ARC9.HUToM +SWEP.RangeMax = 60 / ARC9.HUToM + +-- Physical Bullets +SWEP.PhysBulletMuzzleVelocity = 715 / ARC9.HUToM +SWEP.PhysBulletGravity = 1.5 +SWEP.PhysBulletDrag = 1.5 + +-- Magazine Info +SWEP.Ammo = "smg1" -- What ammo type this gun uses. + +SWEP.ChamberSize = 1 +SWEP.ClipSize = 30 + +-- Recoil +SWEP.Recoil = 1 +SWEP.RecoilUp = 1 +SWEP.RecoilSide = 1.4 + +SWEP.RecoilRandomUp = 1 +SWEP.RecoilRandomSide = 1.1 + +SWEP.RecoilRise = 0 +SWEP.MaxRecoilBlowback = 0 +SWEP.RecoilPunch = 0 +SWEP.RecoilAutoControl = 1.9 + +SWEP.RecoilMultSights = 1 +SWEP.RecoilMultCrouch = 0.75 + +-- Visual Recoil +SWEP.VisualRecoil = 0.5 +SWEP.VisualRecoilMultSights = 1 +SWEP.VisualRecoilCenter = Vector(2, 11, 2) +SWEP.VisualRecoilUp = 0.075 -- Vertical tilt +SWEP.VisualRecoilSide = 0.01 -- Horizontal tilt +SWEP.VisualRecoilRoll = -2.5 -- Roll tilt +SWEP.VisualRecoilPunch = 10 -- How far back visual recoil moves the gun +SWEP.VisualRecoilDampingConst = 80 +SWEP.VisualRecoilSpringMagnitude = 0.44 +SWEP.VisualRecoilPositionBumpUp = .25 + +SWEP.VisualRecoilMultHipFire = .35 +SWEP.VisualRecoilUpHipFire = 2 +SWEP.VisualRecoilSideHipFire = -0.1 +SWEP.VisualRecoilRollHipFire = 20 +SWEP.VisualRecoilPunchHipFire = 2 +SWEP.VisualRecoilDampingConstHipFire = 45 +SWEP.VisualRecoilPositionBumpUpHipFire = .5 + +-- Accuracy and Spread +SWEP.Spread = 0.008 +SWEP.SpreadAddHipFire = 0.025 + +SWEP.SpreadAddRecoil = 0.012 +SWEP.SpreadAddMove = 0.01 +SWEP.SpreadAddMidAir = 0.05 + +SWEP.SpreadMultSights = 1 +SWEP.SpreadMultMove = 1 + +SWEP.RecoilDissipationRate = 8 +SWEP.RecoilResetTime = 0.03 +SWEP.RecoilPerShot = 1 / 5 +SWEP.RecoilMax = 1 +SWEP.RecoilModifierCap = 1 + +-- Weapon handling +SWEP.Speed = 0.85 -- Walk speed multiplier +SWEP.SpeedMultSights = 0.7 -- When aiming +SWEP.SpeedMultShooting = 0.9 + +SWEP.AimDownSightsTime = 0.42 -- Time it takes to fully enter ADS +SWEP.SprintToFireTime = 0.42 -- Time it takes to fully enter sprint + +SWEP.SwayAddSights = 0 +SWEP.BarrelLength = 35 + +-- Shooting and Firemodes +SWEP.RPM = 670 -- How fast gun shoot +SWEP.HeatCapacity = 180 -- For suppresors; how many shots for full heat With big silencer (Small silencers will make this number lower down to 70%) + +SWEP.Num = 1 -- How many bullets shot at once + +SWEP.Firemodes = { + { Mode = -1, -- Full + PoseParam = 1 }, + { Mode = 1, -- Semi + RPM = 555, + PoseParam = 2 } +} + +SWEP.ShootPitch = 90 +SWEP.ShootVolume = 120 + +-- HoldType Info +SWEP.HoldType = "ar2" +SWEP.HoldTypeSprint = "passive" +SWEP.HoldTypeHolstered = nil +SWEP.HoldTypeSights = "smg" +SWEP.HoldTypeCustomize = "slam" +SWEP.HoldTypeNPC = nil + +-- NPC Info +SWEP.NPCWeaponType = "weapon_ar2" +SWEP.NPCWeight = 60 + +-- Iron Sight and Sight Info +SWEP.IronSights = { + Pos = Vector(-3.05491, -3, 0.75966), + Ang = Angle(0, 0, 0), + Magnification = 1.15, + ViewModelFOV = 65, +} + +SWEP.IronSightsHook = function(self) -- If any attachments equipped should alter Irons + local attached = self:GetElements() + + if attached["uplp_ar15_rs_tall"] then + return { + Pos = Vector(-3.05491, -3, -0.17), + Ang = Angle(0, 0, 0), + Magnification = 1.15, + ViewModelFOV = 65, + } + elseif attached["uplp_ar15_rs_short"] then + return { + Pos = Vector(-3.05491, -3, -0.03), + Ang = Angle(0, 0, 0), + Magnification = 1.15, + ViewModelFOV = 65, + } + end +end + +-- Customization Menu Info +SWEP.CustomizePos = Vector(14, 32.5, 5) +SWEP.CustomizeAng = Angle(90, 0, 0) +SWEP.CustomizeRotateAnchor = Vector(14, -4, -3) + +SWEP.CustomizeSnapshotPos = Vector(0, 5, 0) +SWEP.CustomizeSnapshotFOV = 90 + +-- Dropped Magazine +SWEP.ShouldDropMag = true +SWEP.ShouldDropMagEmpty = true +SWEP.DropMagazineModel = "models/weapons/arc9/uplp/ar15_mag_stanag30.mdl" +SWEP.DropMagazineTime = 0.33 * 1.1 +SWEP.DropMagazineQCA = 4 +SWEP.DropMagazinePos = Vector(0, 1.75, -2.5) +SWEP.DropMagazineAng = Angle(90, 90, 90) +SWEP.DropMagazineVelocity = Vector(0, -15, 10) + +---- Sounds + +-- urbna! +local pathUT = "uplp_urban_temp/ar15/" +local pathREAL = "uplp_f/g36/" +local pathUTS = "uplp_urban_temp/scar/" +local pathUTA = "uplp_urban_temp/ak/" +local pathUTC = "uplp_urban_temp/common/" + +SWEP.ShootSound = { + pathREAL .. "fire-01.ogg", + pathREAL .. "fire-02.ogg", + pathREAL .. "fire-03.ogg", + pathREAL .. "fire-04.ogg", + pathREAL .. "fire-05.ogg", + pathREAL .. "fire-06.ogg", +} + +SWEP.ShootSoundSilenced = { + pathUT .. "fire-sup-01.ogg", + pathUT .. "fire-sup-02.ogg", + pathUT .. "fire-sup-03.ogg", + pathUT .. "fire-sup-04.ogg", + pathUT .. "fire-sup-05.ogg", + pathUT .. "fire-sup-06.ogg", +} + +SWEP.ShootSoundSilencedIndoor = SWEP.ShootSoundSilenced + +SWEP.DistantShootSound = { + pathUTC .. "556tails/fire-dist-556x45-rif-ext-01.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-ext-02.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-ext-03.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-ext-04.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-ext-05.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-ext-06.ogg", +} +SWEP.DistantShootSoundIndoor = { + pathUTC .. "556tails/fire-dist-556x45-rif-int-01.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-int-02.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-int-03.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-int-04.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-int-05.ogg", + pathUTC .. "556tails/fire-dist-556x45-rif-int-06.ogg", +} + +SWEP.DistantShootSoundSilenced = { + pathUTC .. "generictails/sup-tail-01.ogg", + pathUTC .. "generictails/sup-tail-02.ogg", + pathUTC .. "generictails/sup-tail-03.ogg", + pathUTC .. "generictails/sup-tail-04.ogg", + pathUTC .. "generictails/sup-tail-05.ogg", + pathUTC .. "generictails/sup-tail-06.ogg", + pathUTC .. "generictails/sup-tail-07.ogg", + pathUTC .. "generictails/sup-tail-08.ogg", + pathUTC .. "generictails/sup-tail-09.ogg", + pathUTC .. "generictails/sup-tail-10.ogg" +} +SWEP.DistantShootSoundSilencedIndoor = { + pathUTC .. "generictails/fire-dist-int-pistol-light-01.ogg", + pathUTC .. "generictails/fire-dist-int-pistol-light-02.ogg", + pathUTC .. "generictails/fire-dist-int-pistol-light-03.ogg", + pathUTC .. "generictails/fire-dist-int-pistol-light-04.ogg", + pathUTC .. "generictails/fire-dist-int-pistol-light-05.ogg", + pathUTC .. "generictails/fire-dist-int-pistol-light-06.ogg", +} + +SWEP.DropMagazineSounds = { + pathUTC .. "rifle_magdrop_1.ogg", + pathUTC .. "rifle_magdrop_2.ogg", + pathUTC .. "rifle_magdrop_3.ogg", + pathUTC .. "rifle_magdrop_4.ogg", + pathUTC .. "rifle_magdrop.ogg", +} + + +---- Animations +-- HideBones, BulletBones, etc. +SWEP.BulletBones = { + [1] = "bullet1", + [2] = "bullet2", + [3] = "bullet3", +} + +-- SWEP.HideBones = { + -- "fakemag", + -- "fakerounds", + -- "bullet1", + -- "bullet2", + -- "bullet3", + -- "bullet4", +-- } + +SWEP.ReloadHideBoneTables = { + [1] = { + "mag", + "bullet1", + "bullet2", + "bullet3", + }, +} + +local mechh = { + pathUT .. "mech-01.ogg", + pathUT .. "mech-02.ogg", + pathUT .. "mech-03.ogg", + pathUT .. "mech-04.ogg", + pathUT .. "mech-05.ogg", + pathUT .. "mech-06.ogg", +} + +local thetoggle = {{ + s = { + "arc9/toggles/flashlight_laser_toggle_off_01.ogg", + "arc9/toggles/flashlight_laser_toggle_off_02.ogg", + "arc9/toggles/flashlight_laser_toggle_off_03.ogg", + "arc9/toggles/flashlight_laser_toggle_on_01.ogg", + "arc9/toggles/flashlight_laser_toggle_on_02.ogg", + "arc9/toggles/flashlight_laser_toggle_on_03.ogg", + }, t = 0 +}} + +-- Animations +SWEP.Animations = { + ["idle"] = { + Source = "idle", + IKTimeLine = { { t = 0, lhik = 1 } }, + }, + ["ready"] = { + Source = "ready", + MinProgress = 0.75, + FireASAP = true, + EventTable = { + { s = pathUTC .. "raise.ogg", t = 0 / 30, c = ca, v = 0.8 }, + { s = pathREAL .. "chgrab.ogg", t = 1 / 30, c = ca, v = 0.8 }, + { s = pathREAL .. "chpull.ogg", t = 4 / 30, c = ca, v = 0.8 }, + { s = pathREAL .. "chamber3.ogg", t = 10 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "grab-polymer.ogg", t = 18 / 30, c = ca, v = 0.3 }, + { s = pathUTC .. "cloth_3.ogg", t = 18 / 30, c = ca, v = 0.8 }, + }, + IKTimeLine = { + { t = 0, lhik = 1 }, + { t = 0.15, lhik = 0 }, + { t = 0.5, lhik = 0 }, + { t = 0.8, lhik = 1 }, + { t = 1, lhik = 1 }, + }, + }, + + ["draw"] = { + Source = "ready" or "draw", + Time = 0.25, + MinProgress = 0.6, + FireASAP = true, + EventTable = { + { s = pathUTC .. "raise.ogg", t = 0 / 30, c = ca, v = 0.8 }, + }, + }, + ["holster"] = { + Source = "ready" or "holster", + Time = 0.25, + MinProgress = 0.4, + Mult = 0.8, + EventTable = { + { s = pathUTC .. "rattle2.ogg", t = 0 / 30, c = ca, v = 0.8 }, + }, + IKTimeLine = { { t = 0, lhik = 1 } }, + }, + ["draw_empty"] = { + Source = "ready" or "draw_empty", + Time = 0.25, + MinProgress = 0.6, + FireASAP = true, + EventTable = { + { s = pathUTC .. "raise.ogg", t = 0 / 30, c = ca, v = 0.8 }, + }, + }, + ["holster_empty"] = { + Source = "ready" or "holster_empty", + Time = 0.25, + MinProgress = 0.4, + Mult = 0.8, + EventTable = { + { s = pathUTC .. "rattle2.ogg", t = 0 / 30, c = ca, v = 0.8 }, + }, + IKTimeLine = { { t = 0, lhik = 1 } }, + }, + + ["fire"] = { + Source = "fire", + ShellEjectAt = 0.01, + IKTimeLine = { { t = 0, lhik = 1 } }, + EventTable = { { s = mechh, t = 0 } }, + }, + ["fire_empty"] = { + Source = "fire_empty", + ShellEjectAt = 0.01, + IKTimeLine = { { t = 0, lhik = 1 } }, + EventTable = { { s = pathUT .. "mech_last.ogg", t = 0 } }, + }, + + -- Reloads -- + + ["reload"] = { + Source = "reload", + MinProgress = 0.8, + PeekProgress = 0.775, + RefillProgress = 0.6, + FireASAP = true, + Mult = 1.1, + EventTable = { + { s = pathUTA .. "reload_start.ogg", t = 0 / 30, v = 0.8 }, + { s = pathREAL .. "magout.ogg", t = 0 / 30, c = ca, v = 0.8 }, + { s = pathUTS .. "struggle.ogg", t = 17 / 30, c = ca, v = 0.8 }, + { s = pathREAL .. "magin.ogg", t = 22 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "cloth_4.ogg", t = 25 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "cloth_4.ogg", t = 32 / 30 - 0.07, c = ca, v = 0.3 }, + + {hide = 0, t = 0}, + {hide = 1, t = 0.33}, + {hide = 0, t = 0.45} + }, + IKTimeLine = { + { t = 0, lhik = 1 }, + { t = 0.15, lhik = 0 }, + { t = 0.6, lhik = 0 }, + { t = 0.85, lhik = 1 }, + { t = 1, lhik = 1 }, + }, + }, + ["reload_empty"] = { + Source = "reload_empty", + MinProgress = 0.8, + PeekProgress = 0.775, + RefillProgress = 0.65, + FireASAP = true, + Mult = 1.1, + EventTable = { + { s = pathUTA .. "reload_start.ogg", t = 0 / 30, v = 0.8 }, + { s = pathREAL .. "magout.ogg", t = 0 / 30, c = ca, v = 0.8 }, + { s = pathUTS .. "struggle.ogg", t = 17 / 30, c = ca, v = 0.8 }, + { s = pathREAL .. "magin.ogg", t = 22 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "cloth_1.ogg", t = 25 / 30, c = ca, v = 0.8 }, + { s = pathREAL .. "chpull2.ogg", t = 42 / 30, c = ca, v = 1 }, + { s = pathREAL .. "chamber3.ogg", t = 49 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "cloth_4.ogg", t = 54 / 30, c = ca, v = 0.3 }, + + {hide = 0, t = 0}, + {hide = 1, t = 0.33}, + {hide = 0, t = 0.45} + }, + IKTimeLine = { + { t = 0, lhik = 1 }, + { t = 0.15, lhik = 0 }, + { t = 0.65, lhik = 0 }, + { t = 0.85, lhik = 1 }, + { t = 1, lhik = 1 }, + }, + }, + + -- Inspecc -- + + ["inspect"] = { + Source = "idle" or "inspect", + FireASAP = true, + MinProgress = 0.925, + Mult = 1.2, + EventTable = { + { s = pathUTC .. "cloth_4.ogg", t = 0 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "movement-rifle-03.ogg", t = 5 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "cloth_2.ogg", t = 37 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "movement-rifle-04.ogg", t = 45 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "movement-rifle-02.ogg", t = 90 / 30, c = ca, v = 0.8 }, + -- {hide = 1, t = 0}, + }, + IKTimeLine = { + { t = 0, lhik = 1 }, + { t = 0.15, lhik = 0 }, + { t = 0.8, lhik = 0 }, + { t = 0.95, lhik = 1 }, + { t = 1, lhik = 1 }, + }, + }, + ["inspect_empty"] = { + Source = "idle" or "inspect_empty", + FireASAP = true, + MinProgress = 0.925, + Mult = 1.2, + EventTable = { + { s = pathUTC .. "cloth_4.ogg", t = 0 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "movement-rifle-03.ogg", t = 5 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "cloth_2.ogg", t = 37 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "movement-rifle-04.ogg", t = 45 / 30, c = ca, v = 0.8 }, + { s = pathUTC .. "movement-rifle-02.ogg", t = 90 / 30, c = ca, v = 0.8 }, + -- {hide = 1, t = 0}, + }, + IKTimeLine = { + { t = 0, lhik = 1 }, + { t = 0.15, lhik = 0 }, + { t = 0.8, lhik = 0 }, + { t = 0.95, lhik = 1 }, + { t = 1, lhik = 1 }, + }, + }, + -- Firemodee -- + + ["firemode_1"] = { + Source = "idle" or "firemode_0", + EventTable = { + { s = "uplp_urban_temp/ar15/selector-01.ogg", t = 0 }, + } + }, + ["firemode_2"] = { + Source = "idle" or "firemode_1", + EventTable = { + { s = "uplp_urban_temp/ar15/selector-06.ogg", t = 0 }, + } + }, + ["firemode_1_empty"] = { + Source = "idle" or "firemode_0_empty", + EventTable = { + { s = "uplp_urban_temp/ar15/selector-01.ogg", t = 0 }, + } + }, + ["firemode_2_empty"] = { + Source = "idle" or "firemode_1_empty", + EventTable = { + { s = "uplp_urban_temp/ar15/selector-06.ogg", t = 0 }, + } + }, + + ["toggle"] = { + Source = "modeswitch", + EventTable = thetoggle + }, + ["toggle_empty"] = { + Source = "modeswitch_empty", + EventTable = thetoggle + }, + + ["switchsights"] = { + Source = "modeswitch", + EventTable = thetoggle + }, + ["switchsights_empty"] = { + Source = "modeswitch_empty", + EventTable = thetoggle + }, +} + +---- Attachments +SWEP.Hook_ModifyBodygroups = function(wep, data) + local eles = data.elements + local mdl = data.model + + local muzzle = (eles["muzzleattached"] and 3) or (eles["uplp_g36_barrel_19"] and 2) or (eles["uplp_g36_barrel_9"] and 0) or 1 + local grip = (eles["gripattached"] and 0) or 1 + + mdl:SetBodygroup( 4, muzzle ) + mdl:SetBodygroup( 5, grip ) + + local optic = (eles["uplp_g36_optic_integrated"] and 2) or (eles["opticattached"] and 1) or 0 + mdl:SetBodygroup( 2, optic ) +end + +SWEP.AttachmentElements = { + ["uplp_g36_barrel_19"] = { Bodygroups = { { 3, 2 }, { 4, 2 } }, AttPosMods = { [5] = { Pos = Vector(0, 0.61485, 21.5) } } }, + ["uplp_g36_barrel_12"] = { Bodygroups = { { 3, 1 }, { 4, 1 } } }, + ["uplp_g36_barrel_9"] = { Bodygroups = { { 3, 0 }, { 4, 0 } }, AttPosMods = { [5] = { Pos = Vector(0, 0.61485, 11.6) } } }, + ["uplp_g36_stock_carbine"] = { Bodygroups = { { 1, 0 } } }, +} + +local defatt = "arc9/def_att_icons/" +local defatt2 = "entities/uplp_attachements/def/" + +SWEP.Attachments = { + { + PrintName = ARC9:GetPhrase("uplp_category_sight_rear"), + Category = {"uplp_ar15_rs", "uplp_backup_optic"}, + DefaultIcon = Material(defatt .. "rs.png", "mips smooth"), + Bone = "body", + Pos = Vector(0, -2.04, -4.2), + Ang = Angle(90, 90, 180), + ActiveElements = {"uplp_g36_rsinstalled"}, + InstalledElements = {"opticattached"}, + }, + { + PrintName = ARC9:GetPhrase("uplp_category_optic"), + Category = {"uplp_g36_optic", "uplp_optic_small", "uplp_optic_mid", "uplp_optic_big"}, + DefaultIcon = Material(defatt .. "optic.png", "mips smooth"), + Bone = "body", + CorrectiveAng = Angle(0, 0, 0), + Pos = Vector(0, -2.04, -2), + Ang = Angle(90, 90, 180), + Icon_Offset = Vector(1, 0, 0), + }, + { + PrintName = ARC9:GetPhrase("uplp_category_stock"), + Category = "uplp_g36_stock", + DefaultIcon = Material(defatt2 .. "arstock.png", "mips smooth"), + Bone = "body", + Pos = Vector(0, 0.99, -8), + Ang = Angle(90, 90, 180), + }, + { + PrintName = ARC9:GetPhrase("uplp_category_barrel"), + Category = "uplp_g36_barrel", + DefaultIcon = Material(defatt .. "barrel.png", "mips smooth"), + Bone = "body", + Pos = Vector(0, 0.61485, 5), + Ang = Angle(90, 90, 180), + ActiveElements = {"uplp_g36_barrel"}, + }, + { + PrintName = ARC9:GetPhrase("uplp_category_muzzle"), + Category = "uplp_muzzle", + Bone = "body", + Pos = Vector(0, 0.61485, 15.5), + Ang = Angle(90, 90, 180), + Icon_Offset = Vector(3, 0, 0), + InstalledElements = {"muzzleattached"}, + }, + { + PrintName = ARC9:GetPhrase("uplp_category_sight_front"), + Category = "uplp_ar15_fs", + DefaultIcon = Material(defatt .. "fs.png", "mips smooth"), + Bone = "body", + Pos = Vector(0, -2.04, 6.5), + Ang = Angle(90, 90, 180), + RequireElements = {"uplp_ar15_rs"}, + }, + { + PrintName = ARC9:GetPhrase("uplp_category_tactical"), + Category = "uplp_tac", + Bone = "body", + Pos = Vector(-1.22, 0.55, 9), + Ang = Angle(90, 90, -90), + Icon_Offset = Vector(0, 0, 1), + }, + { + PrintName = ARC9:GetPhrase("uplp_category_grip"), + Category = {"uplp_grip_vert", "uplp_grip_horiz", "uplp_grip_horiz_cclamp"}, + DefaultIcon = Material(defatt2 .. "grip.png", "mips smooth"), + Bone = "body", + Pos = Vector(0, 1.98, 8.2), + Ang = Angle(90, 90, 180), + Icon_Offset = Vector(0, 0, -2), + InstalledElements = {"gripattached"}, + }, + { + PrintName = ARC9:GetPhrase("uplp_category_receiver"), + Category = "uplp_g36_reciever", + DefaultIcon = Material(defatt2 .. "rec.png", "mips smooth"), + Bone = "body", + Pos = Vector(0, 1.5, -1), + Ang = Angle(90, 90, 180), + }, + { + PrintName = ARC9:GetPhrase("uplp_category_magazine"), + Category = {"uplp_ar15_556_mag", "uplp_g36_mag"}, + DefaultIcon = Material(defatt2 .. "armag.png", "mips smooth"), + Bone = "mag", + Pos = Vector(0, -1.75, -1.25), + Ang = Angle(90, 90, 180), + Icon_Offset = Vector(1.5, 0, -3), + }, + { + PrintName = ARC9:GetPhrase("uplp_category_backup"), + Category = "uplp_backup_optic_front", + Bone = "body", + Pos = Vector(0.045, -0.2, 11.5), + Ang = Angle(90, 90, 180), + RequireElements = {"uplp_backup_optic_is"}, + Installed = "uplp_backup_optic_is_front", + Integral = "uplp_backup_optic_is_front", + Hidden = true, + }, + + + + -- Cosmetic shit + { + PrintName = ARC9:GetPhrase("uplp_category_charm"), + Category = "charm", + Bone = "body", + Pos = Vector(0.63, 1.84, 5.15), + Ang = Angle(90, 0, -90), + }, + +} + + +SWEP.HookP_NameChange = function(self, name) + local att = self:GetElements() + + if att["uplp_g36_barrel_19"] then + name = ARC9:GetPhrase("uplp_weapon_g36") + end + + if att["uplp_g36_barrel_9"] then + name = ARC9:GetPhrase("uplp_weapon_g36_c") + end + + return name +end diff --git a/materials/models/weapons/arc9/uplp-f/g36translucent.vmt b/materials/models/weapons/arc9/uplp-f/g36translucent.vmt new file mode 100644 index 0000000..190b813 --- /dev/null +++ b/materials/models/weapons/arc9/uplp-f/g36translucent.vmt @@ -0,0 +1,17 @@ +VertexLitGeneric +{ + $basetexture "models/weapons/arc9/uplp-f/g36translucent" + $color2 "[0.30 0.27 0.22]" + $translucent 1 + $bumpmap "dev/flat_normal" + $halflambert 1 + $envmap "env_cubemap" + $envmaptint "[0.02 0.02 0.02]" + + $phong 1 + $phongboost 1 + $phongexponent 10 + $phongfresnelranges "[0 1 10]" + + $nocull 0 +} \ No newline at end of file diff --git a/materials/models/weapons/arc9/uplp-f/g36translucent.vtf b/materials/models/weapons/arc9/uplp-f/g36translucent.vtf new file mode 100644 index 0000000..1e0ea27 --- /dev/null +++ b/materials/models/weapons/arc9/uplp-f/g36translucent.vtf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f562ce56e8a04c355f323efd049c48ab13fd0b1ad21e3fc9ca306addfce23ef +size 108 diff --git a/models/weapons/arc9/c_uplp-f_g36-7.dx90.vtx b/models/weapons/arc9/c_uplp-f_g36-7.dx90.vtx new file mode 100644 index 0000000..65608db --- /dev/null +++ b/models/weapons/arc9/c_uplp-f_g36-7.dx90.vtx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d7ae78ec7b305a22acc4944384b9e9d5db644ee1af181a80b4cfbaa7bc88cba +size 227839 diff --git a/models/weapons/arc9/c_uplp-f_g36-7.mdl b/models/weapons/arc9/c_uplp-f_g36-7.mdl new file mode 100644 index 0000000..e13309a --- /dev/null +++ b/models/weapons/arc9/c_uplp-f_g36-7.mdl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61e7cfca9d2d17cf880a03230439d813b747de103759baea221205a886716ee3 +size 109500 diff --git a/models/weapons/arc9/c_uplp-f_g36-7.phy b/models/weapons/arc9/c_uplp-f_g36-7.phy new file mode 100644 index 0000000..7d94207 --- /dev/null +++ b/models/weapons/arc9/c_uplp-f_g36-7.phy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf360324899c05e3a4d53bf65081c0a122c1e00fb62acba74c162585354263cc +size 1397 diff --git a/models/weapons/arc9/c_uplp-f_g36-7.vvd b/models/weapons/arc9/c_uplp-f_g36-7.vvd new file mode 100644 index 0000000..ddb148a --- /dev/null +++ b/models/weapons/arc9/c_uplp-f_g36-7.vvd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41b62c4195eabf0f55b66f43bfa55cdfd6197414a02dc982861397c8b4bad040 +size 1099648 diff --git a/sound/uplp_f/g36/chamber3.ogg b/sound/uplp_f/g36/chamber3.ogg new file mode 100644 index 0000000..a8dc010 --- /dev/null +++ b/sound/uplp_f/g36/chamber3.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e47e3ee5ad1d59b64ba0d39b6caa5b5102350a28d8d0620a569c934fb00e0238 +size 20880 diff --git a/sound/uplp_f/g36/chgrab.ogg b/sound/uplp_f/g36/chgrab.ogg new file mode 100644 index 0000000..c344491 --- /dev/null +++ b/sound/uplp_f/g36/chgrab.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07580036ace82837678ae12dbcc7ae5471fd024126823d246f51c7dfb970e5e6 +size 7712 diff --git a/sound/uplp_f/g36/chpull2.ogg b/sound/uplp_f/g36/chpull2.ogg new file mode 100644 index 0000000..1a417b9 --- /dev/null +++ b/sound/uplp_f/g36/chpull2.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d31b1ec88b782d303741565936662b22301b78b89fe3640bbb1714c3c86d27a9 +size 14033 diff --git a/sound/uplp_f/g36/fire-01.ogg b/sound/uplp_f/g36/fire-01.ogg new file mode 100644 index 0000000..720a162 --- /dev/null +++ b/sound/uplp_f/g36/fire-01.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9baa32b51d0642f86f47eadc63eea65bfa2a2a65c7d0e06e60eb9d898c5bf0a3 +size 103336 diff --git a/sound/uplp_f/g36/fire-02.ogg b/sound/uplp_f/g36/fire-02.ogg new file mode 100644 index 0000000..d58efc8 --- /dev/null +++ b/sound/uplp_f/g36/fire-02.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:608fe91590acd53bd14390f26ad8b6a010561284cce1ae595212fd2e0cc63be7 +size 106508 diff --git a/sound/uplp_f/g36/fire-03.ogg b/sound/uplp_f/g36/fire-03.ogg new file mode 100644 index 0000000..7d6d075 --- /dev/null +++ b/sound/uplp_f/g36/fire-03.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:163ad7c7a8d69799b4f261a71004a256c30cd3076672eda8308808c9df7a8455 +size 104706 diff --git a/sound/uplp_f/g36/fire-04.ogg b/sound/uplp_f/g36/fire-04.ogg new file mode 100644 index 0000000..a0968fe --- /dev/null +++ b/sound/uplp_f/g36/fire-04.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0578eb1abd768f947cd237b314ea80e08f5fc9391f329332153fc109ccf40c3a +size 106535 diff --git a/sound/uplp_f/g36/fire-05.ogg b/sound/uplp_f/g36/fire-05.ogg new file mode 100644 index 0000000..2bf8df0 --- /dev/null +++ b/sound/uplp_f/g36/fire-05.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a13d4903731d263d22636f07dda34ea155a2c2593f4877cb6c3abd180acc3716 +size 105728 diff --git a/sound/uplp_f/g36/fire-06.ogg b/sound/uplp_f/g36/fire-06.ogg new file mode 100644 index 0000000..0ee8b4b --- /dev/null +++ b/sound/uplp_f/g36/fire-06.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38e5696b963a4b4ee9cabe5bbb3a292bc52d98e322a90eb4ad14cd87add902a6 +size 105934 diff --git a/sound/uplp_f/g36/magin.ogg b/sound/uplp_f/g36/magin.ogg new file mode 100644 index 0000000..adb9cf3 --- /dev/null +++ b/sound/uplp_f/g36/magin.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f343b365b5e5fb259741ea70b24f9356584093f7bb02c994237ede623af3d0d4 +size 27147 diff --git a/sound/uplp_f/g36/magout.ogg b/sound/uplp_f/g36/magout.ogg new file mode 100644 index 0000000..3b0d5f4 --- /dev/null +++ b/sound/uplp_f/g36/magout.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c13c6d9f72a85bb13dd40474234df295481eb76675b43f9bc8399335903fda5c +size 22500 diff --git a/sound/uplp_f/g36/magtap.ogg b/sound/uplp_f/g36/magtap.ogg new file mode 100644 index 0000000..1795b9e --- /dev/null +++ b/sound/uplp_f/g36/magtap.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:809d18fdadbcc52cead54391bf58816e8f12dbd8bab7cc51a4304a943ee142e9 +size 17688