Skip to content

PvP: let area spells, walls, explosions and cloaks hit remote players - #35

Open
absol89 wants to merge 4 commits into
devfrom
feat/pvp-aoe-spells
Open

absol89 wants to merge 4 commits into
devfrom
feat/pvp-aoe-spells

Conversation

@absol89

@absol89 absol89 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Part of tiltedphoques#938 (item 5, including the AE "Unbounded" spells from ccbgssse014-spellpack01.esl). Everything is gated on PvP being on, so PvE and PvP-off behave as before.

Changes

Files: Code/client/Games/Skyrim/Actor.cpp, Code/client/Games/Skyrim/Magic/MagicTarget.cpp, Code/client/Events/AddTargetEvent.h, Code/client/Services/Generic/MagicService.cpp

Spell type Why it missed players Fix
Mass spells (e.g. Mass Paralysis scroll) Delivery is Self, so no projectile is launched or synced, and HookAddTarget drops the hit on the remote copy The caster forwards the effect, and the victim runs its own resistance and condition checks. A forwarded effect is not re-sent.
Wall spells The ground hazard only affects actors hostile to its owner (43987 → IsHostileToActor 37537) That check counts as hostile while a remote player's hazard is checking the local player
Explosions While the owner is in combat, targets are limited to its combat group (38560) The check passes when a remote player targets the local player
Cloaks (vanilla Flame, Frost and Lightning Cloak; Unbounded Storms 0x808 and Freezing 0x80D) Hits on players are dropped by HookAddTarget, and the cloak damage effect has an IsHostileToActor condition that a remote player fails The wearer's client decides the hits and forwards them. The copy's replay is ignored, so damage lands once.
Unbounded Storms lightning (script effect 0x806, magicProjectileStormScript) and Unbounded Freezing paralysis (0x813) The effect conditions include GetIsID(Player) == 0 Forwarded from the caster, so the script and paralysis run on the victim's client
Unbounded Flames 0x80E Not a cloak: it's an aimed concentration missile 0x810 with explosion 0x811 Relies on the concentration replay and the explosion fix
Staff of Sheogorath Single-target projectile, already works No change

Condition override: for a remote player's hostile effect on the local player, IsHostileToActor (21472) passes and GetIsID (21487) doesn't match the player. No other condition changes. Keywords, perks and resistances still apply, and NPCs, heals, buffs and PvP-off aren't affected. Perk-gated extras like Disintegrate won't fire without feat/pvp-offensive-perks.

Verified in Ghidra on 1.6.1170: 34410, 43959 → 43987, 43847 → 38560, CloakEffect::Update 0x1405b5630 (callback vtable 205851), and effect conditions evaluated only on add (34525 → 0x140146300; re-evaluation 34062 uses per-spell conditions, which these spells don't have). On 1.7.104 I only checked that the IDs resolve. The ESL was only read. No ESP edits.

Not verified yet

  • RemoteCast on the victim's client hitting the local player with the remote copy as caster.
  • How often the caster re-finds targets while channelling, which affects how long the lightning and paralysis last.
  • Unbounded Flames continuing to fire from a single concentration replay.
  • The cloak target search 0x140777c80 having no filter of its own.
  • Paralysis from Unbounded Freezing now lands on players, which the spell's author blocked. That is intended for PvP.

Test plan (two clients, PvP on)

  1. Flame, Frost and Lightning Cloak damage B at the normal rate (not double) and stop when B leaves range.
  2. Unbounded Storms: 40 per second in range plus lightning strikes, once each.
  3. Unbounded Freezing: frost damage and paralysis within 12 ft.
  4. Unbounded Flames: fireballs keep hitting B through a 10 s cast.
  5. Mass Paralysis scroll paralyses B once, and a paralysis-immune B resists.
  6. Wall spells and Fireball (in and out of combat) damage B once.
  7. Below 15% health with no Disintegrate perk synced, B doesn't turn to ash.
  8. With PvP off nothing here hits players. NPC cloaks and area spells still hit players, A's spells still hit NPCs, and healing another player still works.

Merge note: overlaps in MagicTarget.cpp with fix/pvp-disarm, feat/pvp-summons-attack-players, fix/pvp-poisons and feat/pvp-offensive-perks.

🤖 Generated with Claude Code

https://claude.ai/code/session_018fvQxQEu7yvi9eRZyKsEur

absol89 and others added 2 commits November 5, 2026 11:30
Mass spells only ran on the caster's client, and hazards like the fire from
wall spells skipped the local player since it isn't hostile to a remote
player. Send self-cast area attacks to the other clients, and let hazards and
explosions from a remote player reach the local player while PvP is on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fvQxQEu7yvi9eRZyKsEur
A cloak's copy on the victim's client can't be relied on, since a
concentration cloak only lasts while it's cast on the wearer's client. Let
that client decide on the hits and send them to the victim, whose own checks
can still refuse them, and ignore the hits from the copy's cloak.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fvQxQEu7yvi9eRZyKsEur
@absol89 absol89 changed the title PvP: let area spells, walls and explosions hit remote players PvP: let area spells, walls, explosions and cloaks hit remote players Nov 5, 2026
absol89 and others added 2 commits November 5, 2026 11:51
Cloak damage only lands on targets hostile to the caster, and some area
effects skip the player's base form outright, so hits sent to the victim were
refused. Pass those two conditions for an attack from another player, as other
conditions like resistances still apply, and send concentration area effects
from the caster's client too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fvQxQEu7yvi9eRZyKsEur
It's the same ice form paralysis that has been kept away from players, and its
effect refuses them on purpose. Stop overriding that condition for paralysis
and stop sending the channeled kind to the victim. The cloak's frost damage
and Mass Paralysis, which has no such condition, still land.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fvQxQEu7yvi9eRZyKsEur
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.

1 participant