Cigarettes: Difference between revisions

From PZwiki
(Cleanups)
(→‎Code: code box update)
Line 47: Line 47:


==Code==
==Code==
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
 
{{Retrieved|version=41|incver=78.16}}
{{CodeBox
<pre>
| {{CodeSnip
item Cigarettes
  | lang = java
{
  | line = true
DisplayCategory = Junk,
  | start = 0
Count = 20,
  | source = items.txt
HungerChange = 0,
  | retrieved = true
Weight = 0.005,
  | version = 41
RequireInHandOrInventory = Matches/Lighter,
  | incver = 78.16
Type = Food,
  | code =
DisplayName = Cigarettes,
item Cigarettes
StressChange = -5,
{
Icon = IckySticks,
    DisplayCategory = Junk,
CustomContextMenu = Smoke,
    Count = 20,
CantBeFrozen = TRUE,
    HungerChange = 0,
OnEat = OnEat_Cigarettes,
    Weight = 0.005,
StaticModel = Cigarette,
    RequireInHandOrInventory = Matches/Lighter,
EatType = Cigarettes,
    Type = Food,
WorldStaticModel = CigarettePack_Ground,
    DisplayName = Cigarettes,
CustomEatSound = ,
    StressChange = -5,
}
    Icon = IckySticks,
</pre>
    CustomContextMenu = Smoke,
    CantBeFrozen = TRUE,
    OnEat = OnEat_Cigarettes,
    StaticModel = Cigarette,
    EatType = Cigarettes,
    WorldStaticModel = CigarettePack_Ground,
    CustomEatSound = ,
}
  }}
}}


==See also==
==See also==

Revision as of 07:56, 8 January 2024

Cigarettes
Cigarettes
Cigarettes
General
Category Item
Encumbrance
Heavy Load
0.005
Function Reduce Stress
Effect
Stress
Stress
-5
Technical details
Item ID Base.Cigarettes

Cigarettes are a consumable item.

Usage

A lighter or matches are required to smoke a cigarette.

Effect

Cigarettes can be used to reduce some stress of the player in exchange for causing some sickness.

If the player has the smoker trait, they will require having a regular cigarette, else they'll start to gain stress and eventually unhappiness. By having a smoke, they will completely relieve all stress accumulated (only -5 without the trait).

Cigarettes also reduce Unhappiness by -10 if the player has the Smoker negative trait (ten smokes will fully cure unhappiness).

Ideally, one with the smoker trait should only smoke when stress is at "Agitated", as the previous level, "Anxious", does nothing, and cigarettes cure all stress (But only with the smoker trait).

Smoking to the point of Fever Can poison the player to Death.

Farming

Cigarettes can be used to make insecticide spray to combat pest flies.

The player needs to have read The Farming Magazine or have the gardening trait or farmer profession to craft insecticide.

Product XP gained Skill(s) Recipe Ingredient 1 Ingredient 2 Ingredient 3
TZ GardeningSprayCan.png
Insecticide Spray
0 XP none Farmer
OR
MagazineFish.png
Gardening Spray Can (Empty)
Gardening Spray Can (Empty)
(consumed)
WaterDrop.png
Water (3 units)
(consumed)
IckySticks.png
Cigarettes x5
(consumed)

Distribution

Cigarettes can be found in stacks of twenty at a time, and they may be found in counters, crates, desks, garbage bins and zombies.

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 Cigarettes
{
    DisplayCategory = Junk,
    Count = 20,
    HungerChange = 0,
    Weight = 0.005,
    RequireInHandOrInventory = Matches/Lighter,
    Type = Food,
    DisplayName = Cigarettes,
    StressChange = -5,
    Icon = IckySticks,
    CustomContextMenu = Smoke,
    CantBeFrozen = TRUE,
    OnEat = OnEat_Cigarettes,
    StaticModel = Cigarette,
    EatType = Cigarettes,
    WorldStaticModel = CigarettePack_Ground,
    CustomEatSound = ,
}

See also

Template:Navbox medical