-
Notifications
You must be signed in to change notification settings - Fork 0
05. Advanced Swing Trails
The Models per Style system allows you to dynamically swap a weapon's visual model depending on the player's current combat style (stance).
💡 What's New in v2.2: I have completely deprecated the old, complex "Advanced Swing Trails" system. Now only a single configuration file is required, whereas previously two were used: one where the textures were declared, and one for item_skins for EF. This change making development significantly faster!
Place your configuration files inside your resource pack or mod assets at:
assets/<any_modid>/advanced_swing_trails/*.json
- Per-style swing trail configuration
- Custom textures
- Custom colors
- Custom particle types
- Custom trail positions
- Custom interpolation count
- Custom lifetime
- No
item_skinsfile required
The following example configures different swing trails for the same weapon depending on its current Epic Fight style.
{
"trails": [
{
"item": "epicfight:bokken",
"default": "two_hand",
"style_config": [
{
"style": "one_hand",
"trail_data": {
"color": [51, 235, 203],
"begin_pos": [0.0, 0.0, -0.2],
"end_pos": [0.0, -0.24, -1.8],
"lifetime": 6,
"interpolations": 4,
"texture_path": "epicfight:textures/particle/swing_trail.png",
"particle_type": "epicfight:swing_trail"
}
},
{
"style": "two_hand",
"trail_data": {
"color": [51, 235, 0],
"begin_pos": [0.0, 0.0, -0.2],
"end_pos": [0.0, -0.24, -1.8],
"lifetime": 6,
"interpolations": 4,
"texture_path": "epicfight:textures/particle/swing_trail.png",
"particle_type": "epicfight:swing_trail"
}
}
]
}
]
}| Property | Type | Description |
|---|---|---|
| trails | Array | List of weapon trail configurations. |
Each entry inside the trails array defines the configuration for a specific item.
| Property | Type | Description |
|---|---|---|
| item | String | Item registry name (modid:item_name). |
| default | String | Style used as fallback when the current style has no matching configuration. |
| style_config | Array | List of style-specific trail definitions. |
Each style can define its own trail settings.
| Property | Type | Description |
|---|---|---|
| style | String | Epic Fight style name. |
| trail_data | Object | Swing trail configuration for that style. |
| Property | Type | Description |
|---|---|---|
| color | Integer Array | RGB color values. Format: [R, G, B] (0-255). |
| begin_pos | Float Array | Trail start position. Format: [x, y, z]. |
| end_pos | Float Array | Trail end position. Format: [x, y, z]. |
| lifetime | Integer | Trail lifetime in ticks. |
| interpolations | Integer | Number of interpolation points used by the trail. |
| texture_path | String | Texture used by the trail. |
| particle_type | String | Particle registry name used by the trail. |
When a weapon's current style does not have a matching entry in style_config, the system attempts to use the style specified in the default field.
Example:
{
"item": "epicfight:bokken",
"default": "two_hand"
}If the current style is not configured, the trail assigned to two_hand will be used instead.
- Styles must match valid Epic Fight style names.
- Colors use RGB values ranging from 0 to 255.
- Position values use the same coordinate system as Epic Fight swing trails.
- No additional item_skins configuration is required, so do not use an advanced swing trails and item_skin at the same time.
- This system can be used with both Epic Fight weapons and third-party weapons.
In this example, when the Innate Skills is executed and the combat instance changes (to ochs), the weapon color also changes.
Assetpack from Simply Swords EpicFied by RobertOn.