Use console commands to start MQ102 on Vault exit

Replace direct TESQuest::SetStage usage with console commands to reliably start and advance MQ102 when leaving COVault109. TryStartOutOfTimeQuest now includes RE::Console, issues `startquest MQ102` and `setstage MQ102 10`, and uses a static one-time guard (outOfTimeQuestStartIssued) to avoid repeated issuance. Removed the unreliable currentStage check and adjusted constants/naming and log output. Updated changelog and dev-log to document the implementation and touched compiled script binary.
This commit is contained in:
2026-06-30 22:46:06 +12:00
parent 771f855f89
commit a6d4cc2ba6
4 changed files with 26 additions and 18 deletions
+7 -4
View File
@@ -10,20 +10,23 @@ failed experiments, successful tests, and next steps.
## 2026-06-30 - COVault109 Exit Quest Auto-Start
### Summary
Added automatic quest start for "Out of Time" (MQ102, FormID: 0x0001CC2A) when the player first leaves COVault109. The quest is started and immediately set to stage 10, skipping the vault entry sequence. This provides a smoother transition into the multiplayer world after character creation.
Added automatic quest start for "Out of Time" (MQ102, FormID: 0x0001CC2A) when the player first leaves COVault109. The quest is started with `startquest MQ102` and immediately moved to stage 10 with `setstage MQ102 10`, skipping the vault entry sequence. This provides a smoother transition into the multiplayer world after character creation.
### Files Changed
- `plugin/src/main.cpp`
- `changelog.md`
- `docs/dev-log.md`
### Details
- Added `TryStartOutOfTimeQuest()` helper function that uses `TESDataHandler::LookupForm` to safely resolve the MQ102 quest from Fallout4.esm.
- Function includes safety checks: verifies data handler availability, confirms quest form resolution, and skips if the quest is already started.
- Added `TryStartOutOfTimeQuest()` helper function that uses `TESDataHandler::LookupForm` to safely resolve the MQ102 quest from Fallout4.esm before issuing console quest commands.
- Function includes safety checks: verifies data handler availability, confirms quest form resolution, and only issues the commands once per plugin session.
- Called during the solo cell exit detection in `PollLocalPlayerTransform()` when `soloCellTransformSuppressed` transitions from true to false.
- Logs informational messages on quest start and warnings for any resolution failures.
### Testing
- Compile test: no linter errors.
- Initial in-game log check showed the COVault109 exit trigger fired, but direct `TESQuest::SetStage(10)` did not visibly start MQ102.
- Updated implementation to use console `startquest MQ102` and `setstage MQ102 10`, matching existing project command patterns.
- Removed the `currentStage != 0` skip because the first failed direct-stage attempt could leave a non-zero stage without visibly starting the quest on that save.
- Recommended manual check: create a new character, complete Vault 111, exit into the Commonwealth world, and verify that MQ102 is started and set to stage 10 (check quest menu or `getquestcompletedstage 0001CC2A` console command).
- Verify the quest does not start if the player re-enters and exits COVault109 (safety check works).