Flashlight: Difference between revisions

From PZwiki
(added new header and infobox)
m (Distribution table update)
 
(44 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{languages|Flashlight}}
{{Header|Project Zomboid|Items|Electronics}}
{{header|The Game World|Items|Tools|Illumination|type=Electric|version=Version 39|incver=67.5}}{{Infobox drainable
{{Page version|41.78.16}}
|display_name=Flashlight
{{Infobox item
|name_colour = Electric
|name=Flashlight
|name_text_colour = Electric
|model=FlashLight_Model.png
|image=Flashlight.png
|icon=Flashlight.png
|weight=2
|icon_name=Flashlight
|primary_use=Light source
|category=Light Source
|max_units=1,111
|weight=1
|contents=[[Electricity]]
|function=Light source
|light_distance = 20
|max_units=0.0009
|light_strength = 0.8
|energy_source=[[Battery]]
|torch_cone = True
|metal_value=10
|class_name=Base.Torch
|light_distance=25
}}A '''flashlight''' is a drainable [[items|item]] providing a source of light.
|light_strength=2
|torch_cone=True
|item_id=Base.Torch
}}
'''Flashlight''' is a drainable [[Items|item]] that provides a source of light.


==Usage==
==Usage==
A flashlight is used to provide light for the [[player]] when it is dark. It is the strongest equippable light source in the game, however the light emitted from the flashlight will attract [[zombies]].  
The flashlight is an item that can be used to provide light for the [[player]] when it is dark. To use it, the player must first equip it in either their primary or secondary hand. If the player has an [[Items|item]] such as a [[weapon]] already equipped, equipping the flashlight will make the player hold the item one-handed if possible, otherwise it will be unequipped.


Requires [[battery|batteries]]. Once a battery is in, it can be fitted and un-fitted. However, as the flashlight is used, the battery will eventually die out. A new battery can be put into the flashlight once a battery is dead. When low on battery, the flashlight will occasionally flicker.
The light can be toggled by pressing {{key|F}}. The light will shine in a cone reaching up to 25 tiles in front of the player. The flashlight is significantly brighter than the [[Hand Torch|hand torch]] and is the strongest equippable light source in the game.
 
Flashlights require a [[battery]] to function. There is a chance that the flashlight will spawn with one already installed. While the light is turned on, the battery will gradually drain. When the battery is low, the light will begin to flicker and once completely drained the battery will be consumed. If the player has another battery, they can install it to continue using the flashlight. A full battery can also be taken out of a flashlight if needed for another device.


==Crafting==
==Crafting==
{{Crafting table header}}
{{Crafting/sandbox2
{{RecipeLookup|4036}}
|flashlight
{{RecipeLookup|4037}}
|battery
{{RecipeLookup|1017}}
}}
{{Crafting table footer}}
 
===Carpentry===
{{Crafting/sandbox2
|lamp_on_pillar
}}
 
==Trivia==
*While the [[torch]] and flashlight are two separate items in game, they often refer to the same real world item. Flashlight is the more common term in North America, while torch is most common in other English-speaking countries.
 
==Gallery==
<gallery>
Flashlight Example.png|A player holding a flashlight at night
</gallery>
 
 


== Code ==
==Distribution==
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
The loot distributions can be found in the table(s) below.
{{Retrieved|version=40|incver=5}}
 
<pre> item Torch
<!--BOT FLAG|Torch|41.78.16-->
LightDistance = 20,
{{clear}}
Weight = 2,
<div class="togglebox theme-red">
DisappearOnUse = FALSE,
    <div>Torch distribution
Type = Drainable,
        <span class="mw-customtoggle-togglebox-Torch" 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>
TorchCone = TRUE,
    <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-togglebox-Torch">
UseDelta = 0.0009,
    <div class="toggle-content"><div style="display: flex;"><div style="float:left;">
LightStrength = 0.8,
    {| class="wikitable theme-red" style="margin-right:15px; width:95%;"
DisplayName = Flashlight,
    |+ {{ll|Containers}}
ActivatedItem = TRUE,
    ! Building / Room
Icon = Flashlight,
    ! Container
MetalValue = 10,
    ! Rolls
cantBeConsolided = TRUE,</pre>
    ! Chance
    |-
    | Not referenced
    | {{ll|GeneratorRoom}}
    | 4
    | 4.0
    |-
    | Not referenced
    | {{ll|StoreShelfElectronics}}
    | 4
    | 4.0
    |-
    | all
    | {{ll|crate}}
    | 1
    | 0.2
    |-
    | all
    | {{ll|junk}}
    | 1
    | 2.0
    |-
    | all
    | {{ll|militarycrate}}
    | 4
    | 4.0
    |-
    | all
    | {{ll|other}}
    | 1
    | 4.0
    |-
    | armyhanger
    | {{ll|counter}}
    | 4
    | 4.0
    |-
    | armysurplus
    | {{ll|counter}}
    | 4
    | 4.0
    |-
    | bedroom
    | {{ll|crate}}
    | 4
    | 4.0
    |-
    | bedroom
    | {{ll|crate}}
    | 1
    | 0.4
    |-
    | carsupply
    | {{ll|metal_shelves}}
    | 4
    | 4.0
    |-
    | carsupply
    | {{ll|shelves}}
    | 4
    | 4.0
    |-
    | closet
    | {{ll|crate}}
    | 4
    | 4.0
    |-
    | controlroom
    | {{ll|counter}}
    | 4
    | 4.0
    |-
    | departmentstorage
    | {{ll|metal_shelves}}
    | 4
    | 4.0
    |-
    | electronicsstorage
    | {{ll|shelves}}
    | 4
    | 4.0
    |-
    | empty
    | {{ll|crate}}
    | 4
    | 4.0
    |-
    | kitchen
    | {{ll|counter}}
    | 4
    | 4.0
    |-
    | mechanic
    | {{ll|metal_shelves}}
    | 4
    | 4.0
    |-
    | toolstore
    | {{ll|counter}}
    | 4
    | 4.0
    |}
</div>
<div style="float:left;">
    {| class="wikitable theme-red" style="margin-right:15px; width:95%;"
    |+ {{ll|Vehicles}}
    ! Vehicle Type/Location
    ! Rolls
    ! Chance
    |-
    | TransitTruckBed
    | 4
    | 2
    |}
</div>
    </div><div style="clear:both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Torch" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Torch|41.78.16-->
 
==Code==
{{CodeBox
| {{CodeSnip
  | lang = java
  | line = true
  | start = 1252
  | source = items.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item Torch
{
    DisplayCategory = LightSource,
LightDistance = 25,
Weight = 1,
DisappearOnUse = FALSE,
Type = Drainable,
TorchCone = TRUE,
UseDelta = 0.0009,
LightStrength = 2,
TorchDot = 0.66,
DisplayName = Flashlight,
ActivatedItem = TRUE,
Icon = Flashlight,
MetalValue = 10,
cantBeConsolided = TRUE,
StaticModel = FlashLight,
primaryAnimMask = HoldingTorchRight,
        secondaryAnimMask = HoldingTorchLeft,
        WorldStaticModel = FlashLightGround,
}
}}
}}


==See also==
==See also==
* [[Battery]]
*[[Battery]]
*[[Hand Torch]]
 
{{Navbox items|survival}}
 


{{Navbox/Tools}}
[[Category:Light sources]]
[[Category:Electricity and Engineering]]

Latest revision as of 15:30, 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]
Flashlight
FlashLight Model.png
General
Category
Light Source
Encumbrance
Moodle Icon HeavyLoad.png
1
Function
Light source
Properties
Capacity
1111.1 units
Light distance
25 tiles
Light strength
2
Torch cone
True
Energy source
Technical
Item ID
Base.Torch

Flashlight is a drainable item that provides a source of light.

Usage

The flashlight is an item that can be used to provide light for the player when it is dark. To use it, the player must first equip it in either their primary or secondary hand. If the player has an item such as a weapon already equipped, equipping the flashlight will make the player hold the item one-handed if possible, otherwise it will be unequipped.

The light can be toggled by pressing F. The light will shine in a cone reaching up to 25 tiles in front of the player. The flashlight is significantly brighter than the hand torch and is the strongest equippable light source in the game.

Flashlights require a battery to function. There is a chance that the flashlight will spawn with one already installed. While the light is turned on, the battery will gradually drain. When the battery is low, the light will begin to flicker and once completely drained the battery will be consumed. If the player has another battery, they can install it to continue using the flashlight. A full battery can also be taken out of a flashlight if needed for another device.

Crafting

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

Carpentry

Product Ingredients Tools Requirements Workstation XP
LamponPillar Carpentry.png
Lamp on Pillar
Plank.png Plank ×2
Nails.png Nails ×4
Rope.png Rope ×1
Flashlight.png Flashlight ×1

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

Trivia

  • While the torch and flashlight are two separate items in game, they often refer to the same real world item. Flashlight is the more common term in North America, while torch is most common in other English-speaking countries.

Gallery


Distribution

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

Torch distribution Show / Hide
Containers
Building / Room Container Rolls Chance
Not referenced GeneratorRoom 4 4.0
Not referenced StoreShelfElectronics 4 4.0
all crate 1 0.2
all junk 1 2.0
all militarycrate 4 4.0
all other 1 4.0
armyhanger counter 4 4.0
armysurplus counter 4 4.0
bedroom crate 4 4.0
bedroom crate 1 0.4
carsupply metal_shelves 4 4.0
carsupply shelves 4 4.0
closet crate 4 4.0
controlroom counter 4 4.0
departmentstorage metal_shelves 4 4.0
electronicsstorage shelves 4 4.0
empty crate 4 4.0
kitchen counter 4 4.0
mechanic metal_shelves 4 4.0
toolstore counter 4 4.0
Vehicles
Vehicle Type/Location Rolls Chance
TransitTruckBed 4 2

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 Torch
	{
	    DisplayCategory = LightSource,
		LightDistance	=	25,
		Weight	=	1,
		DisappearOnUse	=	FALSE,
		Type	=	Drainable,
		TorchCone	=	TRUE,
		UseDelta	=	0.0009,
		LightStrength	=	2,
		TorchDot = 0.66,
		DisplayName	=	Flashlight,
		ActivatedItem	=	TRUE,
		Icon	=	Flashlight,
		MetalValue = 10,
		cantBeConsolided = TRUE,
		StaticModel = FlashLight,
		primaryAnimMask = HoldingTorchRight,
        secondaryAnimMask = HoldingTorchLeft,
        WorldStaticModel = FlashLightGround,
	}

See also