-
-
Notifications
You must be signed in to change notification settings - Fork 6
Part Default Installation Handler
Ferdinand Calo edited this page Aug 7, 2019
·
19 revisions
# Installation Handler Overview
Name: Default Installation Handler
Function: adds the ability to install parts in the old scheme
From FVTM: yesThis Installation handler allows you to setup with which vehicles
your part is compatible, which parts the vehicle needs for this part
to be able to be installed and which part this one cannot be installed with.
If you want the part to be just installable, anywhere, without special
settings, just set "Installation": "default" in the Part config!
You can also set a per-vehicle specific "offset" of where the part will be rendered.
Example config (taken from FVP):
{
"__comment": "Part JSON file.",
"Installation": "default"
}
OR
{
"__comment": "Part JSON file.",
"Installation": {
"Handler": "default",
"Removable": true,
"CustomCategory": false,
"Compatible": [
{ "vehicle": "mypack:mycoolcar", "x": 0, "y": 23, "z": 14 },
{ "vehicle": "otherpack:good_truck", "x": 12, "y": 5.6, "z": 19.2 }
],
"Incompatible":[
{ "vehicle": "mypack:mycoolcar", "parts": [ "bumper", "front_deco" ] },
{ "vehicle": "otherpack:good_truck", "parts": [ "some_part_category" ] }
],
"Required": [
{ "vehicle": "mypack:mycoolcar", "parts": [ "lights", "hood" ] }
]
}
}Here an overview of the available fields:
-
Handler- the id of the wanted handler, it isdefault -
Removable- (boolean) optional, if the part can be afterwards removed from the vehicle -
CustomCategory- (boolean) optional, if the part can be installed into a player specified category -
Compatible- optional, this is an JSON array with the compatible vehicles and offsets listed
(each a JSON object)- e.g.
{ "vehicle": "<packid>:<vehicleid>", "x": x, "y": y, "z": z}-
vehicle- the unique id of the vehicle -
x- x coordinate of the seat, may/can be0 -
y- y coordinate of the seat, may/can be0 -
z- z coordinate of the seat, may/can be0
-
- e.g.
-
Incompatible- optional, this is an JSON array with the incompable parts per vehicle listed
(each a JSON object)- e.g.
{ "vehicle": "<packid>:<vehicleid>", "parts": [ "categories", "here" ] }-
vehicle- the unique id of the vehicle -
parts- an string array with incompatible part categories
-
- e.g.
-
Required- optional, this is an JSON array with the incompable parts per vehicle listed
(each a JSON object)- e.g.
{ "vehicle": "<packid>:<vehicleid>", "parts": [ "categories", "here" ] }-
vehicle- the unique id of the vehicle -
parts- an string array with required part categories
-
- e.g.
Need help in something that is not in the wiki, or is not there yet? Got issues or crashes?
Or want to help expand the Wiki? We have a discord server! https://discord.gg/AkMAzaA