Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fx Pass and API additions #26

Merged
merged 21 commits into from
Jan 9, 2024
Merged

Fx Pass and API additions #26

merged 21 commits into from
Jan 9, 2024

Conversation

Z3nner
Copy link
Owner

@Z3nner Z3nner commented Jan 6, 2024

Adds several new macros, some of which improve or replace existing effects, while the rest are for supporting new content.
Adjusted, tweaked, modified, retimed, tuned, gutted, remodeled most of the macros in the module. Includes API adjustments from dodgepong for better maintainability and streamlining.

Z3nner and others added 8 commits November 14, 2023 22:57
>>>>>>>>>>>>>>>>
New
>>>>>>>>>>>>>>>>
 MISSILE MACROS
Added a few different macros to handle a bigger variety of missiles. dodgepong also made a Pinaka Missile macro that uses some pretty intense math to calculate two center points for any group of targets to direct the missile and explosion fx to.

Auto-Template for Pinaka Missile
New macro to drop a template in place with an animated effect on the template. (Easily modified for various sizes or different animations)

NEW MISSILE AIRBURST and CANNONAIRBURST MACRO
this was at the request of a user to handle the hurricane cluster projector from SSMR. I don't intend to add ALL the new 1st party weapons, but this one was too cool not to do, plus I had one that was 95% the way there anyway. Its the same as the second missile video above, but uses a big bullet animation instead of a missile. Travels 60% of the distance between the source and the target group, detonates, spawns a bunch of bullets that fly at the targets the attack Hit, then an explosion plays on each hit target.

NEW DEFAULTTECH
Rebuilt from the ground up for a more E-War appeal and to apply to the widest possible variety of tech attacks.

NEW MINI-GUN MACRO
For Leviathan and the Dustgrave's Reaper Cannon

SUPPORT FOR SOLSTICE RAIN
New macro for the Battle Rifle, Predator Nexus triggers Nexus macro.

SUPPORT FOR DUSTGRAVE
New or modified macros for the new GMS and exotic equipment from Dustgrave.  (Sorry, no LINAC unless one of our awesome devs could hook that up to retort loop.)

(No new weapons from Siren's Song)

>>>>>>>>>>>>>>
Changes
>>>>>>>>>>>>>>
APOCALYPSE RAIL
Removed .missed function (Its cooler if it always explodes).
Moved animations from target 0 to the average location for all targets.

RAILGUN
Only one bullet animation, targeted at the furthest target from the source, plus one hit animation per hit target will play.
Removed .missed function (Its a single bullet, travels in straight lines)

COMBAT DRILL
Fixed animations, wind animation only plays on hit, fewer hit FX play on miss to simulate a sort of "glancing off"

AMR
New prepatory sfx to introduce delay before it appears to fire verified timings

BOLT THROWER
Explosion animation will always play and will do so at the bolt's destination. The explosion SFX will only play on a hit.

MISSILE
swapped VFX from JK to JB2A, made missiles always explode even when missed, but explosion SFX only plays on hit.

DEFAULTMELEE
changed from JB2A's divine smite to their new default melee and tweaked timings.  Adjusted so all animations occur in sequence.

DD 288
rebuilt macro, closer to core book description. (Thanks for the great sound effect Walther Eghus II!)

HAMMER and PLASMA MAUL
Moved ground cracking impact effect behind tokens, adjusted scale, offset of hammer, knockout hammer effect, added glow, tweaked timings.
Now correctly play all animations in sequence, order targeted.

NANOBOT WHIP
Tweaked timings, changed movement mode of animation to look better at longer range (its Threat 3)

NEEDLEBEAM
Adjusted timings of primary and secondary shots

LASERS and PLASMARIFLE
tweaked timings, fixed miss animations.

PLASMA TALONS
Adjusted impact fx, claw animation opacity and zIndex and timings

POWER KNUCKLE
minor adjustment to delay

THERMAL RIFLE
New prepatory weapon beep sound.

TORCH
Added smaller impact animation to the missed animation, impact sound only plays on hit.

WARPIKE
knockout spear, adjust glow to compensate (The wooden spear shaft looked bad for Lancer). trimmed endTime of spear swing sound.

NEXUS
Rebuilt from the ground up with custom soundfx, no longer requires JK assets.

ANNIHILATOR
Added impact vfx and sfx to miss animation

ARCBOW
Similar adjustments to Railgun macro, except changed the lightning effects out and made secondary lightning bolts spawn from the destination of the arrow to each token hit by the attack.

AUTOPOD
Removed .missed references. (Autopod never misses)

CHARGED BLADE
Now correctly plays animations 1x per token, correctly playing hit/miss animations in the order targeted. Swapped sword vfx and tweaked timings.

BROOD SIBLINGS MOLT
Swapped out Sword vfx for one with more consistant hit timing, added glow effect, tweaked timings.

MORTAR
Rebuilt w/ all JB2A effects, new bullet effect for the mortar shell to a central point for target group, subsequent explosion and then secondary explosions on targets hit.

FLAMETHROWER
Added fire effect on tokens hit

PLASMATHROWER
Added some funky hue and glow to approximate the insanity of hot plasma, swapped out vfx for a new one, added flame fx to tokens hit.

DISPLACER
added glow effect and adjusted hue for vfx, adjusted to target the center of a group of targets and tweaked timings.

SLAG CANNON
Complete overhaul.  should seem a lot more like whats described in the book.

REPEATING ANIMATIONS
Wherever it makes more sense, weapons like HMG, Assault Rifle, Leviathan, etc. when missed, the entire burst will target one randomly offset area, instead of each bullet randomly offsetting anywhere around the target.
fix to tech attack macro
Added remaining weapons from Dustgrave NPC templates.
Adds several of FluffyPaws explosion macros and assets and a few others as well.
Add center point calculation methods to the API
Fix timing on repeating macros with miss functions. re-add CannonAirBurst macro, assign macros for SSMR NPC weapons.
@Z3nner
Copy link
Owner Author

Z3nner commented Jan 6, 2024

@cirrahn I wanted to thank you again for your work on Lancer Weapon FX. Were nearing release and I've pushed this request to the main module. I thought I'd ping you and offer an opportunity to review everything.

@cirrahn
Copy link
Contributor

cirrahn commented Jan 6, 2024

@Z3nner these are amazing! I cannot wait to use them in-game (especially the giant nukes). The overall level of quality is outstanding.

Thank you for giving me a chance to review. I have done some brief testing and this is what I found:

  • the "Brood Siblings" macro uses "jb2a.melee_attack.03.trail.greatsword" which does not exist for me, whereas I do have "jb2a.melee_attack.03.greatsword" (note the missing .trail)
    • I am one version behind on JB2A (using 0.6.3 when 0.6.4 is current) so this might be a "me" problem. I cannot verify as their website https://jb2a.com/ is returning a 500 error!
  • for the macros which require warpgate (ElectricExplodeOnClick/ExplodeOnClick), which is not listed in the requirements, it could be good to put the following at the top of the script to avoid a silent crash:
    if (typeof warpgate === "undefined") return ui.notifications.error("This macro requires the Warpgate module to be installed!");
    
  • the "MissilePinaka" macro crashes when targetting two tokens which are close together, or when targetting only one token
  • since there are several manual macros now (and a lot of automatic macros!) it is cumbersome to find them all. It might be time to split the compendium into "Lancer Weapon FX" and "Lancer Weapon FX (Manual)"?

It would also be nice to resolve the failing Check. Is that a fault of the test, or does a clean re-build of the pack need to be done?
From experience, Foundry will re-order compendium lines on world save (and maybe other events). If you return to the Setup screen in Foundry then build and commit the pack, does that resolve the diff?


EDIT: I have now made #27 with an implementation of the pack-splitting idea!

This checks for two things:

- every macro listed in weaponEffects must exist
- no other macros may exist
With this split it is easier for the user to find macros which must be
triggered manually.
This prevents the package from being published to the NPM repository.
As the project is a Foundry module, any such publish would be an
accident!
@cirrahn cirrahn mentioned this pull request Jan 6, 2024
@Z3nner
Copy link
Owner Author

Z3nner commented Jan 7, 2024

I double checked Sequencer, and it shows the .trail address as correct. I'm also on 0.6.3. I don't have the paid module version or anything so I'm not sure what the story there is. I liked the trail version better with the modifications I made, but if a bunch of people don't have it for some reason it might be better to go with the other animation. I'll look into it.

I like the improvements to the warpgate macros. Just the sort of thing I was looking for in order to make more like these.

I noticed the issue with the Pinaka Missiles, but the game text requires that their areas of effect not overlap anyway, so the issue only pops up when it's being used incorrectly...which, while not intended kind of works out in my non-developer mind.

I also liked separating the compendiums. I was sort of just including the extra effects as "easter eggs" but they are much better in their own basket.

I fixed the loose hanging macros, turns out I had overwritten a little work I did to add the content from Dustgrave's NPCs. The only two left hanging are Power Knuckle and Plasma Projector. Power Knuckle was left behind when I reassigned that effect to the default melee effect, but left the other one in case users wanted to change it. Plasma Projector can actually go in the manual compendium. It's a fun combination of ridiculously large energy beam and absurd explosions.

I don't know what the check is that's failing, honestly. I thought it was related to it being a branch, and not having a release, but I don't know.

To avoid the API class becoming a monolith containing every function we
can split parts out to their own files and classes.

The `euclideanDistance` export is not strictly necessary but is an
example of how a function from another file can be added to the API.
@cirrahn
Copy link
Contributor

cirrahn commented Jan 7, 2024

I have made #28 with some more fixes!

The .trail issue looks like a JB2A bug, I have created an issue here: Jules-Bens-Aa/JB2A_DnD5e#16

I have been poking the Pinaka Missiles some more and have found that it can still crash frequently when two valid targets are selected, if their X or Y position match (if they are far apart but in the same hex row/column), and infrequently when any two valid targets are selected.
I think it would also be good if it did not crash when used on a single target, as the text of the weapon is "up to two [...] areas".
To fix these issues, I have made the changes:

  • If there are fewer tokens than the number of target locations, treat each token as its own target location. Lloyd's Algorithm clusters >k points into k clusters, so if we have <=k points, each point must logically be its own "cluster." This fixes the single-target use.
  • When generating initial points to start the algorithm, ensure each starting point is unique. This fixes the frequent (when sharing a coordinate)/occasional (when not sharing a coordinate) crashes when targeting two valid tokens

The check is failing because the final two "manual" macros are not yet in the manual compendium. I have moved them in!

cirrahn and others added 3 commits January 8, 2024 21:24
The algorithm needs unique seed points to run correctly so instead of
generating points which may be duplicates, get a unique list of all
input points and then shuffle that list, and use the first k points.

If this is not a sufficient number of points, extend the list with some
synthetic unique additions by taking the largest X and Y values and
adding an offset.
The "--pack" argument can be used to specify which directory the macro
and JSON metadata should be generated in.
@Z3nner Z3nner merged commit 31bb32f into main Jan 9, 2024
1 check passed
@Z3nner Z3nner deleted the FXPass branch June 18, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants