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.
- [REPO] The parser and writer explicitly recognize
ERF,MOD,HAK,SAV, andRIMheaders in UERFHandler.pas. - [REPO] The loader accepts
V1.0andV1.1archives, withV1.1enabling 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.
- 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.
- 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.
- [REPO] The workspace contains source
.pasfiles, form/resource assets, checked-in.dcuoutputs, and Delphi backup files such as.~pasand.~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 reports0.3.1product metadata.
- [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.
- [OPEN]
Save Aspasses the dialog filter string intoTERFHandler.Save, while the save code reads only the first four characters when overriding the file type header. Non-ERFSave Asflows 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.