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

Chosen Death Teleport Visualization Fix #1220

Merged

Conversation

BlackDog86
Copy link
Contributor

Fixes #496 - Tested & confirmed working with minimal code changes.

@Iridar Iridar added bug-basegame ready-to-review A pull request is ready to be reviewed labels Jul 10, 2023
@Iridar Iridar added this to the 1.26.0 milestone Jul 10, 2023
@BlackDog86 BlackDog86 force-pushed the 496-Fix-Chosen-Death-Redscreen branch 3 times, most recently from 72c8218 to c86ccfd Compare July 13, 2023 18:39
@Iridar
Copy link
Contributor

Iridar commented Jul 13, 2023

What's the status here? Is this ready for review?

@BlackDog86
Copy link
Contributor Author

Yep, all good - I've tested it a few ways with different abilities and it seems to work just fine :)

@BlackDog86 BlackDog86 force-pushed the 496-Fix-Chosen-Death-Redscreen branch from fc0432d to 67f69db Compare July 25, 2023 09:29
@Iridar
Copy link
Contributor

Iridar commented Jul 26, 2023

Uhh why is X2Ability_CarryUnit in this PR?

@BlackDog86
Copy link
Contributor Author

Uh, wtf...that push was supposed to just squash the actual commit with updated comments. I've been having issues with my installation of modbuddy and the SDK so I'll fix and sort this out. Apologies.

@BlackDog86 BlackDog86 force-pushed the 496-Fix-Chosen-Death-Redscreen branch from 67f69db to 9d20be9 Compare July 27, 2023 18:07
@Iridar
Copy link
Contributor

Iridar commented Aug 10, 2023

Good thing I decided to test this before merging, because current implementation is causing bugged visualization.

https://youtu.be/va8IXk38H7Y

The Chosen plays a part of the standard rifle shot animation before teleporting away. Also it seems to be overlaid on top of the chosen death animation, because it horribly distorts his chest and shoulders.

I don't know why exactly does this happen, but implementing a different solution should bypass the problem.

@Iridar
Copy link
Contributor

Iridar commented Aug 10, 2023

Since the original issue happens because the particle effect "FX_Chosen_Teleport.P_Chosen_Teleport_Out_w_Sound" never finishes playing, presumably because that's just how it is set up, there are two possible solutions here:

  1. Create an alternative effect that will finish playing, allowing visualization to proceed as intended.
  2. Create an X2Action_TimedWait that runs in parallel to the X2Action_PlayEffect, and make actions that previously waited on X2Action_PlayEffect wait on X2Action_TimedWait instead. Give it ~5 seconds or so.

@Iridar
Copy link
Contributor

Iridar commented Aug 10, 2023

On deeper look, it seems that build visualization function is just a horrible bugged mess.

@Iridar
Copy link
Contributor

Iridar commented Aug 10, 2023

So the firing animation was played by the build visualization function itself for no adequate reason. Once I got rid of that and tweaked the build vis in a few places, it's crispy smooth:

https://youtu.be/kv-MRWrBGcQ

@BlackDog86
Copy link
Contributor Author

Yep, gotta say, that looks better than my attempt.

@BlackDog86 BlackDog86 force-pushed the 496-Fix-Chosen-Death-Redscreen branch from 264f004 to 827731f Compare August 11, 2023 10:54
@Iridar Iridar force-pushed the 496-Fix-Chosen-Death-Redscreen branch from 827731f to f8fc934 Compare August 13, 2023 09:31
@Iridar Iridar added ready-for-merge the pull request was reviewed and is ready to be merged. and removed ready-to-review A pull request is ready to be reviewed labels Aug 13, 2023
@Iridar
Copy link
Contributor

Iridar commented Aug 13, 2023

I ended up refactoring most of the build visualization function for that ability. The original one was horribly defunct, and the only reason it was working at all is because the thing that was breaking it was broken as well.

It appears it tried to play the Chosen weapon firing animation at the same time as the death animation was playing, and treated the animation action as if it was the death animation.

At least that's the only way I can make sense of it at all.

Either way, I removed the animation action and added a couple delays to make sure it visualizes in a decent manner.

According to testing by Black Dog, the actual delay tends to vary depending on how exactly the Chosen was killed, e.g. kills by melee or environmental explosive will have different timings.

Ideally I would want to have an X2Action that waits for the pawn to become fully idle before the teleport visualization can start, regardless of the death animation used, but there's no existing methodology for that, and would require bigger scope of Highlander changes that I'm comfortable with.

So I'll leave this as is for now, revisit it later if there are any complaints.

@Iridar Iridar merged commit 3daae8b into X2CommunityCore:master Aug 13, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-basegame ready-for-merge the pull request was reviewed and is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chosen death teleport effect times out
3 participants