An open-source remake of Dune II
What you can change today — and what still needs source work.
The easiest way to mod Dune Legacy. Drop an .ini file into
data/maps/singleplayer/ or data/maps/multiplayer/
and it appears in the map selection list. No rebuild required.
Maps are plain-text .ini files with the following sections:
[BASIC]
Author=Your Name
Name=Your Map Name
Size=64
NumPlayers=2
MapScale=0
[BRIEFING]
1=First player briefing text
2=Second player briefing text
[Player1]
Credits=5000
Quota=0
[CHOAM]
Carryall=2
Harvester=4
Launcher=5
MCV=2
'Thopter=3
Quad=5
Siege Tank=6
Tank=6
Trike=5
[STRUCTURES]
ID001=Player1,Const Yard,256,100
ID002=Player1,Windtrap,256,103
[MAP]
001=%%%%%%%---~~~~~~~~...
002=%%%%%%--~~~~~~~~...
| Character | Terrain |
|---|---|
% | Solid rock — buildings and base structures go here |
- | Dune sand — impassable to most ground units |
~ | Spice field |
+ | Bloom (bonus spice yield on harvest) |
O | Player spawn / base start location |
^ | Mountain — impassable to all units |
_ | Water / lake |
| Size | Best for |
|---|---|
| 32×32 | Tiny skirmish, very fast games |
| 64×64 | Standard multiplayer and campaign missions |
| 128×128 | Large battles with room to manoeuvre |
| 192×192 / 256×256 | Epic scale — long campaigns or city-sim style layouts |
2P - 192x192 - SimCity.ini map is a good
starting template for large maps. Open it in any text editor to see how
the sections fit together.
Dune Legacy loads art from .PAK archives under the data/
directory. These are the original Dune II data files (or HD replacements). You can
replace or extend them to change how the game looks.
| PAK File | Contents |
|---|---|
ATRE.PAK | Atreides-specific unit and building graphics |
HARK.PAK | Harkonnen-specific unit and building graphics |
ORDOS.PAK | Ordos-specific unit and building graphics |
DUNE.PAK | Shared terrain, UI, and common sprites |
GFXHD.PAK | HD upscaled graphics (overrides standard PAKs when present) |
SCENARIO.PAK | Campaign mission data and cutscene assets |
Dune Legacy supports loading alternative PAK files. Place replacement PAKs in the
data/ directory and they will override the originals at startup.
HD texture packs work the same way — GFXHD.PAK is loaded last and
takes priority over lower-resolution assets.
To replace sprites and textures you need to unpack the relevant PAK file, edit the art assets, and repack. Here's the general process:
Dune II graphics use an indexed 256-colour palette. When editing sprites, you must work within the original palette or house-specific palette entries — free colour painting will produce unexpected results at runtime. Many sprite editors (PCED, Grafx2) and general tools like GIMP support indexed-mode editing with a loaded palette.
The palette file is typically IBM.PAL inside DUNE.PAK.
Each house also remaps a range of colour indices to its house colours (blue for
Atreides, red for Harkonnen, green for Ordos) — keep this in mind when editing
unit sprites shared across houses.
Several community tools exist for working with Dune II PAK files:
.PAK archivessrc/FileClasses/) shows the PAK format if you want to write your own toolingGFXHD.PAK) is the cleanest way to
distribute a graphics mod — users drop it into data/ and it takes
priority without replacing the originals.
Cost, health, build time, weapon damage, firing rate, and movement speed are
defined in the C++ source under src/. Changing these values
requires editing source and rebuilding. See BUILD.md in the
repository for compilation instructions.
SCENARIO.PAKThere is no data-driven config file for these values today — they live directly in C++ constants and would need a significant refactor to expose as moddable data without a rebuild.
Dune Legacy ships with three playable houses — Atreides, Harkonnen, and Ordos — plus campaign-only houses (Sardaukar, Mercenary, and Fremen). There is no modding interface to add a new house or swap one out. The house system is embedded in the Dune II engine's mission data, AI, and UI.
Adding a custom house would require forking the source, adding a new
HouseType enum value, creating PAK entries with sprites and sounds,
wiring it into AI decision trees and mission scripting, and providing
house-specific briefing text, mentat portraits, and voice lines. It's a
substantial engineering effort.
There is no general-purpose mod loader, mod directory scan, or mod conflict
resolution system. Mods today are limited to custom maps (drop-in .ini
files) and PAK replacements (drop-in asset files). Any logic change requires
a source-level patch and a rebuilt binary.
The audio assets (voice clips, sound effects) come from the original Dune II
data files or replacements placed in data/. Music replacement
follows the same PAK drop-in pattern, but full audio mod tooling is not
documented and may require source-level changes for some formats.
Made a custom map, improved a sprite, or written a useful patch? Contributions are welcome:
data/maps/
in the dunecity repository
BUILD.md and
ARCHITECTURE.md for codebase layout and build instructions