Raised This Month: $32 Target: $400
 8% 

[L4D2] Melee In The Safe Room (with unlock all melee weapons on every campaign)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
n3wton
Senior Member
Join Date: Mar 2010
Plugin ID:
1617
Plugin Version:
2.0.6
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This simply spawns a number of melee weapons at the start of each round in the safe-room.
    Old 04-25-2010 , 10:34   [L4D2] Melee In The Safe Room (with unlock all melee weapons on every campaign)
    Reply With Quote #1

    Melee In The Saferoom


    This simply spawns a number of melee weapons at the start of each round in the safe-room. I wrote this plugin just after 'The Passing' release as during this update valve thought it would be a good idea to have between 2 - 4 melee weapons in the safe-room, meaning sometime people had to use pistols...

    How it works is it waits for a round to begin, then take the first active client from the survivors team and spawns X amount of melee weapons around this point.

    How To Install

    If you don't want all the melee weapons unlocked, simply copy the [L4D2] MeleeInTheSafeRoom.smx to your servers sourcemod/plugins folder.

    If you want all melee weapons to be unlocked, download any one of the
    - Melee In The Safe Room Version 2-*-*.zip

    then extract all the files to there relevant folders on your server.



    How I Unlocked All Melee Weapons

    Basically, there is a melee_weapon_unlock.vpk that contains all the mission.txt files (1,2,3,4,5 & 6) that have a line in which list the melee weapons that are aloud on that campaign. I added all melee weapons that weren't in the list, but with a modded script. so for example if the fireaxe isn't available on a campaign then i have added fireaxe_mod, making l4d2 spawn a fireaxe_mod melee weapon. To make these "mod" melee weapons work, I edited the melee_manifest.txt and added all of the modded script locations. Then because valve have changed how vpk's load, I added all the modded scripts to the left4dead2/scripts/melee directory. Now when a client connects to the server, the modded scripts are downloaded to each client. There are 12 scripts at around 4kb each, so it will take 5 - 10 seconds for them to download, but once the client has the scripts they will never need download them again (unless they delete them).


    l4d2_MITSR_Random
    Spawn Random Weapons (1) or custom list (0)
    Default: "1"

    l4d2_MITSR_Amount
    Number of weapons to spawn if l4d2_MITSR_Random is 1
    Default: "4"

    l4d2_MITSR_BaseballBat

    Number of baseball bats to spawn (l4d2_MITSR_Random must be 0)
    Default: "1"

    *Note: Cvars for every class of melee weapon exist, but adding another 11 sections to this page seems silly. Look in [L4D2] MeleeInTheSaferoom.cfg for the full list.



    Code:
    - 1.0.0
     Initial Release
    
     - 1.0.1
     Small bug fix (increased timer from round start)
    
     - 1.0.2
     Fixed Bug with weapons spawning in wrong place
     Wrote better code for positioning and rotating melee weapons
    
    - 1.0.3
    A Quick Beta version used to check a hunter claws bug had been fixed.
    
    - 1.0.4 
    Added extra checking for spawn amounts.
    Made sure knifes worked for edited servers.
    
    - 1.0.5
    Changed hunter claws check to check all cases (lower and higher caps)
    added !mitserror command to output all weapon models spawned to help with debugging.
    
    - 1.1.0
    Changed how the weapons spawn, hopfully fixing the hunter claws once and for all (Thanks DJ_WEST)
    Fixed some typos
    Removed !mitserror
    NOTE: Please delete the old [L4D2]MeleeSafeRoom.cfg before using this plugin.
    NOTE: This version is broken, reuploaded 1.0.5
    
    - 1.1.1
    Right hopefully, hunter claws are 100% gone, now it finds out what weapons are aloud on that map, then picks from them.
    
    - 1.2.0
    Been a while since an update, and this isn't anything big, basically I've added an extra cvar for versus mode, if enabled both teams get the same melee weapons when set to random, to make it fair.
    
    - 1.2.5
    After many internal versions, trying to fix the glitches with unlocked melee weapons, I finally have one, which I believe works in all game modes. Basically, put the unlock_melee_weapons.vpk in your servers addon folder and this then downloads the individual files from the server to you clients on map start, because there all .txt files there all around 1 - 2kb each so they download instantly, enabling all melee weapons with no glitches and with audio.
    
    - 1.2.6
    added tonfa to the cfg list of files.
    more sure sv_allowdownload is on.
    
    - 2.0.0
     Complete rewrite, from a blank document.
     Fixed all errors (hopefully, tested for on all campaigns with two people with no errors)
     Made all Melee weapons work with out any glitches (read how to setup for more information)
     Now supports custom melee lists, e.g. spawn 4 knives, 1 golf club and 3 katans.
    Cleaner faster code.
    
    - 2.0.1
    Quick (failing) test
    
    - 2.0.2
    Now spawns the default weapons, except for knives. Where it  spawns a huntingknife.
    
    - 2.0.3
    Added riot_shield to make sure people can get riot shields to spawn properly.
    added !melee (admin command) to list all spawnable melee weapons on current campaign
    
    - 2.0.4
    Fixed a potential error where on campaign mode, melee weapons wouldn't spawn on any but the first map.
    
    - 2.0.5
    Add support for the sacrifice an no mercy.
    Fixed a bug where hunter arms could be spawned.
    
    - 2.0.6
    MasterMind420 posted a release which use MITSR 2.0.5 but with some new .vpk's to unlock weapons.
    Repackaged .zip file and updated code to correct version
    
    - 2.0.7
    Made my own vpk with only standard melee weapons unlocked (no knife or riot shield).
    Precached all standard melee weapons.
    (it looks like without having something client side, knife and riot just won't work)
    Yours
    N3wton
    Attached Files
    File Type: zip Melee In The Safe Room Version 2-0-5.zip (18.6 KB, 5864 views)
    File Type: zip Melee In The Safe Room 2-0-7.zip (19.8 KB, 10863 views)
    File Type: sp Get Plugin or Get Source ([L4D2] MeleeInTheSafeRoom.sp - 10463 views - 11.3 KB)

    Last edited by n3wton; 06-19-2011 at 06:24. Reason: Adde Plugin Description.
    n3wton is offline
    NuBS McGee
    New Member
    Join Date: Apr 2010
    Old 04-25-2010 , 13:55   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #2

    *Available
    NuBS McGee is offline
    n3wton
    Senior Member
    Join Date: Mar 2010
    Old 04-25-2010 , 13:56   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #3

    Cheers, I failed english... passed yorkshire though XD

    Yours
    N3wton

    Last edited by n3wton; 04-28-2010 at 13:09.
    n3wton is offline
    IronWarrior
    Veteran Member
    Join Date: Jan 2010
    Old 04-25-2010 , 14:08   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #4

    Really nice.
    IronWarrior is offline
    n3wton
    Senior Member
    Join Date: Mar 2010
    Old 04-25-2010 , 14:10   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #5

    Cheers

    I'm currently working on getting it so you can have any melee weapon in any map, problem is there pre-defined in the mission/campaign.txt so you can't just spawn them...

    I tried using stripper to pre add them with no luck... So i'm kind of at a dead end

    Yours
    N3wton
    n3wton is offline
    Inker
    SourceMod Donor
    Join Date: Dec 2008
    Old 04-25-2010 , 15:16   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #6

    This is great. I've had a few people complaining about the lack of melee weapons in the safehouse since the patch.
    Inker is offline
    Cuthbert
    Senior Member
    Join Date: Nov 2009
    Old 04-27-2010 , 10:28   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #7

    Thanks for making this -- not having a melee weapon is like losing an arm, for seasoned players.
    Cuthbert is offline
    Pluvius
    Junior Member
    Join Date: Jun 2009
    Old 04-27-2010 , 11:30   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #8

    Usually before the DLC I would start the game in Single Player mode, close the single player mode game, re-create a cooperative or versus game to spawn an unlimited pool of baseball bats (melee) in the saferoom. But now this doesn't work anymore, thanks for this alternative.

    Last edited by Pluvius; 04-27-2010 at 11:58.
    Pluvius is offline
    Mortiegama
    Senior Member
    Join Date: Feb 2010
    Old 04-27-2010 , 14:35   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #9

    I always am amazed to see people run out with double pistols AND a primary weapon. Doubles might be almost worthwhile in C1M1 but come on, you need a melee.
    __________________
    Mortiegama is offline
    thresh0ld
    Senior Member
    Join Date: Sep 2009
    Location: Hell
    Old 04-27-2010 , 20:56   Re: L4D2 - Melee In The Safe Room
    Reply With Quote #10

    I don't get why Valve felt the need to change settings such as these where no one even complained about in the first place...unintended?

    Anyway, thanks for sparing me the trouble to implement one myself...I will try this out later

    Btw, shouldn't this plugin be categorized for L4D only?

    Last edited by thresh0ld; 04-27-2010 at 21:02.
    thresh0ld is offline
    Reply



    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 05:00.


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