6. Defining our DLC plot

The narrative design and playable layout established in the preceding tutorials can now be represented formally through plot variables, transitions, conditionals, and quest records. The first implementation begins with one deliberately small fact and expands the plot system incrementally while keeping each new piece tied to an understood part of the quest.

Understand the two identifiers

The example needs two separate numbers:

The bool is saved state. The transition is the command that changes it. These identifiers occupy different numeric namespaces even when their values happen to be the same, so record each one with its type and do not treat them as one identifier.

Plot variables are not declared in a table. An unused plot bool reads as FALSE; after a transition sets it to TRUE, that value is stored in the save.

For the first version of this example, only one state is required:

ShieldModuleRecovered : Plot Bool

FALSE = not recovered
TRUE  = recovered

Later versions can distinguish recovery, installation, and the current shield state:

ShieldModuleRecovered
ShieldModuleInstalled
ShieldsSuppressed

Do not add those extra states until the recovery flow works and persists through a save and reload.

Know which plot files do what

In LE1, a PlotManagerUpdate.pmu file contains conditional functions added or overridden by a DLC mod. A transition belongs in a PlotManagerAutoDLC_*.pcc package, in its StateTransitionMap.

For the Ghost in the Machine example, the intended package is:

DLC_MOD_Ghost_in_the_Machine/CookedPCConsole/
    PlotManagerAutoDLC_Ghost_in_the_Machine.pcc

That package should contain the standard LE1 DLC plot-manager exports:

DataCodexMap
OutcomeMap
QuestMap
ConsequenceMap
StateTransitionMap
ObjectReferencer

The ObjectReferencer must retain references to the map exports. If a known working DLC plot-manager package is used as a template, clear its map entries; renaming the file alone does not remove the source mod's plot data.

Allocate the identifiers

Do not choose an ID merely because it is absent from the vanilla plot list. A vanilla-unused value may already be used by another mod.

For each proposed plot-bool and transition ID:

  1. Open Plot Editor in Legendary Explorer.
  2. Open the base-game PlotManagerAuto.upk or an installed PlotManagerAutoDLC_*.pcc package.
  3. Open Find Usages.
  4. Search the proposed plot-bool ID as a bool.
  5. Search the proposed transition ID as a transition.
  6. Check the project's imported plot references and relevant installed mod packages as well.
  7. Record the final allocation in the mod's design or implementation notes.

Finding no vanilla usage is evidence that an ID is available in vanilla. It is not, by itself, proof that the ID is free across every possible mod.

Create the recovery transition

Open the mod's PlotManagerAutoDLC package in Plot Editor, then:

  1. Select the State Event Map or transition view.
  2. Add a state event using the allocated transition ID.
  3. Add a plot-bool operation to that event.
  4. Set its target to the ShieldModuleRecovered plot-bool ID.
  5. Set New Value to TRUE.
  6. Leave Use Param disabled.
  7. Do not make the operation a substate.
  8. Save the package.

Conceptually, the transition is:

Transition: AcquireShieldModule
    Set Plot Bool ShieldModuleRecovered = TRUE

A substate is unnecessary because this bool has no parent or sibling relationship.

Find the Luna probe sequence

The existing probe logic is in the source-mod copy of:

BIOA_UNC51_00_DSG.pcc

Its relevant sequence has this instanced full path:

TheWorld.PersistentLevel.Main_Sequence.SequenceReference_33.Sequence_6233

The relevant existing nodes are:

BioSeqEvt_ArtPlaceableSkillGameSuccess_0
    -> BioSeqAct_PopupLootGui_1
    -> existing probe-completion behavior

In the inspected package, BioSeqAct_PopupLootGui_1.Out feeds both the existing finish-sequence action and an action that modifies the art placeable. Preserve both behaviors when inserting the module acquisition logic.

Edit the package in the mod's source directory, not an arbitrary installed copy from the game. After installation, inspect the highest-mounted runtime provider separately to verify that the intended package was installed.

Execute the transition after the loot popup

Add a BioSeqAct_PMExecuteTransition node and set:

m_nIndex = AcquireShieldModule transition ID

Wire the sequence in this order:

Successful probe interaction
    -> Normal loot popup
    -> Set ShieldModuleRecovered = TRUE
    -> Show "Shield Control Module Recovered" message
    -> Existing ModifyPropertyArtPlaceable and FinishSequence behavior

Place the transition after BioSeqAct_PopupLootGui_1.Out. This preserves the ordinary treasure reward and makes module recovery part of the completed loot interaction.

Move both existing completion links from the loot popup to the end of the new acquisition chain. Do not delete either existing path.

Do not execute the transition directly from the skill-game success event in parallel with the loot UI. That can grant the module before the loot interaction has completed and makes the sequence's ordering harder to reason about.

Prevent duplicate acquisition

Add a BioSeqAct_PMCheckState after the loot popup and set:

m_nIndex = ShieldModuleRecovered plot-bool ID

Wire it as follows:

PopupLootGui.Out
    -> PMCheckState: ShieldModuleRecovered
        False -> Execute recovery transition
              -> acquisition message
              -> existing completion behavior

        True  -> existing completion behavior

This makes the operation idempotent. If the sequence is triggered again, the module is not awarded twice and the acquisition message is not repeated.

The guard may appear redundant because the probe is designed as a one-use object. Keep it for release: it protects the plot state from later sequence changes, unusual saves, and accidental re-entry.

Read the state elsewhere

At a module installation console, use another BioSeqAct_PMCheckState with:

m_nIndex = ShieldModuleRecovered plot-bool ID

Its outputs mean:

True  -> Shield module is available for installation
False -> Shield module is unavailable

A custom conditional is unnecessary when the question is simply whether one plot bool is true. BioSeqAct_PMCheckState reads that state directly.

A conditional becomes useful for a compound rule such as:

ShieldModuleRecovered
AND NOT ShieldModuleInstalled
AND NOT QuestCompleted

Verify before launching the game

Before runtime testing:

  1. Reopen the source PlotManagerAutoDLC_Ghost_in_the_Machine.pcc in Plot Editor and confirm that the transition targets the intended bool.
  2. Reopen BIOA_UNC51_00_DSG.pcc in Sequence Editor and confirm that the execute-transition node contains the transition ID, not the bool ID.
  3. Confirm that both original completion paths remain connected after the new logic.
  4. Install the mod through its normal build and installation workflow.
  5. Open the installed, highest-mounted copies of both packages and repeat the checks. This separates a source-editing error from a build or installation error before the game is involved.

Test save persistence

Use a save from before opening the probe:

  1. Load the save and confirm that the module-acquisition message has not appeared.
  2. Open the probe.
  3. Confirm that ordinary loot still appears.
  4. Confirm that the module message appears afterward.
  5. Save the game.
  6. Reload that save.
  7. Inspect the raw plot state with Trilogy Save Editor and confirm that the allocated bool is TRUE.
  8. Exercise a temporary test sequence or installation console containing BioSeqAct_PMCheckState and confirm that it follows its True output.
  9. Reload the original pre-probe save and confirm that the same bool is still FALSE there.

Plot state is stored in each save. It is not automatically shared among every save in a career.

  1. Allocate the plot-bool and transition IDs.
  2. Create and verify the mod's PlotManagerAutoDLC package.
  3. Add one transition that sets one bool.
  4. Wire it after the existing probe loot popup.
  5. Verify the source and installed packages.
  6. Verify persistence through a save and reload.
  7. Add installed-state tracking and installation-wheel logic only after this first vertical slice works.

The broader terminology and engine behavior are documented in Introduction to Plot Management.