Trail Presets
Trail presets are stored as JSON files, and can be used by players to save and restore their trail settings.
Every element in a preset file will apply itself to the user's "Your Trails" settings. When exported from in-game, the preset file contains every single setting from that tab. Exported trail configs go to the user's minecraft directory/config/elytratrail_presets folder, and are loaded from there as well.
Here is what the "default" preset looks like:
{
"enableTrail": true,
"enableRandomWidth": false,
"speedDependentTrail": true,
"trailMinSpeed": 0.8,
"trailMovesWithElytraAngle": true,
"maxWidth": 0.05,
"trailLifetime": 2.5,
"startRampDistance": 4.0,
"endRampDistance": 10.0,
"color": -1,
"randomWidthVariation": 0.5,
"prideTrail": "",
"fadeStart": false,
"fadeStartDistance": 1.0,
"lifeTimeFade": true,
"glowingTrails": false,
"translucentTrails": true,
"wireframeTrails": false,
"alwaysShowTrailDuringTwirl": false,
"prideTrailRight": "",
"increaseWidthOverTime": false,
"startingWidthMultiplier": 1.0,
"endingWidthMultiplier": 5.0,
"distanceTillTrailStart": 0.0,
"endDistanceFade": false,
"endDistanceFadeAmount": 1.0,
"speedBasedAlpha": false,
"minAlphaSpeed": 0.75,
"maxAlphaSpeed": 2.0,
"speedBasedWidth": false,
"minWidthSpeed": 0.75,
"maxWidthSpeed": 2.0,
"trailMovesWithAngleOfAttack": true,
"useColorBoth": true,
"colorRight": -1,
"wingtipVerticalPosition": 0.5,
"wingtipHorizontalPosition": 1.0,
"wingtipDepthPosition": 1.0,
"distanceTillTrailEnd": 0.0,
"aoaBasedAlpha": false,
"minAlphaAOA": 10.0,
"maxAlphaAOA": 90.0,
"aoaBasedWidth": false,
"minWidthAOA": 10.0,
"maxWidthAOA": 90.0,
"edgeFade": false
}Presets do NOT need to have every config option in them, that is just how they are exported by default.
This is still a valid Preset, And it will only change those settings when it is applied:
{
"speedDependentTrail": true,
"trailMinSpeed": 0.8,
"color": "#FF00FF00"
}Colors can be stored as hex strings, or directly as integers. Both of these colors will load as white:
{
"color": "#FFFFFFFF",
"useColorBoth": false,
"colorRight": -1
}To define new presets with a resource pack, put them in your resource pack in assets\elytratrails\config_presets.
In game, users will be able to choose them in the "Presets" tab just like any other presets. These cannot override the built in presets, but you can make new ones.
More about how to utilize presets in a resource pack in the Resource Pack Trails Section