Spoilers (for Vehicles) - user-grinch/ModelExtras GitHub Wiki
The Spoiler system allows vehicle components to automatically deploy or adjust their angle once a specific speed threshold is met. This adds a layer of realism and mechanical polish to high-performance vehicle models. ME monitors vehicle velocity in real-time. Once the Trigger Speed is surpassed, the spoiler interpolates from its default position to the specified Rotation angle over a set Time duration.
There are two ways to implement this:
- JSONC Configuration: The preferred method for easy adjustments without re-exporting the model.
- Model Dummies: You can encode rotation and time data directly into the model dummy names for "plug-and-play" assets.
📌 Path: ModelExtras/data/<FILENAME>.jsonc or modloader/AnyFolder/<FILENAME>.jsonc
Both model ID and model name are valid FILENAME (e.g. 602.jsonc or alpha.jsonc).
💡Tip: It is recommended to use model names instead of model IDs to avoid conflicts with other mods — especially when using added vehicles.
Every JSONC configuration requires a metadata specification before any other settings. See here: METADATA
{
"spoilers": {
"movspoiler": { // Must match the dummy name in the model
"rotation": 30.0, // Target angle in degrees
"time": 3000, // Animation duration in milliseconds
"triggerspeed": 20 // Activation speed in km/h
}
}
}