Left 4 Dead 2

Left 4 Dead 2

View Stats:
Editing SG552 Scoped-In Behavior?
I'm looking in weapon_rifle_sg552.txt trying to figure out how to edit it's behavior when it's scoped in so it's either the same rate of fire as normal or so it's 2 or 3 round burst but don't see any lines relevant to what I'm looking for.

What do?
Last edited by TimeSweeperAdam; Apr 5 @ 1:15pm
< >
Showing 1-13 of 13 comments
R󠀡F Apr 5 @ 2:03pm 
scope functions are hard coded to the weapon entity itself.
Originally posted by R󠀡F:
scope functions are hard coded to the weapon entity itself.

So there's no way to change it?
You can try vscript, but the results could be different. For example, when using "Think" function & then adding think function on sg552, you can increase the rate of fire when scoped, by using certain netprops.
Originally posted by kurochama:
You can try vscript, but the results could be different. For example, when using "Think" function & then adding think function on sg552, you can increase the rate of fire when scoped, by using certain netprops.

I unfortunately have zero experience in using vscripts. Hell, today was the first time I opened a normal script file.
How screwed am I in my endeavor to make the SG556 I dream of?
Apr 5 @ 4:06pm 
There used to be a few zoom-all-weapons plugins on allied modders. That was six or eight years ago and not only was it delisted and deleted but I cannot find the original creator any more. Don't remember who, some Asian name. It was fun though, made weapon skins with scopes make sense and be more engaging than just the awp/scout/sg/hunt/mil snipers. It was very entertaining to pull out pistols and zoom. It even affected melee. Must've been some master call function because players could zoom in with literally everything.
Originally posted by TimeSweeperAdam:
Originally posted by kurochama:
You can try vscript, but the results could be different. For example, when using "Think" function & then adding think function on sg552, you can increase the rate of fire when scoped, by using certain netprops.

I unfortunately have zero experience in using vscripts. Hell, today was the first time I opened a normal script file.
How screwed am I in my endeavor to make the SG556 I dream of?
One of simple examples is this mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=3324760372
On that mod, I made a cfg file to allow changes of each weapon rate of fire & reload. What you need is probably a much simplified version where instead of each weapon, it only changes sg552 rate of fire when scoped. Based on the template of that mod, it should be easier, as you'll need to use "m_iFov" netprop to check if a survivor is using scope, & if it's true then increase the rate of fire.

If you want to see a result when a gun gets increased rate of fire when using scope, you can check this:
https://steamcommunity.com/sharedfiles/filedetails/?id=3375035049
Originally posted by kurochama:
Originally posted by TimeSweeperAdam:

I unfortunately have zero experience in using vscripts. Hell, today was the first time I opened a normal script file.
How screwed am I in my endeavor to make the SG556 I dream of?
One of simple examples is this mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=3324760372
On that mod, I made a cfg file to allow changes of each weapon rate of fire & reload. What you need is probably a much simplified version where instead of each weapon, it only changes sg552 rate of fire when scoped. Based on the template of that mod, it should be easier, as you'll need to use "m_iFov" netprop to check if a survivor is using scope, & if it's true then increase the rate of fire.

If you want to see a result when a gun gets increased rate of fire when using scope, you can check this:
https://steamcommunity.com/sharedfiles/filedetails/?id=3375035049

I'll try this when I get home tomorrow, I'm out of town on my other computer where my main one has all my mod tools on it.
Speaking of, do I need anything special to make or edit a vscript?
I've only ever made sound mods and the occasional hud icon before today.
Last edited by TimeSweeperAdam; Apr 5 @ 11:04pm
You only need "Notepad++" or similar application to edit vscript. You can find "Notepad++" easily when searching via google, bing etc.
In that case I might go ahead and take a crack at it tonight.
Would it be okay for me to use the weapon speed boost you sent as examples as the base?
Originally posted by TimeSweeperAdam:
In that case I might go ahead and take a crack at it tonight.
Would it be okay for me to use the weapon speed boost you sent as examples as the base?
Yeah it's fine. You only need to check sg552 part on "bullet_impact" & "weapon_fire" event functions, & ignore anything else.
Originally posted by kurochama:
Originally posted by TimeSweeperAdam:
In that case I might go ahead and take a crack at it tonight.
Would it be okay for me to use the weapon speed boost you sent as examples as the base?
Yeah it's fine. You only need to check sg552 part on "bullet_impact" & "weapon_fire" event functions, & ignore anything else.

Alrighty then, thanks.
I added you on Steam as well so I hope I can turn to you later when I inevitably mess up lol
Last edited by TimeSweeperAdam; Apr 6 @ 12:08am
Varsik Apr 6 @ 7:45pm 
Originally posted by kurochama:
You only need "Notepad++" or similar application to edit vscript. You can find "Notepad++" easily when searching via google, bing etc.

Ppl still use notepad++ for programming?!!

I remember on high school they forced me to use to it becuase "visual studio tOo uSeFuL" 🙄
Last edited by Varsik; Apr 6 @ 7:46pm
Originally posted by Varsik:
Originally posted by kurochama:
You only need "Notepad++" or similar application to edit vscript. You can find "Notepad++" easily when searching via google, bing etc.

Ppl still use notepad++ for programming?!!

I remember on high school they forced me to use to it becuase "visual studio tOo uSeFuL" 🙄
Notepad++ is probably one of the easiest ones to find, that even people without programming background can find & use it without much problem if they simply just want to edit some scripts on vscripts. So that's why :steamhappy:
< >
Showing 1-13 of 13 comments
Per page: 1530 50