Skip to content

Grappling hook magic effects: Swift Reel and Long Line - #32

Merged
MidnightsFX merged 1 commit into
MidnightsFX:mainfrom
ksavila:ksavila/grappling_hook_effects
Oct 2, 2026
Merged

MidnightsFX merged 1 commit into
MidnightsFX:mainfrom
ksavila:ksavila/grappling_hook_effects

Conversation

@ksavila

@ksavila ksavila commented Sep 23, 2026

Copy link
Copy Markdown

Adds two magic effects that roll only on the 1.0 Grappling Hook, and stops the hook rolling damage effects it has no use for.

Why

The hook is an ItemType.Bow (classified Bows), so it inherited the bow effect pool: 26 rollable effects, and about 80% of the roll weight went to damage effects or effects that do nothing on it (ModifyFireRate, AmmoConservation). TripleBowShot was actively broken — each of the three grapple points cancels the one before it.

New effects

Effect Type What it changes Values (all three templates)
Swift Reel ModifyGrapplePullSpeed Pull speed (vanilla 20 m/s), including mid-air re-pulls +10–20% Magic → +50–75% Ancient
Long Line ModifyGrappleFlightTime Shot lifetime (vanilla 1 s), so it reaches farther on a higher arc +10–20% Magic → +60–100% Ancient

Both are gated with AllowedItemNames: ["$item_graplinghook"] (the game's own spelling), weight 10.

Swift Reel is capped at +75% (~35 m/s) so a physics step can't carry the player past the 1 m arrival window.

Long Line is named for flight time rather than range on purpose: gravity acts for the whole flight, so +100% flight time is +100% reach on a level shot but only about +71% straight up.

Supporting changes

  • Rope length — GrapplingPoint snaps the line once it is longer than m_maxLength (60 m), so the rope now scales with Long Line and the existing Projectile Speed effect. Without it, a long shot breaks the moment it attaches.
  • Reload timing — vanilla blocks the reload for a time sized to the 1 s flight, so with Long Line the reload started while the hook was still in the air. The block is extended to the full flight in a postfix on Attack.ProjectileAttackTriggered, since that method rewrites m_blockReload after the projectile is set up.
  • Effect gating — $item_graplinghook added to ExcludedItemNames on 23 effects in each template: the Add*Damage family, ModifyDamage / ModifyPhysicalDamage / ModifyDamageLowHealth, both stagger effects, LifeSteal, LifeStealLowHealth, EitrLeech, Executioner, Slow, ChainLightning, ExplosiveArrows, TripleBowShot, ModifyFireRate and AmmoConservation. What remains on the hook is ModifyProjectileSpeed, ModifyDurability, ReduceWeight, Weightless, QuickDraw and Indestructible, plus the two new effects.

English strings are added; other languages fall back until translated.

Known vanilla issue, not changed here

GrapplingPoint.Update stops the pull once it has counted 0.5 s of frames where the line did not get shorter, and never resets that count during a pull. Above 50 FPS many frames have no physics step, so the distance reads unchanged and the count builds up even at full speed — pulls longer than roughly 20 m can drop into hanging partway. Long Line makes long pulls more common, so this shows up more with it, but it happens on unmodified hooks too.

Testing

In-game on a single-player profile:

  • Swift Reel and Long Line spawned via mieffect and confirmed on long and short pulls.
  • Checked the rollable pool on the hook before and after the gating change.
  • Reload now waits for the shot to land or expire.

@ksavila

ksavila commented Sep 23, 2026

Copy link
Copy Markdown
Author

At a max roll the effect can reach the higher platform.
The lower platform is vanilla max distance.

image

@ksavila

ksavila commented Sep 23, 2026

Copy link
Copy Markdown
Author
grapple.-.Trim.again.mp4

@ksavila

ksavila commented Sep 23, 2026

Copy link
Copy Markdown
Author

Other notes:

Exploding shot looked really cool but of course did no damage.

A new effect that applies knockback or stagger in an AOE around where the grapple lands might be doable too.

@MidnightsFX
MidnightsFX merged commit c991ec4 into MidnightsFX:main Oct 2, 2026
1 check passed
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.

2 participants