BF1 Localization Tool

A WPF localization editor for Star Wars: Battlefront (Classic 2004) and Battlefront II (2005). Reads and writes core.lvl directly in memory via a custom ucfb engine, no third-party utilities. Marker validation, technical-string detection, Cyrillic glyph injection into the font atlas, and a BF2 widescreen menu layout fix.

Latest release: v1.1.0 · 30 September 2026 ·what's new

Features

BF1LocalizationTool.GUI — a WPF editor for creating and editing localizations of both games. Reads and writes core.lvl directly in memory via a custom UcfbReader/UcfbWriter — no third-party utilities (no QuickBMS, no munge/unmunge). Game version is auto-detected from the file path, and the string format (plain-text .txt or binary Locl) from the actual chunk content. Filters rows by language, translation status, and technicality (Technical / Translated / Untranslated — mutually exclusive), plus a separate “Reviewed” filter (rows marked + or +/-, with a counter); a validator checks that technical markers survive translation (%s %d %i %f %c %u, {btn...}, [X], newlines) in both directions — a marker missing from the original but present in the translation is flagged too — and hard-rejects stray Cyrillic-adjacent Russian letters that end up in the translation; a configurable “too long” translation threshold (default 1.3× the original plus a margin), calibrated against real in-game text truncation cases; auto-detection of technical strings that don’t need translation (URLs, numbers, identifiers, key names, cheat codes, copyright text); multi-row selection (Ctrl/Shift+click) and bulk-applying a review mark (+, -, +/-, or free-form text) to everything selected at once via the context menu; multi-line translation editing (Shift+Enter inserts a line break, Enter commits the cell) with a “↵” marker before real line breaks in the “Original” and “Translation” columns; autosave, file logging; CSV export/import for batch translation via external services. Dark/light theme.

Cross-game translation transfer (BF1 ↔ BF2) — a separate feature, not part of everyday editing: the “⇄ BF1↔BF2” button transfers translations between the two games by matching the English original (case- and whitespace-insensitive — BF1 stores text in UPPER CASE, BF2 in normal case), automatically adjusting the transferred row’s case to the target game (it reuses the same review-mark and selection mechanism described above, rather than duplicating it). Only rows without a review mark get overwritten — anything the donor already had reviewed is left alone; rows where the donor has several different translations of the same original go to a separate conflict-resolution window. A transfer summary (changed / unchanged / reviewed skipped / no match) is shown before anything is written.

BF1LocalizationTool.Diagnostic (console, distributed as source only) solves BF1’s main limitation: the .txt text channel (Latin1) doesn’t support Cyrillic on its own. The tool injects new Cyrillic glyphs (real Unicode code points, no mapping table) directly into the core.lvl font atlas, without overwriting a single English glyph. Glyph rasterization and metric models live in a separate BF1LocalizationTool.FontGenerator module.

BF2 widescreen menu layout fix — a separate part of the toolkit (Bf2Widescreen), needed because the font enlarged for Cyrillic shifts menu elements in a game built only for 800×600. It works through a custom interpreter for the game’s own scripts: every element-anchor fix in shell.lvl is computed from the game’s actual behavior rather than guessed, and confirmed with a before/after screenshot. The Instant Action menu (map/mode/era selection) is the hardest one in the game — the general layout rule doesn’t converge to zero defects there, so its values are measured and documented separately. The ingame.lvl file handles the same kind of layout for the pause menu and the multiplayer lobby — screens that only load in-match, so they fall outside the main-menu automated scan and are verified separately; the same file also covers enlarging BF2’s fonts by roughly ×1.5 (the font resource’s HEAD field) for Cyrillic readability on modern screens a targeted gap fix on the unit-selection screen, shifted by that same enlarged font, and a top margin for that screen’s recruitable-classes list (flush against the top edge by default). Every coordinate was measured and confirmed at 1920×1080 specifically — the game doesn’t handle this resolution correctly on its own, so for the best display add the launch option -resolution 1920 1080 in Steam’s game properties (the game may run at other resolutions too, but a pixel-perfect menu layout isn’t guaranteed there).

Movie subtitle fix — the campaign intro movies’ subtitles disappear on any resolution other than 4:3/5:4, a confirmed vanilla-game bug (reproducible with no mods at all). It’s fixed by a new d3d9.dll placed next to BattlefrontII.exe (Windows’ standard DLL search order checks the app folder before System32, so this is the normal mechanism, not a hack); if a third-party d3d9.dll was already there, it’s backed up (d3d9.dll.bf1backup) before being overwritten. The file’s origin isn’t just asserted — it’s backed by a reproducible build: on every commit, GitHub Actions rebuilds d3d9.dll from the open .cpp/.def source in the repository and compares the result byte-for-byte against what actually ships to players:

Verify d3d9.dll build

File Format

The game stores resources in hierarchical .lvl containers (ucfb, Pandemic Studios). Localization strings live under core.lvl → localization → [language] in one of two formats: plain-text .txt (0xHASH text, Latin1, both games — no Cyrillic support) or binary Locl (hash + text, UTF-16LE, BF2 only — full Cyrillic support out of the box). All of BF1’s text is confirmed to live in exactly two files (Data\_LVL_PC\core.lvl and the Tat3 add-on’s core.lvl), fonts only in the first; the Tat3 add-on has no fonts of its own and uses the base game’s atlas.

Requirements

Windows 10/11, Star Wars: Battlefront (Classic 2004) and/or Battlefront II on Steam. Prebuilt binaries (win-x64/win-x86) require no .NET installation; the generic build requires .NET 10 Desktop Runtime. Generating a Cyrillic core.lvl via BF1LocalizationTool.Diagnostic (source only) additionally requires the .NET 10 SDK.

Download

The latest releases (a ready-to-run .zip with the GUI editor) are available on GitHub Releases. The release contains the GUI only; BF1LocalizationTool.Diagnostic is built from source separately.

Security and Transparency

The source code for every component is completely open, and all .lvl file transformation logic is transparent — allowing the mod to be verified on Nexus Mods. The repository contains no extracted game files and no font .ttf files (they’re public on Google Fonts, linked in Credits below).

Starting with version 1.1.0, the release (all three variants — generic, win-x64, win-x86) is built automatically in GitHub Actions, triggered by a version tag (earlier versions were built and uploaded by hand); debug symbols (*.pdb) are stripped before packaging, and the GitHub release description is generated from the matching section of this changelog.

The BF2 layout fix has an extra layer of transparency: d3d9.dll always — there’s no “quiet” build variant — writes a detailed bf2_widescreen_fix.log right next to itself, in append mode; logging can’t be turned off. It’s capped at 25 MB, and the DLL makes no network connections (the source only includes <windows.h>) — see the BF2 localization page for details.

Developed for Star Wars: Battlefront (Classic 2004) — Ukrainian Localization and Star Wars: Battlefront II (Classic, 2005) — Ukrainian Localization.

Credits

  • The Gametoast community — game format documentation
  • swbf-unmunge — initial analysis of the ucfb structure
  • Sofia Sans Extra Condensed (Lettersoup — Botio Nikoltchev, Ani Petrova, SIL OFL) — the font used to render BF1’s Cyrillic glyphs
  • Unbounded (Web3 Foundation / Studio Koto / NaN / Parity Technologies, SIL OFL) and Exo 2 (Natanael Gama, SIL OFL) — the fonts used to render BF2’s Cyrillic glyphs