Quest State-Machine Recovery

How RPG Quest Stage IDs Work: Unsticking Broken Quests via sqt, sqs & setstage Safely

Typing setstage <QuestID> 200 to force-complete a bugged RPG quest is the fastest way to break downstream faction storylines forever. Here is how quest state machines actually execute Papyrus fragment scripts—and the surgical 4-step inspection method that preserves your save.

Tested build / patch
Creation Engine 1 & 2 (Skyrim SE/AE, Fallout 4, Starfield)
Platforms verified
PC & Steam Deck Developer Consoles
Trophy / achievement flag
Follows Per-Game Console Rules (Always Hard-Save First)
Save-file safety
High Risk If Stages Skipped — Step Incrementally Only!

Why Blindly Jumping to Stage 200 Breaks Downstream Quests

In Bethesda’s Creation Engine (Skyrim, Fallout 4, and Starfield), quests are not simple checklist strings—they are numbered finite-state machines (10, 20, 30, 50, 100, 200). Attached to each discrete integer stage is a compiled Papyrus Stage Fragment that unlocks locked dungeon doors, clears essential flags from bosses, removes quest-item locks from your inventory, and starts the *next* quest in a faction chain!

When a player skips straight from stuck Stage 20 to final Stage 200, stages 30, 40, and 100 never execute their cleanup fragments—leaving key NPCs stuck inside locked interiors and preventing the sequel quest from ever starting.

CREATION ENGINE QUEST STATE MACHINE: SURGICAL STEP vs. BROKEN SKIP Stage 20 [Done=1] Talk to NPC (Bugged!) → Stage 30 [Safe Next!] Unlocks Dungeon Door → Stage 50 [Normal] Clears Quest Item Flag → Stage 200 [End] Skipping 30+50 breaks chain! Rule: Always advance ONLY to the immediate next uncompleted integer (0) shown by sqs <QuestID>!
Figure 1: Advancing one single stage (20 → 30) nudges past the broken dialogue trigger while letting normal gameplay run Stages 50 through 200 naturally.

The 4-Command Surgical Quest Recovery Workflow

After creating an offline backup of your save folder (see our Save File Backup Guide), run these four diagnostic commands in exact sequence:

Step & Command What the Engine Prints Why You Run It
1. sqt
(ShowQuestTargets)
Lists EditorIDs (e.g., MQ202, BoS201) for every active quest in your journal Finds the exact internal Quest ID without leaving the game to guess wiki names
2. getstage MQ202 Prints current active stage integer (e.g., GetStage >> 30.00) Confirms where the quest pointer is currently stalled
3. sqs MQ202
(ShowQuestStages)
Prints every valid stage integer tagged (1) completed or (0) not yet set Identifies the very next 0 integer right below your current 1 stage (e.g., 40)
4. setstage MQ202 40 Executes Stage 40’s Papyrus fragment and updates your HUD objective Unsticks the single broken trigger so you can finish the rest of the quest legitimately!
Never Run resetquest or completequest on Story Chains! completequest <QuestID> marks the journal entry finished without firing the final stage’s reward or next-quest-startup script, instantly orphaning the entire faction storyline! Similarly, resetquest rewinds the stage counter to 0 without resetting already-dead bosses or looted chests, creating an unwinnable zombie quest. Stick strictly to single-step setstage increments.

Try Non-Destructive Actor Resets Before Touching setstage

Half of "broken quests" are actually just a stuck NPC pathfinding package rather than a broken quest script. Before advancing setstage, try three gentler fixes on the stuck NPC first:

  1. Select the NPC’s RefID using prid <RefID> and run moveto player (covered in our Skyrim SE/AE Safe NPC Command Builder).
  2. Click the stuck NPC in the console and run evaluatepackage (evp), which forces the AI scheduler to re-check where the actor is supposed to walk right now.
  3. If an NPC refuses to initiate quest dialogue because they think combat is still active a mile away, select them and run stopcombat.

See game-specific quest notes in our Fallout 4 Console Guide and Starfield Console Guide, or return to the Mechanics & Save Safety Hub.

Frequently Asked Questions

Why does setstage do nothing when I pass a stage number I saw in sqs?

Two possibilities: either you already passed a higher stage integer (Creation Engine quest stages generally only move forward, never backward to lower numbers), or that quest uses Starfield/Fallout 4 numerical FormIDs in console commands where sqt showed an alias—pass the 8-digit hex Quest FormID from help "quest name" 4 QUST instead.

How do I remove a stuck "Quest Item" from my inventory after a quest finishes?

If a bugged quest forgot to clear its Quest Item flag on completion, run player.showinventory (or inv) to locate the exact 8-digit item hex ID, then run player.removeitem 1 to clear it cleanly.

Does running sqt or sqs to inspect quest stages disable achievements?

In Fallout 4, no console commands disable achievements. In Starfield and Skyrim SE, treat any console command execution prior to saving as potentially tripping the [M] check—inspect first, or reload your hard save if you find an in-game fix.