Barricade: Difference between revisions

From PZwiki
(Very basic Infobox)
m (Automated Formatting)
 
(21 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Languages}}
{{Header|Project Zomboid|Tiles|Barriers}}
{{Header|Project Zomboid|Items|Construction|version=Version 41|incver=78.16}}
{{Page version|41.78.16}}
{{reupload|missing model images}}
{{Infobox tile
{{Infobox tile
|name=Wooden Wall
|name=Barricade
|model=WoodenWall1_Carpentry.png
|model=Tile_Wooden_Barricade.png
|icon=WoodenWall1_Carpentry.png
|icon=Tile Wooden Barricade.png
|function= Reinforces windows against [[zombie]]s.  
|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. Barricades are used to slow zombies' entry into an area, and are a first step to preventing attacks while [[Sleep|asleep]].  
A '''barricade''' is a reinforcement made of wood or metal secured to a [[door]] or [[window]] as a defensive measure.


[[File:WindowBarricades.png|thumb|In-game image of metal sheet and wooden window barricades (Build 36.40)]]
==Usage==
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.


Barricades can be found naturally in the game world where survivors have barricaded a house. Caution should be exercised on entering a barricaded house, as the former survivors' reanimated corpses may be locked inside.
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.


==Barricading==
As barricades make a lot of sound when attacked, they can be used to alert the [[player]] to a zombies presence.
===Add barricade===
 
===Crafting===
Three materials can be used to create barricades: wooden planks, metal sheets, and metal bars.
Three materials can be used to create barricades: wooden planks, metal sheets, and metal bars.


{{Crafting header|ing=4}}
{{Crafting/sandbox2
{{Crafting carpentry|201|ing=4}}
|barricade
{{Crafting metalworking|201|ing=4}}
|barricade_metal_bar
{{Crafting metalworking|202|ing=4}}
|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.
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.
Barricades can be placed on both sides of a door or window.


===Remove barricade===
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.
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 are retrieved, but nails are lost.


==Building a safehouse ==
===Health===
:''"Proper Planning And Preparations Prevents Poor Performance!" -- Carpentry Guide
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.
Safe house barricades can delay zombies breaking in by in-game hours, and buy a player time to evacuate or defend against the intruders. This guide will help you create a tough base that a ''medium'' horde won't break through.
 
{{Construction hp|barricade}}
 
 
Barricaded doors or windows are undamaged until their barricades are fully destroyed, enhancing protection.


The first five considerations for building a [[base]] are important. The other three are optional:
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.


*[[Zombie]] population
==Gallery==
*[[Water]] availability
<gallery>
*[[Knox Country|Location]]
WindowBarricades.png|In-game image of metal sheet and wooden window barricades (build 36.40)
*Two or more stories
</gallery>
*Close to trees?
*[[Gas station|Gas]] availability
*[[Loot]] availability
*Is the [[businesses|building]] big? - Because it takes more labor to defend [[The Grand Ohio Mall]], than the much smaller [[Rosewood Fire Department]].


;Barricade materials
==History==
There are three barricades materials: [[planks]], [[Metal Sheet|metal sheets]] and [[Metal Bar|metal bars]].
{| class="wikitable theme-red" width="550" style="text-align:center;"
All have different statistics, for instance, planks are easiest to find but the weakest of them all, metal sheets/bars are stronger and harder to find. Bars allow the player to see through the window or door while having the same health as a metal sheet.  
|-
! 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.
|}


Barricades prevent entry or exit, and this applies to the player as well as zombies. The player cannot enter or exit through a barricaded door or window. It is therefore important to consider carefully what part of the structure will be used as an entrance before placing barricades. On buildings with second story windows, [[Sheet Rope|sheet ropes]] provide a useful entrance that can't be used by zombies. This allows all of the first floor doors and windows to be fully secured.
==Code==
{{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);
        }


In an emergency, a player can put up furniture to work as a temporary barricade. Remember that whatever the player puts up against a door, the player can not open the door until the  barricade is  removed.  In addition, materials to barricade are normally heavy.  
        if (var1 != null) {
            var3 = (int)((float)var3 * var1.getBarricadeStrengthMod());
        }


;Barricading windows
        int var4;
[[Window|Windows]] are extremely fragile and create [[Noise|noise]] when they shatter. A [[Plank|plank]] added in front of a [[Window|window]] will buy some time before it shatters into a million pieces. You may also want to consider barricading extra [[Door|doors]] so that you only have just two points of entry, such as a main door and a backup door. Take a look at the [[Survival Guide#Barricading and Carpentry|Barricading and Carpentry]] section to see how you can improve your safehouse to make it the ultimate anti-zombie fortress you can have.
        for(var4 = 0; var4 < 4; ++var4) {
            if (this.plankHealth[var4] <= 0) {
              this.plankHealth[var4] = var3;
              break;
            }
        }


;Visibility
        this.chooseSprite();
A door or window barricaded with up to two planks can be viewed through (as long as it is not covered by a [[curtain]]). This provides some measure of protection while allowing awareness of surroundings.
        if (!GameServer.bServer) {
            for(var4 = 0; var4 < IsoPlayer.numPlayers; ++var4) {
              LosUtil.cachecleared[var4] = true;
            }


Doors or windows barricaded with three to four planks, or metal sheets, cannot be seen through.
            IsoGridSquare.setRecalcLightTime(-1);
            GameTime.instance.lightSourceUpdate = 100.0F;
        }


A barricade made of metal bars can be seen through while providing the same level of protection as a metal sheet.  
        if (this.square != null) {
            this.square.RecalcProperties();
        }


;Building wooden barricades
      }
If you have found a [[Hammer|hammer]] and some [[Nails|nails]], barricade all your [[Window|windows]] with as many [[Plank|planks]] as possible. You can create [[Plank|planks]] by dismantling interior [[Door|doors]] and furniture or chopping down trees with an [[Axe|axe]]. You will also need a [[Saw|saw]] to create [[Plank|planks]] from [[Log|logs]]. You can also find planks and nails out in the world, such as the garage of houses. A great way to think about where you can find these items would be to consider where these items in the real world would be (a player wouldn't find a plank of wood in a bedroom dresser!). When building barricades, be careful, and be sure to clear the area of nearby zombies before attempting any kind of [[Carpentry|construction]]. Not only are you defenseless when building, you will make a moderate amount of [[Noise|noise]], which may result in zombies showing up.
  }
}}


;Creating a [[Sheet Rope|sheet rope]] to climb down a building
{{ID|Metal bar barricade}}<br>
Consider installing [[Sheet Rope|sheet ropes]] on all of the upstairs [[Window|windows]]. In an undead siege, you may end up being trapped in your house's second floor with your first floor swarming with zombies, who are trying to go up to your second floor. You can climb up and down a [[Sheet Rope|sheet rope]], making it a good alternative exit/entrance that zombies cannot use. However, in most cases this will not be important.
{{CodeSnip
  | lang = java
  | retrieved = true
  | version = 41.78.16
  | code =
  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);
              }


;Destroying stairs with a sledgehammer to stop zombies.
              if (var1 != null) {
If you're lucky enough to find a [[Sledgehammer|sledgehammer]], you can use it to destroy the staircase to the second story of a safehouse, rendering it unreachable to zombies. Just be sure to have a [[Sheet Rope|sheet rope]] installed on the north, east or south side window. Make sure to '''NEVER''' destroy the stairs unless sheet rope installed on the higher levels.
                  this.metalBarHealth = (int)((float)this.metalBarHealth * var1.getMetalBarricadeStrengthMod());
              }


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


Walls are very good, they provide safe places to farm, fish, work on cars, collect water, etc. But they can be quite costly, just one wall costs 3 [[planks]] and 5 [[nails]]. But they can have extreme benefits to those who can afford them.
                  IsoGridSquare.setRecalcLightTime(-1);
                  GameTime.instance.lightSourceUpdate = 100.0F;
              }


Walls can give the player more room to store [[loot]] and provide more safety overall. The issue is a larger base makes it, so less space is defended. Zombies can more easily breach the defense.  
              if (this.square != null) {
                  this.square.RecalcProperties();
              }


If there is a massive horde coming. As a last resort, throw a [[Pipe Bomb|pipe bomb]] or a [[Molotov Cocktail|molotov cocktail]]. Explosives and [[fire]] '''CAN''' Clear out a massive horde, but the base might be burnt down, and it could give the player burns or kill the player.  If a player does catch fire, the best thing to do is run for a bit.
            }
        }
      }
  }
}}


==Barricade health==
{{ID|Metal barricade}}<br>
Barricade health is dependent on the material used as well as the skill level of the builder:
{{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);
            }


'''Wooden Barricades:'''
            if (var1 != null) {
*'''Carpentry 0:''' 200HP/plank
              this.metalHealth = (int)((float)this.metalHealth * var1.getMetalBarricadeStrengthMod());
*'''Carpentry 1:''' 200HP/plank
            }
*'''Carpentry 2:''' 220HP/plank
*'''Carpentry 3:''' 230HP/plank
*'''Carpentry 4:''' 240HP/plank
*'''Carpentry 5:''' 245HP/plank
*'''Carpentry 6:''' 255HP/plank
*'''Carpentry 7:''' 260HP/plank
*'''Carpentry 8:''' 270HP/plank
*'''Carpentry 9:''' 280HP/plank
*'''Carpentry 10:''' 300HP/plank


(The below section will be updated after more testing)
            this.chooseSprite();
            if (!GameServer.bServer) {
              for(int var3 = 0; var3 < IsoPlayer.numPlayers; ++var3) {
                  LosUtil.cachecleared[var3] = true;
              }


'''Metal plate:'''
              IsoGridSquare.setRecalcLightTime(-1);
*'''Metalworking 0:'''
              GameTime.instance.lightSourceUpdate = 100.0F;
*'''Metalworking 1:'''
            }
*'''Metalworking 2:'''
*'''Metalworking 3:'''
*'''Metalworking 4:'''
*'''Metalworking 5:'''
*'''Metalworking 6:'''
*'''Metalworking 7:'''
*'''Metalworking 8:'''
*'''Metalworking 9:'''
*'''Metalworking 10:'''


'''Metal bars:'''
            if (this.square != null) {
*'''Metalworking 0:'''
              this.square.RecalcProperties();
*'''Metalworking 1:'''
            }
*'''Metalworking 2:'''
*'''Metalworking 3:'''
*'''Metalworking 4:'''
*'''Metalworking 5:'''
*'''Metalworking 6:'''
*'''Metalworking 7:'''
*'''Metalworking 8:'''
*'''Metalworking 9:'''
*'''Metalworking 10:'''


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.
}}


==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.
|}


==See also==
==See also==
*[[Barricade]]
*[[Carpentry]]
*[[Carpentry]]
*[[Metalworking]]
*[[Metalworking]]

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