# Mod Save Game Compatibility

Task: `TODOS.phase-72.72.14.2.12`

V2 mod save game compatibility is a pre-disable gate for mod management flows.
It detects whether disabling a mod would break save loading, warns before
disable when fallback or migration paths exist, and blocks disable when a save
depends on required mod-owned data with no safe replacement.

## Policy

`FV2ModSaveGameCompatibilityPolicy` is created by
`BuildDefaultModSaveGameCompatibilityPolicy` and enables:

- warning before disabling a mod referenced by saves
- blocking required save references with no fallback or migration
- allowing disable when vanilla fallback data exists
- allowing disable after save migration
- backup-before-disable actions
- a deterministic issue cap

## Save References

`FV2ModSaveGameReference` records the mod id, save slot, entity id, asset path,
data key, saved mod version, whether the reference is required for load, whether
vanilla fallback data exists, and whether a migration is available.

Malformed disable requests and save references are blocking validation issues:
the evaluator requires a target mod id and save slot before disable decisions
can be trusted.

## Disable Preflight

`EvaluateModSaveGameCompatibility` compares pending disable mod ids with save
references and returns an `FV2ModSaveGameCompatibilityReport`.

Required save references without a fallback or migration produce `Blocker`
issues and actions to keep the mod enabled or block disable. Migratable
references produce `Warning` issues plus backup and migration actions. Fallback
references produce `Warning` issues plus backup and disable-with-warning
actions.

The report exposes `bSafeToDisable`, `bRequiresWarning`,
`SaveReferencesEvaluated`, warning/blocking counts, issues, and actions so mod
browser, auto-update, and settings flows can warn before disable without
duplicating save compatibility logic.

## Verification

Run:

```bash
python3 V2/ue/Tools/check-v2-mod-save-game-compatibility.py
python3 -m json.tool V2/ue/Content/V2/Modding/ModSaveGameCompatibility_V2_Contract.json
```

The focused checker verifies runtime types, disable preflight behavior, required
save-reference blockers, migration warnings, fallback warnings, backup actions,
invalid-input validation, automation assertions, docs, CI/Horde wiring, and TODO
evidence for `72.14.2.12`.
