Left 4 Dead 2

Left 4 Dead 2

60 ratings
Rifle with M203 (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Game Content: Weapons, Scripts
Game Modes: Single Player, Co-op
Weapons: Rifle
File Size
Posted
Updated
73.675 KB
7 Nov, 2024 @ 2:01pm
3 Jun @ 5:22am
11 Change Notes ( view )

Subscribe to download
Rifle with M203 (Vscript)

In 2 collections by kurochama
Unique Weapons with Special Features
55 items
M203 Series
12 items
Description
"Is it possible to create a rifle mod with m203? A real m203?"

& the answer is:

"YES..."

After the making of my previous mod, "Ak47 Paladin", this one started to come to my mind. Basically with the template of that Paladin, combined with "env_explosion" entity, this is possible.

& here you go, rifle with m203 added...

This mod allows the use of m203 on rifle when using scope/ aim (yes, rifle can aim with this mod). As the base explosion effect from "env_explosion" was kind of too normal, I changed it to an explosion from particle effect, while still maintaining the gib effect of the explosion. & special for the m203 on SI & tank, there's knockback effect.

List of available features on "rifle with gl.txt" cfg file in "m203 series" folder:
  1. Rifle GL User: Which type of survivor can use the m203 grenade launcher (bots/ players/ all). For bots only, they can use without using scope/ aim, but they only have 5% chance to shoot m203 on each shot.

  2. Rifle GL Explosion Radius: How far the explosion radius is. The default radius is 250, the same as the grenade launcher radius.

  3. Rifle GL Damage: How much the damage of the explosion is. The default damage is 500, same as grenade launcher damage.

  4. Rifle GL Shot Count: How many normal shots until you get a grenade launcher ammo. The default shot count is 40 (shooting 40 bullets of rifle = gain 1 GL ammo).

Here are the mechanisms of the M203:
  • Keep shooting with rifle until you get a notif about "GL Ammo" on the bottom left of the screen. How many shots you need to do are based on "Rifle GL Shot Count".

  • Press "AIM/ SCOPE" button to aim.

  • Shoot when you're still aiming to trigger m203. The rifle fire rate will be greatly reduced when using m203 (you'll get 1-2 seconds of delay before you can shoot. You can switch weapons to skip it though). & the aim/ scope mode will be cancelled when successfully shooting with m203.

  • M203 projectile will go straight to the center of crosshair (no volley effect, as I'm still not familiar in launching the projectile in curve angle yet).

  • The projectile explodes in 1 second after shot.

  • Survivors are immune to this explosion (for now, maybe?).

  • Now it's possible to use AIM/ SCOPE by holding E key. This feature is active only when "Rifle GL User" is set to 2.5 or 3.5. This key also has other benefit that allows survivor to keep shooting GL as long as there's still GL ammo in inventory.

So, this becomes another weapon customization & at the same time a proof that vscript can make one of your dream weapons come true. I think I just got an idea about Robocop's special Barret with explosion bullet, but maybe next time when my crazy idea dominates my mind again.

NOTES:
  • The explosions on the video were without sound because the video was made before I added the explosion sound.
  • a known bug: Only for SI & tank, the explosion can bypass walls or objects.
51 Comments
EVIL_SUPRESOR 11 Jul @ 8:39am 
Good day, author. It's me again)))

Thank you for replying to my last review: you've made my day so much better! In addition to your reply: your script for bonus weapon damage should be expanded in the description, so that it allows you to configure these parameters as probabilities. Thanks again!

And now to the main topic of the comment...

I found... an incomprehensible bug: when moving to the next chapter, the clip of a weapon with an underbarrel grenade launcher breaks (as an example through a scar - it was 60, but with the transition to a new chapter the value changes to 58-59, and after reloading this value wanders between one and the other). It's interesting, but if you pick up the same weapon in a new chapter, but a new one, then the problem disappears exactly until the next transition.
kurochama  [author] 5 Jul @ 10:01am 
@ EVIL_SUPRESOR:
1. Max GL is 100, so it's 3x of normal GL, You can set "Rifle GL Shot Count" to high value if you want lower GL ammo capacity, as GL ammo can be obtained only by shooting.
2. This is possible, but this will make "Rifle GL Shot Count" useless, & players will be able to exploit the infinite GL by camping near ammo piles.
3. Yes, but the explosion effects are limited. There's at least one more, but the explosion is smaller than this. The default explosion looks worse so that's why I used this explosion effect instead
4. This feature is available on other m203 series, like smgs (except mp5), spas, snipers, m60).
5. This one is already available, I think, though the pause is short enough, different from the underbarrel shotgun series..
EVIL_SUPRESOR 5 Jul @ 9:44am 
Good day, author!

I would like to offer a bonus innovation to the grenade launcher setup:

(1) Is it possible to add a function with the "maximum allowable supply of grenades"?

(2) Is it possible to add a separate paragraph of ammunition, which can be replenished ONLY through the points with "a pack or can of cartridges"?

(3) Can the variations of the explosion graphics be changed?

(4) Is it possible to add a degree of projectile flight, instead of a hit-scan with a grenade teleport?

(5) Is it possible to add a pause between using a grenade launcher after shots?
kurochama  [author] 16 Jun @ 1:14pm 
@Valentine , there's this on the mod description that you can try:
"● Now it's possible to use AIM/ SCOPE by holding E key. This feature is active only when "Rifle GL User" is set to 2.5 or 3.5. This key also has other benefit that allows survivor to keep shooting GL as long as there's still GL ammo in inventory."
But well, that also uses Aim/ Scope.
Valentinee 16 Jun @ 9:53am 
NVM now my ADS is bound to the GL... RIP
Valentinee 16 Jun @ 9:46am 
oh never mind i just read the message below, thank you
Valentinee 16 Jun @ 9:45am 
hey bro can you make this hold E + fire to shoot the m203? im currently using weapons with ADS mods and i dont want to fire the grenade when i want to use my scopes. Thank you
Wero !!! 3 Jun @ 2:43pm 
@kurochama thanks my bro!
kurochama  [author] 3 Jun @ 5:25am 
@Wero !!! , I removed the "Walk + Attack" combo keys on this new update. Now you won't shoot m203 by accident when walking.
kurochama  [author] 2 Jun @ 1:43pm 
@Wero !!! , "Walk + Attack" combo keys are used as the alternative for using AIM/ SCOPE. Probably I'll remove that later on the next update to prevent from shooting m203 by accident when walking.