Explanation of Discrete Unsorted Types
Discrete Unsorted Item Sets (DiscreteUnsortedItemSets
) are used for configuring the spawning of cargo on a character that has some attachments set up through the AttachmentSlots
configuration. These item sets define additional items that can be spawned in the character's cargo, enhancing the loadout customization process.
Here's a detailed breakdown of the fields and their purposes within a DiscreteUnsortedItemSet
:
name (string):
This is a user-defined name for the item set. It can be any string and serves as an identifier for the item set.
spawnWeight (integer):
This field determines the likelihood of this item set being selected for spawning. The minimum value is 1, and a higher number increases the chance of this item set being chosen over others with lower spawn weights.
attributes:
This section defines default values for item attributes. These attributes are used if the nested types (children items) do not have
simpleChildrenUseDefaultAttributes
set totrue
. The attributes include:Health minimum and maximum values.
Quantity minimum and maximum values.
complexChildrenTypes:
This is an array of items that will be spawned in the character's cargo. Each item can itself have further nested items, making it a "complex" child. These items can have their own attributes and nested children.
simpleChildrenTypes (array):
This is an array of simple item types (identified by their type names) that will be spawned in the character's cargo. These items do not have nested children and are straightforward in their configuration.
simpleChildrenUseDefaultAttributes (bool):
This boolean field indicates whether the simple children items should use the default attributes defined in the
attributes
section of theDiscreteUnsortedItemSet
. If set totrue
, the simple children will use the default values specified in theattributes
section. If set tofalse
, they may use specific attributes defined elsewhere in the configuration.
Example Use Case
When setting up a DiscreteUnsortedItemSet
, you might want to configure a character's cargo to include a random assortment of items like food, ammunition, or tools. You can create a named set, assign it a spawn weight to control how often it appears, and list the items that should be included. Additionally, you can specify whether these items should use default health and quantity attributes or their specific values.
For instance, a DiscreteUnsortedItemSet
could look like this:
In this example:
Medic Cargo 1 and Medic Cargo 2 are two separate item sets designed to be used in the character's cargo.
Each set has a
spawnWeight
of 1, meaning they have an equal chance of being selected for spawning.The attributes section defines the default health and quantity ranges for the items in these sets.
complexChildrenTypes includes items like
FirstAidKit
with their own specific attributes and nested simple children (e.g.,BloodBagIV
,BandageDressing
,TetracyclineAntibiotics
).simpleChildrenTypes lists additional items that will be directly added to the character's cargo (e.g.,
Rag
,SheepSteakMeat
,Canteen
,Apple
).simpleChildrenUseDefaultAttributes is set to
false
, meaning these simple children items will not use the default attributes specified in the parentattributes
section but may have their own specified attributes.
By configuring DiscreteUnsortedItemSets
in this way, you can create diverse and realistic cargo configurations for characters in your loadout.
Note: As of this document being written, complex items have not been implemented. The functionality is there and will come in the future.
Last updated