Getting started

This page shows the minimum V-SwiFT authoring flow for a part patch.

Minimum setup

  1. Load the shipped mixins with @use "VSwift:*".

  2. Target a part with the :parts ruleset.

  3. Wrap your variant data in @include part-switch() { ... }.

  4. Inside that slot, add one or more variant sets.

  5. Inside each variant set, add one or more variants.

  6. Inside each variant, add transformers by their V-SwiFT transformer name.

Minimal example

@use "VSwift:*";

:parts #container_2v_inline_liquids {
    @include part-switch() {
        +Length {
            VariantSetLocalizationKey: "MyMod/Length";

            +Short {
                VariantLocalizationKey: "MyMod/Length/Short";
                +DefaultMassVisualizer {}
                +MassModifier {
                    Modifier: -0.10;
                }
            }

            +Long {
                VariantLocalizationKey: "MyMod/Length/Long";
                +DefaultMassVisualizer {}
                +MassModifier {
                    Modifier: 0.20;
                }
            }
        }
    }
}

What that example creates

  • a Module_PartSwitch behaviour

  • a Data_PartSwitch module-data object

  • one VariantSet called Length

  • two Variant entries called Short and Long

  • transformer lists on each variant

Useful follow-up pages

Notes

The shipped mixin also injects a PAMModuleVisualsOverride entry so the Part Action Manager displays the V-SwiFT module using the VSwift/PartSwitch label.