Raised This Month: $51 Target: $400
 12% 

[L4D2] Wounded Commons [v1.0.0 | 26-February-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7513
Plugin Version:
1.0.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    16 
    Plugin Description:
    Add wounds to common infected on spawn
    Old 02-25-2021 , 22:54   [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #1

    L4D2 ONLY

    L4D1 version here

    Description

    This plugin adds wounds to common infecteds on spawn.

    Wounds are damages to common infected bodies.

    You can check more detailed information HERE.

    Features
    • Allow setting the chance up to two wounds (max) on common infecteds.
    • Allow setting which wounds should be skipped in the spawn logic. (female/male/ceda/riot)
    • Allow spawning headless common infecteds.
    • Allow blowing the head when a common infected is hit on the head.

    Wounds Table
    • GRAY -> No wound
    • RED -> Excluded wounds (doesn't fit visually)
    • BLUE -> Headless wounds
    • BLACK -> Normal wounds

    Spoiler


    Cvars

    A configuration file named "l4d2_wounded_commons.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Behead a common infected every time it is hit on the head.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wounded_commons_behead_headshot "0"

    // Invalid wounds to apply on common infected spawn for CEDa models.
    // Use values between 0-9 separated by comma.
    // "-1" = OFF.
    // -
    // Default: "4,5,8,9"
    l4d2_wounded_commons_ceda_invalid "4,5,8,9"

    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wounded_commons_enable "1"

    // Invalid wounds to apply on common infected spawn for FEMALE models.
    // Use values between 0-46 separated by comma.
    // "-1" = OFF.
    // -
    // Default: "8,13,14,15,16,19,20,21,22,23,24"
    l4d2_wounded_commons_female_invalid "8,13,14,15,16,19,20,21,22,23,24"

    // Spawn headless common infected.
    // Note: CEDA and RIOT models can't be beheaded so a head wound is applied instead.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wounded_commons_headless "0"

    // Invalid wounds to apply on common infected spawn for MALE models.
    // Use values between 0-47 separated by comma.
    // "-1" = OFF.
    // -
    // Default: "8,14,15,16,17,20,21,22,23,24,25"
    l4d2_wounded_commons_male_invalid "8,14,15,16,17,20,21,22,23,24,25"

    // Invalid wounds to apply on common infected spawn for RIOT models.
    // Use values between 0-13 separated by comma.
    // "-1" = OFF.
    // -
    // Default: "3,4,5"
    l4d2_wounded_commons_riot_invalid "3,4,5"

    // Chance to apply a random wound on common infected spawn.
    // Use the first wound slot.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_wounded_commons_wound1_chance "100"

    // Chance to apply a random wound on common infected spawn.
    // Use the second wound slot.
    // Doesn't repeat the first wound slot.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_wounded_commons_wound2_chance "100" 
    Change Log

    Spoiler


    Admin Commands
    • sm_wound1 => Set the first wound value of the target common infected at crosshair. Increment the value by one when no args are specified (starting from -1 on new targets). Example: no args -> sm_wound1 / with args -> sm_wound1 8. (z flag required)
    • sm_wound2 => Set the second wound value of the target common infected at crosshair. Increment the value by one when no args are specified (starting from -1 on new targets). Example: no args -> sm_wound2 / with args -> sm_wound2 8. (z flag required)
    • sm_woundinfo => Output to the chat the gender and wound values of the target common infected at crosshair. (z flag required)
    • sm_print_cvars_l4d2_wounded_commons => Print the plugin related cvars and their respective values to the console. (z flag required)

    Notes
    • Plugin don't work on clients with z_wound_client_disabled cvar set to 1.
    • Plugin may not affect clients that use "low violence" (-lv) settings.
    • Jimmy Gibs don't have wounds, even setting a value, nothing will change.
    • The wounds are grouped in 4 groups (min-max wound value): Female (0-46) / Male (0-47) / Ceda (0-9) / Riot (0-13).
    • The default disabled wounds are related to wounds that looks weird. (e.g: without upper/lower body or missing legs).
    • Sometimes you can see an organ floating next to the common infected.
    • The headless cvar seems to not work sometimes. (I didn't found a cause)
    • Ceda and Riot models don't have beheaded wounds.
    • There are no changes to hitboxes, headless zombies can still be killed with headshots.
    • L4D1 doesn't have the wound netprop (m_iRequestedWound1/m_iRequestedWound2) that's why it is not supported in this plugin.

    Valve docs

    Related Plugins

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d2_wounded_commons.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_wounded_commons.sp - 463 views - 25.9 KB)
    __________________

    Last edited by Marttt; 01-15-2023 at 12:19.
    Marttt is offline
    DWBoyGamer
    New Member
    Join Date: Jan 2021
    Old 02-27-2021 , 12:26   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #2

    Could you make pistols/smgs be able to gib common infected just like all other weapons can?
    DWBoyGamer is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 02-27-2021 , 13:31   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #3

    Great job man
    Krufftys Killers is offline
    Alex101192
    Senior Member
    Join Date: Aug 2018
    Old 03-01-2021 , 11:29   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #4

    Hey Martt nice plugin. But I am wondering, do wounded commons have less health because of they wounds? Or is it just visual?
    Alex101192 is offline
    sxtszx
    Junior Member
    Join Date: Sep 2020
    Old 03-01-2021 , 13:03   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #5

    Very interesting plugin and this will definitely add to the gory feature of this game. Thanks for the dev&implementation.

    I tested it on my Linux server and here's what I observed.
    Testing condition: SM1.11, only plugin enabled: "[L4D2] Wounded Commons" (1.0.0) by Mart
    Observations:
    1. With l4d2_wounded_commons_headless "0", headless zombies will still spawn sometimes
    2. With l4d2_wounded_commons_behead_headshot "1", headshotting (with gun or melee) zombies rarely beheads them
    3. When spawning a common (using admin system), sometimes they spawn with additional limb appearing in the air and falling to the ground (e.g. a zombie with 2 arms is spawned but also a third arm falling to the ground)
    4. The common now does not gib at all (with guns or melee), they die in the same condition as they were spawned
    5. This is not necessary but for the convenience of a general user, but it'd be great to have a tabulation of wounds & their wound number so users can choose what wound types to turn off. (for example, I do not like the wound type where half of a zombie's body is chopped off, they now feel flimsy to me)

    Last edited by sxtszx; 03-01-2021 at 13:10.
    sxtszx is offline
    Voevoda
    Senior Member
    Join Date: Aug 2016
    Old 03-02-2021 , 15:17   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #6

    Hi Mart

    if I put 2 these plugins will not conflict?

    l4d2_wounded_commons
    and
    l4d_mutant_zombies
    Voevoda is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 03-07-2021 , 12:07   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #7

    @DWBoyGamer,
    I did some research and the method to make it gib is totally different from this plugin, If I have some free time I may try to do something.

    @Alex101192,
    The wounds are just a visual feature, they don't change the common infected health.

    @Voevoda,
    There is no reason for them to conflict, you can use both safely.

    @sxtszx,
    Thanks for the feedback, here are my replies:
    • 1) Headless zombies will still appear even with this cvar set to "0", if you want remove them completely (on spawn), add their respective values to the invalid cvars.
      I added them as blue in the Wounds Table, but probably you would only need change for female/male.
    • 2) No issues found, I did some tests and all headshots beheaded them. It uses the HITGROUP_HEAD on infected_hurt to detect if it should behead or not.
    • 3) This can also be reproduced with the "z_spawn z" console command in listen servers
      Nothing that can be done related to body parts falling to the ground (AFAIK), this is how the animation/engine works.
      But you can try to filter the wounds that do that and add them to their respective invalid cvars.
      Btw, you are not supposed to spawn zombies on front manually in a normal game.
    • 4) This is how the game works, commons has two wounds slots, if both are in use (value != -1) then no changes are applied.
      You can set the "l4d2_wounded_commons_wound2_chance" cvar to "0", so will always have an extra slot to be used. (not tested)
    • 5) I added a Wounds Table to the main post.
      I didn't make a wound table before cause on TLS update some values changed (from what I remember), also the table is kinda big.
      Also added all half body to the respective invalid cvars, now they shouldn't appear on spawn anymore.
      You can always test the wounds values by aiming to a common infected and typing "!wound1 <value>" in chat.
      This is how I did my tests and found all values.
    __________________

    Last edited by Marttt; 03-07-2021 at 15:26.
    Marttt is offline
    sxtszx
    Junior Member
    Join Date: Sep 2020
    Old 03-16-2021 , 14:13   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #8

    Quote:
    Originally Posted by Marttt View Post


    @sxtszx,
    Thanks for the feedback, here are my replies:
    • 1) Headless zombies will still appear even with this cvar set to "0", if you want remove them completely (on spawn), add their respective values to the invalid cvars.
      I added them as blue in the Wounds Table, but probably you would only need change for female/male.
    • 2) No issues found, I did some tests and all headshots beheaded them. It uses the HITGROUP_HEAD on infected_hurt to detect if it should behead or not.
    • 3) This can also be reproduced with the "z_spawn z" console command in listen servers
      Nothing that can be done related to body parts falling to the ground (AFAIK), this is how the animation/engine works.
      But you can try to filter the wounds that do that and add them to their respective invalid cvars.
      Btw, you are not supposed to spawn zombies on front manually in a normal game.
    • 4) This is how the game works, commons has two wounds slots, if both are in use (value != -1) then no changes are applied.
      You can set the "l4d2_wounded_commons_wound2_chance" cvar to "0", so will always have an extra slot to be used. (not tested)
    • 5) I added a Wounds Table to the main post.
      I didn't make a wound table before cause on TLS update some values changed (from what I remember), also the table is kinda big.
      Also added all half body to the respective invalid cvars, now they shouldn't appear on spawn anymore.
      You can always test the wounds values by aiming to a common infected and typing "!wound1 <value>" in chat.
      This is how I did my tests and found all values.
    Thanks a lot for looking into these. Some feedbacks based on your suggestions.

    (1). I added both no head(explode) and no head(cut) to the invalid cvars (female/male) and that seems to stop headless zombies spawn.

    (2)-(4). I grouped these items together since it's easier to describe them altogether.
    In order to retain the gibs effect on common when you melee their legs/arms/heads, I've turned off the 2nd wound (wound2_chance -> 0). This seems to generate gibs again but noticeably less frequent than when you have both wounds chance to 0. I'm not sure how difficult this will be, but is there an easy way to reserve 2nd wounds for limbs gibs only? This is only an idea.

    (5). That's very convenient. A strange observation occurred where I use !sm_wound1 to go through wound types on a spawned common. The wound types sometimes will not take visual effect on the common even though their wound cvar does changes (confirmed by using !sm_woundinfo).
    sxtszx is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 03-16-2021 , 16:54   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #9

    Thanks for the reply @sxtszx,

    I added the HEAD (EXPLODE/CUT) to the default invalid list too (had forgotten), thanks. You don't need to change since you already have done it.

    About the generated wounds I don't know how is the game logic behind it, no much documentation so far, probably I won't be able to find a better behaviour/fix for that.

    And finally, the !sm_wound1 command doesn't change the visual if you use an invalid wound value (less than 0 or higher than the max wound for each model). Also, you need to have the common at your crosshair, so the command can work properly. It is only for debugging purposes, which I had used a lot to detect each wound. I usually aim to a common, type "!sm_wound -1" (to start from -1), then I keep aiming and typing "!sm_wound" (that will increment the previous value by 1) until the max value.

    Maybe you have found some model that doesn't use the "default" logic or some addon (.vpk) is corrupting it, if this is the case I need to know which model and wound value the zombie was during the test. (like CEDA and RIOT have different values)
    __________________
    Marttt is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 03-18-2021 , 07:18   Re: [L4D2] Wounded Commons [v1.0.0 | 26-February-2021]
    Reply With Quote #10

    Quote:
    Originally Posted by Marttt View Post
    L4D2 ONLY

    You can check more detailed information HERE.
    wow, where hell did you found that doc? ^^
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas 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 13:11.


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