Generator

From PZwiki
UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
Generator
F Generator.png
General
Category
Electronics
Encumbrance
Moodle Icon HeavyLoad.png
40
Equipped
Two-handed
Properties
Material
Metal
Metal quantity
500
Max condition
100
Technical
Tags
HeavyItem
Item ID
Base.Generator

A generator is an electrical device that allows the player to generate electricity even after the power cuts out.

How to use

Generators are most often found at warehouses. They may also be found in tool sheds and occasionally self storage facilities. Generators must be placed close to the structure the player wishes to power so that the generator can be connected.

Generators can be picked up but cannot be put into the player's inventory, and must be carried. This means the player cannot attack while carrying a generator, and if a weapon is selected, the generator will be placed on the tile the player is on. The player is also encumbered with the weight, meaning they move slower, and may face additional hazards as a result.

Players should not place a generator inside a structure the player plans to or is currently occupying. Generator exhaust will negatively impact character health very quickly. Leaving the structure will halt the damage but the structure will not be safe until the generator is turned off.

Generators can be connected to the power system of a house via the "Connect Generator" option in the generator's context menu. A generator is fueled with gas via the "Add Fuel" context menu. The tank of a generator can take up to 1¼ gas can's fuel and can only be filled while the generator is off.

Players need the Electrician occupation or to have read the How to Use Generators manual to connect a generator.

In a custom built shelter, there may be some difficulty in getting a generator working. Moving it to the roof may fix this issue.

If the Generator Working In Exterior Custom Sandbox World setting is enabled, generators may also be hooked up to other buildings around the world. One of the most practical uses for this is to power gas station pumps, allowing for continued access to the station's fuel reserves.

Range

The range (radius) is 20 tiles on the x-y plane, as well as 2 floors above and below (forming a cylinder centered on the generator with height of 5 and base diameter of 41).

Generator Range
Range scheme

Gas consumption and runtime

The baseline fuel consumption of a generator running with no load placed on it is 0.02L/h. Any devices within a 20 tile radius add load to the generator, increasing fuel consumption. Various devices add different loads to the generator. All lighting, regardless of size, adds 0.002L/h fuel consumption per light. Refrigerators such as standing fridges and popsicle freezers, add a much greater load (0.13L/h and 0.16L/h per tile, respectively). The total load placed on a generator, along with electrical demand per object, can be seen by right-clicking the generator and selecting "Generator Info".

An example of the Generator Info screen

To calculate generator runtime, the following equation can be used:

% Fuel remaining / power demand = Runtime in the in-game hours

  • Fuel remaining as a percentage.
  • Power demand in L/h.
  • Runtime is measured in the in-game hours.

Example: A popsicle fridge ("0.16L/h" actual 0.24L/h and 0.32L/h for subsequent ones)), Television (0.03L/h), and 6 Lamps (0.012L/h) would equal a total power demand (fuel consumption) of 0.202L/h. A generator filled with one full gas can of fuel (8 out of 10 units of fuel) would give a fuel volume of 80%.

80 / (0.202L/h) = Approximately 396 in-game hours, or 16.5 in-game days

Gas consumption bug

As of 41.78.16 duplicate freezer/refrigerators (may extend to additional appliances) beyond the first (and/or second) may result in much higher total fuel consumption being displayed, but the actual consumption from the itemized total should be accurate (plus 0.02 from base generator operation itself). For Popsicle Fridges (and presumably other multi-tile fridges) each tile counts as an additional fridge, which can result in a more notable discrepancy with the displayed total compared to the actual consumption.

Operations

  • Update in power consumption is done automatically as powered devices are added or removed. In version prior to 41.X this was only done when the generator was turned off and on again.
  • Generators use variable amounts of fuel per hour (based on number and type of powered electronics using it as a source), and lose ~1.2% of condition per day as well. (41.53)
  • Electronics scrap can be used to repair a generator. At least one unit of Electronics Scrap has to be in the player's main inventory. Each repair operation will restore 4% + (0.5 * Electrical skill level)% of condition. Repairs can only be performed on a powered off generator.
  • If the condition drops lower than or equal to 20%, a chance for the generator to catch fire or explode is introduced. Nearby cells may catch fire too. So keep your generators strictly above 20% condition. (41.53)
  • Generators can be heard from a base radius of 20 tiles. (41.73)
  • "Take Generator" requires the use of both hands. Equipping anything in the Primary or Secondary slots will cause the Generator to be dropped. (41.53)
  • Generators occupy a tile & cannot share the same tile with any constructions/furniture, but they do NOT cause collision (i.e., do not block cars, players, or zombies). Thus, one can hide a Generator from plain sight by parking a car/vehicle on top of it. (41.53)

Materials to repair

Item Repaired Repair Materials
Generator.png
Generator
ElectronicsScrap.png
1 × Scrap Electronics
(4% + (0.5 * Electrical skill level)% repaired)

Spawn locations for custom maps

Generators will automatically spawn in rooms with the following room definitions.

Name
shed
garagestorage
storageunit

Code

Code icon.png Code snippet! This section contains source code from Project ZomboidShow / Hide

Source: ProjectZomboid\media\scripts\newitems.txt

Retrieved: Build 41.78.16
item Generator
    {
        DisplayCategory = Electronics,
        Weight	=	40,
        Type	=	Normal,
        DisplayName	=	Generator,
        Icon	=	Generator,
        Tooltip = Tooltip_Generator,
		RequiresEquippedBothHands = true,
		MetalValue = 500,
        ConditionMax = 100,
        Tags = HeavyItem,
    }

See also