This adds ammo packs with various effects to produce some spice into the game. In this rewritten version, those effects can now be extended when the ammo pack with the same effect is deployed.
However, some of these effects can be an advantage or disadvantage to:
Yourself as the deployer
Your team
Infected team
Both teams
So be really careful when deploying them.
Also, there are some specific effects that will disable other effects for the stabilization of both the plugin and the server to lessen the chance of getting a crash mid-game. Few of the added effects eat up more CPU even if its code is optimized.
Lastly, this plugin is recommended for servers with greater number of players.
ConVars:
"nap-l4d2_version" - "3.2" (Version of this plugin)
"nap-l4d2_on" - "1" (Enable/Disable plugin)
"nap-l4d2_freeze_duration" - "15.0" (Duration of Freeze effect)
"nap-l4d2_freeze_radius" - "400.0" (Radius covered by Freeze effect)
"nap-l4d2_matrix_duration" - "15.0" (Duration of Matrix effect)
"nap-l4d2_speed_duration" - "17.5" (Duration of Speed effect)
"nap-l4d2_speed_increase" - "1.5" (Increases deployer's speed to this value)
"nap-l4d2_immune_duration" - "20.0" (Duration of Immune effect)
"nap-l4d2_immune_type" - "1" (Immune Box blocks: 0 = Damages taken by deployer, 1 = Same as 0 but include boomer vomits)
"nap-l4d2_heal_type" - "3" (Heal Box must give: 1 = A static amount of HP to the deployer, 2 = Maximum HP to the deployer, 3 = Full treatment for the deployer)
"nap-l4d2_heal_amount" - "50" (Amount of HP to heal, works only if above convar is set to 1)
"nap-l4d2_gravity_duration" - "22.5" (Duration of Gravity effect)
"nap-l4d2_gravity_amount" - "0.3" (Gravity changes to this value)
"nap-l4d2_upgrade_ammo_multiplied" - "1" (Apply multiplier to upgrade ammo when using normal ammo packs)
Commands:
"sm_nap_info" - Brings up a menu with a list of all box types for information.
"sm_nap_predict" (Admin and VIP accesses) - Toggle's prediction when deploying ammo packs.
Ammo Pack Types:
Freeze Box
Freezes the deployer and nearby players and colors them blue with little transparency.
Shows a beam ring around the deployer and the origin of the deployed box.
After being released by an SI while the effect is still ongoing, the victim will freeze again.
Matrix Box
Applies Slow Motion.
(Depending on the convar) Players will have glows, indicating their location.
Speed Box
Increases the deployer's speed.
Shows adrenaline effect.
Immune Box - (Depending on the convar) Protects the deployer from all harm.
Heal Box - (Depends on the convar) Heals the deployer.
Invisible Box
Makes the deployer non-visible to everyone. (Result will vary on the value of the convar)
A dummy will replace the deployer and will be spawned at the last origin the box was deployed. (if enabled)
A glow will be provided for the dummy as a replacement for the health indication. (if enabled)
Gravity Box - (Depends on the convar) Low gravity will be applied.
Ammo Box
Spawns 2 ammo packs of each kind, a total of 4.
A beam ring will appear around them to let other players notice them.
Weaponry Box
Spawns a bunch of weapons with a beam ring effect around them.
The spawned weapons can either be Tier 1, 2, or 3.
It is useful when survivors are running out of ammo.
Jingle Box
Incaps the deployer while being immune.
Burns common and witches, and kills special infected on contact.
Cannot be revived, not even by bots.
Bile Box - Biles the deployer and nearby entities after the ammo pack has been deployed.
Mob Box - Summons mega mobs.
Flame Box - A fire ignites at the deployer's feet.
Sparkle Box - Sparks will fly at the deployer's feet.
Item Box
Spawns a variety of items.
It can be either throwables or health-related stuff.
Realism Box
Removes the glows of fellow survivors.
All damages are multiplied.
Spit Box - An acid puddle will appear at the deployer's feet.
Meteor Fall Box
Meteors will come crashing down at the deployer's position.
They will cause damage to anyone that gets hit.
Also, meteors can push anyone back.
Fireworks Box
A display of wonderful fireworks will appear.
Common infected will be attracted to them.
Burns anything around it.
Explosion Box
A huge explosion will take place.
Tremendous damage is expected.
Flings nearby survivors.
Bleed Box - All of the deployer's health will be turned into temporary health.
Pet Box
Calls a little pet for the deployer.
It will follow the deployer anywhere.
It will also help in taking down enemies.
Parachute Box
Provides the deployer with parachutes.
Useful when falling from tall heights or death.
Armor Box
Changes the deployer's model into a riotcop.
Negates any damages taken even from world.
Shout Box
The deployer becomes enraged that causes him to shout.
The deployer's shout damages any nearby player.
It will make them stagger due to the deployer being too loud.
Blind Box - The deployer will lose sight of his surroundings.
Blur Box - The vision of every player becomes blurry.
Warp Box
Teleports the deployer to one of his/her teammates.
Additional effect and sound included in teleportation.
Snow Box
Changes the weather to snow.
A random player will be getting frozen by chance.
Tank Box - A tank will spawn from the deployer's position.
Witch Box - A witch will spawn from the deployer's position.
Party Box
Either all of the uncommon or special infected will surround you.
As a bonus, you invited a mega mob to come at your party.
Airstrike Box
Calls an F-18 plane to bomb the area at the deployer's position.
Huge damages are expected during bombing.
Flash Box
Makes the screen of every player turn white.
Produces the CS Flashbang sound.
Natives and Forwards:
PHP Code:
/**
* Fires when the plugin is (un)loaded.
*
* @param iState Initialization state.
* @noreturn
*/
forward void NAP_OnInit(int iState);
/**
* Fires before a Heal Box's effect is applied to the deployer.
* @remarks This forward only runs when nap-l4d2_heal_type is
* set to 3.
*
* @param client Given client index
* @noreturn
*/
forward void NAP_OnHBPre(int client);
/**
* Fires during the effect of a Heal Box being applied to the deployer.
* @remarks This forward only runs when nap-l4d2_heal_type is set to 3.
*
* @param client Given client index
* @noreturn
*/
forward void NAP_OnHB(int client);
/**
* Fires after a Heal Box's effect is applied to the deployer.
* @remarks This forward only occurs when nap-l4d2_heal_type
* is set to 3.
*
* @param client Given client index
* @noreturn
*/
forward void NAP_OnHBPost(int client);
/**
* Fires when an airstrike bomb explodes at a position.
*
* @param fHitX X axis of the bombed position
* @param fHitY Y axis of the bombed position
* @param fHitZ Z axis of the bombed position
*
* @noreturn
*/
forward void NAP_OnAirstikeHit(float fHitX, float fHitY, float fHitZ);
/**
* Checks to see if a client still feels effects from deployed ammo packs.
*
* @param client Client index
* @param effectIndex Index of ammo pack with effect.
*
* @error Invalid client or incorrect index
* @return true if it is still there, false otherwise
*/
native bool HasEffect(int client, int effectIndex);
/**
* Returns the time left an ammo pack effect has.
*
* @param client Client index
* @param effectIndex Index of ammo pack with effect
*
* @error Invalid client or incorrect index
* @return time left on success, 0.0 on failure
*/
native float GetEffectTime(int client, int effectIndex);
/**
* Gets the index of a deployer's ammo pack.
*
* @param client Client index
* @param effectIndex Index of ammo pack with effect
*
* @error Invalid client
* @return deployer's ammo pack index, else 0
*/
native int GetAPIndex(int client);
/**
* Sets the index of a deployer's ammo pack.
*
* @param client Client index
* @param APIndex Chosen index of ammo pack.
*
* @error Invalid client or incorrect index
* @noreturn
*/
native void SetAPIndex(int client, int APIndex);
/**
* Gets the name of the ammo pack being deployed.
*
* @param client Client index
* @param sBuffer String used to store the name
* @param iBufferSize Size of the string
*
* @error Invalid client or incorrect buffer size
* @return Number of bytes written
*/
native int GetAPName(int client, char[] sBuffer, int iBufferSize);
/**
* Sets the name of the ammo pack being deployed.
*
* @param client Client index
* @param sBuffer String used to change the name
*
* @error Invalid client
* @noreturn
*/
native void SetAPName(int client, char[] sBuffer);
Bugs:
Deployer will still have the speed effect though it already expired. [FIXED]
Matrix effect will still linger even if its timer elapsed. [FIXED]
Immune effect lasting for the whole campaign. [FIXED]
All common infected ignite during Fireworks effect. [FIXED]
Server crash after picking up infinite undeployed ammo packs near deployed ones. [FIXED]
"Netprop not found" error on Airstrikes. [FIXED]
Airstrikes never doing their work. [FIXED]
Server crash after deploying Tank Boxes. [FIXED]
Independencies:
[L4D2] Upgrade Packs BUG FIX - This plugin's function is already included.
Installation Guide:
1.Unzip [L4D2] NAP Extras. This contains the materials, models, and sounds that the plugin needs and they are to be placed on your L4D2 directory.
2. Unzip [L4D2] New Ammo Packs.
(For direct installation)
3a. Put the .smx files in the plugins folder of your Sourcemod directory.
(For compiling)
3b. Put the .sp files in the scripting folder of your Sourcemod directory.
4. Have the necessary includes in order for the compilation to work or just edit and remove the lines which are related to the includes.
5. Compile them and if successful, move the compiled .smx files to the plugins folder.
To Do:
Re-add the missing ones with better results and hopefully no more crashing.
Completely prevent boomer vomits from biling survivors that have the Immune effect.
Add Updater support.
Notes:
If you are experiencing crashes with this plugin, probable cause would be the unprecached models used so it's best to download my [L4D2] Game Files Precacher.
There must be no, not even a single, trace of the old and buggy version. You could use that for back-up though.
If re-compiling, you must have the necessary includes used by this plugin.
Left 4 Downtown 2 is now optional when compiling so it is not necessary to have the extension installed.
If you're having trouble re-compiling (mainly due to Scene Processor, and the conflicting L4D Stocks and Glow includes), I suggest:
For sceneprocessor.inc, please manually edit the file,
find the line(s) that is/are producing the error(s), and add (a) missing semicolon(s).
For conflicting includes, kindly edit the l4d_stocks include, and remove the conflicting line(s).
Credits:
Silvers - For his [L4D2] Fireworks Party and [L4D2] F18 Airstrike plugin mechanisms, and tutorial for creating forwards.
Panxiaohai - For his [L4D/L4D2] Variable size of infected and witch plugin mechanism. (Which will be re-added on future updates)
V10 & SilentBr - For their Upgrade packs BUG FIX plugin mechanism.
Mortiegama - For his updated Vicious Infected gamedata.
GsiX - For the [L4D2] Christmas Pet plugin mechanism.
Changelog:
06-29-2017: First release.
: A whole rewrite of the old and messy one.
: The duration of the effects can now be extended.
07-03-2017: Huge update.
: Few boxes were re-added.
: Gamedata updated.
08-02-2017: Pet Box, Armor Box, and Shout Box added.
: Fixed three bugs.
: New natives.
: 6 of the previous boxes are re-added.
08-30-2017: Warp, Distortion, Blur, Party, and Snow Boxes added.
: Re-added forward for Airstrikes.
: 3 previous boxes re-added.
: Some bugs fixed.
: Another huge update.
08-31-2017: A small update. (:) Thanks to Farmoza for reporting! :))
10-04-2017: Flash Box added.
: Bugs have been fixed.
Pyc
11-09-2016 13:34
Re: [L4D2] Different Ammo Packs
I found only 3 box in sources
cravenge
11-09-2016 21:27
Re: [L4D2] Different Ammo Packs
Quote:
Originally Posted by Pyc
(Post 2468986)
I found only 3 box in sources
Look at the main post again. In there, I said pre-made but not implemented because I need testers if it works and I'm busy this week so I can't test it.
KasperH
11-13-2016 08:23
Re: [L4D2] Different Ammo Packs
I was waiting for this. :D Seems like after the matrix box effect ended, the infected aura is still red. But i will test more and edit my post. :) I can't wait for the rest of the boxes, sounds really good.
KasperH
11-15-2016 10:14
Re: [L4D2] Different Ammo Packs
Quote:
L 11/15/2016 - 16:07:57: [SM] Exception reported: Game event "choke_begin" does not exist
L 11/15/2016 - 16:07:57: [SM] Blaming: different_ammo_packs-l4d2.smx
L 11/15/2016 - 16:07:57: [SM] Call stack trace:
L 11/15/2016 - 16:07:57: [SM] [0] HookEvent
L 11/15/2016 - 16:07:57: [SM] [1] Line 101, different_ammo_packs-l4d2.sp::OnPluginStart
L 11/15/2016 - 16:07:57: [SM] Unable to load plugin "different_ammo_packs-l4d2.smx": Error detected in plugin startup (see error logs)
KasperH
11-16-2016 11:10
Re: [L4D2] Different Ammo Packs
Quote:
Originally Posted by cravenge
(Post 2470427)
Update (1.2): Check first post.
Thx for the update! ^_^
I have some to. :D
Freeze box: Looks ok for the deployer (The blue effect are longer then the duration, dunno its a bug or not.), but your team mates (bots) are frozen forever, and they look like creepy ghosts. :D (Still need to test with real players.) Edit: They are free when a jockey, charger, smoker grab them.
Jingle box: Seems like its leaving me with 1hp and no incap, bots able to heal me. Edit: The fire effect seems long to.
Speed box: It doesn't feel faster. (Not sure, i test more.)
Spit box: It works well, but u can't hear that sound when you are standing on a spit.
Still need to test: Bile, Mob box Edit: They are working well!
One more thing, i'm not sure. When i set the duration of the boxes it doesn't seems to work. Edit: Confirmed for the matrix and freeze box!
Lux
11-17-2016 09:18
Re: [L4D2] Different Ammo Packs
Look interesting but i have not tried it yet
KasperH
11-17-2016 11:48
Re: [L4D2] Different Ammo Packs
Quote:
Originally Posted by cravenge
(Post 2470736)
Update (1.3) : Fully loaded with all the missing stuff I missed and lots of fixes.
Really nice update! :)
Pls don't hate me! :D
Matrix box: The duration still feels bugged, it's not that long then before. I changed to 2 sec. for the test. The 2 sec. works well with the freeze box!
Speed box: Didn't feel fast, i will test with "2.0". Edit: Sadly no speed. :(
Jingle box: Bots able to revive and heal.
Let's write some good things! :D
Blue screen effect longer than duration of freezing: Looks like it fixed itself. :D Didn't happened now!
Jingle box: The fire effect duration is the same as the cvar! Yay!
Heal box: Yay! (Tested with HP only. Update will come!) Edit: All good! ^^
Spit box: Have the sound! It's possible to add that "hurt" sound to?
All other boxes looks good! ^^
cravenge
11-19-2016 00:17
Re: [L4D2] Different Ammo Packs
Quote:
Originally Posted by KasperH
(Post 2470772)
Matrix box: The duration still feels bugged, it's not that long then before. I changed to 2 sec. for the test.
The duration of the matrix box is not bugged. It's because the time frame becomes 0.2 sec/frame so if you want it to last for 2 seconds, the value you need is 0.4
Quote:
Originally Posted by KasperH
(Post 2470772)
Speed box: Didn't feel fast, i will test with "2.0". Edit: Sadly no speed. :(
Jingle box: Bots able to revive and heal.
Will fix this in the next update. Hopefully, Jingle Boxes won't be so buggy anymore.
Quote:
Originally Posted by KasperH
(Post 2470772)
Blue screen effect longer than duration of freezing: Looks like it fixed itself. :D Didn't happened now!
Jingle box: The fire effect duration is the same as the cvar! Yay!
Heal box: Yay! (Tested with HP only. Update will come!) Edit: All good! ^^
Spit box: Have the sound! It's possible to add that "hurt" sound to?
Good to hear. For the spit, I'm currently trying to make it act like an "insect_swarm" entity so any plugins such as Vicious Infected's acid swipe will take effect.
KasperH
11-19-2016 09:02
Re: [L4D2] Different Ammo Packs
Quote:
Originally Posted by cravenge
(Post 2471265)
Update (1.4): Check first post for important changes and notes.
Edit: Everyone, please redownload the plugin because of a crasher bug.
Thank you for your hard work!
Oh and thx for the information about the matrix box! And sorry, i didn't know. ^^