Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cleanup and save state

Scene termination is not quest completion, and quest completion is not world cleanup. First Contact makes every boundary visible so one successful spoken line cannot hide a leaked actor, stale marker, or save-backed old graph.

Five different completion boundaries

BoundaryNative ownerWhat it establishesWhat it does not establish
Section normal output.scene graphThe timed line section reached its normal socketA public named outcome or quest transition
End node 3.scene graphThe scene reached a terminating graph nodeCommunity deactivation or a persistent completion fact
Exit contact_done.scene + questSceneNodeDefinition interfaceThe child phase can continue through the matching outputCleanup has occurred
Child phase outputChild .questphaseMeet/leave objectives and community teardown completedThe root completion guard/fact has been updated
Fact cqa005_completedRoot .questphase and saveLater starts can take the already-completed routeJournal, scene, or community state was automatically erased

Do not collapse these into a generic “end.” In particular, there is no quest-scene-node output called end; the public success name is contact_done.

Exact completed lifecycle

The completed child phase orders actor readiness, scene handoff, and teardown:

child Input
  -> meet objective Active
  -> contact mappin Active
  -> community Activate
  -> CharacterSpawned
  -> setup trigger IsInside
  -> checkpoint
  -> scene start
  -> scene contact_done
  -> meet objective Succeeded
  -> contact mappin Inactive
  -> leave objective Active
  -> cleanup trigger IsOutside
  -> community Deactivate
  -> leave objective Succeeded
  -> child Output

After the child returns, the root succeeds the quest journal state, writes cqa005_completed, and exits. On a later activation, its completion guard can bypass the child rather than spawning the contact again.

The order is intentional:

  • CharacterSpawned prevents the scene racing a community entry that has not materialized;
  • contact_done is consumed before the meet objective and pin change;
  • the leave objective makes delayed cleanup visible to the player;
  • IsOutside avoids deactivating the contact at speaking distance;
  • deactivation completes before the leave objective and child output;
  • the durable completion fact is written only after the child returns.

A failed or interrupted scene must not accidentally reach the same success chain. Lab 5 exercises the ordinary cqa005 completion through contact_done. Active-line interruption, CutDestination, and interrupted recovery require separate tests if your scene uses them.

Scene interruption is not cleanup

The scene’s Default interruption scenario reacts when speaker distance rises above 6 and permits return after it falls below 5. With playInterruptLine: 1 and talkOnReturn: 1, it describes how the conversation may interrupt and resume.

That policy is separate from all of these:

  • scnEndNode 3 and named exit contact_done;
  • the quest scene node’s unconnected Default INT and Default RET outputs;
  • its empty interruptionOperations;
  • its unconnected CutDestination;
  • the wider IsOutside cleanup condition;
  • community Deactivate;
  • the persistent completion fact.

Do not route a six-unit conversational interruption directly to world cleanup. The player may return within five units and continue. Conversely, reaching End does not remove the community; the questphase retains it until the leave boundary is crossed.

notAllowedToBeFrozen: 0, reapplyInterruptionOperationsAfterGameLoad: 0, and syncToMusic: 0 are exact scene-node values in the fixture. They are not proof of save/reload or cut semantics. Those behaviors require runtime observation.

State that can outlive an archive edit

Treat these as separate save variables while diagnosing the lab:

Save-backed or persistent areaFirst Contact example
Factscqa005_completed and any prior probe values
JournalQuest/objective state, visited state, tracked entry, and mappin state
Quest graphActive root/child nodes and checkpoint progress
SceneActive or interrupted scene state and its return path
CommunityActivation, spawned entries, phase/workspot state, and deactivation progress
DevicesController persistent state if a later lab adds a device; no device is required by this one-line scene

Replacing a .scene, .questphase, or archive does not clear these domains. Resetting only cqa005_completed is also insufficient: a save can still retain an active child, journal state, checkpoint, scene, or community from an older payload. See Facts, journals, and saves.

Practical cleanup matrix

Run this matrix on Cyberpunk 2077 Windows GOG 2.31a with WolvenKit 8.19.0, ArchiveXL 1.27.0, RED4ext 1.30.0, and redscript 0.5.31. Record the packed payload inventory, exact save history, installed framework versions, and result for every row.

The Lab 5 test procedure covers the supplied checkpoint. Also test active-scene reload and interruption when adding those behaviors.

The frozen campaign begins from two untouched manual-save originals, then Case 1 creates the three named manual seeds under the unchanged candidate. Cases 3/4/7, 5/6/8, and 9/11 load distinct full-slot clones from their respective seed. Close the game before cloning. Never use an autosave, checkpoint save, or a save carried forward from a failed or differently build when comparing the result.

CaseSave point and actionRequired observations
Normal routeClean save; approach, hear the line, leave the outer cleanup areaContact is ready before launch; line occurs once; contact_done advances; pin changes; community deactivates after leaving; objectives and fact finish once
Named pre-scene loads (Cases 3/4/7)Load a distinct byte-identical clone of seed-pre-scene-outside-setup, then follow the exact case routeNo duplicate contact or objective transition; actor reacquires; Cases 3/4 start once and Case 7 survives its stream-away/return
Arbitrary pre-scene save/loadSave at any unlisted active-child point, then loadRecord the exact behavior; do not infer it from the supplied seed-save cases
Active-scene reloadWhere saving is permitted, save during the line or interruption and reload; otherwise record the nearest game-provided checkpointNo crash, stale speaker, duplicate line, false success, or leaked Cinematic AI state; exact behavior is recorded rather than inferred
Interrupt and returnCross above 6 units during the line, then return below 5Default interruption/return behavior is coherent and does not trigger cleanup or completion accidentally
Named post-contact loads (Cases 5/6/8)Load distinct clones of seed-post-contact-inside-cleanup, then follow the exact case routeMeet and pin state remain correct; replay is suppressed; cleanup/deactivation occurs once
Named completed loads (Cases 9/11)Load distinct clones of seed-completed under each case’s installation conditionRoot guard or removal isolation behaves as frozen; final journal state does not reactivate the quest
Case 7 stream away and returnLoad its seed-pre-scene-outside-setup clone, leave the finite Quest descriptor by ordinary movement, return, and finishNodeRefs reacquire, active stage remains coherent, and no duplicate community/scene launch occurs

If a case cannot be executed because the game forbids saving at that moment, record that limitation. Do not convert an untested save point into a passing claim.

Failure routing

SymptomInspect first
Contact vanishes during the lineCleanup branch reached too early, wrong trigger state/NodeRef, or an interruption route was conflated with deactivation
Contact remains after leavingIsOutside condition, community target/scope, Deactivate operation, or active save state from an older graph
Meet succeeds but leave objective never appearsConnection order after contact_done, journal socket names, and pin-inactive node
Quest finishes but contact remainsRoot fact/journal completion bypassed child cleanup, or deactivation occurred after rather than before child output
Quest restarts after completionCompletion fact write, root guard comparison/branch, or test save history
Behavior changes only after reloadActive quest checkpoint, scene interruption state, community phase, journal state, and installed build
Start checkpoint completes the meetingRoot or child start graph invokes the inert Start 1 -> End 3 scene shell; remove that invocation from the start project