Topic Editing - NenyaBit/Dynamic-Dialogue-Replacer GitHub Wiki

The use case of Topic Editing is to change the flow of Player Dialogue at runtime. This is very powerful for soft integrations as it allows you to dynamically hide, replace or inject additional topics into a conversation without editing the actual topic objects in the plugin.

File Structure

The .yml section for this editing type is topics:

topics:
  - Topic1
  - Topic2
  - ...

Each Topic object is defined as follows:

id: 0x267DE|Skyrim.esm
affects: 0x267DC|Skyrim.esm
replace: 0x123|Example.esp
text: "This is the new player response"
inject:
  - 0x123|Example.esp
  - 0xABC|OtherExample.esm
conditions:
  - GetIsReference Player == 0 AND
proceed: true
check: false
hide: false

Let's break things down:

  • id: The Form ID of the Topic which you want to edit.
  • affects: The Form ID of the Topic that you want to hide or replace. It can/cannot? be the same as id.
    • Default: 0
  • replace: The Form ID of the Topic that you want to be used in place of the affected Topic.
    • Default: 0
  • text: The player text to use in place of the original one for id.
    • Slightly counter-intuitive: The replacement text is used for the edited topic id when available as a dialogue choice, while other operations listed here affect the choices available downstream of this topic.
    • Default: ""
  • inject: A list of Topics to add as player responses after id
    • Injected Topics are independent of the underlying NPC response (which defines further player responses)
    • Injections only occur when there is at least one pre-existing player response topic available, independently of whether the other topic is valid (passes its conditions)
    • Default: []
  • conditions: The conditions to run against the speaker.
  • proceed: If this edit allows further edits by other configurations (does not consumes the editing process)
    • Default: true
  • check: If this edit should only be applied if there is at least one pre-existing player response topic that is valid (passes its conditions)
    • Default: false
  • hide: If the affected topic should be hidden (removed) from the list of valid responses
    • If no affected topic is given, will hide all topics from this branch
      • Excluding topics previously injected via this or preceding configurations
    • This will always consume the editing process
    • Default: false

A topic object is valid if all of the following holds:

  • The id field is present and references a valid Topic object.
  • If replace is present, then affects is present. Both are valid references to an existing Topic object.
  • Either replace is present, or text is non-empty, or inject is non-empty and references one or more valid Topic objects, or hide is true