On this page
Mods in the editor: mount, edit, port back
This page is the beginner tutorial for editing a mod's map in the web editor: mount the mod you have installed next to the base game, change a map, export it for the game and drop it back into the mod's folder to try it. The mount reads your own files in the browser; nothing is uploaded.
The editor reads the mod from your own installation; nothing of the mod is uploaded or shared by bf2.us. Project Reality, Forgotten Hope 2 and every other mod belong to their teams: share an edited map only the way the mod's team allows, and never publish its files.
What works#
Checked against the editor at heroes-next with the BF2 retail data and a small test mod (2026-10-30; the checks are cargo test -p bf2-editor --test mods_bf2 and editor_check.py --game bf2 --only mods --mod-check):
| Step | Where | State |
|---|---|---|
| Open a base-game level (BF2, 2142, Heroes) | the top bar's game and level pickers | works |
| Mount a mod from its folder | Overlays tab, Mods part, Add mod (folder button) | works (H2371) |
| The mod's levels in the level picker | its own group Mod: <name> (your files), each level badged mod <name> | works (H2371) |
| Open a mod level with the mod's objects over the base game's | pick it in the level picker | works (H2371) |
| The mod's object templates in the Assets tab | badged mod <name> | works (H2371) |
| Move, copy, delete, add objects; edit template properties | viewport gizmo, Inspector, Assets tab | works |
| Save the edits into an overlay (a folder of changed files over the game's) | Save (Ctrl+S, the edit toolbar); the Overlays tab lists, makes and mounts overlays | works |
| Export the overlay for the original game | Overlays tab, the overlay's Export button, then Export for the game | works (H2102); for a mod level the paths are the mod's |
| The same export from the command line | bf2_editor --game bf2 --level <map> --overlay <dir> --export-game <out.zip> | works for base-game levels (H2102) |
What "Export for the game" makes: the original game reads a level's files from its archives only (Levels/<map>/server.zip and client.zip; a loose file next to them is never read), so the package holds copies of those archives with your changed files inside, every other entry left exactly as it was, and an INSTALL.txt that says where each file goes and who needs it (the server, every player or both). Template changes go into small patch archives that the mod's archive scripts mount first. The details are in notes/editor/overlays.md ("Export for the game").
Checked example: Strike at Karkand, one road sign (industrial, object 2, from CompiledRoads.con) moved 5 m. The package is mods/bf2/Levels/strike_at_karkand/server.zip plus INSTALL.txt; the copied server.zip has the original's 52 entries in the same order, only CompiledRoads.con changed (the sign's object.absoluteposition 26.0896/150.765/272.992), the other 51 byte for byte the original's.
The mod mount#
The mod mount (registry task H2371, notes/editor/api.md "Mod packs") puts a mod's folder next to the base game the way the game itself runs a mod (+modPath mods/<mod>): the mod's folder is searched first, its archive scripts (ServerArchives.con, ClientArchives.con) mount its own archives ahead of the base game's, and its levels are found first by the level load. What the mod leaves out comes from the base game (a Project Reality map can still place a base-game building). Unmounting the mod leaves the base game exactly as before from the next level load.
- What to pick: the mod's folder from your Battlefield 2 install,
mods/<mod>/(mods/pr/,mods/fh2/, ...). The folder's name becomes the mod's name in the editor. Large archives are not copied into the browser's memory: the editor reads the parts it needs from your disk while it loads. - How long it lasts: the editor keeps the mod for your next visits. In Chrome and Edge it keeps the folder you picked and mounts it again when the page opens (the browser may ask once more for read access: press Allow again in the Mods part, or just pick one of the mod's levels). In other browsers a mod up to 512 MB is copied into the browser's own storage and mounted from there; a bigger one lasts until the page reloads. Unmount forgets it.
- Big mods: the editor reads your mod's archives in 1 MB pieces, so the thousands of object scripts of a mod like Project Reality cost a few hundred reads of your disk. A test mod of Project Reality's shape (4,200 object scripts, a 611 MB objects archive) opens its version of Strike at Karkand in about 9 seconds; the console line
mod <name>: level ... loaded in ... s; <n> reads of your mod's filessays how long yours took. The editor keeps the mod's object scripts for the rest of the visit, so opening a second map of the same mod (or the same map again) skips reading them: thetemplates:line then says how many came from "this session's copy". It also keeps every piece of your mod's files it read (the meshes and textures too, up to 1 GB in the page's memory), so the same map opened again reads nothing from your disk: the test mod's Karkand opens the second time in about 2 seconds instead of 8, and the load line ends with<k> from this session's copy. AddBF2_EDITOR_MOD_KEEP_MB=<n>to the page's address (?...&BF2_EDITOR_MOD_KEEP_MB=512) to keep less or more, 0 for nothing. - The mod's shaders: the mod's
Shaders_client.zipis used ahead of the base game's. In the browser the editor can only use shaders that are already compiled, so a shader the mod changed is drawn with the base game's version (the console names it); everything the mod left unchanged is the same either way. - PLAY: a mod's map plays in the browser too. PLAY opens the game's page with the map and the mod's name; the page mounts the same mod the editor keeps (your folder, or its copy in the browser's storage), and the round's server and your client both read the mod's archives and its map, as a game started with the mod would. The console of the game's page says
editor mod: bf2/<mod> mounted from ...and, per side,mod pack <mod> (client|server): ... ahead of the game'sand how many objects of the mod's templates the map placed. A mod's own version of a game map (Project Reality's Strike at Karkand, say) plays from the mod's files without downloading the game's version of that map first (webdata: level <map> is the mod <mod>'s own ...). The mod must be kept for that: a mod bigger than 512 MB picked through the file input lasts for the page only, so use Add mod with the folder chooser (Chrome, Edge). If the browser wants to ask again for read access to the folder when the game's page opens, the page saysYour mod folder <mod> needs read access again: click the page, then allow it in the browser's prompt.: click anywhere on the page and allow it, and the round goes on with your folder (without a click within two minutes, or if you refuse, the round runs on the game's own files; then press Allow again in the editor's Mods part before PLAY).
Tutorial: edit a mod's map and test it in the mod#
1. Have the mod installed#
Install the mod the normal way (its installer or launcher) into your Battlefield 2 folder, so it has a mods/<mod>/ folder with Levels/ inside. Start it once to be sure it runs.
2. Mount the mod in the editor#
- Open the editor at bf2.us/editor and choose Battlefield 2 in the game picker.
- Open the Overlays tab on the left. At its bottom is the Mods part.
- Press the folder button (Add mod) and choose your mod's folder, for example
C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr. Chrome asks you to confirm (its dialog says "upload"); the files stay on your computer, the page only reads them. - The mod shows in the list with its levels, and the console says
mod: <mod> mounted: <n> files, <k> level(s).

The level picker now has a group for the mod, Mod: <name> (your files), below the base game's levels; each of its levels carries the badge mod <name>.

3. Open the map and change something#
Pick the map in the level picker (or click it in the Mods list) and wait for level ready in the console. The mod's objects draw over the base game's; in the Assets tab the mod's templates carry the badge mod <name>. Select an object (click it, or find it in the scene tree), drag the gizmo to move it, or change a value in the Inspector. Ctrl+Z undoes.

4. Save into an overlay#
Press Save (Ctrl+S, or the Save button of the edit toolbar). With no overlay mounted the editor makes one called edits, mounts it and writes your changes there; the Overlays tab then shows it with your edit list. The overlay lives in the browser; reloading the level shows your changes (a kept mod mounts again by itself first). To use your own name, type it in the Overlays tab, press New overlay and click the new overlay to mount it (that loads the level again) before you start editing.
5. Export for the game#
Press the overlay's Export button. The dialog lists what the server needs and what every player needs; press Export for the game. The download is <game>_<overlay>_for_the_game.zip with the level's archive copies and INSTALL.txt. For a mod level the paths start at the mod's folder: a moved object of the test mod's level exports as mods/h2371test/Levels/H2371_Test/server.zip (the copy with the changed StaticObjects.con), with INSTALL.txt saying "unpack into the game's install folder (the folder that holds mods/h2371test/)".
6. Put it into the game or the mod#
- Close the game.
- Back up every file the package replaces (
INSTALL.txtlists them, for examplemods/pr/Levels/<map>/server.zip). - Unpack the zip into the Battlefield 2 folder (the one that holds
mods/): its paths start atmods/<mod>/, so the archives land in the map's folder of the mod.
7. Test it#
In the browser first: with the mod's map open, press PLAY. The round runs the map with the mod and your saved overlay; Stop · Back to editor returns to the map.
In the game: start it with the mod (its launcher, or BF2.exe +modPath mods/<mod>), host a local game on the map (or run the dedicated server with the same mod and the map in its settings/maplist.con) and look at what you changed. The server and every player need the same files wherever INSTALL.txt says so.
8. Undo#
Put the backed-up archives back (or let the mod's launcher repair its files).
What the mods' own tools expect#
From the mod teams' mapping guides (Project Reality's forum tutorials at forum.realitymod.com, Forgotten Hope 2's at forgottenhope.warumdarum.de/tutorials), and how the editor meets them:
- A map is a folder
mods/<mod>/Levels/<map>/withserver.zip(the.confiles, heightmaps, gameplay objects, collision) andclient.zip(terrain textures, lightmaps, overgrowth), plusinfo/with the.desc. Both mods ship their maps that way; the editor lists everyLevels/<map>/folder of the mod that holds aserver.zip, aclient.zipor anInit.con, and the export writes those two archives. - Project Reality wants map folders and files in lower case (its servers run on Linux). Keep the names the mod uses; the editor keeps the folder's own spelling in the paths it exports.
- Extra objects of a map (Project Reality's custom-content maps) come in archives inside the map's folder (
Levels/<map>/Objects_client.zip,Objects_server.zip) that the map's ownClientArchives.con/ServerArchives.con(inside itsserver.zip) mount. The editor runs those scripts at the level load as the game does, so such a map's objects load too. - Mappers edit unpacked copies and pack them with the mod's script (Project Reality's map builder script, Forgotten Hope 2's
pack-map.py), which leaves out editor files and, in Forgotten Hope 2, trims the kits a map loads. The editor needs no unpacking: it reads the packed archives and exports packed copies with only your changed files replaced, so the mod's other packing rules stay as the mod's own packer left them. - The mods' launchers and updaters check their files and may put the originals back: keep your backups, and test on a local game or your own server. An online server of the mod refuses players whose files differ from its own, so an edited map is played on a server that has the same package.
Related#
- The web modding editor: how the editor is built.
- Level editor plan: every file of a level, its reader and the writer contract.
notes/editor/overlays.md: overlays and Export for the game in detail.notes/editor/api.md"Mod packs": the mount's engine side and what it reads.
How it is tested#
- A mod's chain (
crates/bf2-editor/tests): a mod pack's level opens over the game mod its parent chain builds on (mods_parent_levels_bf2.rs,mods_chain_bf2.rs), loose files come before archives (mods_loose_first_bf2.rs), and an export keeps the chain (mods_chain_export_bf2.rs). - The mount order itself is the file system's, with tests from the original's listing (archives).
- The tutorial's steps on this page were played by hand when it was written; no scenario replays them.
In the code#
| What | Where |
|---|---|
| the editor's engine: mounts, overlays, export | crates/bf2-editor |
| the virtual file system a mount goes through | crates/bf2-fs, in the browser crates/bf2-webfs |
| the editor's page | web/editor/ |
docs/dev/editor/mod-mount.md · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.