Flashlight: Difference between revisions

From PZwiki
m (Fix typo: Added HandTorch item properties with Flashlight item properties)
m (Distribution table update)
 
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{languages}}
{{Header|Project Zomboid|Items|Electronics}}
{{header|The Game World|Items|Tools|Illumination|type=Electric|version=Version 41|incver=73}}{{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_Model.png
|icon=Flashlight.png
|image_width = 300px
|icon_name=Flashlight
|alternate_image = Flashlight.png
|category=Light Source
|alternate_name = Flashlight
|alternate_link =  
|weight=1
|weight=1
|primary_use=Light source
|function=Light source
|max_units=1,111
|max_units=0.0009
|contents=[[Battery]]
|energy_source=[[Battery]]
|light_distance = 25
|metal_value=10
|light_strength = 2
|light_distance=25
|torch_cone = True
|light_strength=2
|class_name=Base.Torch
|torch_cone=True
}}'''Flashlights''' or '''Torches''' are drainable [[items|items]] that provide a source of light.
|item_id=Base.Torch
}}
'''Flashlight''' is a drainable [[Items|item]] that provides a source of light.


==Usage==
==Usage==
A flashlight or torch can be used to provide light for the [[player]] when it is dark. To use them, it must be equipped in either the primary or secondary hand, meaning a [[weapon]] will either be made to [[weapons#Two-Handed|one-handed]] or unequipped. The light can be toggled with {{key|F}}. The light will be shone in a cone in front of the player. The torch is weaker than the flashlight, the strongest equippable light source in the game.  
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.


Flashlights and torches requires a [[battery|battery]] to function. Some spawn with one, so check how much yours has. As the light is used, the battery will gradually drain. When the battery is low, the light will begin to flicker. Once completely drained, the battery will be {{abbr|consumed|disappears}} and a new battery will need to be put into the flashlight for it to function again. A full battery can be taken out of a flashlight or torch if needed for another [[Electricity and Engineering|device]].
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 header|ing=2}}
{{Crafting/sandbox2
{{Crafting general|002|ing=2}}
|flashlight
{{Crafting general|003|ing=2}}
|battery
|}
}}
 
===Carpentry===
===Carpentry===
{{Crafting/sandbox2
|lamp_on_pillar
}}


{{Crafting header|ing=5}}
==Trivia==
{{Crafting carpentry|402|ing=5}}
*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>
 
 
 
==Distribution==
The loot distributions can be found in the table(s) below.
 
<!--BOT FLAG|Torch|41.78.16-->
{{clear}}
<div class="togglebox theme-red">
    <div>Torch distribution
        <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>
    <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-togglebox-Torch">
    <div class="toggle-content"><div style="display: flex;"><div style="float:left;">
    {| class="wikitable theme-red" style="margin-right:15px; width:95%;"
    |+ {{ll|Containers}}
    ! Building / Room
    ! Container
    ! Rolls
    ! 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==
==Code==
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
{{CodeBox
{{Retrieved|version=41|incver=65}}
| {{CodeSnip
<nowiki> item Torch
  | lang = java
DisplayCategory = LightSource,
  | line = true
LightDistance = 25,
  | start = 1252
Weight = 1,
  | source = items.txt
DisappearOnUse = FALSE,
  | retrieved = true
Type = Drainable,
  | version = 41.78.16
TorchCone = TRUE,
  | code =
UseDelta = 0.0009,
item Torch
LightStrength = 2,
{
TorchDot = 0.66,
    DisplayCategory = LightSource,
DisplayName = Flashlight,
LightDistance = 25,
ActivatedItem = TRUE,
Weight = 1,
Icon = Flashlight,
DisappearOnUse = FALSE,
MetalValue = 10,
Type = Drainable,
cantBeConsolided = TRUE,
TorchCone = TRUE,
StaticModel = FlashLight,
UseDelta = 0.0009,
primaryAnimMask = HoldingTorchRight,
LightStrength = 2,
secondaryAnimMask = HoldingTorchLeft,
TorchDot = 0.66,
WorldStaticModel = FlashLightGround,</nowiki>
DisplayName = Flashlight,
'''''From newitems.txt (Project Zomboid directory/media/scripts/)'''''
ActivatedItem = TRUE,
{{Retrieved|version=41|incver=65}}
Icon = Flashlight,
<nowiki> item HandTorch
MetalValue = 10,
DisplayCategory = LightSource,
cantBeConsolided = TRUE,
LightDistance = 15,
StaticModel = FlashLight,
Weight = 0.5,
primaryAnimMask = HoldingTorchRight,
DisappearOnUse = FALSE,
        secondaryAnimMask = HoldingTorchLeft,
Type = Drainable,
        WorldStaticModel = FlashLightGround,
TorchCone = TRUE,
}
UseDelta = 0.0004,
}}
LightStrength = 0.9,
}}
DisplayName = Hand Torch,
ActivatedItem = TRUE,
Icon = Flashlight2,
MetalValue = 10,
cantBeConsolided = TRUE,
StaticModel = HandTorch,
primaryAnimMask = HoldingTorchRight,
secondaryAnimMask = HoldingTorchLeft,
WorldStaticModel = HandTorchGround,</nowiki>


==See also==
==See also==
Line 82: Line 219:
*[[Hand Torch]]
*[[Hand Torch]]


{{Navbox_equipment}}
{{Navbox items|survival}}
[[Category:Electricity and Engineering]]
 
 
[[Category:Light sources]]

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