Skip to content

Make summons attack a player fighting their owner in PvP - #34

Open
absol89 wants to merge 1 commit into
devfrom
feat/pvp-summons-attack-players
Open

absol89 wants to merge 1 commit into
devfrom
feat/pvp-summons-attack-players

Conversation

@absol89

@absol89 absol89 commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Requested by Eric · project thread

Part of tiltedphoques#938 ("Conjurations being able to attack other players").

Why summons ignored players

A commanded actor only counts as hostile to someone whose combat group targets its commander or itself (0x1406796b0, called from IsHostileToActor). A remote player's copy has no such group, so a summon never picks it as a target.

What

  • With PvP on, a hit between the local player and a remote player, in either direction (weapons and hostile spells), sends our local summons and raised corpses at that remote player through the existing StartCombat.
  • They stop 30 s after the last hit between the two players (kSummonAggroSeconds), or sooner if the target dies, leaves or PvP turns off. Stopping uses StopCombat, which also drops any NPC the summon was fighting.
  • Uses CombatComponent, which was unused live; its only reader (CombatController::UpdateTarget) is behind a disabled hook.
  • PvP-off fix: HookDamageActor and HookAddTarget now block damage and hostile spells from a remote player's summon. Before, only remote players were blocked. Friendly spells from those summons still apply.

Verified vs assumed

Verified in Ghidra, SkyrimSE 1.6.1170:

  • 37537 (0x140679f10) returns hostile straight away if the actor's combat group already holds the target (0x1406b74e0, then 0x140803df0), so a forced summon stays hostile.
  • The commanded-actor rule in 0x1406796b0.
  • Papyrus StartCombat (0x1409eae60) only refuses when the actor is the player, either side is dead or has no AI process, or the actor is in dialogue; otherwise it queues task 0x2a.

Assumed:

  • Task 0x2a (case at 0x140657e1f, partly read) adds a remote copy to the group the same way.
  • Nothing later drops the target for being non-hostile.
  • The summon's copy on the victim's client lands hits on them (the issue reports summon hits already hurt players).

Testing

Not built locally (CI builds it) and not tested in game. Two clients, PvP on:

  1. A hits B with a summon out: A's summon attacks B, and B takes damage.
  2. B hits A: A's summon attacks B.
  3. Repeat 1 and 2 with a hostile spell.
  4. 30 s without hits: the summon stops, and goes back to any NPC it was fighting.
  5. The target leaves, dies, or PvP is turned off: the summon stops.
  6. Standing near each other without hitting: summons ignore the other player.
  7. Healing the other player doesn't trigger the summon.

PvP off: summons never attack players; a remote player's summon swinging at an NPC next to you does no damage and its area spells don't affect you; everything else as on dev.

Merge note: touches the same HookAddTarget block as #30, #31 and #33, so expect small conflicts when combining them on a playtest branch.


Generated by Claude Code

Commanded actors aren't hostile to a remote copy, as it has no combat group
of its own to mark them as enemies. Force the target while a fight between
the two players lasts. Also stop a remote player's summon from hurting the
local player with PvP off, which only remote players themselves were kept
from doing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fvQxQEu7yvi9eRZyKsEur
@absol89 absol89 self-assigned this Nov 5, 2026
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