Raised This Month: $61 Target: $400
 15% 

[L4D2] Saferoom Naps: Spawn Next Map With 50 HP


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ConnerRia
Junior Member
Join Date: Mar 2018
Plugin ID:
6060
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Prevent metagaming in harder gamemodes. If you have less than 50hp, spawn in saferooms with 50hp.
    Old 03-27-2018 , 02:26   [L4D2] Saferoom Naps: Spawn Next Map With 50 HP
    Reply With Quote #1

    Saferoom Naps: Spawn Next Map With 50 HP

    Made for L4D2. Not tested on L4D, but will work if the survivors are considered client team 2.

    Intended for co-op gamemodes. The plugin code still executes on versus, but is totally obsolete: code is fired before map transition, but in versus survivors start new rounds on a clean slate with full health.


    Description
    A very simple plugin that sets players below 50 permanent hp to 50 hp (configurable) on the next map.

    In hard coop gamemodes, a popular strategy is to kill low health players at the end of each map so that they can respawn with 50health on the next map. In a game that emphasizes teamwork and surviving together, this is pretty jarring and immersion-breaking.

    My plugin fixes that by healing lowhealth players to 50hp - or the server's "z_respawn_health" value - and resetting their incap counter (times you can be incapped before going black-and-white) before the map transition. This makes the need to kill one another redundant.


    Cvars

    SafeRoomNaps_CanWeUseCustomValue
    //Default 0.
    If set to 1, allows you to input your own health value to set lowhp players to. Otherwise uses the "z_respawn_health" value, which is 50 by default.

    SafeRoomNaps_CustomSaferoomHealth
    //Default 50. (Unused)
    Only used if CanWeUseCustomValue is set to 1.

    SafeRoomNaps_RemoveBlackAndWhite
    //Default 1
    Self explanatory. Whether to remove blackandwhite. Enabled by default.

    SafeRoomNaps_TempHealthMultiplier
    //Default 0
    Float to multiply lowhp players' temporary health by. Its zero by default, meaning all temporary health is removed.

    SafeRoomNaps_VeryHealthyTempHealthMultiplier
    //Default 1
    Float to multiply healthy (those above the saferoomhp value) players' temporary health by. Its 1 by default, meaning all temporary health is kept. Set to 0 for consistency: if low health players lose their temp health after resting, why shouldnt high hp players do so too?


    Credits

    kaffaljidhma - Inspiration. They were the first to make a plugin addressing the issue. Sadly their code is super clunky and totally bork.

    disawar1 - Their Say Event plugin helped me find the correct event to hook to.
    Attached Files
    File Type: sp Get Plugin or Get Source (SaferoomNaps.sp - 429 views - 4.0 KB)
    File Type: smx SaferoomNaps.smx (6.5 KB, 147 views)

    Last edited by ConnerRia; 04-02-2018 at 02:37.
    ConnerRia is offline
    ShineKia
    Junior Member
    Join Date: Apr 2017
    Old 04-25-2018 , 21:11  
    Reply With Quote #2

    Noicee!

    After we take a saferoom nap, at the next chapter those who have had hp below 50 solid, would have 50 solid but the HUD is kinda bug, like shown in this pic:



    https://imgur.com/a/lhm0Cjx

    Last edited by arne1288; 04-27-2018 at 08:21. Reason: Merged four posts in a row, there is an Edit button if you need to add more information while you're still the last one posting in the thread
    ShineKia is offline
    joyist
    Junior Member
    Join Date: Apr 2018
    Old 06-03-2018 , 23:20   Re: [L4D2] Saferoom Naps: Spawn Next Map With 50 HP
    Reply With Quote #3

    Chinese translation, please ignore
    Attached Files
    File Type: sp Get Plugin or Get Source (SaferoomNaps-ch.sp - 185 views - 4.0 KB)
    joyist is offline
    KoMiKoZa
    Member
    Join Date: Dec 2017
    Location: Russia
    Old 01-06-2019 , 09:44   Re: [L4D2] Saferoom Naps: Spawn Next Map With 50 HP
    Reply With Quote #4

    Great idea, but as ShineKia has already mentioned, there's a graphical hp scale glitch.
    KoMiKoZa is offline
    KoMiKoZa
    Member
    Join Date: Dec 2017
    Location: Russia
    Old Yesterday , 09:29   Re: [L4D2] Saferoom Naps: Spawn Next Map With 50 HP
    Reply With Quote #5

    Quote:
    Originally Posted by ShineKia View Post
    After we take a saferoom nap, at the next chapter those who have had hp below 50 solid, would have 50 solid but the HUD is kinda bug
    With some great help from Dragokas, I present Saferoom Naps 2.0:

    Differences from the original:
    • Fixed graphical hp bugs.
    • Removed all temporary-health-related variables. Temporary hp will no longer be saved (it's a nap after all!).
    • Saved 3 original cvars:
    1. SafeRoomNaps_CanWeUseCustomValue
    2. SafeRoomNaps_CustomSaferoomHealth
    3. SafeRoomNaps_RemoveBlackAndWhite
    Attached Files
    File Type: smx SaferoomNaps2_0.smx (5.6 KB, 1 views)
    File Type: sp Get Plugin or Get Source (SafeRoomNaps2_0.sp - 4 views - 2.7 KB)
    File Type: inc SetHealthStock.inc (904 Bytes, 2 views)

    Last edited by KoMiKoZa; Yesterday at 09:46. Reason: Added .inc and precompiled .smx
    KoMiKoZa 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 04:41.


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