Class WearableSlotConfig
- Namespace
- Vintagestory.GameContent
- Assembly
- VSSurvivalMod.dll
An entity can provide seats and slots
A slot however if filled with a chair can also provide a seat
Or a slot can also be configured to be usable as a seat if empty Open in GitHub
[DocumentAsJson]
public class WearableSlotConfig
- Inheritance
-
WearableSlotConfig
Examples
"wearableSlots": [
{
"code": "head",
"forCategoryCodes": [ "bridle" ],
"attachmentPointCode": "HeadAP"
},
{
"code": "face",
"forCategoryCodes": [ "face" ],
"attachmentPointCode": "FaceAP"
},
{
"code": "neck",
"forCategoryCodes": [ "lantern" ],
"attachmentPointCode": "NeckAP"
},
...
]
Inside a collectible to be worn...
"attributes": {
"attachableToEntity": {
"categoryCode": "pillion",
"attachedShape": { "base": "item/wearable/hooved/pillion1" },
"seatConfig": {
"bodyYawLimit": 0,
"controllable": false,
"mountOffset": {
"x": -0.25,
"y": -0.45,
"z": -0.25
},
"MountRotation": { "y": 0.0 },
"eyeOffsetX": 0.2
}
},
...
},
Fields
AttachmentPointCode (Required)
Attachment point code of the shape element to attach to
[DocumentAsJson("Required", "", false)]
public string AttachmentPointCode
Field Value
Code (Required)
Unique identifier for this slot
[DocumentAsJson("Required", "", false)]
public string Code
Field Value
ForCategoryCodes (Recommended)
Allows items with specified category codes to be placed in this slot
[DocumentAsJson("Recommended", "", false)]
public string[] ForCategoryCodes
Field Value
- string[]
BehindSlots (Optional) (Default: None)
Allows to combine multiple slots into one bigger slot
[DocumentAsJson("Optional", "None", false)]
public string[] BehindSlots
Field Value
- string[]
EmptyInteractPassThrough (Optional) (Default: False)
Skips the attach interaction if set to True and the slot is empty when the attach key is not pressed, allowing mount and other interactions to trigger instead
[DocumentAsJson("Optional", "False", false)]
public bool EmptyInteractPassThrough { get; set; }
Field Value
StepParentTo (Optional) (Default: None)
[DocumentAsJson("Optional", "None", false)]
public Dictionary<string, StepParentElementTo> StepParentTo
Field Value
Properties
SeatConfig (Required)
The config for the seat, stored in the attached collectible's JSON.
Requires a specific setup, see the example.
[DocumentAsJson("Required", "", true)]
public SeatConfig SeatConfig