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

[L4D] Survivor Upgrades


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Jerrith
Junior Member
Join Date: Jun 2009
Plugin ID:
956
Plugin Version:
1.4
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Gives survivors access to upgrades.
    Old 06-22-2009 , 22:17   [L4D] Survivor Upgrades
    Reply With Quote #1

    What does it do?
    This plugin allows you to enable the survivor upgrades in Left 4 Dead. By default, they are given out as follows:
    • Laser sight is automatically given.
    • At the start of a round, 3 random upgrades are given to each player.
    • When a witch is killed, 1 random upgrade is given to each player.
    • When a witch is killed, if someone was recognized as the primary attacker, that one player gets 1 random upgrade.
    • When a tank spawns, 1 random upgrade is given to each player.
    • When a tank is killed, 1 random upgrade is given to each player. (Note: Does not appear to work during a finale.)
    • When a tank is killed, if someone was recognized as the primary attacker, that one player gets 1 random upgrade.
    Also, as some players do not like the laser sight, if the cvar to automatically give it is set, they can turn it on, off, or toggle it with /laseron, /laseroff, /laser, respectively.

    I've also hidden most (if not all) of the text printed out by the upgrade system by default, replacing it, when appropriate, with my own text.

    Finally, you can use /listupgrades to list what upgrades you currently have.

    Config
    surup_verbosity - How much text output about upgrades players see (0 = none, 3 = max, default is 2).
    surup_always_laser - Whether or not we always give survivors the laser sight upgrade. (Default 1 (on))
    surup_upgrades_at_spawn - How many random upgrades to give survivors when they spawn. (Default 3)
    surup_upgrades_at_witch_kill_killer - How many random upgrades to give survivors when they personally kill the witch. (Default 1)
    surup_upgrades_at_witch_kill_all - How many random upgrades to give survivors when their team kills the witch. (Default 1)
    surup_upgrades_at_tank_spawn - How many random upgrades to give survivors when a tank spawns. (Default 1)
    surup_upgrades_at_tank_kill_killer - How many random upgrades to give survivors when they personally kill the tank. (Default 1)
    surup_upgrades_at_tank_kill_all - How many random upgrades to give survivors when their team kills the tank. (Default 1)

    For disabling various upgrades, you can use:
    surup_allow_kevlar_body_armor, surup_allow_raincoat, surup_allow_climbing_chalk, surup_allow_second_wind, surup_allow_goggles, surup_allow_hot_meal, surup_allow_laser_sight, surup_allow_combat_sling, surup_allow_large_clip, surup_allow_hollow_point_ammo, surup_allow_knife, surup_allow_smelling_salts, surup_allow_ointment, surup_allow_reloader
    (0 = disabled, 1 = randomly awarded, 2 = given at round start)

    By default, they are all on except for laser and hot meal. Laser is because you get it automatically, and it would be nice not to give it out to someone who used /laser to remove it. Hot meal is because, in testing for Versus, it seemed the only truly unfair one - the 150 health total translated into points, which the other team might have no way to beat.

    Translation File
    User Mecha the Slag has contributed a replacement english translation file for Left4Dead that replaces the missing instructor strings with valid values. It will only help you with your own client - it is not downloaded by the game. If you want to use it, download the attached file, translation_file.zip, and extract the left4dead_english.txt inside it into your left4dead/resource directory.

    Credits
    Thanks to everyone on this alliedmods.net forum. I was able to build this much faster thanks to everyones examples. l4dmmo.sp was, of course, the foundation of all the upgrades. Thanks again to Mecha the Slag for the translation file.

    Change log
    1.0 - 6/22/09
    -Initial release
    1.1 - 6/23/09
    - Filtered out #L4D_Upgrade_laser_sight_expire text broadcast when turning off a laser.
    - Added cvars to allow disabling of specific upgrades. (Hot Meal is disabled, by default.)
    - Added verbosity cvar. 0 for no messages, 1 for expire events only, 2 for expire events and short self messages, 3 for everything. (Default is now 2.)
    - Added potential fix for bots taking over for players getting upgrades.
    1.2 - 6/25/09
    - Filtered out #L4D_Upgrade_laser_sight_expire for real this time...
    - Filtered out #L4D_NOTIFY_VOMIT_ON when a survivor with a raincoat was vomited on.
    - Added code to deal with multiple tank_spawn events being generated. If this event occurs twice within 15 seconds, only the first event will grant upgrades.
    1.3 - 6/28/09
    - Fixed bug in the error message displayed if someone with every upgrade were to get another. (Thanks Number Six)
    - Added incendiary ammo upgrade.
    - Changed addUpgrade, giveRandomUpgrade, and removeUpgrade to be targeted, per tommy76's suggestions.
    - Changed giveRandomUpgrade to giveRandomUpgrades, which now takes how many upgrades to give as a parameter.
    - Changed addUpgrade, giveRandomUpgrade, and removeUpgrade to go through the rest of the mod's calls, rather than directly applying an upgrade. (Prevents things like getting an upgrade twice.) This also changes the index values to 1 to 15.
    - Setting the allowed cvar for an upgrade to 2 will make it so that it is automatically given out to survivors at the start of a round. (Thanks again to tommy76.)
    1.4 - 6/28/09
    - Added colors to text messages (Thanks to Mecha the Slag)
    - Fixed bug with incendiary ammo that occured in most games. (Thanks for the log, Number Six)
    - Fixed logic error in random upgrade selection that made the last two upgrades very unlikely to be picked. (Thanks for the report, Sirenic.)
    Attached Files
    File Type: sp Get Plugin or Get Source (survivor_upgrades.sp - 29056 views - 31.2 KB)
    File Type: zip translation_file.zip (22.5 KB, 11118 views)

    Last edited by Jerrith; 06-28-2009 at 22:51. Reason: Version 1.4 & Translation file
    Jerrith is offline
    Number Six
    Senior Member
    Join Date: Dec 2008
    Old 06-22-2009 , 23:26   Re: Survivor Upgrades
    Reply With Quote #2

    Need survival_upgrades 1 in server.cfg ?
    Working on Versus ?

    Update after little tests:
    Tested , working on versus but scoring board not work 0 - 0 on the first round .
    And another opinion , allow too more updates for all survivors on spawn .

    But really good for a first release .
    __________________



    Last edited by Number Six; 06-23-2009 at 00:16.
    Number Six is offline
    AngryVag
    Member
    Join Date: Jun 2009
    Old 06-23-2009 , 00:23   Re: Survivor Upgrades
    Reply With Quote #3

    Oh man, this plugin is damn near perfect! Really stable on my linux server, no errors in log. Bravo! This is just what I've been looking for! I'll give it a few more days of testing to see how people like it. But so far, everyone loves it!

    Edit: forgot to add for 6... Yes it works on Versus. As for "survivor_upgrades 1", I already had it enabled so I'm not sure if it's needed or not.
    __________________
    AngryVag is offline
    Number Six
    Senior Member
    Join Date: Dec 2008
    Old 06-23-2009 , 00:42   Re: Survivor Upgrades
    Reply With Quote #4

    Quote:
    Originally Posted by AngryVag View Post
    Oh man, this plugin is damn near perfect! Really stable on my linux server, no errors in log. Bravo! This is just what I've been looking for! I'll give it a few more days of testing to see how people like it. But so far, everyone loves it!

    Edit: forgot to add for 6... Yes it works on Versus. As for "survivor_upgrades 1", I already had it enabled so I'm not sure if it's needed or not.
    Not request apparently and fixed bugs with not the survivor_upgrades 1
    __________________


    Number Six is offline
    Jerrith
    Junior Member
    Join Date: Jun 2009
    Old 06-23-2009 , 01:15   Re: Survivor Upgrades
    Reply With Quote #5

    Thanks for the feedback, glad it works on Linux. I wanted to have support for both platforms without a config file for the signatures. It turns out that if you try and set it up for Windows first, and if that fails, Linux, everything is good. (Do it the other way though (linux, then windows) and you get a crash on Windows.)

    The plugin does require survivor_upgrades 1, but it tries to set it automatically for you.

    There's one L4D debug message that I missed catching, "#L4D_NOTIFY_VOMIT_ON" when someone with the prevent_it / raincoat upgrade gets vomited on. I suspect it uses a different UserMsg to broadcast that text.

    I'm not sure why the tank bonuses don't work during a finale... The events (such as tank_killed) don't seem to get called.

    Lastly, there is one annoying bug I'm still trying to track down: If a player quits and a bot takes over, that bot gets a fresh set of 3 upgrades. It doesn't usually make a huge difference (since bots aren't very smart anyways) but I'm still hoping to track it down.
    Jerrith is offline
    Naow
    Senior Member
    Join Date: Feb 2009
    Old 06-23-2009 , 06:58   Re: Survivor Upgrades
    Reply With Quote #6

    This plugin looks fun but I would like to use it in versus game , however , I think some upgrades are going to be too unbalanced (like fast reloading or knife)
    It would be cool if we could select which upgrades are eligible.

    Anyway great work , you should combine this plugin with proboomer's plugin
    Naow is offline
    Number Six
    Senior Member
    Join Date: Dec 2008
    Old 06-23-2009 , 14:22   Re: Survivor Upgrades
    Reply With Quote #7

    Quote:
    Originally Posted by Naow View Post
    This plugin looks fun but I would like to use it in versus game , however , I think some upgrades are going to be too unbalanced (like fast reloading or knife)
    It would be cool if we could select which upgrades are eligible.

    Anyway great work , you should combine this plugin with proboomer's plugin
    Correct on normal versus , really need limited upgrades , but on a extrem versus 8x8 with mega hordes & Co. , necessary upgrades lol
    __________________


    Number Six is offline
    AtomicStryker
    Veteran Member
    Join Date: Apr 2009
    Location: Teutonia!!
    Old 06-23-2009 , 15:29   Re: Survivor Upgrades
    Reply With Quote #8

    Request: Can you do a Plugin that enables _only_ Laser Sight?

    Also, could someone post a Screenie, how does that look ingame? (First and Third person)
    AtomicStryker is offline
    Jerrith
    Junior Member
    Join Date: Jun 2009
    Old 06-23-2009 , 16:27   Re: Survivor Upgrades
    Reply With Quote #9

    You can already do laser sight only: Just set all the cvars listed in config except for surup_always_laser to 0.

    I'll look into adding the ability to disable specific upgrades - it shouldn't be too difficult.
    Jerrith is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 06-23-2009 , 18:09   Re: Survivor Upgrades
    Reply With Quote #10

    Please put [L4D] in the title, it makes it easier to scan the list of topics and identify the ones I care about.
    Thraka 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 19:30.


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