Battery: Difference between revisions

From PZwiki
m (Remove lines))
(25 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Languages}}{{Header|The Game World|Items|Electricity and Engineering|type=Electric|version=Version 39|incver=67.5}}{{Infobox drainable
{{Header|Project Zomboid|Items|Materials}}
|display_name=Battery
{{Page version|41.78.16}}
|name_colour = Electric
{{Infobox item
|name_text_colour = Electric
|name=Battery
|image=Battery.png
|model=Battery_Model.png
|icon=Battery.png
|icon_name=Battery
|weight=0.6
|weight=0.6
|primary_use=Power small appliances
|primary_use=Power small appliances
|max_units=100,000
|max_units=100,000
|contents=[[Electricity]]
|contents=[[Electricity]]
|class_name=Base.Battery
|item_id=Base.Battery
}}{{About|batteries required to power small appliances|batteries that power vehicles|Car Battery}}
}}
{{About|batteries required to power small appliances|batteries that power vehicles|Car Battery}}
A '''battery''' is a source of power for small household items.
A '''battery''' is a source of power for small household items.


==Usage==
==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 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.
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==
==Crafting==
{{Crafting header|ing=2}}
{{Crafting/sandbox2
{{Crafting general|003|ing=2}}
|battery
{{Crafting general|002|ing=2}}
|flashlight
{{Crafting general|030|ing=2}}
|hand_torch
{{Crafting general|029|ing=2}}
|rubber_duck
|}
}}


==Distribution==
==Distribution==
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.
The loot distributions can be found in the table(s) below.
It can also be found in very large amounts in the Egenerex Battery Factory, in the Northeast corner of Louisville.


If a [[Zombie]] spawns with a [[Walkie Talkie]] as loot, you can take one full battery from it.
{| class="mw-collapsible mw-collapsed wikitable theme-red" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}" style="text-align:center; min-width:24em;"
! colspan="4" | Containers
|-
! Building/Room
! Container
! style="width: 3.2em;" | Rolls
! style="width: 3.2em;" | Chance
|-
|all
|[[other]]
|1
|2
|-
|armyhanger
|[[counter]]
|4
|2
|-
|rowspan="5"|batteryfactory
|[[crate]]
|4
|1
|-
|[[crate]]
|4
|1
|-
|[[crate]]
|4
|2
|-
|[[crate]]
|4
|2
|-
|[[crate]]
|4
|5
|-
|rowspan="2"|closet
|[[crate]]
|4
|1
|-
|[[metal_shelves]]
|4
|8
|-
|rowspan="2"|controlroom
|[[counter]]
|4
|1
|-
|[[counter]]
|4
|2
|-
|rowspan="2"|departmentstorage
|[[metal_shelves]]
|4
|1
|-
|[[metal_shelves]]
|4
|2
|-
|rowspan="4"|electronicsstorage
|[[shelves]]
|4
|1
|-
|[[shelves]]
|4
|1
|-
|[[shelves]]
|4
|2
|-
|[[shelves]]
|4
|2
|-
|kitchen
|[[counter]]
|4
|2
|-
|radiofactory
|[[crate]]
|4
|1
|-
|toolstore
|[[counter]]
|4
|1
|}


==Disposal==
==Disposal==
Much like most Batteries in 1993, {{PAGENAME}} in Project Zomboid are non-recharable (ie. 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.
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.


==Code==
==Code==
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
{{CodeBox
{{Retrieved|version=41|incver=71}}
| {{CodeSnip
<pre>
  | lang = java
item Battery
  | line = true
DisplayCategory = Electronics,
  | start = 658
Weight         = 0.1,
  | source = items.txt
Type     = Drainable,
  | retrieved = true
UseDelta = 0.00001,
  | version = 41.78.16
UseWhileEquipped = FALSE,
  | code =
DisplayName = Battery,
item Battery
Icon         = Battery,
{
MetalValue       = 1,
    DisplayCategory = Electronics,
Weight = 0.1,
Type = Drainable,
UseDelta = 0.00001,
UseWhileEquipped = FALSE,
DisplayName = Battery,
Icon = Battery,
MetalValue = 1,
cantBeConsolided = TRUE,
cantBeConsolided = TRUE,
WorldStaticModel = Battery,
WorldStaticModel = Battery,
</pre>
}
}}
}}


==History==
==History==
{| class="pztable" width="550" style="text-align:center;"
{| 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 76: Line 184:
*[[Electrical]]
*[[Electrical]]


{{Navbox equipment}}
{{Navbox items|equipment}}


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

Revision as of 06:29, 15 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.

Containers
Building/Room Container Rolls Chance
all other 1 2
armyhanger counter 4 2
batteryfactory crate 4 1
crate 4 1
crate 4 2
crate 4 2
crate 4 5
closet crate 4 1
metal_shelves 4 8
controlroom counter 4 1
counter 4 2
departmentstorage metal_shelves 4 1
metal_shelves 4 2
electronicsstorage shelves 4 1
shelves 4 1
shelves 4 2
shelves 4 2
kitchen counter 4 2
radiofactory crate 4 1
toolstore counter 4 1

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