Battery: Difference between revisions

From PZwiki
m (fixed container links)
(Update distribution file)
 
(48 intermediate revisions by 13 users not shown)
Line 1: Line 1:
__NOTOC__
{{Header|Project Zomboid|Items|Materials}}
{{languages|Battery}}
{{Page version|41.78.16}}
{{header|The Game World|Items|Electricity and Engineering|version=Version 39|incver=53}}
{{Infobox item
{{items
|name=Battery
|image = Battery_120px.png
|model=Battery_Model.png
|weight = 0.6
|icon=Battery.png
|icon_name=Battery
|weight=0.6
|primary_use=Power small appliances
|max_units=100,000
|contents=[[Electricity]]
|item_id=Base.Battery
}}
}}
'''Batteries''' are a source of power for small household items. They are used to power the [[flashlight]], [[radio]]s, [[Radio|HAM radio]], [[Radio|walkie talkies]] and [[Lamp on Pillar|lamp on pillar]]. When the device it is powering is turned ''on'', the battery will begin to drain, until it eventually dies, upon which it will be destroyed/consumed. When used to power a flashlight, the player can tell when the battery is getting low, as the light will begin to flicker rapidly.  
{{About|batteries required to power small appliances|batteries that power vehicles|Car Battery}}
A '''battery''' is a source of power for small household items.


Batteries can be found in various places throughout the world, such as in [[Containers#Bins|garbage cans]], [[Containers#Wooden Crate|wooden crates]], [[Containers#Counters|counters]] and many other places. They can also be found inside [[radio]]s and [[flashlight]]s, so long as they haven't been left on.  
==Usage==
Batteries are used to power the [[flashlight]], [[radio]], [[Ham Radio|ham radio]], [[Walkie Talkie|walkie talkie]] and [[Lamp on Pillar|lamp on pillar]].


Batteries will begin to drain when the device they're powering is ''on'', until it eventually dies, upon which it is destroyed/consumed. When used to power a flashlight, the player can tell when the battery is getting low, as the light will begin to flicker rapidly.


==Recipes==
==Crafting==
{| class="wikitable sortable" style="text-align:center;"
{{Crafting/sandbox2
|-
|battery
! Name
|flashlight
! class="unsortable" | Recipe
|hand_torch
! class="unsortable" | Description
|rubber_duck
! Level
}}
{{RecipeLookup|4036}}
{{RecipeLookup|4037}}
|}


==Distribution==
The loot distributions can be found in the table(s) below.


== Code ==
<!--BOT FLAG|Battery|41.78.16-->
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
{{Clear}}
<nowiki>
<div class="togglebox theme-red">
item Battery
    <div>Battery distribution
Weight = 0.6,
        <span class="mw-customtoggle-togglebox-Battery" title="{{int:show}} / {{int:hide}}" style="float: right; padding-right: 30px; padding-top: 4px; font-size: 0.7em; font-weight: normal;">{{int:show}} / {{int:hide}}</span></div>
Type = Drainable,
    <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-togglebox-Battery">
UseDelta = 0.00001,
    Effective chance calculations are based off of default loot settings, and median zombie density. The higher the density of zombies in an area, the higher the effective chance of an item spawning. Chance is also influenced by the [[lucky]] and [[unlucky]] traits.    <div class="toggle-content">
UseWhileEquipped = FALSE,
<div class="pz-container">
DisplayName = Battery,
<div id="containers" style="flex-basis:30%">
Icon = Battery,
    {| class="wikitable theme-red" style="margin-right: 15px; width: 95%;"
MetalValue = 1,
    |+ {{ll|Containers}}
cantBeConsolided = TRUE,
    ! Building/Room
</nowiki>
    ! Container
    ! Effective chance
    |-
    | Electrician
    | {{ll|crate}}
    | 23.28%
    |-
    | Electrician
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | all
    | {{ll|counter}}
    | 6.29%
    |-
    | all
    | {{ll|crate}}
    | 1.01%
    |-
    | all
    | {{ll|metal_shelves}}
    | 3.98%
    |-
    | all
    | {{ll|other}}
    | 1.61%
    |-
    | armyhanger
    | {{ll|counter}}
    | 6.29%
    |-
    | armyhanger
    | {{ll|metal_shelves}}
    | 6.29%
    |-
    | batteryfactory
    | {{ll|crate}}
    | 23.28%
    |-
    | batteryfactory
    | {{ll|crate}}
    | 41.14%
    |-
    | batteryfactory
    | {{ll|crate}}
    | 76.55%
    |-
    | batteryfactory
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | batteryfactory
    | {{ll|metal_shelves}}
    | 41.14%
    |-
    | batteryfactory
    | {{ll|metal_shelves}}
    | 76.55%
    |-
    | batterystorage
    | {{ll|crate}}
    | 23.28%
    |-
    | batterystorage
    | {{ll|crate}}
    | 41.14%
    |-
    | batterystorage
    | {{ll|crate}}
    | 76.55%
    |-
    | bedroom
    | {{ll|crate}}
    | 1.01%
    |-
    | closet
    | {{ll|crate}}
    | 1.01%
    |-
    | closet
    | {{ll|crate}}
    | 23.28%
    |-
    | closet
    | {{ll|metal_shelves}}
    | 19.27%
    |-
    | controlroom
    | {{ll|counter}}
    | 23.28%
    |-
    | controlroom
    | {{ll|counter}}
    | 41.14%
    |-
    | departmentstorage
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | departmentstorage
    | {{ll|metal_shelves}}
    | 41.14%
    |-
    | electronicsstorage
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | electronicsstorage
    | {{ll|metal_shelves}}
    | 41.14%
    |-
    | electronicsstorage
    | {{ll|shelves}}
    | 23.28%
    |-
    | electronicsstorage
    | {{ll|shelves}}
    | 41.14%
    |-
    | electronicsstore
    | {{ll|counter}}
    | 23.28%
    |-
    | electronicsstore
    | {{ll|counter}}
    | 41.14%
    |-
    | electronicsstore
    | {{ll|shelves}}
    | 23.28%
    |-
    | electronicsstore
    | {{ll|shelves}}
    | 41.14%
    |-
    | garagestorage
    | {{ll|crate}}
    | 1.01%
    |-
    | garagestorage
    | {{ll|crate}}
    | 23.28%
    |-
    | generalstore
    | {{ll|shelves}}
    | 23.28%
    |-
    | generalstore
    | {{ll|shelves}}
    | 41.14%
    |-
    | generalstorestorage
    | {{ll|shelves}}
    | 23.28%
    |-
    | generalstorestorage
    | {{ll|shelves}}
    | 41.14%
    |-
    | gigamart
    | {{ll|shelves}}
    | 23.28%
    |-
    | gigamart
    | {{ll|shelves}}
    | 41.14%
    |-
    | housewarestore
    | {{ll|shelves}}
    | 23.28%
    |-
    | housewarestore
    | {{ll|shelves}}
    | 41.14%
    |-
    | kitchen
    | {{ll|counter}}
    | 6.29%
    |-
    | kitchenwares
    | {{ll|shelves}}
    | 23.28%
    |-
    | kitchenwares
    | {{ll|shelves}}
    | 41.14%
    |-
    | livingroom
    | {{ll|counter}}
    | 6.29%
    |-
    | livingroom
    | {{ll|wardrobe}}
    | 19.27%
    |-
    | radiofactory
    | {{ll|crate}}
    | 23.28%
    |-
    | radiofactory
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | radioshipping
    | {{ll|crate}}
    | 23.28%
    |-
    | radioshipping
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | radiostorage
    | {{ll|crate}}
    | 23.28%
    |-
    | radiostorage
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | storageunit
    | {{ll|crate}}
    | 1.01%
    |-
    | storageunit
    | {{ll|crate}}
    | 23.28%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 1.01%
    |-
    | toolstore
    | {{ll|counter}}
    | 23.28%
    |-
    | toolstore
    | {{ll|shelves}}
    | 23.28%
    |}
</div>
<div id="vehicles" style="flex-basis:30%">
    {| class="wikitable theme-red" style="margin-right: 15px; width: 95%;"
    |+ {{ll|Vehicles}}
    ! Type
    ! Container
    ! Effective chance
        |-
        | Ambulance
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Carpenter
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Construction Worker
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Distillery
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Doctor
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Electrician
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Farmer
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Fire
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Fisherman
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Fossoil
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | All
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Golf
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Heralds
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Hunter
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Mass Gen Fac
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | McCoy
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Metal Welder
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Painter
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Police
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Postal
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Radio
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Ranger
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Spiffo
        | {{ll|Glove Box}}
        | 23.28%
        |-
        | Survivalist
        | {{ll|Glovebox}}
        | 23.28%
        |-
        | Transit
        | {{ll|Glove Box}}
        | 23.28%
        |}
</div>
    </div><div style="clear: both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Battery" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Battery|41.78.16-->


==Disposal==
Much like most batteries in 1993, batteries in Project Zomboid are non-rechargeable (i.e., alkaline) batteries. In the event the player finds a battery with 0% charge, the only thing that can be done with these is disposing of them. Either in any [[Storage#Bins|Garbage Bin]] with the ability to delete items not disabled in settings, or via leaving in the inventory of a [[Containers#Corpses|Zombie corpse]] as it decays unless the server is set to remove items laying on the ground.


== History ==
==Code==
{| class="wikitable" width="550" style="text-align:center;"
{{CodeBox
| {{CodeSnip
  | lang = java
  | line = true
  | start = 658
  | source = items.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item Battery
{
    DisplayCategory = Electronics,
Weight = 0.1,
Type = Drainable,
UseDelta = 0.00001,
UseWhileEquipped = FALSE,
DisplayName = Battery,
Icon = Battery,
MetalValue = 1,
cantBeConsolided = TRUE,
WorldStaticModel = Battery,
}
}}
}}
 
==History==
{| class="wikitable theme-red" width="550" style="text-align:center;"
|-
|-
! colspan="2" | Alpha  
! colspan="2" | Alpha
|-
|-
| 0.2.0f || Batteries fittable / removable for flashlights.
| 0.2.0f || Batteries fittable / removable for flashlights.
|-
|-
| RC 2.9 || Slowly drain and is consumed automatically by Flashlights.  
| RC 2.9 || Slowly drain and is consumed automatically by Flashlights.
|-
|-
| 2.9.9.16 || Flashlight can flicker, especially when they're almost out of batteries
| 2.9.9.16 || Flashlight can flicker, especially when they're almost out of batteries
Line 58: Line 444:
|}
|}


 
==See also==
==See Also==
*[[Car Battery]]
*[[Car Battery]]
*[[Generator]]
*[[Generator]]
*[[Electrical]]
*[[Electrical]]


{{Navbox/Tools}}
{{Navbox items|equipment}}
{{Navbox/Electricity and Engineering}}


[[Category:Illumination]]
[[Category:Electricals and Transmission (Project)]]

Latest revision as of 12:02, 30 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]
Battery
Battery Model.png
General
Encumbrance
Moodle Icon HeavyLoad.png
0.6
Function
Power small appliances
Properties
Contents
Capacity
100,000
Technical
Item ID
Base.Battery
PlushSpiffo.pngThis article is about batteries required to power small appliances. For batteries that power vehicles, see Car Battery.

A battery is a source of power for small household items.

Usage

Batteries are used to power the flashlight, radio, ham radio, walkie talkie and lamp on pillar.

Batteries will begin to drain when the device they're powering is on, until it eventually dies, upon which it is destroyed/consumed. When used to power a flashlight, the player can tell when the battery is getting low, as the light will begin to flicker rapidly.

Crafting

Product Ingredients Tools Requirements Workstation XP
Battery.png
Battery
One of:
Flashlight.png Flashlight ×1
Flashlight2.png Hand Torch ×1
Rubberducky.png Rubber Duck ×1
none none none none
Flashlight.png
Flashlight
Flashlight.png Flashlight ×1
Battery.png Battery ×1
none none none none
Flashlight2.png
Hand Torch
Flashlight2.png Hand Torch ×1
Battery.png Battery ×1
none none none none
Rubberducky.png
Rubber Duck
Rubberducky.png Rubber Duck ×1
Battery.png Battery ×1
none none none none

Distribution

The loot distributions can be found in the table(s) below.

Battery distribution Show / Hide
Effective chance calculations are based off of default loot settings, and median zombie density. The higher the density of zombies in an area, the higher the effective chance of an item spawning. Chance is also influenced by the lucky and unlucky traits.
Containers
Building/Room Container Effective chance
Electrician crate 23.28%
Electrician metal_shelves 23.28%
all counter 6.29%
all crate 1.01%
all metal_shelves 3.98%
all other 1.61%
armyhanger counter 6.29%
armyhanger metal_shelves 6.29%
batteryfactory crate 23.28%
batteryfactory crate 41.14%
batteryfactory crate 76.55%
batteryfactory metal_shelves 23.28%
batteryfactory metal_shelves 41.14%
batteryfactory metal_shelves 76.55%
batterystorage crate 23.28%
batterystorage crate 41.14%
batterystorage crate 76.55%
bedroom crate 1.01%
closet crate 1.01%
closet crate 23.28%
closet metal_shelves 19.27%
controlroom counter 23.28%
controlroom counter 41.14%
departmentstorage metal_shelves 23.28%
departmentstorage metal_shelves 41.14%
electronicsstorage metal_shelves 23.28%
electronicsstorage metal_shelves 41.14%
electronicsstorage shelves 23.28%
electronicsstorage shelves 41.14%
electronicsstore counter 23.28%
electronicsstore counter 41.14%
electronicsstore shelves 23.28%
electronicsstore shelves 41.14%
garagestorage crate 1.01%
garagestorage crate 23.28%
generalstore shelves 23.28%
generalstore shelves 41.14%
generalstorestorage shelves 23.28%
generalstorestorage shelves 41.14%
gigamart shelves 23.28%
gigamart shelves 41.14%
housewarestore shelves 23.28%
housewarestore shelves 41.14%
kitchen counter 6.29%
kitchenwares shelves 23.28%
kitchenwares shelves 41.14%
livingroom counter 6.29%
livingroom wardrobe 19.27%
radiofactory crate 23.28%
radiofactory metal_shelves 23.28%
radioshipping crate 23.28%
radioshipping metal_shelves 23.28%
radiostorage crate 23.28%
radiostorage metal_shelves 23.28%
storageunit crate 1.01%
storageunit crate 23.28%
storageunit metal_shelves 1.01%
toolstore counter 23.28%
toolstore shelves 23.28%
Vehicles
Type Container Effective chance
Ambulance Glove Box 23.28%
Carpenter Glove Box 23.28%
Construction Worker Glove Box 23.28%
Distillery Glove Box 23.28%
Doctor Glove Box 23.28%
Electrician Glove Box 23.28%
Farmer Glove Box 23.28%
Fire Glove Box 23.28%
Fisherman Glove Box 23.28%
Fossoil Glove Box 23.28%
All Glove Box 23.28%
Golf Glove Box 23.28%
Heralds Glove Box 23.28%
Hunter Glove Box 23.28%
Mass Gen Fac Glove Box 23.28%
McCoy Glove Box 23.28%
Metal Welder Glove Box 23.28%
Painter Glove Box 23.28%
Police Glove Box 23.28%
Postal Glove Box 23.28%
Radio Glove Box 23.28%
Ranger Glove Box 23.28%
Spiffo Glove Box 23.28%
Survivalist Glove Box 23.28%
Transit Glove Box 23.28%

Disposal

Much like most batteries in 1993, batteries in Project Zomboid are non-rechargeable (i.e., alkaline) batteries. In the event the player finds a battery with 0% charge, the only thing that can be done with these is disposing of them. Either in any Garbage Bin with the ability to delete items not disabled in settings, or via leaving in the inventory of a Zombie corpse as it decays unless the server is set to remove items laying on the ground.

Code

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

Source: ProjectZomboid\media\scripts\items.txt

Retrieved: Build 41.78.16
item Battery
	{
	    DisplayCategory = Electronics,
		Weight	=	0.1,
		Type	=	Drainable,
		UseDelta	=	0.00001,
		UseWhileEquipped	=	FALSE,
		DisplayName	=	Battery,
		Icon	=	Battery,
		MetalValue = 1,
		cantBeConsolided = TRUE,
		WorldStaticModel = Battery,
	}

History

Alpha
0.2.0f Batteries fittable / removable for flashlights.
RC 2.9 Slowly drain and is consumed automatically by Flashlights.
2.9.9.16 Flashlight can flicker, especially when they're almost out of batteries
2.9.9.17 You can now build light sources, requiring batteries
Build 31 Fixed infinite batteries from "Remove Battery > All" action.
Build 33 Radios will have battery that can be removed.
Build 35 Can't consolidate batteries, candle and torch.

See also