• Anathema Weapon Base - I've stopped working on it edition
    2 replies, posted
People have been adding me with questions about my weapon base. Some of them were using my atrocious unnetworked version from the past back when I didn't know about network variables. Some of them were asking about the .zip file I randomly dropped in the WAYWO thread after calling it quits. Here's a proper thread. (The first video doesn't have the finalized recoil patterns, spread, and stuff.) [video=youtube;hnih8SdYYtY]https://www.youtube.com/watch?v=hnih8SdYYtY[/video] [video=youtube;4pQ3z6gMU_k]https://www.youtube.com/watch?v=4pQ3z6gMU_k[/video] [url]https://github.com/waut3r/AWB[/url] This is an old project I've worked for years now. I've got no interest in doing much more with this and I'm providing it to the public as a potential base for advanced scripted weaponry. What's it got? * Tons of variables * Hit-scan based bulletdrop * Weapon "modes" for sprinting, ironsights, crouching, etc. (variables for movement speed, accuracy, etc.) * Dynamic recoil patterns (increases or decreases based on mode and player velocity) [i](Note that I have it set to randomly flip or scale as well! If you don't like that, fix it.)[/i] * Dynamic spread (increases or decreases based on mode and player velocity) * Potentially great or bad networking (dunno, haven't really tested) * Lua-based viewmodel animations * Things * Stuff * Example weapons/effects * Custom muzzle flashes (made by yours truly) * Custom tracers * Scope * Support for CS:S Shotgun animations Even if the networking is garbage or if it's full of other problems, chances are you can rip certain aspects out of this as you see fit. I don't reccomend this for people who aren't up for fixing things. I may return to this project later down the road but I'm not satisfied with Garry's Mod in it's current limited state, specifically with lack of support for custom animations and [url=http://facepunch.com/showthread.php?t=1472559&highlight=]SWEP inheritence[/url]. I am excited for Garry's vision for a Source 2 variant of Garry's Mod, but that's besides the point. I'll take pull requests as well, so if you know how to make this project better in anyway, feel free to share. Oh, and here's the insane amount of variables because I'm that insane of a guy: [code]--[[ _|_| _| _| _|_| _| _| _|_|_| _|_|_| _|_|_|_| _|_|_| _|_| _|_|_| _|_| _| _| _|_|_|_| _| _| _| _| _| _| _| _|_|_|_| _| _| _| _|_|_|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_|_| _|_| _| _| _|_|_| _| _| _| _| _| Scripted Weapon Base by wauterboi ]]-- SWEP.Anathema = true -- Tables *DO NOT TOUCH* SWEP.Mode = { } SWEP.Mode.Ducking = { } SWEP.Mode.Ironsight = { } SWEP.Mode.Walking = { } SWEP.Mode.Sprinting = { } SWEP.Mode.Misc = { } SWEP.Primary = { } SWEP.Primary.Damage = { } SWEP.Primary.Recoil = { } SWEP.Primary.Recoil.Pattern = { } SWEP.Primary.Recoil.Pattern.X = { } SWEP.Primary.Recoil.Pattern.Y = { } SWEP.Primary.Spread = { } SWEP.Primary.BulletDrop = { } SWEP.Primary.Reload = { } SWEP.Primary.Sound = { } SWEP.Primary.Effect = { } SWEP.Primary.Scope = { } SWEP.Primary.Scope.Sound = { } -- Customizable Variables -- Basic Information SWEP.PrintName = "AnathemA Weapon Base" SWEP.Author = "wauterboi" SWEP.Instructions = "" -- View/World Model SWEP.ViewModel = "models/weapons/v_rif_ak47.mdl" SWEP.ViewModelFOV = 80 SWEP.ViewModelFlip = true SWEP.WorldModel = "models/weapons/w_rif_ak47.mdl" -- Scope Variables SWEP.Primary.Scope.Draw = true SWEP.Primary.Scope.BG = Material( "anathema/scope/scope_test" ) -- Wrap that string in Material( ) SWEP.Primary.Scope.Refract = Material( "anathema/scope/scope_refract" ) -- Wrap that string in Material( ) SWEP.Primary.Scope.FG = Material( "anathema/scope/scope_test_crosshair" ) -- Wrap that string in Material( ) SWEP.Primary.Scope.FOV = 10 SWEP.Primary.Scope.WhileFiring = true SWEP.Primary.Scope.Sound = { "player/taunt_equipment_gun1.wav", "player/taunt_equipment_gun2.wav" } -- Sound SWEP.Primary.Sound.Shoot = "weapons/pistol/pistol_fire2.wav" SWEP.Primary.Sound.Empty = "Weapon_Pistol.Empty" -- Effect SWEP.Primary.Effect.MuzzleFlash = { "anathema/sprites/muzzle/anim_muzzle1_01", "anathema/sprites/muzzle/anim_muzzle1_02", "anathema/sprites/muzzle/anim_muzzle1_03", "anathema/sprites/muzzle/anim_muzzle1_04", "anathema/sprites/muzzle/anim_muzzle1_05", } SWEP.Primary.Effect.MuzzleSmoke = "particles/smokey" SWEP.Primary.Effect.MuzzleEffect = "awb_muzzle_rifle" -- Reload Speeds SWEP.Primary.Reload.ShotgunReload = false -- This, and the following three variables, are EXPLICITLY for CS:S Shotgun Reload animations. SWEP.Primary.Reload.StartAnimDur = .25 SWEP.Primary.Reload.ReloadAnimDur = .5 SWEP.Primary.Reload.FinishAnimDur = .5 -- Gun Modes SWEP.Mode.Ducking.Pos = Vector( 0, 5, 3 ) SWEP.Mode.Ducking.Ang = Angle( -4, 4, 2 ) SWEP.Mode.Ducking.AnimDur = 1 SWEP.Mode.Ducking.HoldType = "smg" SWEP.Mode.Ducking.FOV = 80 -- If using a scope, you keep this the same as the ironsight FOV SWEP.Mode.Ducking.FOVSpeed = 2 SWEP.Mode.Ducking.WalkSpeed = 100 --[[ ! ]] SWEP.Mode.Ducking.DuckSpeed = 0.3 -- Sets how long it takes for the player to enter the ducking position. SWEP.Mode.Sprinting.Pos = Vector( -10, 0, 0 ) SWEP.Mode.Sprinting.Ang = Angle( 0, -70, 10 ) SWEP.Mode.Sprinting.AnimDur = 16 SWEP.Mode.Sprinting.HoldType = "passive" SWEP.Mode.Sprinting.FOV = 100 SWEP.Mode.Sprinting.FOVSpeed = 32 SWEP.Mode.Sprinting.WalkSpeed = 250 SWEP.Mode.Ironsight.Pos = Vector( -3, 6.1, 2 ) SWEP.Mode.Ironsight.Ang = Angle( 3, -.125, 0 ) SWEP.Mode.Ironsight.AnimDur = 1 SWEP.Mode.Ironsight.FocusDur = .5 -- Length of transition to focus in scope SWEP.Mode.Ironsight.HoldType = "smg" SWEP.Mode.Ironsight.FOV = 75 SWEP.Mode.Ironsight.FOVSpeed = 0.5 SWEP.Mode.Ironsight.WalkSpeed = 125 SWEP.Mode.Ironsight.Sensitivity = .125 -- Multiplier of normal sensitivity when aiming SWEP.Mode.Walking.Pos = Vector( 0, 0, 0 ) SWEP.Mode.Walking.Ang = Angle( 0, 0, 0 ) SWEP.Mode.Walking.AnimDur = 2 SWEP.Mode.Walking.HoldType = "shotgun" SWEP.Mode.Walking.FOV = 90 SWEP.Mode.Walking.FOVSpeed = 1 SWEP.Mode.Walking.WalkSpeed = 200 --[[ ! ]] SWEP.Mode.Walking.WaterSpeed = 125 SWEP.Mode.Misc.Pos = Vector( -10, 0, -10 ) SWEP.Mode.Misc.Ang = Angle( 0, -70, 10 ) SWEP.Mode.Misc.AnimDur = 2 SWEP.Mode.Misc.FOV = 90 SWEP.Mode.Misc.FOVSpeed = 1 SWEP.Mode.Misc.WalkSpeed = 100 -- Firerate SWEP.Primary.Delay = 0.125 -- Firerate SWEP.Primary.FirstDelay = 0.2 -- Amount of time that differentiates d
Holy Variables Batman! Thank you. I've been looking for such a tweaked weapons base for a while. +1 for detailed commented out code
Thanks. I think I've laid some groundwork for someone better to build off of. I don't think it's perfect, but someone will figure out how to make it so.
Sorry, you need to Log In to post a reply to this thread.