Monthly Target: $400 Donations: $602
 150% 

[L4D2] Weapon Unlock v0.8.1


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Crimson_Fox
Senior Member
Join Date: Mar 2009
Plugin ID:
1379
Plugin Version:
0.8.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Approver:
    Plugin Description:
    Unlocks the hidden CSS weapons.
    Servers with this Plugin:
    486 
    Old 01-03-2010 , 11:14   [L4D2] Weapon Unlock v0.8.1
    Reply With Quote #1

    Ever think to yourself "I wish Left 4 Dead 2 was more like Counter-Strike"? No? Well me neither, but I ended up writing this plug-in anyway. =P

    As you may already know, Valve had to reduce the gore in the German version of L4D2. This was because otherwise they would not be allowed to ship L4D2 there. So in order to compensate, Valve added four Counter-Strike Source weapons to the German version. Unfortunately, those weapons were never enabled for everyone else.

    Well folks, you can now have your strudel and eat it too!

    Coop/Realism: CSS guns added to dynamic gun spawns with the exception of c4m1-c4m4.
    Versus: CSS guns added to dynamic gun spawns. Weapons kept the same for both teams.
    Scavenge: All static gun and grenade spawns randomised each round with CSS guns added. Weapons kept the same for both teams.
    L4D1 maps: All static gun and grenade spawns randomised. L4D2 guns, CSS guns, and boomer bile added.

    Weapon types are kept the same when randomised. For example, a sub machine gun will never be replaced with auto shotgun or an assault rifle. It will be replaced with another SMG such as an uzi, a silenced SMG, or an mp5.

    Cvars:
    l4d2_wu_enable, Is Weapon Unlock plug-in enabled?, default 1
    l4d2_wu_awp, Enable AWP sniper rifle?, default 1
    l4d2_wu_mp5, Enable MP5 submachine gun?, default 1
    l4d2_wu_scout, Enable Scout sniper rifle?, default 1
    l4d2_wu_sg552, Enable SG552 assault rifle?, default 1
    l4d2_wu_awpboost, Amount of damage added to the AWP sniper rifle., default 135 (base 115+135=250 total at 1.05 sec cycle time vs special infected)
    l4d2_wu_scoutboost, Amount of damage added to the scout sniper rifle., default 110 (base 90+110=200 total at 0.9 sec cycle time vs special infected)

    To do:
    Add support for 8+ player servers.
    Add proper support for baseball bats and knives.
    Find a method to lower the reload speed for the MP5/Sig.
    Add cvars to enable/disable the plug-in by game mode.

    If you need help getting this installed this plug-in try this tutorial: http://forums.alliedmods.net/showthread.php?t=69092

    Changelog:
    0.8.1
    -Added precache for boomer bile.
    0.8
    -Added cvar to enable/disable plug-in.
    0.7
    -Added support for scavenge.
    -Fixed c4m5 crash.
    Thanks to McFlurry for the heads-up.
    -Removed bat option as it's pretty glitchy at the moment.
    0.6
    -Added support for L4D1 maps.
    -Tweaked round detection for Versus.
    -Added model precache for bats.
    0.5.2
    -Using new method of spawning bats.
    0.5.1
    -Readded map reload on plug-in load for dedicated servers as it is still required in some instances.
    0.5
    -Added config file.
    Thanks to satannuts for looking this up.
    0.4.5
    -Fixes problems with wrong weapon models in versus by using a new method to store/retrieve weapon spawns.
    0.4.4
    -Map reload on plug-in load is not required for dedicated servers. Will now only reload map on plug-in load for listen servers.
    0.4.3
    -Added small fix for baseball bats.
    Thanks to satannuts for the bug report.
    -Disabled modifying spawns for co-op modes in c4m1-4 as the transitions keep causing crashes.
    Thanks to everyone that reported the crashes.
    0.4.2.0
    -Fix for wrong model bug that showed up in 0.4.1.
    Thanks to M249-M4A1 for the heads-up.
    0.4.2
    -Updated Hard Rain coop/realism map transition code. Should hopefully stop crashes on windows servers.
    0.4.1
    -Tweaked weapon initialisation to prevent crash on plug-in refresh.
    Thanks to RenegadeXR for the heads-up.
    -Lowered default AWP boost.
    -Added check to boost code to prevent errors.
    0.4
    -Added options to boost CCS sniper rifle damage.
    0.3.9
    -Added fix for Hard Rain, should not crash on any map.
    Thanks to chunXray for the bug reports.
    -Fixed a typo on weapon spawn bug fix for c4m1_milltown_a.
    Thanks again to SkaP for the bug report.
    -Fixed a few bugs related to weapon initialisation.
    0.3.8
    -Rewrote fix for sugarmill_a -> sugarmill_b. Should be more stable on windows servers now.
    -Updated weapon spawn bug fix for c4m1_milltown_a, will work on windows servers now.
    0.3.7.2
    -Even further fixes for weapon spawn bug.
    -Increased delay for RoundStart again as it was still not long enough for some map transitions.
    0.3.7.1
    -Further fixes for weapon spawn bugs.
    Thanks to Visual77 for the bug reports.
    0.3.7
    -Added versus weapon spawn fix for c4m1_milltown_a.
    Thanks to SkaP for the bug report.
    0.3.6
    -Moved precache function to prevent crashes for windows servers.
    -Added check to skip changing weapons on sugarmill_a since it causes listen servers to crash.
    -Added fix for c2m5_concert, would cause weapons to glitch for the second team in versus.
    Thanks to SkaP for the bug report.
    -Increased RoundStart delay as it wasn't long enough for some setups.
    0.3.5
    -Optimised and re-wrote the spawn modification code. Should resolve the problems with weapons not matching up with their models.
    0.3.4
    -Removed round_start check as it caused the plug-in not to run at startup.
    -Added check to prevent duplicate bats from being given out.
    0.3.3
    -Added option to give baseball bats to the survivors at the start of the round.
    Thanks to SkaP for the suggestion.
    -Added check for coop modes (coop, realism), will now spawn weapons in different locations if the survivors are wiped out.
    Thanks to Daewa for the heads-up.
    -Added check to prevent round_start from being triggered more than once per round.
    -Removed exception for c4m3_sugarmill_b as it's problematic.
    0.3.2
    -Added exception for c4m3_sugarmill_b so that same weapons are kept.
    0.3.1
    -Fixed the c4m2_sugarmill_a -> c4m3_sugarmill_b crash.
    Thanks to everyone that reported this.
    0.3
    -Added support for versus, now both teams get the same set of weapons.
    Thanks to everyone that tested this.
    -Tweaked model precaching, should fix crashing problems. *again*
    Thanks to everyone who post a bug report. *again* =)
    -Added cvars to enable/disable individual weapons.
    Thanks to Cuthbert for the suggestion.
    0.2.2
    -Optimised code, will be easier to add features.
    -Rewrote initialisation. Should stop crashes on windows dedicated servers and work better for listen servers.
    0.2.1
    -Fixed a few bugs I added in the hidden weapon initialisation. =P
    0.2
    -Added precache of hidden weapon models to prevent crashes.
    Thanks to MagnoT for the heads-up.
    -Updated hidden weapon initialisation so that sb_all_bot_team isn't disabled if it was previously set.
    0.1
    -Initial release.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_WeaponUnlock.sp - 42218 views - 21.2 KB)

    Last edited by Crimson_Fox; 04-05-2010 at 19:44.
    Crimson_Fox is offline
    Blakeocity
    Senior Member
    Join Date: Nov 2009
    Old 01-03-2010 , 13:01   Re: [L4D2] Weapon Unlock
    Reply With Quote #2

    Could you add the knife as well?

    Force spawning them using the Weapon Spawner plugin is working. Havn't seen them in rotation on versus yet.

    Only just put it on so I'll try it out for a bit for you.
    Thanks!

    edit: Works PERFECTLY in Versus/
    Thank you!

    Last edited by Blakeocity; 01-03-2010 at 13:19.
    Blakeocity is offline
    Visual77
    Veteran Member
    Join Date: Jan 2009
    Old 01-03-2010 , 13:38   Re: [L4D2] Weapon Unlock
    Reply With Quote #3

    Great plugin. Thanks
    Visual77 is offline
    Downtown1
    Veteran Member
    Join Date: Mar 2004
    Old 01-03-2010 , 14:11   Re: [L4D2] Weapon Unlock
    Reply With Quote #4

    Does this get around the problem of having to restart the map?
    Downtown1 is offline
    AtomicStryker
    Veteran Member
    Join Date: Apr 2009
    Location: Teutonia!!
    Old 01-03-2010 , 14:21   Re: [L4D2] Weapon Unlock
    Reply With Quote #5

    It fakes it. It spawns a Bot, gives him all weapons, then lets the server hibernate again.

    If a Lobby joins map is changed, so everything needed to initialize the weapons is done.


    Then, on Map Start, this Plugin loops through all weapons spawns and randomly replaces those with unlock weapons.
    AtomicStryker is offline
    Crimson_Fox
    Senior Member
    Join Date: Mar 2009
    Old 01-03-2010 , 14:36   Re: [L4D2] Weapon Unlock
    Reply With Quote #6

    Quote:
    Originally Posted by AtomicStryker View Post
    It fakes it. It spawns a Bot, gives him all weapons, then lets the server hibernate again.

    If a Lobby joins map is changed, so everything needed to initialize the weapons is done.


    Then, on Map Start, this Plugin loops through all weapons spawns and randomly replaces those with unlock weapons.
    That is precisely right! I tried spawning the weapons on plugin start, but that just crashed the server. I can try a few other things, but this seems to work for now.

    As far as the weapon spawns, that not *exactly* right. It only looks for the dynamic weapon spawns and alters them based on the odds the weapons would have had to spawn if the director had them in the rotation.

    Last edited by Crimson_Fox; 01-03-2010 at 14:41.
    Crimson_Fox is offline
    Crimson_Fox
    Senior Member
    Join Date: Mar 2009
    Old 01-03-2010 , 14:38   Re: [L4D2] Weapon Unlock
    Reply With Quote #7

    Quote:
    Originally Posted by Blakeocity View Post
    Could you add the knife as well?

    Force spawning them using the Weapon Spawner plugin is working. Havn't seen them in rotation on versus yet.

    Only just put it on so I'll try it out for a bit for you.
    Thanks!

    edit: Works PERFECTLY in Versus/
    Thank you!
    NP! I haven't tried the knife, I'll see if that's doable.
    Crimson_Fox is offline
    Visual77
    Veteran Member
    Join Date: Jan 2009
    Old 01-03-2010 , 14:44   Re: [L4D2] Weapon Unlock
    Reply With Quote #8

    If you don't want the bots to be spawned with the guns, I assume you could use stripper and the weapons you find at random places will do damage
    Visual77 is offline
    Downtown1
    Veteran Member
    Join Date: Mar 2004
    Old 01-03-2010 , 14:46   Re: [L4D2] Weapon Unlock
    Reply With Quote #9

    Will this work with sb_all_bot_team 1? Also you could just give weapons to bots then remove them right away .
    Downtown1 is offline
    Crimson_Fox
    Senior Member
    Join Date: Mar 2009
    Old 01-03-2010 , 14:52   Re: [L4D2] Weapon Unlock
    Reply With Quote #10

    Quote:
    Originally Posted by Visual77 View Post
    If you don't want the bots to be spawned with the guns, I assume you could use stripper and the weapons you find at random places will do damage
    I was thinking of doing something along those lines in the beginning, but I like this method works better because it doesn't require stripper. Since this happens when the server is hibernating, the bots never get the weapons in an actual game so it's not an issue.
    Crimson_Fox is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 06:36.


    Powered by vBulletin®
    Copyright ©2000 - 2015, vBulletin Solutions, Inc.
    Theme made by Freecode