Closed cirrahn closed 3 months ago
Nice! So, if somebody uploaded homebrew LCPs, instead of no animations, they would get default animations?
I had dreams of writing some heuristics based on weapon name, mount type, range, etc. to more intelligently pick default animations for unassigned weapons at some point.
Not currently. I previously set up the fallback animations to work for basic weapon attacks, but not specific weapons; this PR does not change that.
See: https://github.com/Z3nner/lancer-weapon-fx/blob/main/scripts/flow/flowListener.js#L57 -- the BasicAttackFlow
has a fallback, but the WeaponAttackFlow
does not, so a custom weapon ID will not be given an animation.
The specific problem this PR solves is the regression from v10 Lancer, where every tech attack had the default animation. I failed to maintain that functionality in the v11 migration.
For weapons, I think "no animation" is better than "obviously wrong animation" as a baseline. Your heuristic idea of would be a good next step, though!
The v2 Lancer system has improved the sheet UI, allowing, for example, "INVADE" actions to be run directly from their system cards. As these items have specific IDs but no effect defined, they would not play any effect.
The changes in this commit allow a missing effect to gracefully fall back on the default for that action type ("system-specific invade" -> "default tech attack").
Additionally, this refactor makes it easy to add other effect sources in the future. For example, a custom effect registry that the user can edit in-client.
Demo:
StabilizeFlow
andFullRepairFlow
are separate, so these could be differentiated in future, if desired.null
in the console, I addedlwfx_core_power
ID as a stub after recording the demo).fallback_effects.webm
(Sorry for the truncated clip, the 10 MiB upload limit is punishing.)