Skip to content

Spawning Gear Configuration

What is the Spawning Gear Configuration?

The Spawning Gear Configuration is a way to override vanilla character spawning without touching the mission files. The configuration is based on the cfgPlayerSpawnGear.json file the structure of which is documented here.

This can be used to prepare multiple character presets that will be used during the spawning process.

INFO

Once activated in the Gameplay Settings, the cfgPlayerSpawnGear.json file overrides the behavior of StartingEquipSetup() in mission init file. If the CreateCharacter() in the mission init file is overridden and someone uses their own characterName setting/selection here, characterTypes from this JSON preset(s) will be ignored.

Structure of the cfgPlayerSpawnGear.json

FieldTypeDescription
versionintegerinternal version
presetssee Presets

Presets

An array of individual presets that will be used during the character spawn process. Presets with higher spawnWeight have higher chance to spawn often.

FieldTypeDescription
namestringName (can be any string)
spawnWeightintegerSpawn weight (min = 1, higher number means higher chance for spawn selection)
characterTypesarrayAn array of character types (typename) associated with the preset. Spawned in random order.
attachmentSlotItemSetsarrayAn array of AttachmentSlots structures which is used for character attachments spawning.
discreteUnsortedItemSetsarrayAn array of DiscreteUnsortedItemSets structures which is used for character cargo spawning.

AttachmentSlots

Configuration of specific character attachments (on character slots - back, head, body, etc.)

FieldTypeDescription
slotNamestringThe name of the attachment slot for the character, derived from CfgSlots. note: For shoulders, you can use shoulderL and shoulderR, these are automatically translated to respective ones defined in CfgSlots.
discreteItemSetsarrayAn array of discrete items that can be attached to the slot.

DiscreteItemSets

Configuration of specific character attachment(slot) and its attachments/cargo, for example weapon(s) and its attachments. You can setup multiple variants for each slot. Its spawning chance is driven by the spawnWeight.

FieldTypeDescription
itemTypestringThe type or name of the item in the set.
spawnWeightintegerSpawn weight (min = 1, higher number means higherchance for spawn selection)
attributesSee Attributes section. Those are default values used if the nested types have not simpleChildrenUseDefaultAttributes set to true.
quickBarSlotintegerThe quick bar slot where the item can be placed. Value of -1 means "don't assign".
complexChildrenTypesAn array of items that will be spawned under the parent (defined by itemType). See ComplexChildrenTypes section.
simpleChildrenTypesarrayAn array of items (typename) that will be spawned under the parent (defined by itemType).
simpleChildrenUseDefaultAttributesboolIndicates whether simple children items use default attributes. Defined on parent or configuration default.

DiscreteUnsortedItemSets

Used for spawning of cargo to character that have some attachments configured (through AttachmentSlots configuration).

FieldTypeDescription
namestringName (can be any string)
spawnWeightintegerSpawn weight (min = 1, higher number means higher chance for spawn selection)
attributesSee Attributes section. Those are default values used if the nested types have not simpleChildrenUseDefaultAttributes set to true.
complexChildrenTypesAn array of items that will be spawned in any of the characters cargo.
simpleChildrenTypesarrayAn array of items (typename) that will be spawned in any of the characters cargo.
simpleChildrenUseDefaultAttributesboolIndicates whether simple children items use default attributes defined in that structure or configuration default.

ComplexChildrenTypes

Primary use of that types is for spawning of nested cargo, for example, if you want to spawn the Pot with Tomato inside. You can also set the QuickBar shortcut for the parent item.

FieldTypeDescription
itemTypestringName of item to spawn (typename)
attributesSee Attributes section. Those are default values used if the nested types have not simpleChildrenUseDefaultAttributes set to true.
quickBarSlotintegerThe quick bar slot where the item can be placed. Value of -1 means "don't assign".
simpleChildrenUseDefaultAttributesboolIndicates whether simple children items use default attributes defined in that structure or configuration default.
simpleChildrenTypesarrayAn array of item names (typename) that will be spawned.

SimpleChildrenTypes

Is used for simple spawning of one or more items to the existing cargo that is already attached to the player (through AttachmentSlots configuration).

Attributes

These are common attributes used by the other structures and defines the basic stats of the item. If set, random value between the min and max is calculated and set during the item spawn.

FieldTypeDescription
healthMinfloatThe minimum health attribute value for the item.
healthMaxfloatThe maximum health attribute value for the item.
quantityMinfloatThe minimum quantity attribute value for the item.
quantityMaxfloatThe maximum quantity attribute value for the item.