Skip to content

OpenKotOR/TalkEd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TalkEd

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 .tlk file from the UI or from the command line,
  • browse a bounded StrRef interval 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 .tlk file onto the current one,
  • change the TLK header language id,
  • save changes back to disk.

Status

  • 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.

Repository Layout

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.

How TalkEd Works

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.

Supported Workflows

Open and Browse

  • Use File -> Open to load a .tlk file.
  • Use the start and stop boxes to bound the displayed StrRef interval.
  • Double-click or use the edit action to modify the selected row.

Search

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 StrRef interval,
  • optional sound resref substring filter.

Add, Edit, Delete, and Pad

  • New entries are appended to the end of the talk table.
  • Edited entries are updated in place.
  • Deleting an entry reindexes all following StrRef values.
  • Padding creates blank entries up to a target StrRef.

Merge / Append

Append file loads a second .tlk and appends its entries to the current file, assigning new sequential StrRef values as they are inserted.

Language Header

The language dialog currently maps the first six language IDs to:

  • 0 English
  • 1 French
  • 2 German
  • 3 Italian
  • 4 Spanish
  • 5 Polish

Build and Run

Build Requirements

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.

Current Workspace Support

The .vscode folder is tuned to this repository and includes:

  • Pascal-related file associations,
  • file nesting for TLKEdit and its form units,
  • validation tasks that confirm the TalkEd project surface exists,
  • launch configurations for running TalkEd.exe directly or with a .tlk file argument.

Known Constraints and Historical Edges

  • 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 .gitignore excludes .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 public for that setting.
  • Contributor workflow expectations for that limitation live in CONTRIBUTING.md.

Documentation Map

  • 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.

Repository Remote

The local repository is configured with the private GitHub remote:

  • origin: https://github.com/OpenKotOR/TalkEd.git

About

Delphi 7 TLK editor for TLK V3.0 talk table files used in KOTOR modding

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages