TalkEd is a Delphi 7 desktop editor for BioWare-style TLK V3.0 talk table files. In practice, this repository is aimed at Knights of the Old Republic modding workflows where a .tlk file acts as a string database keyed by StrRef values.
This is the authentic source code Stoffe was working with 10-20 years ago, released to the community so it can be maintained and kept from becoming abandonware.
The application lets you:
- open an existing
.tlkfile from the UI or from the command line, - browse a bounded
StrRefinterval rather than loading the full table into the grid at once, - search entries by text, words, sound resref presence, blank/non-blank status, custom/new status, and interval,
- add, edit, delete, and pad entries,
- append another
.tlkfile onto the current one, - change the TLK header language id,
- save changes back to disk.
- Language/runtime: Delphi 7 / Win32 VCL application.
- Primary project entrypoint:
TLKEdit.dpr. - Default executable name in this repo:
TalkEd.exe. - Current in-source version markers:
1.0.4b (WIP). - Native build support: Windows host with Delphi 7-era tooling.
- Non-Windows support: running an already-built executable through Wine.
Top-level files are intentionally flat and mirror the original Delphi 7 project structure.
TLKEdit.dpr: VCL application entrypoint and startup wiring.TLKEdit.cfg: local Delphi compiler options file that may exist in a native build environment but is intentionally not tracked in git.TLKEdit.dof: Delphi IDE project options.UTLKFile.pas: TLK parsing, in-memory string storage, and save logic.UMainForm.pas: main window, menus, grid display, and orchestration.USearchForm.pas: search dialog and filter flags.UEntryForm.pas: add/edit entry dialog.ULanguageForm.pas: TLK language selector dialog.UPadForm.pas: pad-to-StrRef workflow.UConfirmDelete.pas: delete confirmation dialog.StoffeUtils.pas,UStrTok.pas,modgrids.pas: helper units..vscode/: workspace-local launch, task, and editor settings tuned for TalkEd.
At startup, TLKEdit.dpr creates the main form plus the supporting modal forms. If a first command-line argument exists and ends in .tlk, the app immediately asks TMainForm.LoadFile to load it.
TTLKFileHandler in UTLKFile.pas owns the file header data and an in-memory linked list of TTLKString objects. Each entry tracks:
- TLK flags,
- sound resref,
- volume variance,
- pitch variance,
- string offset,
- string size,
- sound length,
- strref,
- string text,
- whether the entry is custom/new in the current editing session.
The main window does not render every entry by default. Instead, the user specifies a StrRef interval and the grid is filled for that range only. This is deliberate: the code warns that displaying the entire file at once can take significant time and memory on large talk tables.
- Use
File -> Opento load a.tlkfile. - Use the start and stop boxes to bound the displayed
StrRefinterval. - Double-click or use the edit action to modify the selected row.
Search supports multiple filters simultaneously:
- case-sensitive or case-insensitive text search,
- exact match or substring search,
- word-search mode where all search words must appear,
- negated matches,
- limit to new/custom entries,
- limit to non-blank entries,
- limit to entries with sound resrefs,
- limit to a selected
StrRefinterval, - optional sound resref substring filter.
- New entries are appended to the end of the talk table.
- Edited entries are updated in place.
- Deleting an entry reindexes all following
StrRefvalues. - Padding creates blank entries up to a target
StrRef.
Append file loads a second .tlk and appends its entries to the current file, assigning new sequential StrRef values as they are inserted.
The language dialog currently maps the first six language IDs to:
0English1French2German3Italian4Spanish5Polish
To build from source you currently need:
- a Windows machine,
- Delphi 7 or a closely compatible command-line compiler,
- the VCL forms and resource pipeline expected by the original project.
The repository does not contain an automated cross-platform build. On Linux and macOS, the workspace is configured for launching an already-built Windows executable under Wine, not compiling the project.
See BUILDING.md for the full build and launch workflow.
Local Delphi companion files such as TLKEdit.cfg, .dfm, .res, and icon resources may exist in a native Windows worktree, but this repository intentionally does not commit those UI/resource artifacts today.
The .vscode folder is tuned to this repository and includes:
- Pascal-related file associations,
- file nesting for
TLKEditand its form units, - validation tasks that confirm the TalkEd project surface exists,
- launch configurations for running
TalkEd.exedirectly or with a.tlkfile argument.
- The project is still structured as a Delphi 7-era flat repository.
- There is no automated unit-test suite in this repository today.
- Build validation is currently manual and environment-dependent.
- The repository
.gitignoreexcludes.dfm,.res,.ico,.ddp, and generated binaries, which means some visual/resource changes are not tracked unless that policy is changed intentionally. - The TLK reader/writer explicitly carries fixes for long strings beyond the original 4096-byte buffer behavior, but this remains an area worth validating when changing TLK serialization.
- GitHub branch protection is not currently enforceable on this private repository tier; the GitHub API returns
403 Upgrade to GitHub Pro or make this repository publicfor that setting. - Contributor workflow expectations for that limitation live in
CONTRIBUTING.md.
README.md: project overview and operator-facing usage.BUILDING.md: build and launch details.ARCHITECTURE.md: unit and workflow breakdown.CONTRIBUTING.md: contribution process and validation expectations.CONVENTIONS.md: coding and repository conventions specific to this project..github/labels.md: current repository label baseline and governance notes.
The local repository is configured with the private GitHub remote:
origin:https://github.com/OpenKotOR/TalkEd.git