TSLPatcher Data Syntax - OpenKotOR/PyKotor GitHub Wiki

TSLPatcher Data Syntax

TSLPatcher's data-oriented sections are now documented on dedicated pages so each syntax family can be maintained independently. Use this page as the stable entry point for links that refer to [2DAList] and [TLKList] syntax.

In PyKotor's current tooling pipeline, these are not abstract labels. TSLPatcherINISerializer.serialize() emits changes.ini in canonical section order beginning with [TLKList], then [InstallList], [2DAList], [GFFList], [SSFList], and [HACKList], while TSLPatchDataGenerator.generate_all_files() stages the companion files in tslpatchdata such as append.tlk and the source assets that later sections patch or install [TSLPatcherINISerializer.serialize(), _serialize_tlk_list, _serialize_2da_list, TSLPatchDataGenerator.generate_all_files(), _generate_tlk_files, _generate_2da_files].

That matches the historical design goal described by stoffe's original documentation: TLK and 2DA passes exist first so later stages can consume dynamically-assigned StrRef# and 2DAMEMORY# values instead of forcing hardcoded row numbers or talk-table indices [Deadly Stream TSLPatcher page].

Contents

When to use this page

Use this hub when you need to decide whether a change belongs in [2DAList] or [TLKList], or when an older wiki link brought you here. For exact directives, examples, processing notes, and token usage, follow the dedicated guides below.

If your mod needs to create data that other sections will later reference, start here first. [TLKList] is the normal source of dynamic StrRef# tokens, and [2DAList] is the normal source of dynamic 2DAMEMORY# values that later flow into GFF, SSF, and NCS patches [Deadly Stream TSLPatcher page, TSLPatcher GFFList Syntax, TSLPatcher HACKList Syntax].

2DAList Syntax

Use [2DAList] when a mod needs to merge changes into a 2DA table instead of replacing the whole file. The standalone guide covers row targeting, ChangeRow, AddRow, CopyRow, AddColumn, 2DAMEMORY tokens, processing order, and troubleshooting.

Canonical page:

Typical uses:

  • appending rows to appearance.2da, spells.2da, or similar tables
  • storing row indices in 2DAMEMORY# for later GFF, SSF, or NCS patches
  • merging per-mod table edits without shipping whole-file overrides

TLKList Syntax

Use [TLKList] when a mod needs to append or patch TLK string entries. The standalone guide covers StrRef# creation, replacement behavior, processing order, and how those string references flow into later sections such as [2DAList], [GFFList], and [SSFList].

Canonical page:

Typical uses:

  • adding new dialogue or item text to dialog.tlk
  • creating StrRef# tokens for later use in 2DA and GFF edits
  • updating localized text without replacing the entire talk table

Related sections