Flashlight: Difference between revisions

From PZwiki
(update infobox values & code)
m (Distribution table update)
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Languages}}
{{Header|Project Zomboid|Items|Electronics}}
{{header/sandbox2|Project Zomboid|Items|Electronics}}
{{Page version|41.78.16}}
{{page version|41.78.16}}
{{Infobox item
{{Infobox item
|name=Flashlight
|name=Flashlight
|model=FlashLight_Model.png
|model=FlashLight_Model.png
|icon = Flashlight.png
|icon=Flashlight.png
|icon_name = Flashlight
|icon_name=Flashlight
|category=Light Source
|category=Light Source
|weight=1
|weight=1
Line 13: Line 12:
|energy_source=[[Battery]]
|energy_source=[[Battery]]
|metal_value=10
|metal_value=10
|light_distance = 25
|light_distance=25
|light_strength = 2
|light_strength=2
|torch_cone = True
|torch_cone=True
|item_id=Base.Torch
|item_id=Base.Torch
}}
}}
Line 21: Line 20:


==Usage==
==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 [[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.  
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.


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.  
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.  
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 header|ing=5}}
{{Crafting/sandbox2
{{Crafting carpentry|402|ing=5}}
|lamp_on_pillar
|}
}}


==Trivia==
==Trivia==
Line 43: Line 42:
==Gallery==
==Gallery==
<gallery>
<gallery>
Flashlight Example.png|A player holding a flashlight at night.
Flashlight Example.png|A player holding a flashlight at night
</gallery>
</gallery>






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


{| class="mw-collapsible mw-collapsed wikitable theme-red" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}" style="text-align:center; min-width:24em;"
<!--BOT FLAG|Torch|41.78.16-->
! colspan="4" | Containers
{{clear}}
|-
<div class="togglebox theme-red">
!Building/Room
    <div>Torch distribution
!Container
        <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>
! style="width: 3.2em;" |Rolls
    <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-togglebox-Torch">
! style="width: 3.2em;" |Chance
    <div class="toggle-content"><div style="display: flex;"><div style="float:left;">
|-
    {| class="wikitable theme-red" style="margin-right:15px; width:95%;"
| rowspan="1"|all
    |+ {{ll|Containers}}
| [[other]]
    ! Building / Room
| 1
    ! Container
| 4
    ! Rolls
|-
    ! Chance
| rowspan="1"|armyhanger
    |-
| [[counter]]
    | Not referenced
| 4  
    | {{ll|GeneratorRoom}}
| 4
    | 4
|-
    | 4.0
| rowspan="1"|armysurplus
    |-
| [[counter]]
    | Not referenced
| 4
    | {{ll|StoreShelfElectronics}}
| 4
    | 4
|-
    | 4.0
| rowspan="2"|bedroom
    |-
| [[crate]]
    | all
| 4  
    | {{ll|crate}}
| 4
    | 1
|-
    | 0.2
|[[crate]]
    |-
|1
    | all
|0.4
    | {{ll|junk}}
|-
    | 1
| rowspan="4"|carsupply
    | 2.0
| [[metal_shelves]]
    |-
| 4  
    | all
| 4
    | {{ll|militarycrate}}
|-
    | 4
|[[metal_shelves]]
    | 4.0
|4
    |-
|4
    | all
|-
    | {{ll|other}}
|[[metal_shelves]]
    | 1
|4
    | 4.0
|4
    |-
|-
    | armyhanger
|[[shelves]]
    | {{ll|counter}}
|4
    | 4
|4
    | 4.0
|-
    |-
| rowspan="2"|closet
    | armysurplus
| [[crate]]
    | {{ll|counter}}
| 4  
    | 4
| 4
    | 4.0
|-
    |-
|[[crate]]
    | bedroom
|4
    | {{ll|crate}}
|4
    | 4
|-
    | 4.0
| rowspan="1"|controlroom  
    |-
| [[counter]]
    | bedroom
| 4  
    | {{ll|crate}}
| 4
    | 1
|-
    | 0.4
| rowspan="1"|departmentstorage  
    |-
| [[metal_shelves]]
    | carsupply
| 4  
    | {{ll|metal_shelves}}
| 4
    | 4
|-
    | 4.0
| rowspan="1"|electronicsstorage  
    |-
| [[shelves]]
    | carsupply
| 4  
    | {{ll|shelves}}
| 4
    | 4
|-
    | 4.0
| rowspan="1"|empty  
    |-
| [[crate]]
    | closet
| 4  
    | {{ll|crate}}
| 4
    | 4
|-
    | 4.0
| rowspan="1"|kitchen  
    |-
| [[counter]]
    | controlroom
| 4  
    | {{ll|counter}}
| 4
    | 4
|-
    | 4.0
| rowspan="2"|mechanic  
    |-
| [[metal_shelves]]
    | departmentstorage
| 4  
    | {{ll|metal_shelves}}
| 4
    | 4
|-
    | 4.0
|[[metal_shelves]]
    |-
|4
    | electronicsstorage
|4
    | {{ll|shelves}}
|-
    | 4
| rowspan="1"|toolstore
    | 4.0
| [[counter]]
    |-
| 4  
    | empty
| 4
    | {{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==
Line 160: Line 191:
   | version = 41.78.16
   | version = 41.78.16
   | code =
   | code =
item Torch
item Torch
{
{
    DisplayCategory = LightSource,
    DisplayCategory = LightSource,
Line 181: Line 212:
         WorldStaticModel = FlashLightGround,
         WorldStaticModel = FlashLightGround,
}
}
  }}
}}
}}
}}


Line 188: Line 219:
*[[Hand Torch]]
*[[Hand Torch]]


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


[[Category:Light sources]]
[[Category:Light sources]]

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