Skip to content

Part Installation Handler

Ferdinand Calo edited this page Aug 10, 2019 · 5 revisions
# Feature Overview
Kind: Part Installation Handler
Extendable: yes
JSON based: no
JSON config: yes

Part Installation Handlers are a new feature added in FVTM 3.
Before you had to setup a part's installable categories and had the choice
to set with vehicle vehicle it is compatible and with which not etc.
Well, that's still how it works, but for some things (e.g. wheels) defining
all possible installation categories could become... irrating...
Especially if someone then selected a category for another vehicle kind...

Well! That's fixed with Installation Handlers!
If you select the "default" one, you get all features as before
(that is, configure compatible vehicles for the part, or incompatible).
But also you can select specialized Installation handlers for your Part
like the Part - Wheel Installation Handler, it will show you only relevant
categories into which you can install the wheel, no more, no less.

If you have the required wisdom in java/modding you can create your own.

To add an installation handler you can do as follows:

{
    "__comment": "Part JSON file.",
    "Installation": "default"
}
OR
{
    "__comment": "Part JSON file.",
    "Installation": {
        "Handler": "default",
        "Removable": true,
        "CustomCategory": false,
        "Compatible": {}
    }
}
OR
{
    "__comment": "Part JSON file.",
    "Installation": "com.domain.mypack.MyInstallationHandler.class"
}

Here a list of default handlers shipped with FVTM:

Clone this wiki locally