Bed

From PZwiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
Crafted Bed
CraftedBed.png
[[File:{{{icon2}}}|Crafted Bed|]]
[[File:{{{icon3}}}|Crafted Bed|]]
[[File:{{{icon4}}}|Crafted Bed|]]
[[File:{{{icon5}}}|Crafted Bed|]]
General
Category
Movable
Size
2 tiles
Function
Sleep
Rest
Properties
Type
Bed
Build
Skill (level)
Tool(s)
Ingredients
6 × Plank.png Plank
4 × Nails.png Nails
1 × Mattress.png Mattress
Move
Skill (level)
Tool(s)
Disassemble
Skill (level)
Technical
Item ID(s)
Movables.Movable
Tile ID(s)
carpentry_02_73 carpentry_02_72
Night night, don't let the zombies bite.
— In-game description

A bed is a craftable piece of furniture.

Usage

Beds can be slept in when the player is tired. This will fast-forward time until the player wakes up, or when a sleeping event occurs.

Sleeping on a bed of "average" or "poor" quality (or the floor) will reduce the rate at which tiredness disappears, and the player will wake up without being fully rested while also being potentially sore in the neck.

Crafting

Carpentry

Main article: Carpentry
Product Ingredients Tools Requirements Workstation XP
CraftedBed.png
Bed
Plank.png Plank ×6
Nails.png Nails ×4
Mattress.png Mattress ×1

Hammer.png
Hammer (tag)
Carpentry 4 none 1.25 Carpentry

Distribution

Beds can be found inside of houses, or can be crafted by the player.

Code

Code icon.png Code snippet! This section contains source code from Project ZomboidShow / Hide
Retrieved: Build 41.78.16
-- bed
    local bedSprite = ISBuildMenu.getBedSprite(player);
    local bedOption = subMenu:addOption(getText("ContextMenu_Bed"), worldobjects, ISBuildMenu.onBed, square, bedSprite, player);
    local tooltip9 = ISBuildMenu.canBuild(6,4,0,0,0,4,bedOption, player);
    -- we add that we need a mattress too
	local mattress = ISBuildMenu.countMaterial(player, "Base.Mattress");
    if mattress < 1 then
		tooltip9.description = tooltip9.description .. ISBuildMenu.bhs .. getItemNameFromFullType("Base.Mattress") .. " " .. mattress .. "/1 ";
        if not ISBuildMenu.cheat then
            bedOption.onSelect = nil;
            bedOption.notAvailable = true;
        end
    else
		tooltip9.description = tooltip9.description .. ISBuildMenu.ghs .. getItemNameFromFullType("Base.Mattress") .. " " .. mattress .. "/1 ";
    end
    tooltip9:setName(getText("ContextMenu_Bed"));
    tooltip9.description = getText("Tooltip_craft_bedDesc") .. tooltip9.description;
    tooltip9:setTexture(bedSprite.northSprite1);
	ISBuildMenu.requireHammer(bedOption)


See also