Skip to content

[Enhancement] Skip Enemy Cutscenes#1038

Merged
Eblo merged 8 commits intoHarbourMasters:developfrom
Eblo:enemy-cutscene-skips
Aug 10, 2025
Merged

[Enhancement] Skip Enemy Cutscenes#1038
Eblo merged 8 commits intoHarbourMasters:developfrom
Eblo:enemy-cutscene-skips

Conversation

@Eblo
Copy link
Contributor

@Eblo Eblo commented Mar 3, 2025

Some boss cutscene skips existed, but this expands the scope to include most bosses and mini-bosses in the game.

  • Add new VB, VB_ENEMY_CUTSCENE_ACTION, that exists to be used within actor files. In most cases, it is a simple set to false to skip vanilla behavior. Other uses involve setting state information as part of the phase change cutscene skip, or a death cutscene skip. These uses were not covered by the existing cutscene hooks; some actors use their own timers and camera control for instance.
  • Renamed boss skips to enemy skips, since the scope increased over what was there before
  • Separated from story cutscene skips into new setting specifically for enemy cutscene skips

Build Artifacts

Copy link
Contributor

@Archez Archez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a little spam of comments lol, mainly trying to think about how to minimize impact to vanilla src (even if just whitesapcing related)

@Eblo
Copy link
Contributor Author

Eblo commented Mar 3, 2025

Applied the 8 early return suggestions. The diff is a little cleaner now.

Copy link
Contributor

@garrettjoecox garrettjoecox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a high level, this feels more invasive than I'd like on the source code for z_en_pametfrog, z_en_bigslime, and z_en_kaizoku.

If these actors aren't often in a scene, it might be worth trying to use ShouldActorUpdate, and conditionally overriding their actionFunc with a custom one that cuts out the undesired behavior before the update is run.

@Eblo
Copy link
Contributor Author

Eblo commented Mar 8, 2025

The actors using VB_ENEMY_CUTSCENE_ACTION are indeed uncommon. I think what you're suggesting is feasible for the actor behavior changes, but camera behavior may not be so easy. I initially wanted to hook in at the lower level in the camera functions for exactly the reason of having to touch less of the source code as possible, but actor information is not accessible at that point. I'll see what I can do.

@Eblo Eblo force-pushed the enemy-cutscene-skips branch from 6ba5c8e to 1817e1c Compare March 9, 2025 16:53
@Eblo
Copy link
Contributor Author

Eblo commented Mar 9, 2025

If these actors aren't often in a scene, it might be worth trying to use ShouldActorUpdate, and conditionally overriding their actionFunc with a custom one that cuts out the undesired behavior before the update is run.

I pushed an update that does this just for EnPametfrog. Given how extensive the change in approach is, I wanted to do just one enemy to submit for consideration before doing all of them.

The footprint on z_en_pametfrog.c has now been eliminated, and in its place is SkipGekkoSnapperCutscenes.cpp. Much of the code there is duplicated actor functions, with references to camera controls removed. Since some of the camera code is nested in functions indirectly called by actionFuncs, this redundancy was unavoidable.

If this example is preferred over GameInteractor_Should calls, I can proceed with the other enemies. I think the ones you've named, including this one I've already done, would be the most extensive changes. The others should be simple to convert. Then the new VB can just be removed.

@Eblo Eblo force-pushed the enemy-cutscene-skips branch from 1817e1c to 99d03ab Compare April 4, 2025 00:27
@Eblo
Copy link
Contributor Author

Eblo commented Apr 4, 2025

After a discussion, I took Archez's suggestion to instead hook into the more common shared camera functions and use a static variable combined with actor lifecycle hooks to remove the need for ad-hoc modifications to individual actor source code. This flag is set to true when a relevant actor is initialized and false when the actor is destroyed. Considering that these cutscene-driven enemies don't share rooms with each other, that should be fine.

  • VB_PLAYER_CUTSCENE_ACTION is used to stop actors from controlling/locking Link during cutscenes that are now skipped
  • VB_SET_CAMERA_AT_EYE is used to prevent actors from controlling the camera for cutscenes that are now skipped
  • VB_SET_CAMERA_FOV similar to the above, but only for Eyegore
  • I also added some static variables to the enhancement file for player rotation. These are only used for the Fighter Pirate actor, which forces Link to face them during the now-skipped death cutscene. I could use ActorExtension if that's preferred, but that feels like a bit much overhead for something so brief and minor.

Copy link
Contributor

@Archez Archez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving the latest updates! The footprint has been significantly reduced which is nice.
Mainly had one bit of feedback below that I think should be worth considering.

@Eblo Eblo force-pushed the enemy-cutscene-skips branch from d721f76 to 1231fd6 Compare April 6, 2025 23:54
@Eblo Eblo force-pushed the enemy-cutscene-skips branch from 1231fd6 to a9f17ba Compare July 27, 2025 23:59
Copy link
Contributor

@balloondude2 balloondude2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few minor nitpicks. It'd be nice to get some more QA on this.

@Eblo Eblo force-pushed the enemy-cutscene-skips branch from a9f17ba to 044350d Compare August 3, 2025 19:50
@Eblo Eblo merged commit b9181d4 into HarbourMasters:develop Aug 10, 2025
5 checks passed
@Eblo Eblo deleted the enemy-cutscene-skips branch August 10, 2025 02:40
@Eblo Eblo mentioned this pull request Aug 21, 2025
44 tasks
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.

4 participants