Skip to main content

Engine Theory & the Map Editor

Community-reported

Architecture theory in this section is explicitly not officially confirmed — treat it as the community's best working model, not verified fact. Where reverse engineering has since confirmed or corrected part of it, that's called out inline. See Getting Started for the full provenance note.

Engine architecture theory

  • Why checkpoints respawn when you leave and return: the working theory (from a 2016–2017 thread, partly corroborated by the "Infamous Fusion" mod's own developer) is that the original Dunia engine (as used in FC2) keeps only very limited state memory — effectively just the player's current zone/vicinity, with no persistent record of previously cleared areas beyond that. "Local state" is always fully reloaded; "global state" persists a simple killed/alive flag but nothing more granular. Contrasted with Dunia 2 (FC3), which apparently added enough state memory to avoid loading screens between islands. Per the mod developer directly: sectors/objects are either fully loaded from local state or restored from last-known global state — there is no partial/percentage repopulation possible, and enemy stat parameters (aggressiveness, FOV, speed) are fixed once per definition rather than scaling per difficulty level. A concrete mitigation proof-of-concept exists (Discord, 🔨-fc2-modding, Mar 2022, scubrah): increasing the distance the player can travel away from specific world sectors before those sectors "reload" reduces how easily a checkpoint's AI/state resets from ordinary movement — never released as a finished mod, but it confirms the reload-radius is a tunable value, not a hardcoded engine constant.
  • Checkpoint/guard-post mercs do stop respawning once killed, with a finite reinforcement pool — except in a small number of specifically-designed endless-spawn zones (the two main hub towns, and "cease fire" zones after violating them). Reinforcement counts for these endless zones are described by the "Infamous Fusion" developer as currently infinite but changeable to end after a while — a middle ground is technically possible at the engine-data level, even though no public mod had implemented it as of the sources reviewed here. A separate 2016 experiment found only a binary on/off toggle (mercs stay dead forever, globally, once cleared).
  • The infamous "11MB player.xml" bloat is not evidence of sloppy original development — Gibbed clarified this directly: the original binary (entitylibrarypatchoverride.fcb) is only ~2.5MiB. The binary format supports referencing shared/duplicated data, and the original developers used that mechanism. It's Gibbed's own XML dump format that flattens everything into full duplication, by design, to make hand-editing simpler without needing a reference-resolving visual editor.
  • Faction infighting and other systemic behaviors appear deliberately reduced/cut relative to what the data supports — the <MapArmy>/faction-color system and the patrol faction-color trick (Data Recipes) show the underlying simulation supports far more dynamic faction conflict than vanilla exposes. Community consensus (speculative): FC2 may have been something of an engine/design experiment ahead of FC3, with several systems (the cut "watch" item, underused faction infighting, DLC content walled off from the patch system) left unfinished or dialed back.
  • Buddy characters are a scripted "facade," confirmed by a knowledgeable modder citing Clint Hocking's own interviews directly (Discord, 🔨-fc2-modding, Nov 2021, "Hunter" — later revealed as the actual author of the well-known FC_Redux mod): buddies are effectively stationary mission-givers until their scripted "rescue" sequence triggers, after which they walk around briefly and despawn once you leave the map square — they don't persistently roam the world. A theoretical workaround (untested): swap a buddy's model onto a neutral/generic patrol NPC on an existing patrol route so you'd see "them" out in the world — their voice lines wouldn't trigger contextually, so it would still be a facade, just a better-dressed one.
  • Truck-mounted enemies seen in cutscenes/intro sequences are baked into the vehicle model itself, not real spawn points — confirmed directly (Hunter): you cannot add more NPCs to those vehicle "slots" beyond what's modeled, and the game crashes if you try to add too many NPCs to a vehicle that does have real passenger spots.
  • Manual per-sector enemy placement is possible but genuinely tedious, with no probability/chance mechanism available: to add enemies to a specific world location, locate the relevant world sector's numbered .fcb file, unpack it, and add entries with explicit X/Y/Z coordinates by hand (text/XML editing — no visual placement tool exists for this data). Confirmed directly by Hunter: there is no spawn-chance or probability field — ambient/sector enemy presence is a hard on/off toggle only, and state reloads fully whenever you re-enter a map square (consistent with the local-state- reload theory above). "Sometimes an ambush spawns here" style unpredictability needs to be implemented in whatever Lua hooks are actually honored (see the Lua-reliability gotcha) rather than a built-in data field.
  • World1/World2 (Leboa/Bowa) are structurally duplicated, not a shared parameterized dataset — confirmed by multiple modders independently discovering near-identical folder/file trees for each map.
  • Community sentiment: FC2's Dunia 1 had stronger shaderwork/dynamics than FC3's Dunia 2 (Discord, 🔨-fc3-and-bd-modding, 2021-11-28) — Uktena: "FC2's was pretty good"; legendhavoc175: "better shaderwork than FC3, that's for sure"; Uktena: "More dynamic stuff too." Opinion, not a spec claim, but consistent across multiple independent posters. Related, also anecdotal: Watch Dogs 1's Disrupt engine is claimed to be a fork of FC2's Dunia specifically (not FC3's) — "yeah WD's disrupt is a fork of FC2 dunia" (みる97, same thread) — with a separate poster describing Disrupt as "built between dunia1 and dunia2 (fc3)," FC2 feeling physically closer to Disrupt than to FC3+ (Discord, 🔨-fc4-and-p-modding, 2022-07-08, legendhavoc175).
  • A second, independent pair of witnesses corroborates the FC2/Avatar shared-engine kinship already established via Gabor (see Sources): "People have discovered the first Avatar game share a lot of similarities with FC2 Dunia — you can inject/port over Avatar models into the game and it will work" (Low, Discord 🔨-fc3-and-bd-modding, 2025-01-22), with EVERGREEN adding a first-hand account of trying (and failing) to restore an early trailer's compass while knowing Avatar used the same engine and file format for the most part. Consistent with, and predating, the working cross-title tooling documented on the .xbm/.xbg format page.

Map Editor

FC2 ships with a built-in in-game map editor, used for building custom multiplayer maps (and reused as the base for several community "editor mods" that unlock extra content — see Mods Survey). Source: ModDB's "Far Cry 2 Map Editor Run Through" tutorial (Henley, Dec 2008), the canonical beginner reference linked from fc2mp.com.

  • Launching: FC2Editor.exe in the game's bin folder — ...\Steam\SteamApps\common\Far Cry 2\bin\ (Steam) or ...\Ubisoft\Far Cry 2\bin\ (retail/Uplay). "File → New Map of Nature" pre-generates terrain/vegetation for a chosen biome instead of starting from a flat plane.
  • Custom map install location: Documents\My Games\FarCry2\usermaps\ — drop an extracted map folder here directly (both singleplayer and multiplayer maps use this same path).
  • Navigation: WASD + mouse, Shift to speed up the camera. The camera can't clip through terrain/water, so anything below sea level must be shaped before adding water. CTRL+G instantly drops you into a live playtest from the editor's current camera position (no save required, can't die, but can shoot/swim/drive) — fast iteration loop, worth using instead of constant save/launch cycles.
  • Terrain tools (hotkeys F1–F7), all sharing a brush model (Radius/Hardness/Distortion/Strength, square-or-circle brush): Bump (F1, uneven organic terrain like mountains/riverbeds, Ctrl toggles add/remove), Raise/Lower (F2, flat-topped edits like cliffs/walls), Flatten (F3, forces land to one exact height — best for islands/boundaries), Smooth (F4, medians two heights, good for walkable riverbeds), Ramp (F5, click two points at different heights to auto-connect a drivable slope), Noise (F6, adds roughness/detail, has Raise-only/Lower-only/both modes), Erosion (F7, subtractive-only weathering look). An 8th terrain tool, Terrace, exists in the toolbar beyond this F1–F7 hotkey set (confirmed via the decompiled source — no bound hotkey found) — see Data Recipes for its parameters.
  • Texture Painter (F8): max 4 textures per map, drawn from 4 biome categories (Savannah/Desert/Jungle/Woodlands), auto-blended at edges. Per-texture altitude and slope constraints (Minimum/Maximum altitude, Altitude fuzziness, Minimum/Maximum slope) allow automatic biome-appropriate placement.
  • Objects (F9): prop/vehicle/building placement from FC2's full object library, with Select/Move/Rotate/Snap/Add sub-tools, group and "neighborhood" (auto-select-nearby) selection, local-vs-world axis alignment, and angle-snapping. Drivable vehicles cannot spawn underwater; static props can.
  • Collection System (F10): foliage (grass/trees/shrubs/rocks), max 8 collections per map, same 4 biome categories plus an "Others" (fake distant foliage) category — placement within a collection is randomized, not per-instance. Removing individual foliage instances is not directly supported: to clear unwanted vegetation around a specific object without wiping a whole collection, place a second/different vegetation collection over the area and clear that new collection instead (removes both), or use the object's density property to place more densely instead.
  • Water level on multiplayer maps is possible but fiddly — confirmed "tricky business but doable" with a working demo, contrasted with the single global Water level control below, which is the simple/default case.
  • Roads (F11): up to 8 road selections per map from the same 4 biome styles; draw with click-drag, edit key points after. Each new intersecting road needs its own separate selection set.
  • Playable Zone (F12): defines the out-of-bounds boundary — leaving it gives a 10-second grace period before penalty (one source describes the penalty as being "considered a deserter and executed" — same mechanic, consistent across sources).
  • Environment: time of day (12hr AM/PM), Storm factor (0.0 sunny – 1.0 heavy storm), and a single global Water level (one height for the whole map, no per-region water).
  • Map validation is gamemode-specific and enforced server-side (non-conforming maps are rejected by the master server / excluded from rotation): Deathmatch needs 16–64 ordinary spawn points + ≥2 non-colliding spectator cameras; Team Deathmatch needs 8–64 UFLL spawn points + a nominated UFLL base
    • 8–64 APR spawn points + a nominated APR base + ≥2 spectator cameras; Capture the Diamond adds one non-colliding UFLL diamond station and one APR diamond station on top of the TDM requirements; Uprising replaces the diamond stations with exactly 3 well-separated control points (A/B/C). Global soft limits reported by the map-report tool: fewer than 6 vehicles, fewer than 16 explosive/physics objects, fewer than 10 ammo piles.
  • "Make Beautiful": one-click lighting/shadow optimization pass, time-of-day dependent.
  • A community editor mod ("Multi editor mod v1.3.2.1") ships a modified Dunia.dll — actual engine-binary patching, not just FCB/XML data edits. Incompatible with the FC2MPPatcher multiplayer-revival tool and must be removed to play multiplayer (online or LAN).

Custom multiplayer map heightmap format

(Discord, map-editor, Jan 2026, worked out live by Gabor and fdx4061): a full MP map is 512m × 512m, divided into an 8×8 grid of .sdat sector files (64 total, confirmed correct). The community's original guess for the per-file byte layout — "each sector's heightmap is 513×513 values, 2 bytes per value (u16), little-endian, no header" —

Verified via reverse engineering

Turned out to be wrong, corrected by reverse-engineering FarCry2_server — see the .sdat format page: each .sdat is a generic 20-byte-header chunk container wrapping a 572-byte metadata block, a packed 65×65-vertex grid (64×64 quads — not 513×513; 513 is the whole map's vertex count across all 8 sectors, not one sector's), a hole-mask table, and a variable trailing record array. The 513×513 figure itself is still correct as the whole-map figure (8 sectors × 64 quads

  • 1 shared edge), just mis-applied to a single file in the earlier community write-up. The meters = u16 ÷ 128 conversion carries over into the corrected format but wasn't independently re-confirmed at the byte level — see that page's Unknowns.

Gotcha: adjacent sectors duplicate their shared edge row/column — when stitching sectors together or computing total grid size, that overlap must be excluded on one side, or the reconstructed map comes out both larger and subtly misaligned. Whether the sector count itself (8×8) can be increased to build larger MP maps is unresolved — Gabor tried briefly and it failed; increasing the playable zone size within the existing fixed sector grid works fine and is a separate, already-solved thing.

Custom map file structure

(Discord, map-editor, Dec 2025): a saved custom map folder splits into two halves — an ige ("in-game-editor") subfolder holding the editor's own working copy of the whole map (the only thing the map editor itself reads back in when you reopen a map for further editing), and everything else, generated purely for the shipped game to read at runtime (this is where the sector .sdat files live) and regenerated fresh from the ige data every save. Concretely: you can delete the generated game-side files (including the sdats) entirely and the editor will still load the map correctly from its ige copy and regenerate identical terrain/water on the next save. Exactly 4 files together make up "the editor version" of a map. Community tooling: Gibbed.Map.Unpack can unpack these but leaves some files labeled "unknown" due to gaps in its internal name list; Gabor has his own unpacker/repacker plus a maintained file-list (map_files.filelist). A known editor stability bug: clicking "test in-game" from inside a work-in-progress map crashed the editor to desktop for at least one user, losing unsaved edits — save before testing.

Cross-title asset import

The map editor supports cross-title asset import, but not cross-title level porting. Gabor discovered the FC2/Avatar (2009) shared-Dunia-engine connection after a community member swapped an Avatar buggy model into FC2, then found importing further Avatar objects into the FC2 editor's object library "isn't hard actually" — he's since imported 1,700+ objects from Avatar: The Game as static/decorative props (his own "FC2 editor mod," distinct from Janne252's/Fino's/Al's/Multi editor mod — see Mods Survey). Vehicle animations don't transfer: Avatar's vehicle rigs were built for a third-person camera, FC2's for first-person, so imported Avatar vehicles can only be added as static (non-drivable) decoration. You cannot load or edit an actual Avatar game level inside the FC2 editor even with the format kinship — the only bridge that exists today is one-directional (Avatar objects into FC2 maps), not full level conversion; a hypothetical dedicated csdatsdat level converter was discussed as technically plausible but not built by anyone.