Getting started
This page shows the minimum V-SwiFT authoring flow for a part patch.
Minimum setup
Load the shipped mixins with
@use "VSwift:*".Target a part with the
:partsruleset.Wrap your variant data in
@include part-switch() { ... }.Inside that slot, add one or more variant sets.
Inside each variant set, add one or more variants.
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_PartSwitchbehavioura
Data_PartSwitchmodule-data objectone
VariantSetcalledLengthtwo
Variantentries calledShortandLongtransformer 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.