Template:Infobox item/doc: Difference between revisions

From PZwiki
(Example: added missing parameters, re-arranged. Parameters: added "tags", "condition_lower_chance". Removed unused parameters (width & link))
m (Change template usage)
Line 72: Line 72:
===Weapon part (wip)===
===Weapon part (wip)===
{{See|Template:Infobox weapon mod}}
{{See|Template:Infobox weapon mod}}
{{Stub|Section}}
{{Stub|section=true}}


===Ammo (wip)===
===Ammo (wip)===
{{See|Template:Infobox ammo}}
{{See|Template:Infobox ammo}}
{{Stub|Section}}
{{Stub|section=true}}


===Clothing (wip)===
===Clothing (wip)===
{{See|Template:Infobox clothing}}
{{See|Template:Infobox clothing}}
{{Stub|Section}}
{{Stub|section=true}}


===Bag (wip)===
===Bag (wip)===
{{See|Template:Infobox container}}
{{See|Template:Infobox container}}
{{Stub|Section}}
{{Stub|section=true}}


===Water container (wip)===
===Water container (wip)===
{{See|Template:Infobox drainable}}
{{See|Template:Infobox drainable}}
{{See|Template:Infobox normal}}
{{See|Template:Infobox normal}}
{{Stub|Section}}
{{Stub|section=true}}


===<s>Trap</s> (wip)===
===<s>Trap</s> (wip)===
{{See|Template:Infobox trap}}
{{See|Template:Infobox trap}}
{{Stub|Section}}
{{Stub|section=true}}


===Communication (wip)===
===Communication (wip)===
{{See|Template:Infobox radio}}
{{See|Template:Infobox radio}}
{{Stub|Section}}
{{Stub|section=true}}


===Food===
===Food===
Line 150: Line 150:
===Literature (wip)===
===Literature (wip)===
{{See|Template:Infobox literature}}
{{See|Template:Infobox literature}}
{{Stub|Section}}
{{Stub|section=true}}


===Vehicle maintenance (wip)===
===Vehicle maintenance (wip)===
{{See|Template:Infobox vehicle part}}
{{See|Template:Infobox vehicle part}}
{{Stub|Section}}
{{Stub|section=true}}


===Other (wip)===
===Other (wip)===

Revision as of 01:08, 22 January 2024

Notebook.png
This is a documentation subpage for Template:Infobox item.
It contains usage information and other content that is not part of the original template page.
LightBulbYellow.png
IMPORTANT: This template has recently undergone a major rework. Please use this template with caution until all testing is completed.
Hammer.png
This template is currently under construction.
It is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well.
If this page has not been updated in a while, please replace this notice with {{Improve}}. Last edit was 22/01/2024.

All item infoboxes use this template.

Basic usage

name
Image.png
General
Category
category
Encumbrance
Moodle Icon HeavyLoad.png
weight
Technical
Item ID
item_id
{{Infobox item
| name =            <!-- or | display_name -->
| model =           <!-- or | image -->
| model_caption =   <!-- or | image_caption -->
| icon = 
| icon_name = 
| category = 
| weight = 
| item_id = 
}}

Detailed usage

Weapon

See more: Template:Infobox weapon
{{Infobox item
|name=
|model=
|icon= <!-- icon2, icon3, ... -->
|icon_name= <!-- icon_name2, icon_name3, ... -->
<!--GENERAL-->
|category=
|weight=
|equipped=
|attachment_type=
|function=
|skill_type=
|ammo_type
|clip_size
<!--PROPERTIES-->
|material= <!-- E.g. Metal -->
|material_value= <!-- E.g. MetalValue attribute -->
|condition_max=
|condition_lower_chance=
<!--DAMAGE-->
|damage_type
|min_damage=
|max_damage=
|door_damage=
|tree_damage=
|min_range=
|max_range=
|hit_chance=
|recoil_delay=
|sound_radius=
|base_speed=
|push_back=
|knockdown=
|aiming_time=
|reload_time=
|crit_chance=
|crit_multiplier=
|kill_move=
<!-- TECHNICAL -->
|item_id=
}}

Weapon part (wip)

See more: Template:Infobox weapon mod
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Ammo (wip)

See more: Template:Infobox ammo
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Clothing (wip)

See more: Template:Infobox clothing
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Bag (wip)

See more: Template:Infobox container
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Water container (wip)

See more: Template:Infobox drainable
See more: Template:Infobox normal
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Trap (wip)

See more: Template:Infobox trap
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Communication (wip)

See more: Template:Infobox radio
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Food

See more: Template:Infobox food
{{Infobox item
|name=
|model=
|icon=
|icon_name=
<!--GENERAL-->
|category=
|weight=
|function=
|max_units=
|days_fresh=
|days_rotten=
|cant_be_frozen=
|packaged=
<!--NUTRITION-->
|hunger_change=
|thirst_change=
|calories=
|lipids=
|proteins=
|carbohydrates=
<!--EFFECT-->
|unhappy_change=
|boredom_change=
|stress_change=
|fatigue_change=
|endurance_change=
|flu_change=
|pain_change=
|sick_change=
|reduce_infection_power=
|alcohol_power=
|poison_power=
<!--COOKING-->
|cook_minutes=
|burn_minutes=
|dangerous_uncooked=
|bad_microwaved=
|good_hot=
|bad_cold=
|spice=
<!--TECHNICAL DETAILS-->
|item_id=
}}

Literature (wip)

See more: Template:Infobox literature
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Vehicle maintenance (wip)

See more: Template:Infobox vehicle part
Notebook.png
This section may need more content.
Editors are encouraged to add new material to the page while expanding upon current topics.

Other (wip)

See more: Template:Infobox item custom

Decide whether more specific infobox use-cases are needed (medical, materials, and such).

Parameters

name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
General
Category
category
Encumbrance
Moodle Icon HeavyLoad.png
weight
<span title="Expression error: Unrecognized word "weight". with organized trait Expression error: Unrecognized word "weight". with disorganized trait" style="text-decoration: underline dotted; cursor: help;">Expression error: Unrecognized word "weight". (full)
Equipped
equipped
Slot attached
attachment_type
Function
function
Used in
weapon
Part type
part_type
Skill
skill_type
Ammunition
ammo_type
Magazine size
clip_size
Properties
Material
material
material quantity
material_value
Contents
contents
Capacity
max_units
Can boil water
Can_boil_water
Consumed
Consumed
Writable
Writable
Skills learned
recipes
Total pages
page_number pages
Total volumes
volumes
Packaged
Packaged
Rain factor
rain_factor
Days fresh
days_fresh days
Max condition
condition_max
Condition lower chance
condition_lower_chance
Run speed
run_speed (disabled)
Combat speed
combat_speed
Scratch defence
scratch_defense
Bite defence
bite_defense
Bullet defence
bullet_defense
Neck protection
neck_protection
Insulation
insulation
Wind resistance
wind_resistance
Water resistance
water_resistance
Light distance
light_distance tiles
Light strength
light_strength
Torch cone
Torch_cone
Wet cooldown
wet_cooldown
Sensor range
sensor_range tiles
Energy source
energy_source
Two-way
Two_way
Mic range
mic_range
Transmit range
transmit_range
Frequency range
min_channel–max_channel
Performance
Damage type
Slash
Damage
min_damage–max_damage
Door damage
door_damage
Tree damage
tree_damage
Range
min_range–max_range
Min range
min_range_mod
Max range
max_range_mod
Accuracy
hit_chance
Recoil
recoil_delay
Noise radius
sound_radius
Attack speed
base_speed
Knockback
push_back
Knockdown
knockdown
Aiming time
aiming_time
Reload time
reload_time
Crit chance
crit_chance%
Spread
angle_mod
Special ability
kill_move
Encumbrance mod.
weight_mod
effect_type power
effect_power
effect_type range
effect_range tiles
effect_type duration
effect_duration minutes
effect_type timer
effect_timer
Nutrition
HungerMoodle Icon Hungry.png
hunger_change
ThirstMoodle Icon Thirsty.png
thirst_change
CaloriesCalories
calories
CarbohydratesCarbohydrates
carbohydrates
ProteinsProteins
proteins
FatFat
lipids
Effect
UnhappinessMoodle Icon Unhappy.png
unhappy_change
BoredomMoodle Icon Bored.png
boredom_change
StressMoodle Icon Stressed.png
stress_change
FatigueMoodle Icon Tired.png
fatigue_change
EnduranceMoodle Icon Endurance.png
endurance_change
ColdMoodle Icon Cold.png
flu_change
PainMoodle Icon Pain.png
pain_change
SickMoodle Icon Sick.png
sick_change
AlcoholMoodle Icon Drunk.png
alcoholic
Sterilize powerDisinfection
alcohol_power
Antibiotic powerAntibiotics.png
reduce_infection_power
Bandage powerMoodle Icon Bleeding.png
bandage_power
WetnessMoodle Icon Wet.png
4% per unit
PoisonPoison
poison_power
Cooking
Time until cooked
cook_minutes minutes
Time until burned
burn_minutes minutes
Dangerous uncooked
Dangerous_uncooked
Bad microwaved
Bad_microwaved
Good hot
Good_hot
Bad cold
Bad_cold
Spice
Spice
Custom recipe
evolved_recipe
Crafting
Ingredients
ingredients
Technical
Tags
tags
Item ID
item_id

Name and images

Parameter Description
Preferred Alternative Game files
name display_name DisplayName The name of the item. Displayed at the top of the infobox.
Default: uses page name
model image WorldStaticModel
WeaponSprite
The model of the item.
Default: uses the icon
model_width image_width The width of the model.
Default: 200px (128px if model is blank)
model_caption image_caption The caption of the model/image. Displayed beneath the image/model.
icon Icon
IconsForTexture
The icon of the item. For multiple icons, add any number from 2-16 to the parameter.
E.g. icon2.
icon_width The width of the icon. For multiple icons, use the same number as the icon parameter.
E.g. icon_width2.
icon_name The tooltip to be displayed when hovering over the icon. For multiple icons, use the same number as the icon parameter.
E.g. icon_name2
icon_link The link for the icon when clicked. For multiple icons, use the same number as the icon parameter.
E.g. icon_link2

General

Parameter Description
Preferred Alternative Game files
category DisplayCategory The in-game category for the item.
weight Weight The encumbrance (previously weight) of the item.
weight_full The weight of the item when full.
Default: leaving blank will calculate the weight of a bag when full.'
capacity Capacity The capacity of the item, to be used in the weight_full value, or displayed in the properties section.
May be for bags or "drainable" items.
weight_reduction WeightReduction The encumbrance reduction of the item, to be used in the weight_full value, or displayed in the properties section.
body_location equipped BodyLocation The location of the item to be equipped.
attachment_type AttachmentType The slot the item is attached to. Typically used for weapons.
function primary_use
secondary_use
The item's function.
Deprecated: primary_use, secondary_use
secondary_item Item to be equipped in the secondary hand for the item to function.
attachments_provided AttachmentsProvided The attachment slots provided by the item. Typical of belts.
weapon MountOn
weapons
MountOn Weapons that the item is used in.
skill_type Categories The skill the item is associated with. Typically used with weapons.
ammo_type ammo AmmoType The type of ammo used in the item/firearm.
clip_size MaxAmmo The maximum ammo the item can contain. Typically used for firearms and magazines.

Properties

Parameter Description
Preferred Alternative Game files
material FabricType
MetalValue
The material the item is made of. Usage is not strict. Intended use is for items with MetalValue, or FabricType (Cotton, Leather, or Denim).
material_value MetalValue How much of the material the item contains. The material parameter will be included in the group title.
contents Alternate to material, especially if the material is fuzzy, e.g. A water bottle can hold water or gas.
capacity max_units UseDeltaDrainable
CountAmmo
1) The maximum units of a drainable item. Will automatically be calculated: 1/UseDelta.
2) Max number of rounds in a box. Group title will display differently if category = Ammo.
3) If error, it'll display as the input, with no changes. This is in case the max_units has already been calculated.
weight_reduction WeightReduction Encumbrance reduction of the item. Used to calculate the "Full encumbrance" value. Displayed as a percentage.
weight_reduction_text Extra text to be displayed next to weight_reduction. Typically usage: (Full)
can_boil_water IsCookable
CanBoilWater
*TODO: UPDATE*
Set to TRUE if the item can be used to boil water.
consumed *TODO: UPDATE*
Set to TRUE if the item is consumed once used/depleted.
writable CanBeWrite *TODO: UPDATE*
Set to TRUE if the item can be written in.
recipes TeachedRecipes
SkillTrained
The recipes or skills that are learned from the item (magazine or book).
page_number NumberOfPages
PageToWrite
Number of pages in the item.
vol_number *DEPRECATED* Volume number now in the display name.
packaged Packaged *TODO: UPDATE*
Set to TRUE if the item is packaged. Unlocks ability to look at the nutritional content.
rain_factor RainFactor Determines how quickly an item can fill up with water if left out in the rain.
days_fresh DaysFresh The amount of days this item is recognized as "fresh". The unit "days" is appended after the value.
days_rotten DaysTotallyRotten The amount of days before this item is recognized as "rotten". The unit "days" is appended after the value.
cant_be_frozen CantBeFrozen *TODO: UPDATE*
Set to TRUE if the item can be frozen, delaying time before the food rots.
condition_max ConditionMax The item's maximum condition, i.e. when it's fully repaired.
condition_lower_chance ConditionLowerChanceOneIn The item's chance of lowering in durability. Used in the calculation for "Base durability".
base_durability ConditionMax×ConditionLowerChanceOneIn *TODO: ADD PAREMETER TO TEMPLATE*
The average number of hits it will take before breaking, at level 0. See: Condition
run_speed RunSpeedModifier Run speed modifier. Note this is currently bugged/unimplemented, and has no in-game function.
combat_speed Combat speed modifier.
scratch_defense ScratchDefense Scratch defense modifier.
bite_defense BiteDefense Bit defense modifier.
bullet_defense BulletDefense Bullet defense modifier.
neck_protection NeckProtectionModifier Neck protection modifier.
insulation Insulation Insulation modifier.
wind_resistance WindResistance Wind resistance modifier.
water_resistance WaterResistance Water resistance modifier.
light_distance LightDistance The distance the light from the source will travel.
light_strength LightStrength The intensity/brightness of light the source provides.
torch_cone TorchCone *TODO: UPDATE*
Set to TRUE if the light from this item travels in a single direction, a.k.a torch cone.
wet_cooldown WetCooldown Time it takes to dry 1 wet_cooldown unit. Calculated based on the input and displayed in seconds.
sensor_range remote_range SensorRange
RemoteRange
How close an entity needs to be before the trap is triggered, or the distance the remote needs to be in order to trigger.
energy_source The energy source of the item. E.g. UsesBattery = TRUE would mean the energy source is a battery.
portable IsPortable Whether the item can be used while in the inventory, or if it must be placed on the ground in order to operate.
two_way TwoWay Whether the item can receive and transmit a signal.
mic_range MicRange Number of tiles the player must be within in order for the mic to transmit their voice.
transmit_range TransmitRange The distance in tiles the item will transmit
min_channel MinChannel The minimum bandwidth/frequency for selecting a channel.
max_channel MaxChannel The maximum bandwidth/frequency for selecting a channel.

Performance

Parameter Description
Preferred Alternative Game files
damage_type DamageCategory The type of damage this weapon does. The attribute used to define this has an order of priority, if it exists for the item.
  1. DamageCategory
  2. SubCategory
  3. Categories (ignore "Improvised")
  • Explosives should use common-sense for the damage type, e.g. Fire, Explosion, Smoke, Noise.
min_damage
max_damage
door_damage
tree_damage
damage_mod DamageModifier
min_range
max_range
min_range_mod
max_range_mod hit_chance
hit_chance_mod
accuracy_mod
recoil_delay recoil_mod
recoil_delay_mod
sound_radius
base_speed
push_back
knockdown
aiming_time aiming_time_mod
aiming_mod
reload_time reload_time_mod
reload_mod
crit_chance crit_multiplier
angle_mod spread_mod
kill_move
weight_mod
effect_type
effect_power
effect_range
effect_duration
effect_timer

Nutrition

Parameter Description
Preferred Alternative Game files
hunger_change HungerChange The value of hunger that is changed from using/consuming this item.
thirst_change ThirstChange The value of thirst that is changed from using/consuming this item.
calories Calories The value of calories.
carbohydrates Carbohydrates The value of carbohydrates.
proteins Proteins The value of proteins.
lipids fat Lipids The value of lipids.

Effect

Parameter Description
Preferred Alternative Game files
unhappy_change UnhappyChange The value of unhappiness that is changed from using/consuming this item.
boredom_change BoredomChange The value of boredom that is changed from using/consuming this item.
stress_change StressChange The value of stress that is changed from using/consuming this item.
fatigue_change FatigueChange The value of fatigue that is changed from using/consuming this item.
endurance_change EnduranceChange The value of endurance that is changed from using/consuming this item.
flu_change FluReduction The value of flu/cold that is changed from using/consuming this item.
pain_change PainReduction The value of pain that is changed from using/consuming this item.
sick_change ReduceFoodSickness The value of sickness that is changed from using/consuming this item.
alcoholic alcohol Alcoholic Whether this item is considered to be alcohol and therefore contributing to the drunk moodle.
alcohol_power AlcoholPower The alcohol power of this item when used on wounds.
reduce_infection_power ReduceInfectionPower How much the item reduces wound infection.
bandage_power BandagePower How effective the item is at absorbing blood, and how frequently it needs to be replaced.
wet_cooldown WetCooldown If this value is defined, the "Wetness" value will be displayed. Does not contribute to the value.
max_units UseDelta Displayed as "Wetness" if wet_cooldown is defined. Determines how much wetness is dried per unit. Displayed as a percentage.
poison_power PoisonPower The value of poison power attached to this item.

Cooking

Parameter Description
Preferred Alternative Game files
cook_minutes MinutesToCook How long it takes before this item is "cooked". The unit "minutes" is appended after the value.
burn_minutes MinutesToBurn How long it takes before this item is "burnt". The unit "minutes" is appended after the value.
dangerous_uncooked DangerousUncooked *TODO: UPDATE*
Set to TRUE if the item is can make the player sick if consumed before cooking it.
bad_microwaved BadInMicrowave *TODO: UPDATE*
Set to TRUE if this item is of a poorer quality when cooked in a microwave.
good_hot GoodHot *TODO: UPDATE*
Set to TRUE if this item is of a superior quality when consumed hot.
bad_cold BadCold *TODO: UPDATE*
Set to TRUE if this item is of a poorer quality when consumed cold.
spice Spice *TODO: UPDATE*
Set to TRUE if this item is considered a "spice" in cooking recipes.
evolved_recipe EvolvedRecipeName The name of the item used in evolved recipes. Not a list of recipes this can be used in.

Crafting

Parameter Description
Preferred Alternative Game files
ingredients

Technical

Parameter Description
Preferred Alternative Game files
tags Tags The Tags attributes for the item, that are used to define/group its functionality.
item_id class_name [module].[name] The ID of the item. The format is [module].[name]. This can be found in-game with debug, in the item list. Otherwise, in the item scripts where [module] is the name of the outermost block, e.g. Base, radio, farming, camping.
media_id The media ID for recorded media. Found in recorded_media.lua.
E.g. 89108e07-fc70-4eec-a267-790d6f4b9831 for CD: Your smile. Your kiss.