Skip to content

Part Slot Provider Function

Ferdinand Calo edited this page Aug 19, 2021 · 4 revisions
# Function Overview
Name: Part Slot Provider Function
Function: adds part slots to install slot-based parts on them
From FVTM: yes

The Part-Slots Function allows you to define "part slots" in the vehicle,
on which parts (which are marked as "SlotBased" in the Installation Handler)
can be installed on. It also allows to set an offset, which any part
that is mounted in turn on that part (if it's also a provider) will be offset.

Example config (taken from FVP):

{
    "__comment": "Part JSON file.",
    "Function":{
        "id": "fvtm:part_slots",
        "slots":[
            [ 0, 0, 0, "mid_axle", "mid_axle" ],
            [ 0, 0, 0, "side_storage_s", "storage_left_s" ],
            [ 0, 0, 0, "side_storage_s", "storage_right_s" ]
        ]
    }
}

The slots are defined in an array labeled "slots", and each
entry should be an array as well. Here each's meaning:

  • x - first is the X offset, if any else leave as 0
  • y - second is the Y offset, if any else leave as 0
  • z - third is the Z offset, if any else leave as 0
  • type - forth is the type, any part that is installable on a slot
    and their category equals this type, can be installed on this slot
  • category - fifth, optional value, if missing it will be generated,
    this is the category a part which is installed into this slot will be identified as,
  • radius - sixth, optional value, if missing default will be 0.25,
    set's the default slot preview/hitbox for hotinstall/hotswap.
  • rotation - seventh, optional value, json array, if missing default is [ 0, 0, 0 ]
    wrapped x/y/z rotation for the part which will be installed on this part slot
Clone this wiki locally