Skip to content

OpenKotOR/ERFEdit

Repository files navigation

ERFEdit

ERFEdit is a legacy Windows desktop editor for Bioware ERF-family archives. The application can open existing archives, create new ones, browse contained resources, add or replace files, extract selected resources, delete entries, and search large archives through a VCL list view.

The codebase is small and direct: one Delphi project file, one main form, one archive handler, and one shared utility unit. That makes it approachable, but it also means most behavior is concentrated in a few large legacy units and the repo contains some stale tooling metadata.

Supported Archive Families

  • [REPO] The parser and writer explicitly recognize ERF, MOD, HAK, SAV, and RIM headers in UERFHandler.pas.
  • [REPO] The loader accepts V1.0 and V1.1 archives, with V1.1 enabling 32-byte resource references for newer Neverwinter Nights 2-era files.
  • [REPO] The main UI exposes ERF, MOD, SAV, and RIM in its file dialogs today. HAK is recognized by the code path, but it is not surfaced in the current dialog filters.

What Matters First

  • ERFEdit.dpr: application entrypoint and command-line open behavior.
  • UMainForm.pas: UI controller for open, new, save, insert, extract, delete, drag/drop, and search.
  • UMainForm.dfm: form layout and menu wiring.
  • UERFHandler.pas: archive loading, resource lookup, staged additions, delete behavior, and full archive rewrite on save.
  • UST_Common.pas: dialogs, folder picker, file helpers, and icon lookup wrappers.

Documentation Map

  • BUILD.md: build prerequisites, platform constraints, and validation notes.
  • ARCHITECTURE.md: runtime structure, core flows, and format-handling responsibilities.
  • CONVENTIONS.md: codebase-specific patterns and legacy constraints.
  • CONTRIBUTING.md: how to make changes safely in this repo snapshot.
  • AGENTS.md: concise instructions for AI coding agents.
  • docs/knowledgebase/README.md: deeper subsystem notes, evidence boundaries, and maintainer-oriented repo archaeology.
  • ReadMe.txt: original release notes and historical user-facing notes retained from the legacy project.

Current Repo State

  • [REPO] The workspace contains source .pas files, form/resource assets, checked-in .dcu outputs, and Delphi backup files such as .~pas and .~dfm.
  • [REPO] .gitignore excludes several file types that are still present in the snapshot, including .dfm, .ddp, and .res. Treat tracked copies already in the tree as authoritative project assets.
  • [REPO] The current VS Code workspace files under .vscode are ERFEdit-specific and now mirror the actual entrypoint, archive-launch argument, and Delphi-era file layout.
  • [OPEN] No automated test suite, CI pipeline, or verified build artifact is included in this workspace snapshot.
  • [OPEN] Version markers are inconsistent: ReadMe.txt reports v0.4, while ERFEdit.dof still reports 0.3.1 product metadata.

Operational Notes

  • [REPO] Added resources are staged until the user saves the archive. They are marked with * in the list and skipped by extraction until committed.
  • [REPO] Saving rewrites the archive through a temp folder and reloads the file afterward, rather than patching entries in place.
  • [REPO] The app can open a single archive path passed on the command line at startup.

Known Areas To Verify Before Deeper Work

  • [OPEN] Save As passes the dialog filter string into TERFHandler.Save, while the save code reads only the first four characters when overriding the file type header. Non-ERF Save As flows should be runtime-tested before being treated as reliable.
  • [OPEN] HAK support should be tested end to end from the current UI, because the archive handler recognizes HAK but the dialog filters do not advertise it.

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages