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

[L4D & L4D2] Barricades - Doors and Windows (1.21) [07-Dec-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
8074
Plugin Version:
1.21
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Allows Survivors to create Barricades in broken doorways, window frames and breakable walls.
    Old 06-02-2022 , 19:23   [L4D & L4D2] Barricades - Doors and Windows (1.21) [07-Dec-2022]
    Reply With Quote #1






    About:
    • Create up to 4 barricades where doors, windows and breakable walls have been broken.
    • Supports double doors and large windows with a larger plank.
    • Barricades can be built on fallen saferoom doors (requires the "Saferoom Door Spam Protection" plugin with auto fall enabled).
    • Cvars to customize build time and delays.
    • Cvars to customize plank health and shove damage.
    • Data config and commands to add barricade positions to existing frames with no doors or windows.
    • Data config provided adding barricades to many open doorways and breakable walls on all L4D2 official Valve maps.



    Issues:
    • No cost system for building. Please do not request. If someone wants to write a system it can be added in.
    • Double doors which are not linked together and act individually build single size barricades. L4D2 c1m1 map has this for example. This plugin now contains a fix to pair the doors so they open and close together, allowing the plugin to use the larger plank. Please report maps and locations where double doors are individually controlled.
    • Some doors or windows may cause planks to spawn in the wrong direction. This might not be fixable on some maps. Please report which map and location if you see this happening.
    • Server console spam: "prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file" - to block these messages use Cleaner - Console warning supressor or Console Spam Patches plugin.
    • L4D2: Survivor bots try to use/open the planks like they are doors (the classname for planks is changed to doors after spawn so the infected would attack them).
    • L4D1: Infected do not attack the planks.



    Adding Barricade Locations:
    You can save custom positions to build barricades. These are saved to "l4d_barricade.cfg" in the servers \addons\sourcemod\data\ folder.

    There are two methods for adding an area to build barricades:

    1. On breakable props such as walls that zombies can destroy or certain windows.
    • Find a breakable wall, these can be found in Versus mode with the yellow Infected texture flashing on walls.
    • Aim at the prop and use the command "sm_barricade_add -1" for small gaps/planks or "sm_barricade_add -2" for larger gaps/planks.
    • These can be added to other breakable props such as windows which the plugin does not automatically account for.
    • To delete from the config, you must be aiming at the prop it was added from.

    2. Between empty door frames, empty window frames or open garage doors.
    • Find an empty door frame, window or garage.
    • For small gaps e.g. single doors and small windows, stand in the center and face one of the frame sides, then use the command "sm_barricade_add 1".
    • For large gaps e.g. double doors, stand against one side of the frame, aim at the other side and use "sm_noclip" to slightly move back into the frame, then use the command "sm_barricade_add 1".
    • It might take some attempts to get the planks to visibly touch both sides, so recommend always testing by creating the planks. You can use the command "sm_barricade_del" to delete and try again.
    • To delete from the config, you must be near to where you saved the position.


    Thanks:
    • Maur0 - For the request.
    • Toranks - Lots of help testing.
    • gongo - Lots of help testing.
    • NoroHime - Chinese translations.



    Admin Commands: (requires "z" flag)

    PHP Code:
    sm_barricade_add       // Adds a place for barricades to the data config. Usage: sm_barricade_add <plank type: -1=Small breakable (aim at wall). -2=Large breakable (aim at wall). 1=Small planks (back to wall), 2=Large planks (back to wall)>.
    sm_barricade_del       // Deletes a data config entry when nearby to the position it's saved. Must be next to the one of the frame sides.
    sm_doors_glow          // L4D2 only. Debug testing command to show all doors.
    sm_winds_glow          // L4D2 only. Debug testing command to show all windows.
    sm_walls_glow          // L4D2 only. Debug testing command to show all breakable walls. This creates many entities to show the glow. 

    Cvars:

    Saved to l4d_barricade.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // 0=Plugin off, 1=Plugin on.
    l4d_barricade_allow "1"

    // 0=Default game damage. Amount of damage to cause to planks when shoved by a Common Infected.
    l4d_barricade_damage_common "250"

    // 0=Default game damage. Amount of damage to cause to planks when shoved by a Special Infected.
    l4d_barricade_damage_infected "250"

    // 0=Default game damage. Amount of damage to cause to planks when shoved by a Survivor.
    l4d_barricade_damage_survivor "250"

    // 0=Default game damage. Amount of damage to cause to planks when shoved by a Tank.
    l4d_barricade_damage_tank "0"

    // Empty string = allow everyone. Otherwise only users with one of these flags can build barricades.
    l4d_barricade_flags ""

    // Health of each plank.
    l4d_barricade_health "500"

    // 1=USE key. 2=CTRL + USE keys. 3=SHIFT + USE keys. Which key combination to build a barricade.
    l4d_barricade_keys "1"

    // Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
    l4d_barricade_modes ""

    // Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
    l4d_barricade_modes_off ""

    // Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
    l4d_barricade_modes_tog "0"

    // Range required by Survivors to an open doorway to create planks. Large values may affect other nearby doorways.
    l4d_barricade_range "100.0"

    // How long does it take to build 1 plank. Use whole numbers only, must be 1 or greater.
    l4d_barricade_time "5"

    // How long must someone be holding +USE before building starts.
    l4d_barricade_time_press "0.3"

    // How long after building a plank to make the player wait until they can build again.
    l4d_barricade_time_wait "0.5"

    // 1=Doors. 2=Windows. 4=Breakable Walls. 8=Saferoom Doors (requires "Saferoom Door Spam Protection" plugin with falling door enabled). 15=All. Where can barricades be built. Add numbers together."
    l4d_barricade_types "7"

    // 0=Off. The chance out of 100 for the Survivor to vocalize when building a plank.
    l4d_barricade_vocalize "30" 


    Changes:
    Code:
    1.21 (07-Dec-2022)
        - Fixed the Tanks damage not being considered. Thanks to "a2121858" for reporting.
    
    1.20 (28-Oct-2022)
        - Added optional translations support. Requested by "NoroHime".
    
    1.19 (27-Jun-2022)
        - Fixed custom spawn locations not loading on round restarts. Thanks to "gongo" for reporting.
    
    1.18 (24-Jun-2022)
        - Added cvar "l4d_barricade_vocalize" to vocalize when building. Thanks to "gongo" for the suggestion.
        - Fixed building barricades on the last saferoom door. Thanks to "gongo" for reporting.
        - Fixed cvar "l4d_barricade_types" not working correctly. Thanks to "gongo" for reporting.
    
    1.17 (22-Jun-2022)
        - Fixed the saferoom doors not building barricades.
    
    1.16 (21-Jun-2022)
        - Changed cvar "l4d_barricade_types" to allow building barricades where Saferoom Doors fall. Requires plugin the "Saferoom Door Spam Protection" with falling door enabled.
        - L4D1: Fixed the progress bar not displaying.
        - L4D1: Fixed the barricades falling. Thanks to "CrazMan" for reporting.
    
    1.15 (21-Jun-2022)
        - New feature: Building barricades on breakable walls!
        - Data config updated adding barricades to many open doorways and breakable walls on all L4D2 official Valve maps.
    
        - Added command "sm_barricade_reload" to reset the plugin and reload the data config.
        - L4D2: Added command "sm_walls_glow" to show where breakable walls are. Note: this creates many "prop_physics" with door models for the glow.
        - L4D1: Fixed the barricades falling to the ground. Thanks to "CrazMan" for reporting.
    
    1.14 (20-Jun-2022)
        - Added a data config to specify positions where there are no doors to allow building barricades in that spot.
        - Added commands "sm_barricade_add" and "sm_barricade_del" to save and delete entries from the data config.
        - L4D2: Plugin now hides the weapon world model when building a barricade.
        - L4D2: Tanks now attack the planks. Thanks to "Lux" for finding the solution.
        - L4D2: Special Infected now attack the planks.
    
    1.13 (16-Jun-2022)
        - Changed cvar "l4d_barricade_keys" to set accept SHIFT + USE.
    
    1.12 (09-Jun-2022)
        - Added some door models to prevent building barricades on them.
    
    1.11 (08-Jun-2022)
        - L4D2: Fixed the building animation not ending when releasing the USE button or after progress bar has finished.
    
    1.10 (07-Jun-2022)
        - L4D2: Fixed the progress bar not ending correctly.
        - L4D2: Fixed another possible bug of players getting stuck.
    
    1.9 (07-Jun-2022)
        - L4D2: Fixed the new progress bar creating a solid random model. Thanks to "gongo" for reporting.
        - L4D2: Potentially fixed players getting stuck when the progress bar is destroyed.
        - Changed some cvars to have a minimum value of 0.1, to prevent potential issues with spamming USE.
    
    1.8 (07-Jun-2022)
        - L4D2: Fixed the double door fix not working from map start.
    
    1.7 (07-Jun-2022)
        - Added cvar "l4d_barricade_keys" to set the key combination. Requested by "xZk".
        - Fixed building a barricade when reviving someone. Thanks to "gongo" for reporting.
        - L4D2: Progress bar changed to timed button with custom text. Thanks to "xZk" for the method.
    
    1.6 (05-Jun-2022)
        - Optimized cvar "l4d_barricade_flags" flag checking.
    
    1.5 (04-Jun-2022)
        - Added cvar "l4d_barricade_flags" to only allow users with specific flags to build barricades. Requested by "Maur0".
        - Added more windows that can be barricaded. Thanks to "Maur0" for reporting.
    
    1.4 (03-Jun-2022)
        - L4D1: Fixed the planks not showing, however Infected do not attack the barrier. Thanks to "finishlast" for reporting.
    
    1.3 (03-Jun-2022)
        - Fixed some issues regarding plank health.
    
    1.2 (03-Jun-2022)
        - Fixed some plank placements being wrong with certain doors and windows.
    
        - Plugin will now auto link some known individual double doors (currently only L4D2: "c1m1_hotel").
        - This will make the doors open together instead of individually, this is an easier than larger plugin modification to create a workaround.
        - If double doors open individually (which then creates small plank barricades), please report to me the map and location to fix.
        - If admins don't want the doors linked, please request a cvar to block those known doors from being used for barricades.
    
    1.1 (03-Jun-2022)
        - Common infected now attack the planks!
        - Plugin now supports building barricades in broken Window frames.
        - Plugin renamed to "Barricades - Doors and Windows".
        - All cvars renamed.
    
    1.0 (01-Jun-2022)
        - Initial release.


    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    2. Optionally download the "l4d_barricade.cfg" data config into your servers \addons\sourcemod\data\ folder.
    3. Optionally download the "translations.zip" archive and extract the \translations\ folder to your servers sourcemod folder \addons\sourcemod\ folder.

    Updating from 1.17 or older:
    • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

    Current Translations: English (en), Simplified Chinese (zho), Traditional Chinese (chi).
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_barricade.sp - 603 views - 67.2 KB)
    File Type: cfg l4d_barricade.cfg (23.1 KB, 557 views)
    File Type: zip translations.zip (1.3 KB, 387 views)
    __________________

    Last edited by Silvers; 12-07-2022 at 11:24.
    Silvers is offline
    Maur0
    Senior Member
    Join Date: Aug 2020
    Old 06-02-2022 , 22:54   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #2

    Cool! Now it is being completed better.

    I have two things to clarify:

    1) When I put the value for the Common l4d_barricade_damage_common "60" having 500HP the planks. And when a Common tries to damage a plank, it breaks instantly instead of taking 60 damage as I put it in the command.

    2) What kind of windows can I put the boards on? Because it went to the final Death Toll map and I looked at the boathouse windows, and nothing happened. So I wanted to know what kind of windows allows to add the planks.

    The rest is impeccable. Thank you very much for all your work!
    Maur0 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-02-2022 , 23:17   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #3

    Next version will fix some window positions I noticed were wrong. Only windows and doors that can be broken, then the planks can be placed. Empty door frames and window frames cannot be built on because there was no entity to find the relative position. Will look into damage issue.
    __________________
    Silvers is offline
    Maur0
    Senior Member
    Join Date: Aug 2020
    Old 06-02-2022 , 23:58   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #4

    Quote:
    Originally Posted by Silvers View Post
    Next version will fix some window positions I noticed were wrong. Only windows and doors that can be broken, then the planks can be placed. Empty door frames and window frames cannot be built on because there was no entity to find the relative position. Will look into damage issue.
    Thank you very much. I really appreciate your effort.
    Maur0 is offline
    sonic155
    Senior Member
    Join Date: Mar 2019
    Old 06-03-2022 , 00:47   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #5

    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    sonic155 is offline
    Toranks
    Senior Member
    Join Date: Dec 2021
    Location: Spain
    Old 06-03-2022 , 10:11   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #6

    Quote:
    Originally Posted by sonic155 View Post
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    prop_wall_breakable has Door model (models/props_debris/wood_board04a.mdl) with no door_options! Verify that SKIN is valid, and has a corresponding options block in the model QC file
    I think this is necessary for the commons to attack the plancks. It has no consequences. If it's annoying, you can add those lines to Cleaner, so you won't see those on the console.

    Last edited by Toranks; 06-03-2022 at 10:17.
    Toranks is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 06-03-2022 , 11:22   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #7

    Hi there,

    I tried 1.1 in l4d1 and I only see the progress bar.
    Building barricade...
    When I hold use key it goes 100% and then restarts goes up to 100% and so on.

    No barricade appears and no error in log.

    Used stock settings in cfg
    __________________

    Last edited by finishlast; 06-03-2022 at 11:23.
    finishlast is offline
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 06-03-2022 , 11:53   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #8

    https://github.com/eyal282/l4d2-poin...ntSystemAPI.sp

    I can't finish it, but Point System API is definitely the best cost system for it.
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334
    eyal282 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-03-2022 , 12:15   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #9

    Quote:
    Originally Posted by finishlast View Post
    Hi there,

    I tried 1.1 in l4d1 and I only see the progress bar.
    Building barricade...
    When I hold use key it goes 100% and then restarts goes up to 100% and so on.

    No barricade appears and no error in log.

    Used stock settings in cfg
    Which map, which door/window?

    Try with this new version.

    Code:
    1.2 (03-June-2022)
        - Fixed some plank placements being wrong with certain doors and windows.
    
        - Plugin will now auto link some known individual double doors (currently only L4D2: "c1m1_hotel").
        - This will make the doors open together instead of individually, this is an easier than larger plugin modification to create a workaround.
        - If double doors open individually (which then creates small plank barricades), please report to me the map and location to fix.
        - If admins don't want the doors linked, please request a cvar to block those known doors from being used for barricades.
    __________________

    Last edited by Silvers; 06-03-2022 at 13:18.
    Silvers is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 06-03-2022 , 14:05   Re: [L4D & L4D2] Barricades - Doors and Windows (1.1) [03-Jun-2022]
    Reply With Quote #10

    Quote:
    Originally Posted by Silvers View Post

    Which map, which door/window?
    First right window Dead Air greenhouse
    First window up the hill in sacrafice
    First door no mercy

    Never seen the barricade anywhere actually.
    Just the progress going 100% then start again to 100% and so on.

    But its l4d1. No change with 1.3
    __________________

    Last edited by finishlast; 06-03-2022 at 14:06.
    finishlast 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 04:14.


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