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

Author Topic: [HELP] Modifying HL2 original weapons  (Read 330 times)

0 Members and 1 Guest are viewing this topic.

Offline Becks

  • *
  • +1% chance to make useful post
  • Becks has no influence.
[HELP] Modifying HL2 original weapons
« on: January 11, 2017, 03:22:17 AM »
Hi everyone.
I've been trying to make a few tweaks to the original Half-Life weapons, and some of the standard SMOD guns as well. In particular, I wanted to change damage, spread, and rate of fire, but I see that not all weapons can have those parameters modified by "sk_" or "weapon_" commands.
So I tried accessing the script files, hoping to find the relevant fields, but I had similar results. I decided to add the corresponding lines, as described in tutorials about custom weapon files (the one in smod.wikidot, and the one by Onemanshow in this forum), but that doesn't seem to have any effect.
Furthermore, I wanted to add laser pointers and selective fire to a few guns, using the same approach. I succeeded in changing the setup in an M4A1 I imported from an old Redux version of the game... but I suspect it had to do with the fact that it already had those functions properly incorporated before I tweaked them.
Related question; why is it that all weapon modifications made through cvars are always reset upon map change? Is there any way around that?
Thanks a lot to anyone willing to chime in and help me out  :D

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [HELP] Modifying HL2 original weapons
« Reply #1 on: January 11, 2017, 10:05:18 AM »
Welcome!
You cannot modify any of the weapons using scripting besides weapon_custom1-30 (except for the magazine size and a few other minor things). They are all hardcoded. As for your other problem, try saving the sk_ commands inside a seperate .cfg file, and add it to your autoexec.cfg.

Offline Becks

  • *
  • +1% chance to make useful post
  • Becks has no influence.
Re: [HELP] Modifying HL2 original weapons
« Reply #2 on: January 11, 2017, 12:34:28 PM »
Ahh shucks. Does the hardcoding also extend to weapons added by SMOD itself, such as the MP5 or Kar98? Anyway, those clarifications helped a lot already. Many thanks.

Offline Comrade

  • *
  • *
  • +11% chance to make useful post
  • Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...
Re: [HELP] Modifying HL2 original weapons
« Reply #3 on: January 11, 2017, 01:56:08 PM »
pretty much any weapon that isnt custom1-30 is not adjustable