Skip to content

Fix: Prevent crash caused by EscortBehavior with null TargetParty - #208

Open
xtended2l wants to merge 2 commits into
R-Vaccari:mainfrom
xtended2l:main
Open

Fix: Prevent crash caused by EscortBehavior with null TargetParty#208
xtended2l wants to merge 2 commits into
R-Vaccari:mainfrom
xtended2l:main

Conversation

@xtended2l

Copy link
Copy Markdown

This patch uses Harmony to intercept MobileParty.TargetParty assignments. If a party has AiBehavior == EscortParty but the target is being set to null, the patch automatically resets the behavior to DoNothing().

This prevents a rare but critical crash that occurs when AI strength evaluation methods access TargetParty.Party.TotalStrength without null checks.

The fix is backward-compatible and safe for existing saves.

xtended2l added 2 commits May 1, 2025 02:11
Fix: Prevent EscortBehavior with null TargetParty via Harmony patch
Fix: Prevent EscortBehavior with null TargetParty via Harmony patch
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