Template:Container/doc

Containers are interactable in-game objects containing items that can be looted by the party. This template is used to store information regarding a container (currently only in ) for use in other parts of the wiki.

Fixed containers can be locked - requiring a key or the appropriate skills to unlock, trapped - which requires you disarm the trap to safely open it, or hidden which prevents the container from showing up or being interacted with before it is detected. All of these checks use the Mechanics skill.

Items are pulled from three main sources:
 * The containers "inventory". This is a fixed set of items that are guaranteed to appear in a specific container.
 * The items equipped by the killed creature or NPC, including their quick slot items. Note that certain items are set to never drop as loot, and containers can be set to not pull items from the character's equipment.
 * A lootlist containing random loot.

How it works
The container template is not passed any random loot data (besides the root lootlist name). This data is generated automatically via the #invoke to Module:Lootlist, which constructs a cargo_store parser function using the data passed into the Container template, plus a set of  and   fields for each of the 20 possible different loot combinations. This module handles the generation of the loot items, and mimics the state of the psuedorandom number generator and logic of the lootlist evaluation process in. Doing this saves having to manually input these values, which would otherwise take up a huge amount of space on the page.

Syntax
{{Container
 * name              = Chest
 * image             =
 * description       =
 * location          = Crucible Keep
 * group             =
 * mapnode           =
 * position_x        = -22.0466
 * position_z        = -36.16709


 * locked            = yes
 * locked_difficulty = 3
 * key_item          =
 * key_required      = no


 * trapped           = no
 * trap_item         =


 * hidden            = no
 * detect_difficulty =


 * steal_faction     = Knights of the Crucible
 * steal_rep         = Minor
 * steal_attack      = yes
 * steal_ally_attack = no


 * inventory         =
 * inventory_qty     =
 * lootlist          = Dyr_Med_Weapons_5_6


 * internalname      = Container_2D_Chest_05_L
 * guid              = 6ac25cab-78f9-4130-9d3e-e180bf22f390
 * }

Example
To do testing at a later date

Parameters
The template takes the following named parameters:

(String)
 * The label field in-game (e.g. "Shelf", "Bookcase", etc). This is shown at the top of the loot window.


 * Container.LabelName or Container.ManualLabelName, first present

(File)
 * An image of the container. Not currently used.

(Wikitext)
 * A brief description of where this container is found within the level. Do not include the name of the container, name of the location, or mention of any items that the container contains. For example "Northeastern corner, outside of Trygil's Curriery"

(Page)
 * The page name of the location this container is found, e.g. Dyrford Village

(String)
 * Can be used to group containers. The container list creates a dropdown option for each unique group. This allows a user to view the containers in a specific group by selecting it in the dropdown. The group can be whatever, but ideally should be a notable and easily identifiable section of the map (e.g. Kitchen, Northwestern corner, Lobby, etc).

(String)
 * The text used as an identifier on a Template:Worldmap_poe1 present on the page. This will be shown in the top right of the container table, and when clicked will highlight and jump to the node on the map. If this is present, an equivalent Template:Poinode_poe1 should exist with the class "loot-container-mapnode", which when clicked will highlight and jump to the associated container table.
 * Container links to the node using the  identifier. The container has the id attribute of the   field, and a data-mapnode-id attribute with the value of the   field.
 * Mapnode links to the container using the  (below). The mapnode should have id attribute of the   field, and a data-container-id attribute with the value of the.

and  (Float)
 * Transform.position XZ (Unity uses Y-up, poe1 has the world on the "floor" with the camera pointing down). This is stored because the XZ position of the container is used as part of the random seed when the loot list is evaluated.


 * Loot.transform.position.x and Loot.transform.position.z

Lock (OCL)
(Boolean, default = no)
 * Whether this container is locked. Valid values are "yes" and "no".


 * True if Container has OCL component

(Integer, default = 1)
 * How difficult this lock is to lockpick. See Mechanics


 * OCL.LockDifficulty

(Page)
 * The page name of the key that opens this container.


 * OCL.Key

(default = "no")
 * Whether the key must be in the stash for the container to be unlocked (if true, the container cannot be lockpicked). Valid values are "yes" and "no"


 * OCL.MustHaveKey

Trap
(Boolean)
 * Whether this container is trapped. Valid values are "yes" and "no"


 * Presence of a Trap component on the container

(Integer, default = 1)
 * How difficult this trap is to disarm. See Mechanics


 * Trap.TrapDifficulty

(Page)
 * The item given to the character disarming the trap. Leave empty if no item is given.
 * Trap.DisarmItem

Detectable
(Boolean, default = "no")
 * Whether this container is hidden. Valid values are "yes" and "no".

If a container is trapped, and StartsDetected is true, the container is visible but the trap is not. Inversely, if a container is trapped and StartsDetected is false, the container is invisible and trapped - detecting it will detect both the container and the trap.


 * Presence of Detectable component on Container, as long a Detectable.StartsDetected is false

(Integer)
 * How difficult it is to detect this container.
 * Detectable.Difficulty

Stealing
(Page)
 * The page name of the faction that owns this container. If FactionName.None, characters may freely loot the container without issue. Otherwise, taking from this container if you aren't part of the faction (not the same as a good relationship with the faction) will either cause reputation loss with the faction, or will cause nearby faction members to immediately attack you. This occurs if you aren't in stealth, or if you're in stealth and the enemy has > 200 suspicion (red circle filled) AND has line of sight with you. Stealing from the same container more than once does not cause a repeat loss in reputation.


 * Container.StealingFactionID

(String)
 * The negative reputation adjustment towards the faction if caught stealing from this container. Valid values are "None", "VeryMinor", "Minor", "Average", "Major", and "VeryMajor".
 * Container.StealingFactionAdjustment

(Boolean, default = "no")
 * Whether stealing from this container will cause characters in the faction to attack. Valid values are "yes" and "no".
 * Container.AttackThief

(Boolean, default = "no")
 * Whether stealing from this container will cause characters in allied factions to attack. Valid values are "yes" and "no".
 * Container.AlliesAttackThief

Technical
(String)
 * The GameObject name of the container.

(String)
 * The InstanceID.UniqueID of the container GameObject.

Contents
(List of Page)
 * A semicolon separated list of the items in the inventory of this container. These are items that are always present in the container. Should not contain duplicates!
 * For example:
 * Inventory.Items

(List of Integer)
 * A semicolon separated list of the quantity of each of the items in the inventory of this container. May be omitted if all items have a quantity of 1, and must contain the exact number of items present in the above field if present.

(String)
 * The ID of the root lootlist of this container. This should match an ID in the table Template:Lootlist
 * Loot.LootList

Generated fields
The following parameters are not used in calls to Container, and are instead automatically generated for use in the cargo_store parser function.

(List of Page)
 * The loot items that were generated during the evaluation of the loot list on day x, without duplicates.

(List of Integer)
 * A list of the quantity of each of the items that were generated on this day. As with, this may be omitted if all items have a quantity of 1, and should contain the exact number of items present in the above field, if present.