Advertisement
Guest User

SMMOD weapon_custom mockup

a guest
Aug 31st, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.43 KB | None | 0 0
  1. WeaponData
  2. {
  3. // Weapon data is loaded by both the Game and Client DLLs.
  4. "printname" "#HL2_Pistol"
  5. "viewmodel" "models/weapons/v_pistol.mdl"
  6. "playermodel" "models/weapons/w_pistol.mdl"
  7. "anim_prefix" "pistol"
  8. "bucket" "1"
  9. "bucket_position" "0"
  10.  
  11. "clip_size" "45"
  12. "clip2_size" "-1"
  13.  
  14. "default_clip" "45"
  15. "default_clip2" "-1"
  16.  
  17. "primary_ammo" "SMG1"
  18. "secondary_ammo" "SMG1_Grenade"
  19.  
  20. "weight" "2"
  21. "item_flags" "0"
  22.  
  23. "BuiltRightHanded" "0"
  24. "AllowFlipping" "0"
  25.  
  26. "DisableFreeaim" "1" //disable RO freeaim
  27. "NoDrop" "0"
  28.  
  29. "UseClip" "1" //uses clips or draws all ammo from the reserve pool
  30.  
  31. "RegenerateAmmo" "0" //regenerates ammo?
  32. "RegenerateAmmoRate" "0.5"
  33. "RegenerateAmmoDelay" "0.5"
  34.  
  35. "MuzzleType" "COMBINE" // override muzzle flash used by the weapon
  36. "MuzzleSizeMult" "1.5" // size of the muzzle
  37. "MuzzleAttach" "0" // force muzzle to attach to "MUZZLE" attachment
  38. "MuzzleAdjustX" "-3" // xyz adjustment of the muzzle position
  39. "MuzzleAdjustY" "-3"
  40. "MuzzleAdjustZ" "-3"
  41.  
  42. "IsCSViewModel" "0" // if this uses CSS QC code, set to 1.
  43. "IsCSWorldModel" "0" // forces NPC compatibility for CSS world models. will not fix crotch guns
  44. "AttachWorldModel "0" // fixes crotch guns by assigning gun model to an attachment
  45. "AttachName" "anim_attachment_RH"
  46.  
  47. "GiveWithHEV" "0" //give the player this weapon when picking up the HEV suit
  48. "NewWeaponOnSecondPickup" "1" // give another weapon when the player picks up this weapon twice
  49. "NewWeaponName" "weapon_dualpistol" // name of the weapon when the player picks up this weapon twice
  50.  
  51. "Origin" { // same as "Adjust" from SMOD
  52. "Right" "0"
  53. "Up" "0"
  54. "Forward" "0"
  55. "FOV" "0"
  56. "Pitch" "0"
  57. "Yaw" "0"
  58. "Roll" "0"
  59. }
  60.  
  61. "SprintOrigin" { // if shooting while sprinting is disabled, use this to position the weapon on the screen while sprinting
  62. "Right" "-6.42"
  63. "Up" "2.55"
  64. "Forward" "10"
  65. "FOV" "5"
  66. "Pitch" "50"
  67. "Yaw" "20"
  68. "Roll" "10"
  69. }
  70.  
  71. "Crosshair" { // lifted almost wholesale from SMOD2's smod_crosshair.txt. delete or leave blank to use default
  72. Color "255 0 0 255" // set to "0 0 0 0" to not draw crosshair
  73. Data "l -4 -4 -1 -1 -2 -2 l 4 -4 1 -1 2 -2 l -4 4 -1 1 -2 2 l 4 4 1 1 2 2 l 0 0 1 1 0 0 e"
  74. MinSize "20.0"
  75. MaxSize "64.0"
  76. }
  77.  
  78. // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
  79. SoundData
  80. {
  81.  
  82. "reload" "Weapon_Pistol.Reload"
  83. "reload_npc" "Weapon_Pistol.NPC_Reload"
  84. "empty" "Weapon_Pistol.Empty"
  85. "single_shot" "Weapon_Pistol.Single"
  86. "single_shot_npc" "Weapon_Pistol.NPC_Single"
  87. "special1" "Weapon_Pistol.Special1"
  88. "special2" "Weapon_Pistol.Special2"
  89. "burst" "Weapon_Pistol.Burst"
  90. }
  91.  
  92. // Weapon Sprite data is loaded by the Client DLL.
  93. TextureData
  94. {
  95. "weapon"
  96. {
  97. "font" "WeaponIcons"
  98. "character" "d"
  99. }
  100. "weapon_s"
  101. {
  102. "font" "WeaponIconsSelected"
  103. "character" "d"
  104. }
  105. "ammo"
  106. {
  107. "font" "WeaponIcons"
  108. "character" "p"
  109. }
  110. "crosshair"
  111. {
  112. "font" "Crosshairs"
  113. "character" "Q"
  114. }
  115. "autoaim"
  116. {
  117. "file" "sprites/crosshairs"
  118. "x" "0"
  119. "y" "48"
  120. "width" "24"
  121. "height" "24"
  122. }
  123. }
  124.  
  125. "WeaponSpec"
  126. {
  127. "Options" {
  128. "DryFireAnimation" "1" // use dry fire animations
  129. "RecoilAnimation" "1" // use HL2 recoil animations
  130. "RecoilAnimRate" "2" // number of shots between recoil animations
  131. "LoweringAnimation" "1" // use HL2 lowering/raising animations
  132. "FireModeAnimation" "0" // use firemode switch animation
  133. "IronsightAnimation" "0" // use ironsight in/out/idle/fire animations
  134. "ReloadEmptyAnimation" "0" // use special empty reload animation
  135. "AnimSpeedMult" "2.0" // multiplies animation speed
  136. "UseReloadSoundData" "1" // use reload sound as defined in the SoundData
  137. "UseBurstSoundData" "1" // use burst sound for burst firemode as defined in the SoundData
  138. "UseLastFireSoundData" "1" // use lastfire sound as defined in "special3" in the SoundData
  139. "IsAkimbo" "0" // use akimbo animations and events
  140. "AkimboSecondaryFire" "0" // allow akimbo weapons to use secondary fire and clip2 for the righthand gun
  141. "OnlyReloadOnEmpty" "1" // Can only reload the weapon when the clip is empty
  142. "FireSoundRange" "2048" // distance NPCs can hear the fire sound. leave blank for default
  143. "ViewModelSkin" "0" // skingroup to use
  144. "ViewModelBodygroups" "0000000" // bodygroups to use for the weapon
  145. }
  146.  
  147. "ActivityOverride" {
  148. "PrimaryFire" ""
  149. "SecondaryFire" ""
  150. "HitCenter" ""
  151. "MissCenter" ""
  152. "HitKill" ""
  153. "Recoil1" ""
  154. "Recoil2" ""
  155. "Recoil3" ""
  156. "Reload" ""
  157. "ReloadEmpty" ""
  158. "DryFire" ""
  159. "DryFireLeft" ""
  160. "Idle" ""
  161. "GLFire" ""
  162. "FireModeSwitch" ""
  163. "Deploy" ""
  164. "IronSightIn" ""
  165. "IronSightOut" ""
  166. "IronSightIdle" ""
  167. "IronSightPrimaryFire" ""
  168. "ShotgunReloadStart" ""
  169. "ShotgunReload" ""
  170. "ShotgunReloadFinish" ""
  171. "ShotgunPump" ""
  172. "GatlingPrefire" ""
  173. "GatlingSpinup" ""
  174. "GatlingSpindown" ""
  175. }
  176.  
  177. "PrimaryFire" { // anything in this block will use the primary fire.
  178. "WeaponType" "0" // 0 : single, 1 : automatic, 2 : shotgun, 3 : autoshotgun, 4 : melee, 5 : grenade, 6 : gatling
  179. "FireRate" "0.1"
  180. "CanJam" "0" // can using the primary fire jam the weapon
  181. "JamChance" "0.0005" // chance per-shot that the weapon can jam, requiring a reload to clear it ala STALKER. this should also display a hud hint message when it happens so players don't get confused
  182. "FireUnderWater" "1" // can fire underwater
  183. "GatlingSpinUpTime" "0.8" // time needed to spin up the gatling gun before firing
  184. "Bullet" {
  185. "AmmoType" "Pistol"
  186. "ShootAttachment" "MUZZLE" // attachment name to generate the bullets from. perhaps move this to "Primary/SecondaryFire" instead?
  187. "PlayerDamage" "6" // damage done by the weapon when used by the player
  188. "NPCDamage" "3" // damage done by the weapon when used by NPCs
  189. "ShotCount" "1"
  190. "TracerFreq" "3"
  191. "ForceMult" "0.5"
  192. "Bounce" "1" // enable ricochet
  193. "BounceAng" "90" // for revolver ocelot wannabes who want to do sicknasty trickshots
  194. "ImpactEffect" "1" // 0:none 1:default 2:ar2 3:big (jeep? airboat?) 4:custom
  195. "AmmoConsumed" "1" // amount of ammo consumed per-shot
  196. "Penetrate" "128" // measured in units instead of SMOD's strange way of doing it
  197. "DMGDropoffStart" "4096" // units that the bullet can travel before damage dropoff takes effect
  198. "DMGDropoffEnd" "8096" // units that the bullet can travel before damage dropoff is maximum
  199. "TraceLenght" "9048" // maximum distance the projectile can travel before it is removed from the game world
  200. }
  201. "EnergyBullet_" { // No longer tied to "Bullet" code. the "_" means this is ignored by the script.
  202. "IsHitscan" "0" // use hitscan projectiles or real-time
  203. "UseChargeUp" "0" // can projectile be charged up to be more powerful
  204. "ChargeTime" "1" // seconds to take to max charge
  205. "DamageType" "DMG_ENERGYBEAM"
  206. "PlayerDamage" "10" // damage done by the weapon when used by the player
  207. "NPCDamage" "5" // damage done by the weapon when used by NPCs
  208. "ChargeDamage "100" // damage dealt on max charge
  209. "IsExplosive" "0" // can this cause explosions on contact
  210. "ExplodeDamage" "100" // damage for the boom
  211. "ExplodeRadius" "128" // radius for the boom
  212. "ShotCount" "1"
  213. "ChargeShotCount" "1" // how many shots to fire on max charge
  214. "Bounce" "2"
  215. "BounceAng" "90" // maximum angle for bounce to happen
  216. "Size" "1"
  217. "LightRadius" "8"
  218. "LightColor" "255 180 90"
  219. "Speed" "5000" //ALLOW SPEEDS OVER 3000 PLEASE!
  220. "SpriteMaterial" "effects/redflare"
  221. "Gravity" "100"
  222. "TrailSize" "2"
  223. "TrailTime" ".2"
  224. "FlyTime" "10"
  225. "Penetrate" "128"
  226. "ChargePenetrate" "256" // units penetrated on max charge
  227. "AmmoConsumed" "1" // amount of ammo consumed per-shot
  228. "ChargedAmmoConsumed" "10" // amount of ammo consumed on max charge
  229. }
  230. "Spread" {
  231. "X" "3.0"
  232. "Y" "3.0"
  233. "Z" "3.0"
  234. "MaxX" "6.0"
  235. "MaxY" "6.0"
  236. "MaxZ" "3.0"
  237. "RunSpread" "10.0"
  238. "RunSpeed" "90"
  239. "CrouchMult" "0.8"
  240. "FireMult" "1.3"
  241. }
  242. "Recoil" {
  243. "EnablePunch" "1"
  244. "PunchPitch" "0.1 -0.1"
  245. "PunchYaw" "-0.1 0.1"
  246. "EnableSnap" "1"
  247. "SnapPitch" "-0.5 0.0"
  248. "SnapYaw" "-0.1 0.1"
  249. "CrouchMult" "0.8"
  250. "FireMult" "1.6"
  251. "PunchLimit" "4.0"
  252. "SnapLimit" "3.0"
  253. }
  254. }
  255.  
  256. "SecondaryFire" { // anything in this block will use the secondary fire.
  257. "WeaponType" "1" // 0 : single, 1 : automatic, 2 : shotgun, 3 : autoshotgun, 4 : melee, 5 : grenade, 6 : gatling
  258. "FireRate" "0.1"
  259. "FireUnderWater" "0" // can fire underwater
  260. "ProjectileLauncher" { // can be used for much more than just grenades...
  261. "Class" "custom_projectile" // not just explosives anymore.
  262. "Type" "SMG1Grenade"
  263. "Model" "" // model override for the projectile
  264. "ShootAttachment" "MUZZLE" // attachment name to shoot the projectile from
  265. "XVector" "0" // correction vectors from the center to fire the projectile from
  266. "YVector" "0"
  267. "ZVector" "40"
  268. "XAngle" "0"
  269. "YAngle" "25" // angle that the projectile is fired from. for mortars, etc
  270. "ZAngle" "0"
  271. "Power" "1200"
  272. "AngVelocity" "1000"
  273. "LaunchAngle" "-90" //the rotation angle of the projectile on launch
  274. "Mass" "100"
  275. "RemoveTime" "0" // seconds before removing projectile from the game world. set to 0 or leave blank to never remove
  276. "Gravity" "0" // gravity override setting used by the projectile. set to 0 for no gravity
  277. "TrackLaser" "1" // does the projectile follow the laser pointer
  278. "IsSeeking" "1" // can the projectile home in on hostile NPCs
  279. "IsSticky" "0" // projectiles stick to world/npcs on contact
  280. }
  281. "Beam_" { //bzzzzzzzz. will this even use firerate? the "_" means this is ignored by the script.
  282. "UseChargeUp" "0" // can beam be charged up to be more powerful
  283. "ChargeTime" "1" // seconds to take to max charge
  284. "ShootAttachment" "MUZZLE" // attachment name to shoot the beam from
  285. "DamageType" "DMG_ENERGYBEAM"
  286. "PlayerDamage" "10" // damage done by the weapon when used by the player
  287. "NPCDamage" "5" // damage done by the weapon when used by NPCs
  288. "ChargeDamage "100" // damage dealt on max charge
  289. "IsExplosive" "0" // can the beam cause explosions on contact
  290. "ExplodeDamage" "100" // damage for the boom
  291. "ExplodeRadius" "128" // radius for the boom
  292. "Bounce" "2"
  293. "BounceAng" "90" // maximum angle for bounce to happen
  294. "BeamSize" "1"
  295. "BeamLength" "64"
  296. "BeamDieTime" ".2"
  297. "BeamColor" "255 180 90"
  298. "Material" "effects/redflare"
  299. "MaxRange" "2048"
  300. "Penetrate" "256"
  301. "ChargePenetrate" "512" // units the beam can penetrate on max charge
  302. "AmmoConsumeRate" "5" // amount of ammo consumed per-second
  303. "ChargeAmmoConsumeRate" "10" // amount of ammo consumed on max charge
  304. }
  305. "Spread" { // see PrimaryFire
  306. }
  307. "Recoil" { // see PrimaryFire
  308. }
  309. "Melee_" { // for melee attack. the "_" means this is ignored by the script.
  310. "IsThrowable" "0" // is this "melee" attack actually throwing the weapon?
  311. "ThrowPower" "1200" // power of the throw
  312. "ThrowDamage" "50"
  313. "ThrowStick" "0" // does the thrown weapon stick in walls/NPCs
  314. "Range" "80"
  315. "Frame" "10"
  316. "NextAttack" "15"
  317. "DamageType" "DMG_ENERGYBEAM"
  318. "PlayerDamage" "6" // damage done by the weapon when used by the player
  319. "NPCDamage" "3" // damage done by the weapon when used by NPCs
  320. "Force" "5.0"
  321. "ImpactEffect" "2" // 0:default 1:nodecal 2:nodecal,nosound 3:noeffect
  322. "Decal" "ManhackCut"
  323. }
  324. "HandGrenade_" { // separate from the old SMOD "BulletEntitySpawn" or "GrenadeLauncher" blocks. the "_" means this is ignored by the script.
  325. "Class" "custom_projectile" // not just explosives anymore. can use stock HL2 entities too
  326. "Type" "FragGrenade"
  327. "ThrowPower" "1200"
  328. "AllowCooking" "1" // can the grenade be "cooked" by holding down the button
  329. "XVector" "0" // correction vectors from the center to throw the grenade from
  330. "YVector" "0"
  331. "ZVector" "40"
  332. "YAngle" "25" // vertical angle that the grenade is thrown at
  333. "XAngle" "0"
  334. "ZAngle" "0"
  335. "ThrowFrame" "3" // -1 = use animation event
  336. "IsSticky" "0" // projectiles stick to world/npcs on contact
  337. "IsSeeking" "0" // can the projectile home in on hostile NPCs
  338. }
  339. }
  340.  
  341. "UseButton" { // anything in this block will use the +use button.
  342. "LaserSight" {
  343. "SpreadMult" "0.5"
  344. "RecoilMult" "2.0"
  345. "FireRateMult" "2.0"
  346. "DeactivateOnReload" "1"
  347. "Material" "sprites/laserpointer.vmt"
  348. "Color" "255 0 0"
  349. "SwitchSound" "1"
  350. "MaxDrawRange" "512"
  351. "TraceLength" "64"
  352. "FixSize" "0"
  353. "PointerSize" "1"
  354. "DrawBeam" "1" // draw a beam between the gun and the dot
  355. "BeamAttachment" "MUZZLE" // attachment name to start the beam from
  356. "DrawOnlyWithNVG" "1" // dot and beam only show when using night vision goggles
  357. }
  358. "Flashlight_" { // for weapon attached flashlights
  359. "DeactivateOnReload" "1"
  360. "Material" "sprites/laserpointer.vmt"
  361. "Color" "255 255 255" // light color
  362. "Brightness" "5" // brightness of the light
  363. "BeamAttachment" "MUZZLE" // attachment name to start the beam from
  364. "SwitchSound" "1"
  365. "MaxDrawRange" "512"
  366. "TraceLength" "64"
  367. "FixSize" "0"
  368. "PointerSize" "1"
  369. }
  370. "FireMode_" { // allows firemode to use different buttons instead of SecondaryFire
  371. "AllowSemi" "1"
  372. "AllowBurst" "1"
  373. "AllowAuto" "1"
  374. "AllowGL" "1" // count grenade launcher as firemode instead of taking up a fire button. still must be defined in code block
  375. "AllowROFToggle" "1" // can toggle between different fire rates
  376. "ROFToggleFireRate "0.05"
  377. }
  378. "Burst_" { // if "AllowBurst" is set to 1 in "FireMode", can be switched to, if 0 or undefined, this will trigger whenever the button is pressed
  379. "BurstFireCount" "3"
  380. "BurstDelay" "0.2"
  381. "BurstSpreadMult" "2.0"
  382. "BurstRecoilMult" "0.5" // recoil multiplier when using bursts
  383. "BurstFireRateMult" "0.5" // firerate multiplier when using bursts
  384. }
  385. "Silencer_" { // yay
  386. "SpreadMult" "0.9"
  387. "RecoilMult" "1.0"
  388. "DamageMult" "0.9"
  389. "FireSoundRange" "512" // decrease NPC hearing radius to this when the silencer is on
  390. "TracerFreq" "5" // overrides "Bullet" code
  391. }
  392. }
  393.  
  394. "IronsightButton" { // anything in this block will use the ironsight button. Best used for ironsights or scopes.
  395. "IronSight" {
  396. "Right" "-6.42"
  397. "Up" "2.55"
  398. "Forward" "-12"
  399. "FOV" "-14"
  400. "Pitch" "0"
  401. "Yaw" "0"
  402. "Roll" "0"
  403. "InTime" "0.1" // how long it takes to enter irons
  404. "OutTime" "0.1" // how long it takes to exit irons
  405. "WalkSpeedMult" "0.5" // per-weapon player speed while using ironsights
  406. "SpreadMult" "0.5" // accuracy bonus while using ironsights
  407. "RecoilMult" "0.8" // recoil bonus while using ironsights
  408. "IsGatlingSpinUp" "0" // use ironsight function to "prefire" a gatling gun.
  409. "Drift" "0.1" // much like SMOD's scope drift setting, but for ironsights
  410. "IronOffOnShoot" "1" // kick player out of irons when shooting
  411. }
  412. }
  413.  
  414. "ZoomButton" { // anything in this block will override the HEV zoom. Best used for scopes.
  415. "Scope" {
  416. "Material" "vgui/customscope1.vmt" // path to scope texture. leave blank for none
  417. "UseOverlay" "0" // use color overlay
  418. "OverlayColor" "50 255 100" // overlay color
  419. "OverlayAlpha "100" // alpha for the overlay color
  420. "ZoomLevels" "1" // amount of zoom levels the scope has (divided by maxzoomfactor)
  421. "MaxZoomFactor" "8.0" // maximum possible zoom
  422. "DisableCrosshair" "0" // disable crosshair when using scope
  423. "SpreadMult" "0.07" // accuracy multiplier
  424. "FireRate" "0.3" // overrides typical weapon firerate
  425. "InTime" "0.1" // how long it takes to enter scope
  426. "OutTime" "0.1" // how long it takes to exit scope
  427. "Drift" "0.5" // copy of SMOD's drift setting. possibly use different xyz settings?
  428. "DrawViewmodel" "0" // draw the view model when using the scope
  429. "ScopeOffOnShoot" "1" // kick player out of scope when shooting
  430. }
  431. }
  432.  
  433. "NPC" {
  434. "AnimTypeOverride" "SMG1" // override anim_prefix for NPCs
  435. "SpreadMult" "0.75" // NPC-only spread multiplier
  436. "BurstMax" "10"
  437. "BurstMin" "4"
  438. "RestMax" "0.5" // max time before the NPC can fire between bursts
  439. "RestMin" "0.1" // min time before the NPC can fire between bursts
  440. "FireRate" "0.07"
  441. "Range" "2048"
  442. "UseMuzzleFlash" "1"
  443. "UseLaserSight" "1"
  444. "UseGL" "1" // can NPCs use projectile launcher
  445. "CanFireOnDeath" "0" // can NPCs fire this when killed
  446. "DeathBurstMax" "5" // maximum rounds the NPC fires when dead
  447. "DeathBurstMin" "2" // minimum rounds the NPC fires when dead
  448. }
  449. }
  450.  
  451. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement