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

[L4D2] Medkit Density (2010-06-18)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
cigs
Senior Member
Join Date: Jul 2006
Plugin ID:
1535
Plugin Version:
1.5
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Removes, replaces, doubles or leaves medkits at start, checkpoints and in the outdoors
    Unapprover:
    Reason for Unapproving:
    Precaching in OnPluginStart: will lead to crashes
    Old 03-18-2010 , 11:04   [L4D2] Medkit Density (2010-06-18)
    Reply With Quote #1

    [L4D2] Medkit Density

    This plugin can remove, replace, change the amount of medkits at the start of a campaign in coop, at start of every map in versus, at safehouses and in the outdoors. When opting to replaced medkits, they can be replaced with either pills or defibrillators.

    This plugin can be enabled in Versus/TeamVersus only or in Coop/Realism/Versus/TeamVersus alltogether for multicoop server that welcome more than the default 4 kits per safe area.

    If you need different settings per gamemode, use Thraka's Game Mode Config Loader to change the settings accordingly, though make sure sm_medkitdensity_versusonly is set to 0 then.

    The default configuration is ideal for an 8coop game, where the survivors start out with 8 medkits at start and 12 medkits in each saferoom and each medkit found outdoors will contain 2 medkits. (12 in saferoom because the first 4 survivors to arrive in the saferoom usually heal up and take a 2nd healthkit)

    This has been tested as working on L4D2 in coop gamemode. It is not tested in a versus game, but should work fine. Please report if you experience any issues.

    Installation

    Download the "l4d2medkitdensity.smx" and drop into your addons\sourcemod\plugins directory.
    Once the plugin is loaded for the first time, it will create a "l4d2medkitdensity.cfg" file in left4dead2\cfg\sourcemod directory where you can change the ConVars noted below.
    Prior to installing newer version, delete the old files.

    ConVars

    // Should the plugin be on? 1[on] 2[off]
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_md_enabled "1"

    // What to do with each medkit outdoors? 0[do nothing] 1[use sm_md_outdoors_medkitcount] 2[remove medkits] 3[replace with pills] 4[replace with defibrillators] 5[infinite]
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "5.000000"
    sm_md_outdoors "1"

    // With how many medkits should each medkit in the outdoors be replaced?
    // -
    // Default: "2"
    // Minimum: "2.000000"
    // Maximum: "10.000000"
    sm_md_outdoors_medkitcount "2"

    // What to do with medkits in saferooms? 0[do nothing] 1[use sm_md_checkpoint_medkitcount] 2[remove medkits] 3[replace with pills] 4[replace with defibrillators] 5[infinite] 6[replace 1 medkit with 1 defibrillator]
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "6.000000"
    sm_md_saferoom "1"

    // In saferooms, replace medkits with how many medkits?
    // -
    // Default: "12"
    // Minimum: "4.000000"
    // Maximum: "20.000000"
    sm_md_saferoom_medkitcount "12"

    // What to do with medkits at the start? (coop: start of campaign)(versus: start of every map) 0[do nothing] 1[use sm_md_start_medkitcount] 2[remove medkits] 3[replace with pills] 4[replace with defibrillators] 5[infinite medkits] 6[change 1 medkit to 1 def
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "6.000000"
    sm_md_start "1"

    // At start, replace medkits with how many medkits?
    // -
    // Default: "8"
    // Minimum: "4.000000"
    // Maximum: "20.000000"
    sm_md_start_medkitcount "8"

    // Change medkit density in versus games only? 0[coop,realism,versus,teamversus] 1[versus,teamversus]
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_md_versusonly "0"

    start: the 4 medkits at start of campaign in coop, or start of every map in versus
    saferoom: the 4 medkits in the saferoom
    outdoors: all medkits spread accross the map (that are not at start and not in a saferoom)

    Changelog:

    v1.5
    - added FCVAR_NOTIFY cvar flags to all cvars
    - added ability to have infite medkits at start, saferoom and outdoors
    - removed round_freeze_end event, applied different method

    v1.4 (636 views)
    - remove abilities to double, tripple or quadruple medkitcount at start, checkpoints and outdoors
    - added ability to set a specified amount of medkits at start and checkpoints
    - added ability to replace each outdoor medkit with specified amount of medkits
    - fixed case where random outdoor medkit was treated like a saferoom medkit
    - changed method of spawning saferoom medkits to gradually spawning
    - changed the method of finding entities
    - sm_md_start now effects every medkit at start of every map in versus games

    v1.3.2 (204 views)
    - fixed a bug where a survivor has his medkit removed from him/her
    - other minor changes

    v1.3.1 (24 views)
    - applied another way to carry over the correct amount of medkits at checkpoint to next map
    - added a reset on closest medkit location on mapchange
    - changed convar limits for tripple, quadruple and 1defib+3medkits to work

    v1.3 (18 views)
    - really fixed carrying over the correct amount of medkits at checkpoint to next map
    - fixed replacing some outdoor medkits that the director spawned late into the game
    - added the abilities to tripple or quadruple medkitcount at start, checkpoints and outdoors
    - added the ability to replace 1 of 4 medkits with 1 defibrillator at start and checkpoints

    v1.2 (25 views)
    - fixed carrying over the correct amount of medkits at checkpoint to next map

    v1.1 (12 views)
    - set convar min and max limits
    - fixed issue with spawning too many medkits

    v1.0 (6 views)
    - Initial Release
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2medkitdensity.sp - 6471 views - 19.0 KB)

    Last edited by cigs; 06-18-2010 at 04:54. Reason: new version
    cigs is offline
    HowGentle
    Member
    Join Date: Feb 2010
    Old 03-18-2010 , 12:20   Re: [L4D2] Medkit Density
    Reply With Quote #2

    I tested it on my dedicate sever.(realism mode, maxplayers 7)
    but there's some bugs.

    when first map(ex: c1m1) end, start second map(ex :c1m2), there's many many many medkit in saferoom.(over hundred! so my sever is down)

    when last map clear(ex : c1m4) and go next missions(ex : c2m1), there's only 4 medkit in startline.

    my convar is
    sm_medkitdensity_versusonly 0
    sm_medkitdensity_start 4
    sm_medkitdensity_checkpoint 4
    sm_medkitdensity_outdoors 0
    HowGentle is offline
    cigs
    Senior Member
    Join Date: Jul 2006
    Old 03-18-2010 , 16:29   Re: [L4D2] Medkit Density
    Reply With Quote #3

    new version 1.1
    __________________
    cigs is offline
    HowGentle
    Member
    Join Date: Feb 2010
    Old 03-18-2010 , 18:41   Re: [L4D2] Medkit Density
    Reply With Quote #4

    Thaks for update.
    Another bug report.
    Test it on realism mode, 7 survivor(1=me, 6=bot)

    When survivor reached safehouse, and go next map, Medkit which survior pack on ther back is gone.

    my convar is
    sm_medkitdensity_versusonly 0
    sm_medkitdensity_start 4
    sm_medkitdensity_checkpoint 4
    sm_medkitdensity_outdoors 0
    HowGentle is offline
    cigs
    Senior Member
    Join Date: Jul 2006
    Old 03-18-2010 , 18:46   Re: [L4D2] Medkit Density
    Reply With Quote #5

    The plugin doesn't handle anything with medkits that survivors are holding/carrying. So, if a survivorbot took a medkit and the next map is loaded, the bot should still have that medkit. Unless the plugin that handles your extra survivorbots interferes somewhere.

    Why not test it with 7 people, and see if they all lost their medkits. There's a big chance they will still have them.
    __________________

    Last edited by cigs; 03-18-2010 at 18:51.
    cigs is offline
    Acecombat2
    Senior Member
    Join Date: Nov 2009
    Old 03-18-2010 , 22:31   Re: [L4D2] Medkit Density
    Reply With Quote #6

    aha can tell me where the checkpoint and outdoors i don't understand that part O.O
    __________________
    I'm Noob So Please Don't Criticise me (Fail In Engglish)
    Acecombat2 is offline
    cigs
    Senior Member
    Join Date: Jul 2006
    Old 03-18-2010 , 23:05   Re: [L4D2] Medkit Density
    Reply With Quote #7

    start: the 4 medkits at beginning of campaign
    checkpoint: the 4 medkits in the saferoom
    outdoors: all medkits spread accross the map (that are not at start and not in a saferoom)
    __________________
    cigs is offline
    HowGentle
    Member
    Join Date: Feb 2010
    Old 03-19-2010 , 05:26   Re: [L4D2] Medkit Density
    Reply With Quote #8

    I tested with 4 survivor.
    when survivor reached saferoom with carrying 4 medkit, there's 8 Medkit in saferoom.
    But after loading next map, there's a only 4 medkit in saferoom.(4 Medit in the saferoom were gone.)
    (Medkit which survior carrying is not gone in this case.)

    I set
    sm_medkitdensity_versusonly 0
    sm_medkitdensity_start 4
    sm_medkitdensity_checkpoint 4
    sm_medkitdensity_outdoors 0

    Last edited by HowGentle; 03-19-2010 at 05:56.
    HowGentle is offline
    Acecombat2
    Senior Member
    Join Date: Nov 2009
    Old 03-19-2010 , 08:49   Re: [L4D2] Medkit Density
    Reply With Quote #9

    sometimes i see something fishy.

    in {tab} shows that bot doesn't have the medkit but on the model i saw 1
    thx for the explanation
    __________________
    I'm Noob So Please Don't Criticise me (Fail In Engglish)
    Acecombat2 is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 03-19-2010 , 08:58   Re: [L4D2] Medkit Density
    Reply With Quote #10

    Quote:
    Originally Posted by Acecombat2 View Post
    sometimes i see something fishy.

    in {tab} shows that bot doesn't have the medkit but on the model i saw 1
    thx for the explanation
    No Steam. No support.
    psychonic 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 00:24.


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