Battery: Difference between revisions

From PZwiki
m (category)
m (Distribution table update)
 
(43 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|type=Electric|version=Version 39|incver=67.5}}{{Infobox drainable
{{Infobox item
|display_name=Battery
|name=Battery
|name_colour = Electric
|model=Battery_Model.png
|name_text_colour = Electric
|icon=Battery.png
|image=Battery_120px.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
}}A '''battery''' is a source of power for small household items.
}}
{{About|batteries required to power small appliances|batteries that power vehicles|Car Battery}}
A '''battery''' is a source of power for small household items.


==Usage==
==Usage==
Batteries are used to power the [[flashlight]], [[radio]], [[Radio|ham radio]], [[Radio|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 table header}}
{{Crafting/sandbox2
{{RecipeLookup|4036}}
|battery
{{RecipeLookup|4037}}
|flashlight
{{Crafting table footer}}
|hand_torch
|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.


== Code ==
<!--BOT FLAG|Battery|41.78.16-->
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
{{clear}}
{{Retrieved|version=39|incver=67.5}}
<div class="togglebox theme-red">
<nowiki> 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,
    <div class="toggle-content"><div style="display: flex;"><div style="float:left;">
UseWhileEquipped = FALSE,
    {| class="wikitable theme-red" style="margin-right:15px; width:95%;"
DisplayName = Battery,
    |+ {{ll|Containers}}
Icon = Battery,
    ! Building / Room
MetalValue = 1,
    ! Container
cantBeConsolided = TRUE,</nowiki>
    ! Rolls
    ! Chance
    |-
    | Not referenced
    | {{ll|StoreShelfElectronics}}
    | 4
    | 10.0
    |-
    | Not referenced
    | {{ll|StoreShelfElectronics}}
    | 4
    | 20.0
    |-
    | all
    | {{ll|counter}}
    | 4
    | 2.0
    |-
    | all
    | {{ll|crate}}
    | 1
    | 1.0
    |-
    | all
    | {{ll|other}}
    | 1
    | 2.0
    |-
    | armyhanger
    | {{ll|counter}}
    | 4
    | 2.0
    |-
    | batteryfactory
    | {{ll|crate}}
    | 4
    | 20.0
    |-
    | batteryfactory
    | {{ll|crate}}
    | 4
    | 10.0
    |-
    | batteryfactory
    | {{ll|crate}}
    | 4
    | 50.0
    |-
    | bedroom
    | {{ll|crate}}
    | 1
    | 1.0
    |-
    | closet
    | {{ll|crate}}
    | 4
    | 10.0
    |-
    | closet
    | {{ll|metal_shelves}}
    | 4
    | 8.0
    |-
    | controlroom
    | {{ll|counter}}
    | 4
    | 10.0
    |-
    | controlroom
    | {{ll|counter}}
    | 4
    | 20.0
    |-
    | departmentstorage
    | {{ll|metal_shelves}}
    | 4
    | 20.0
    |-
    | departmentstorage
    | {{ll|metal_shelves}}
    | 4
    | 10.0
    |-
    | electronicsstorage
    | {{ll|shelves}}
    | 4
    | 10.0
    |-
    | electronicsstorage
    | {{ll|shelves}}
    | 4
    | 20.0
    |-
    | kitchen
    | {{ll|counter}}
    | 4
    | 2.0
    |-
    | radiofactory
    | {{ll|crate}}
    | 4
    | 10.0
    |-
    | toolstore
    | {{ll|counter}}
    | 4
    | 10.0
    |}
</div>
<div style="float:left;">
    {| class="wikitable theme-red" style="margin-right:15px; width:95%;"
    |+ {{ll|Vehicles}}
    ! Vehicle Type/Location
    ! Rolls
    ! Chance
    |-
    | AmbulanceGloveBox
    | 4
    | 10
    |-
    | CarpenterGloveBox
    | 4
    | 10
    |-
    | ConstructionWorkerGloveBox
    | 4
    | 10
    |-
    | DistilleryGloveBox
    | 4
    | 10
    |-
    | DoctorGloveBox
    | 4
    | 10
    |-
    | ElectricianGloveBox
    | 4
    | 10
    |-
    | FarmerGloveBox
    | 4
    | 10
    |-
    | FireGloveBox
    | 4
    | 10
    |-
    | FishermanGloveBox
    | 4
    | 10
    |-
    | FossoilGloveBox
    | 4
    | 10
    |-
    | GloveBox
    | 4
    | 10
    |-
    | GolfGloveBox
    | 4
    | 10
    |-
    | HeraldsGloveBox
    | 4
    | 10
    |-
    | HunterGloveBox
    | 4
    | 10
    |-
    | MassGenFacGloveBox
    | 4
    | 10
    |-
    | McCoyGloveBox
    | 4
    | 10
    |-
    | MetalWelderGloveBox
    | 4
    | 10
    |-
    | PainterGloveBox
    | 4
    | 10
    |-
    | PoliceGloveBox
    | 4
    | 10
    |-
    | PostalGloveBox
    | 4
    | 10
    |-
    | RadioGloveBox
    | 4
    | 10
    |-
    | RangerGloveBox
    | 4
    | 10
    |-
    | SpiffoGloveBox
    | 4
    | 10
    |-
    | SurvivalistGlovebox
    | 4
    | 10
    |-
    | TransitGloveBox
    | 4
    | 10
    |}
</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-->


== History ==
==Disposal==
{| class="wikitable" width="550" style="text-align:center;"
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==
{{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 65: Line 317:
*[[Electrical]]
*[[Electrical]]


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


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

Latest revision as of 14:56, 24 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
Containers
Building / Room Container Rolls Chance
Not referenced StoreShelfElectronics 4 10.0
Not referenced StoreShelfElectronics 4 20.0
all counter 4 2.0
all crate 1 1.0
all other 1 2.0
armyhanger counter 4 2.0
batteryfactory crate 4 20.0
batteryfactory crate 4 10.0
batteryfactory crate 4 50.0
bedroom crate 1 1.0
closet crate 4 10.0
closet metal_shelves 4 8.0
controlroom counter 4 10.0
controlroom counter 4 20.0
departmentstorage metal_shelves 4 20.0
departmentstorage metal_shelves 4 10.0
electronicsstorage shelves 4 10.0
electronicsstorage shelves 4 20.0
kitchen counter 4 2.0
radiofactory crate 4 10.0
toolstore counter 4 10.0
Vehicles
Vehicle Type/Location Rolls Chance
AmbulanceGloveBox 4 10
CarpenterGloveBox 4 10
ConstructionWorkerGloveBox 4 10
DistilleryGloveBox 4 10
DoctorGloveBox 4 10
ElectricianGloveBox 4 10
FarmerGloveBox 4 10
FireGloveBox 4 10
FishermanGloveBox 4 10
FossoilGloveBox 4 10
GloveBox 4 10
GolfGloveBox 4 10
HeraldsGloveBox 4 10
HunterGloveBox 4 10
MassGenFacGloveBox 4 10
McCoyGloveBox 4 10
MetalWelderGloveBox 4 10
PainterGloveBox 4 10
PoliceGloveBox 4 10
PostalGloveBox 4 10
RadioGloveBox 4 10
RangerGloveBox 4 10
SpiffoGloveBox 4 10
SurvivalistGlovebox 4 10
TransitGloveBox 4 10

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