Barricade: Difference between revisions

From PZwiki
m (Made nail count clear, wikified formatting and corrected few typos)
m (Automated Formatting)
 
(64 intermediate revisions by 19 users not shown)
Line 1: Line 1:
{{Header|Project Zomboid|Tiles|Barriers}}
{{Page version|41.78.16}}
{{Infobox tile
|name=Barricade
|model=Tile_Wooden_Barricade.png
|icon=Tile Wooden Barricade.png
|mode2l=Tile Metal Bar Barricade.png
|icon2=Tile Metal BarBarricade.png
|model3=Tile_Metal_Sheet_Barricade.png
|icon3=Tile Metal Sheet Barricade.png
|function=Reinforces windows against [[zombie]]s.
}}
A '''barricade''' is a reinforcement made of wood or metal secured to a [[door]] or [[window]] as a defensive measure.


{{languages|Barricade}}
==Usage==
<div class="header" style="margin: 5px; align: right; background: #C3E4ED; padding: 13px; text-align: left; font-size: 100%; color:#000000; border: 1px solid #9AC0CD"> <!-- Code for Background Colour -->
Barricades are used to slow zombies' entry into an area, and are a first step to preventing attacks while [[Sleep|asleep]]. They can be found naturally in the game world, indicating where a survivor has barricaded a house. These houses often contain loot stashes from the previous occupants, who may still be inside.
<div style="float: right;background: #C3E4ED;border: 1px solid #9AC0CD; margin: -30pt -10.5pt">    '''Page Updated @ Version: 36.4'''    </div><!-- Code for Version Tag at top -->
<div style="float: left;background: #C3E4ED;border: 1px solid #9AC0CD; margin: -30pt -10.5pt">   '''Navigation''' - [[:Category:Main|Main Index]] -> [[:Category:The_Game_World|The Game World]] -> [[:Category:Items|Items]] -> [[:Category:Construction|Construction]] -> [[:Category:Carpentry|Carpentry]]/[[:Category:Metalwork|Metalwork]] -> [[{{PAGENAME}}]]   </div><!-- Code for Navigation Bar at top, special blank char's before '''Navigation''' to give space -->
A '''barricade''' is wood or metal placed onto a [[door]] or [[window]] as a defense measure. It's useful in controlling how quickly zombies are able to enter an area and is a essential requirement to keeping a house secure while sleeping.  


[[File:WindowBarricades.png|thumb|Ingame image of a Metal Sheet and Wooden Window Barricades - Build 36.40]]
Barricades will only slow down [[zombie]]s, not stop them. They are just one method of protecting a safehouse, and should be used alongside others.


Barricades can be found naturally in the game world where a former survivor has barricaded a house.  
As barricades make a lot of sound when attacked, they can be used to alert the [[player]] to a zombies presence.


Beware that sometimes these houses are full of zombies as the barricades keep them inside as well.
===Crafting===
Three materials can be used to create barricades: wooden planks, metal sheets, and metal bars.


== Barricading ==
{{Crafting/sandbox2
=== To Barricade ===
|barricade
To barricade an object with a wooden plank, you must have a [[Hammer|hammer]], a [[wooden plank]] and 2 [[nails|nails]] in your inventory.
|barricade_metal_bar
|barricade_metal_sheet
}}
With one of these combinations in the player's inventory, right-click a [[door]] or [[window]] and select '''"Barricade"''' from the drop-down menu.


To barricade an object with metal sheets, you must have a [[Welder|welder]], a [[Welding mask|welding mask]] and a [[Metal sheet|metal sheet]] in your inventory.
Barricades can be placed on both sides of a door or window.


To barricade an object with metal bars, you must have a [[Welder|welder]], a [[Welding mask|welding mask]] and three [[Metal bar|metal bars]] in your inventory.
To remove wooden barricades, a hammer or a [[crowbar]] can be used to quickly remove barricade planks. Metal barricades must be removed using a propane torch. Metal sheets, bars, and wooden planks can be retrieved, but nails are always lost.


Right click onto the selected [[door]] or [[window]] and this will bring up a drop down menu where you can choose to '''"Barricade"'''.
===Health===
Barricade health is dependent on the material used as well as the skill level of the builder. The barricade health can't be upgraded or repaired, other than taking them out and re-applying when damaged or a higher skill level is reached.


=== To undo a Barricade ===
{{Construction hp|barricade}}
If you wish to remove a wooden barricade, you will need to use a hammer, and you will get wood planks back.


If you wish to remove a metal sheet barricade, you will need to use a welder and welding mask, and once done you will get the metal sheet back.


At this time, (Build 36.40) metal bar barricades cannot be removed.
Barricaded doors or windows are undamaged until their barricades are fully destroyed, enhancing protection.


== Strength of Barricades ==
A wooden barricade's durability depends on the plank's condition. As it's damaged, so are the planks. To repair, replace damaged planks with fresh ones.


Wooden Barricade strength is dependent on the wooden plank that has been placed on the window. As the barricade becomes damaged, the planks themselves become damaged. To restore the health of the barricade, a fresh non-damaged plank must be placed after the older planks are taken down. Doors/Windows which are barricaded are protected from damage until the last wooden plank is removed either by the player or by zombie attack.
==Gallery==
<gallery>
WindowBarricades.png|In-game image of metal sheet and wooden window barricades (build 36.40)
</gallery>


A metal barricade currently (Version 36.4) is dependent on its HP and will simply break over time. (this is a assumption)
==History==
{| class="wikitable theme-red" width="550" style="text-align:center;"
|-
! Alpha ||
|-
| Build 36 || Introduction of Metal Barricades.
|-
| Build 27 || Occasional glitch occurs in which when unbarricading a window or door, the planks used will not go back into the player's inventory and will disappear.
|-
| RC 2.9.8a || Zombies can no longer climb through a barricaded window.
|}


== Effects of Barricade ==
==Code==
Barricades can delay zombies breaking in by ingame hours, and buys a player time to evacuate or if possible, defend from intruders attempting to break in by leaving via another entrance.
{{CodeBox|{{ID|Wooden barricade}}<br>
{{CodeSnip
  | lang = java
  | retrieved = true
  | version = 41.78.16
  | code =
  public void addPlank(IsoGameCharacter var1, InventoryItem var2) {
      if (this.canAddPlank()) {
        int var3 = 1000;
        if (var2 != null) {
            var3 = (int)((float)var2.getCondition() / (float)var2.getConditionMax() * 1000.0F);
        }


=== Window Barricade Effects ===
        if (var1 != null) {
A barricaded window with 1-2 planks can be viewed through, assuming a curtain/sheet is not down on the window. This allows for some measure of protection while looking out at what is attacking the window. A window with 3-4 planks OR a metal sheet cannot be seen through and there will be no way to see how many zombies are outside or if it is a safe exit to take. A window without a barricade is extremely fragile.
            var3 = (int)((float)var3 * var1.getBarricadeStrengthMod());
        }


=== Door Barricade Effects ===
        int var4;
A barricaded door is unopenable, so think carefully on placement of barricades incase a door is breached that another exit is possible.
        for(var4 = 0; var4 < 4; ++var4) {
            if (this.plankHealth[var4] <= 0) {
              this.plankHealth[var4] = var3;
              break;
            }
        }


== Health of Barricade ==
        this.chooseSprite();
        if (!GameServer.bServer) {
            for(var4 = 0; var4 < IsoPlayer.numPlayers; ++var4) {
              LosUtil.cachecleared[var4] = true;
            }


To be added shortly. - MJ
            IsoGridSquare.setRecalcLightTime(-1);
            GameTime.instance.lightSourceUpdate = 100.0F;
        }


== Code ==
        if (this.square != null) {
<nowiki>
            this.square.RecalcProperties();
To be added shortly. - MJ
        }
</nowiki>


== History ==
      }
  }
}}


{| class="wikitable" width="550" style="text-align:center;"
{{ID|Metal bar barricade}}<br>
|-
{{CodeSnip
! Alpha ||
  | lang = java
|-
  | retrieved = true
| Build 36 || Introduction of Metal Barricades.  
  | version = 41.78.16
|-
  | code =
| Build 27 || Occasional glitch occurs in which when unbarricading a window or door, the planks used will not go back into your the player's inventory and will disappear.  
  public void addMetalBar(IsoGameCharacter var1, InventoryItem var2) {
|-
      if (this.getNumPlanks() <= 0) {
| RC 2.9.8a || Zombies can no longer climb through a barricaded window.  
        if (this.metalHealth <= 0) {
|}
            if (this.metalBarHealth <= 0) {
              this.metalBarHealth = 3000;
              if (var2 != null) {
                  this.metalBarHealth = (int)((float)var2.getCondition() / (float)var2.getConditionMax() * 5000.0F);
              }
 
              if (var1 != null) {
                  this.metalBarHealth = (int)((float)this.metalBarHealth * var1.getMetalBarricadeStrengthMod());
              }
 
              this.chooseSprite();
              if (!GameServer.bServer) {
                  for(int var3 = 0; var3 < IsoPlayer.numPlayers; ++var3) {
                    LosUtil.cachecleared[var3] = true;
                  }
 
                  IsoGridSquare.setRecalcLightTime(-1);
                  GameTime.instance.lightSourceUpdate = 100.0F;
              }
 
              if (this.square != null) {
                  this.square.RecalcProperties();
              }
 
            }
        }
      }
  }
}}
 
{{ID|Metal barricade}}<br>
{{CodeSnip
  | lang = java
  | retrieved = true
  | version = 41.78.16
  | code =
  public void addMetal(IsoGameCharacter var1, InventoryItem var2) {
      if (this.getNumPlanks() <= 0) {
        if (this.metalHealth <= 0) {
            this.metalHealth = 5000;
            if (var2 != null) {
              this.metalHealth = (int)((float)var2.getCondition() / (float)var2.getConditionMax() * 5000.0F);
            }
 
            if (var1 != null) {
              this.metalHealth = (int)((float)this.metalHealth * var1.getMetalBarricadeStrengthMod());
            }
 
            this.chooseSprite();
            if (!GameServer.bServer) {
              for(int var3 = 0; var3 < IsoPlayer.numPlayers; ++var3) {
                  LosUtil.cachecleared[var3] = true;
              }
 
              IsoGridSquare.setRecalcLightTime(-1);
              GameTime.instance.lightSourceUpdate = 100.0F;
            }
 
            if (this.square != null) {
              this.square.RecalcProperties();
            }
 
        }
      }
  }
}}
 
}}
 
 
==See also==
*[[Carpentry]]
*[[Metalworking]]
*[[Survival Guide]]
 
{{Navbox construction}}


==See Also==
*[[Metalworking_Guide|Metalworking Guide]]
{{Navbox/Construction}}
[[Category:Construction]]
[[Category:Carpentry]]
[[Category:Carpentry]]
[[Category:Gameplay]]
[[Category:Items]]
[[Category:Metalwork]]
[[Category:Metalwork]]
[[Category:Version 36]]
[[Category:Spiffo's Construction Crew (Project)]]

Latest revision as of 06:25, 14 April 2024

UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
Barricade
Tile Wooden Barricade.png
Tile Metal BarBarricade.png
Tile Metal Sheet Barricade.png
[[File:{{{icon4}}}|Barricade|]]
[[File:{{{icon5}}}|Barricade|]]
General
Category
Furniture
Function
Reinforces windows against zombies.

A barricade is a reinforcement made of wood or metal secured to a door or window as a defensive measure.

Usage

Barricades are used to slow zombies' entry into an area, and are a first step to preventing attacks while asleep. They can be found naturally in the game world, indicating where a survivor has barricaded a house. These houses often contain loot stashes from the previous occupants, who may still be inside.

Barricades will only slow down zombies, not stop them. They are just one method of protecting a safehouse, and should be used alongside others.

As barricades make a lot of sound when attacked, they can be used to alert the player to a zombies presence.

Crafting

Three materials can be used to create barricades: wooden planks, metal sheets, and metal bars.


Product Ingredients Tools Requirements Workstation XP
WoodenBarricade Carpentry.gif
Barricade
One of:
WoodenDoor Carpentry.gif Door ×1
Window Carpentry.gif Window ×1
Each of:
Plank.png Plank ×1
Nails.png Nails ×2

Hammer.png
Hammer (tag)
none none 0.75 Carpentry
MetalBarBarricade Metalwork.png
Barricade (Metal Bars)
One of:
WoodenDoor Carpentry.gif Door ×1
Window Carpentry.gif Window ×1
MetalBar.png Metal Bar ×3
BlowTorch.png
Propane Torch
1 unit(s)
  
(and)
WeldingMask.png
Welder Mask
none none 1.5 Metalworking
MetalSheetBarricade Metalwork.png
Barricade (Metal Sheet)
One of:
WoodenDoor Carpentry.gif Door ×1
Window Carpentry.gif Window ×1
SheetMetal.png Metal Sheet ×1
BlowTorch.png
Propane Torch
1 unit(s)
  
(and)
WeldingMask.png
Welder Mask
none none 1.5 Metalworking

With one of these combinations in the player's inventory, right-click a door or window and select "Barricade" from the drop-down menu.

Barricades can be placed on both sides of a door or window.

To remove wooden barricades, a hammer or a crowbar can be used to quickly remove barricade planks. Metal barricades must be removed using a propane torch. Metal sheets, bars, and wooden planks can be retrieved, but nails are always lost.

Health

Barricade health is dependent on the material used as well as the skill level of the builder. The barricade health can't be upgraded or repaired, other than taking them out and re-applying when damaged or a higher skill level is reached.

Health per barricade
Skill level Wood planks Metal bars Metal sheet
0 1000 HP 3000 HP 5000 HP
1 1000 HP 3000 HP 5000 HP
2 1100 HP 3300 HP 5500 HP
3 1140 HP 3420 HP 5700 HP
4 1180 HP 3540 HP 5900 HP
5 1220 HP 3660 HP 6100 HP
6 1260 HP 3480 HP 5800 HP
7 1300 HP 3900 HP 6500 HP
8 1340 HP 4020 HP 6700 HP
9 1400 HP 4200 HP 7000 HP
10 1500 HP 4500 HP 7500 HP


Barricaded doors or windows are undamaged until their barricades are fully destroyed, enhancing protection.

A wooden barricade's durability depends on the plank's condition. As it's damaged, so are the planks. To repair, replace damaged planks with fresh ones.

Gallery

History

Alpha
Build 36 Introduction of Metal Barricades.
Build 27 Occasional glitch occurs in which when unbarricading a window or door, the planks used will not go back into the player's inventory and will disappear.
RC 2.9.8a Zombies can no longer climb through a barricaded window.

Code

Code icon.png Code snippet! This section contains source code from Project ZomboidShow / Hide

Wooden barricade


Retrieved: Build 41.78.16
public void addPlank(IsoGameCharacter var1, InventoryItem var2) {
      if (this.canAddPlank()) {
         int var3 = 1000;
         if (var2 != null) {
            var3 = (int)((float)var2.getCondition() / (float)var2.getConditionMax() * 1000.0F);
         }

         if (var1 != null) {
            var3 = (int)((float)var3 * var1.getBarricadeStrengthMod());
         }

         int var4;
         for(var4 = 0; var4 < 4; ++var4) {
            if (this.plankHealth[var4] <= 0) {
               this.plankHealth[var4] = var3;
               break;
            }
         }

         this.chooseSprite();
         if (!GameServer.bServer) {
            for(var4 = 0; var4 < IsoPlayer.numPlayers; ++var4) {
               LosUtil.cachecleared[var4] = true;
            }

            IsoGridSquare.setRecalcLightTime(-1);
            GameTime.instance.lightSourceUpdate = 100.0F;
         }

         if (this.square != null) {
            this.square.RecalcProperties();
         }

      }
   }

Metal bar barricade


Retrieved: Build 41.78.16
public void addMetalBar(IsoGameCharacter var1, InventoryItem var2) {
      if (this.getNumPlanks() <= 0) {
         if (this.metalHealth <= 0) {
            if (this.metalBarHealth <= 0) {
               this.metalBarHealth = 3000;
               if (var2 != null) {
                  this.metalBarHealth = (int)((float)var2.getCondition() / (float)var2.getConditionMax() * 5000.0F);
               }

               if (var1 != null) {
                  this.metalBarHealth = (int)((float)this.metalBarHealth * var1.getMetalBarricadeStrengthMod());
               }

               this.chooseSprite();
               if (!GameServer.bServer) {
                  for(int var3 = 0; var3 < IsoPlayer.numPlayers; ++var3) {
                     LosUtil.cachecleared[var3] = true;
                  }

                  IsoGridSquare.setRecalcLightTime(-1);
                  GameTime.instance.lightSourceUpdate = 100.0F;
               }

               if (this.square != null) {
                  this.square.RecalcProperties();
               }

            }
         }
      }
   }

Metal barricade


Retrieved: Build 41.78.16
public void addMetal(IsoGameCharacter var1, InventoryItem var2) {
      if (this.getNumPlanks() <= 0) {
         if (this.metalHealth <= 0) {
            this.metalHealth = 5000;
            if (var2 != null) {
               this.metalHealth = (int)((float)var2.getCondition() / (float)var2.getConditionMax() * 5000.0F);
            }

            if (var1 != null) {
               this.metalHealth = (int)((float)this.metalHealth * var1.getMetalBarricadeStrengthMod());
            }

            this.chooseSprite();
            if (!GameServer.bServer) {
               for(int var3 = 0; var3 < IsoPlayer.numPlayers; ++var3) {
                  LosUtil.cachecleared[var3] = true;
               }

               IsoGridSquare.setRecalcLightTime(-1);
               GameTime.instance.lightSourceUpdate = 100.0F;
            }

            if (this.square != null) {
               this.square.RecalcProperties();
            }

         }
      }
   }


See also