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

[Enhancement] Make sword beams work on any enemy #682

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

Eblo
Copy link
Contributor

@Eblo Eblo commented Jun 10, 2024

This extends the Fierce Deity Anywhere enhancement to make the sword beams work for regular enemies. For a given enemy, the sword beam multiplier is set to 1 if it is 0. The effect will match light arrows if none are already set. Additionally, sword beams will always trigger a collision, which makes them work on enemies with special properties, such as Skulltulas and Big Octos. Bosses should retain their existing behavior for sword beams, such as the splash effect when Odolwa blocks sword beams.

2024-06-20.12-38-44.mp4

Known enemies that still ignore sword beams:

  • Snapper
  • Deep Python, which I don't think is possible for FD to even encounter?

Build Artifacts

@Eblo Eblo marked this pull request as draft June 10, 2024 01:23
@smashbro596
Copy link

smashbro596 commented Jun 10, 2024

YES! now to wait for this and the two handed sword attacks to be merged into the main nightly branch and i'll be ready to cut the moon in half!

all enemies found in termina field work beautifully. ill test in other areas.

enemies the beams go right through:
big octos
big skulltulas (when facing you. they work when their backs are turned)
leevers? *(they won't sit still long enough for me to hit them. but better safe then sorry)

@inspectredc
Copy link
Contributor

Hey! Awesome work so far on this! Just wanted to note that the intention of using hooks is to have a single enhancement be able to subscribe to multiple hooks rather than a hook being used multiple times for a single enhancement. In this case the idea would be to instead create a new VB hook where you have used the FD anywhere one, and then register that hook similarly inside the same RegisterFierceDeityAnywhere function. If you have any more questions about this or need any help lmk in the development channel!

@Eblo
Copy link
Contributor Author

Eblo commented Jun 10, 2024

big skulltulas

In this case, skulltulas only take damage in their exposed state, like they would with other sword attacks.

leevers? *(they won't sit still long enough for me to hit them. but better safe then sorry)

They seem to work from my own testing, but I've only managed to get a sword beam to target a leever when the leever is so close that it's hard to say it wasn't the sword itself that connected.

In this case the idea would be to instead create a new VB hook where you have used the FD anywhere one, and then register that hook similarly inside the same RegisterFierceDeityAnywhere function

Are you recommending to do something similar to the clock tower cutscene skip hook?

@smashbro596
Copy link

big skulltulas

In this case, skulltulas only take damage in their exposed state, like they would with other sword attacks.

leevers? *(they won't sit still long enough for me to hit them. but better safe then sorry)

They seem to work from my own testing, but I've only managed to get a sword beam to target a leever when the leever is so close that it's hard to say it wasn't the sword itself that connected.

In this case the idea would be to instead create a new VB hook where you have used the FD anywhere one, and then register that hook similarly inside the same RegisterFierceDeityAnywhere function

Are you recommending to do something similar to the clock tower cutscene skip hook?

i noticed the big skulltulas are killed when hit by a beam to the back. but i feel like they should react like getting hit by an arrow. yknow because it passes through.
interestingly the bubble enemies die whether on fire or not when struck by a sword beam.

@Eblo
Copy link
Contributor Author

Eblo commented Jun 10, 2024

The Skulltulas, Big Octos, and They actually seem to be fixable by ORing the sword beam damage effect with the arrow damage effect when setting the sword beam damage flags. So far, this seems to keep boss sword beam effects intact while maintaining the damaging effect on enemies. However a comment specifically recommends not combining these flags for the time being...

// Don't use combinations of these flags in code until we figure out how we want to format them.
// It's okay to use these flags if the code is only checking a single flag, though.

@inspectredc
Copy link
Contributor

Are you recommending to do something similar to the clock tower cutscene skip hook?

Yes that should be a good example to follow

@Eblo Eblo force-pushed the sword-beams-on-any-enemy branch from 34a073c to 51c0dbb Compare June 11, 2024 14:17
@smashbro596
Copy link

i wonder. could the check be applied to boulders? my thought is: imagine blowing up rocks with your blade beam. or melt ice? or destroy sun blocks?

@Eblo
Copy link
Contributor Author

Eblo commented Jun 12, 2024

i wonder. could the check be applied to boulders? my thought is: imagine blowing up rocks with your blade beam. or melt ice? or destroy sun blocks?

Now that I have a better understanding of how hooks should be applied, that's probably an easy thing to add. I'm not sure if that should be a standard feature as part of this, though. The idea of this is to make the sword beam behavior for normal enemies similar to how it works on bosses.

I applied the normal arrow effect to sword beams so that they could kill big octos and non-prone skulltulas. A side effect of this is that they can now break the big icicle on Termina Field in 2 hits. If someone else wanted to, they could add in whatever effects they please to sword beams, like the ones you listed.

@Eblo Eblo marked this pull request as ready for review June 17, 2024 01:36
Eblo added 5 commits June 23, 2024 16:51
Add separate variable for FD sword beams on regular enemies
Use those for Fierce Deity sword beam stuff
Add DamageAndEffectHookInfo struct to pass multiple fields into hooks
Use ActorInit hook on sword beams for the arrow damage effect
Actually pass in the DamageAndEffectHookInfo pointer for the damage effect hook
Add more clarification within FDA enhancement comments
Revamp how sword beam handling works with Fierce Deity Anywhere
Remove light arrow damage flag and instead make sword beams always collide with actors
Give sword beams the light arrow effect if they do not already have one defined
Draw blue light orbs effect for sword beams using the light orbs effect
Add special sword beam damage effect for Big Octos since they're unique with drawing damage effects
@Eblo Eblo force-pushed the sword-beams-on-any-enemy branch from 086f364 to f9ec1b3 Compare June 23, 2024 20:56
@Eblo
Copy link
Contributor Author

Eblo commented Jun 23, 2024

I just pushed a new update that makes enemies display the blue light orbs effect upon taking sword beam damage. I also completely overhauled the collision detection of sword beams. Instead of adding the light arrow damage flag, it will instead always register a collision. This keeps the one odd effect from Odolwa intact while also letting the beams connect with Skulltulas and Big Octos.

Various hurdles, as commented in FierceDeityAnywhere.cpp required having some sort of per-actor variable to use. I went with the actor's ActorShape face, since that is something that exists for all actors but is not normally used for anything but the player. This shouldn't interfere with how anything else in the game behaves, unless other enhancements decide to use the same thing for other purposes.

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