Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Outpost 2: Divided Destiny — Map & Mission Editor

A from-scratch editor for Outpost 2 maps (.map) and missions: edit terrain (tiles, cell types, lava, tilesets), place the mission object layer (players, units, structures, beacons, markers, wreckage, walls/tubes), and import/export the community formats — .opm, .json maps, .json tile groups, OP2Lua, and TitanAPI C++.

Built on .NET 10 + WPF. All logic lives in a UI-agnostic core library; the editor is self-contained under this folder.

Built independently — no community map/mission editor's code was used, only the OP2 file-format libraries and SDK reference data. See docs/REPORT.md for the full rationale.

Build & run

dotnet build src\OP2MapEditor.slnx -c Debug
dotnet run --project src\OP2MapEditor\OP2MapEditor.csproj
dotnet run --project src\OP2MapEditor\OP2MapEditor.csproj -- "D:\Outpost 2\opu_12.map"   # open a map
dotnet test  src\OP2MapEditor.slnx                                                        # 49 tests

Build output (bin/obj/publish) goes to the shared external folder D:\opu\build (the .NET SDK "artifacts" layout, configured in src\Directory.Build.props), keeping the source tree clean and out of SVN — nothing is written under src\. The app still finds Assets from there: the asset resolver walks up from the running binary and also scans each ancestor's sub-folders, so it locates the editor's Assets even when run from D:\opu\build.

Terrain tilesets are bundled in Assets\Tilesets; maps that reference extra tilesets also pick them up from D:\Outpost 2\OPU\base\tilesets.

Using the editor

Terrain (left toolbar + right tabs):

  • Tools: Paint, Rect (drag a rectangle), Fill (flood), Pick (eyedropper).
  • Tiles tab — pick a tile from the palette and paint it. Cell Types tab — paint passability (colored overlay). Lava tab — left-drag sets lava-possible, right-drag clears.
  • Pan with the middle mouse button or scrollbars; Ctrl+wheel zooms; View menu has zoom/fit/grid, Game Zoom (1:1) (Ctrl+1 — the native 32px scale OP2 uses in-game), and a Minimap toggle. Ctrl+Z / Ctrl+Y undo/redo.
  • The minimap (right panel) shows a whole-map overview with the current viewport outlined; click or drag on it to jump anywhere on the map.

Objects (Objects tab):

  • Choose the player and a category (Structures/Vehicles/Walls/Beacons/Markers/Wreckage), pick a type, then left-click to place. Click an object to select it (properties show on the right), drag to move, right-click or Delete to remove. Object edits undo too.
  • Players tab edits each player's faction, human/AI, color, bot, morale, and starting resources.

Files (File menu):

  • New / Open / Save .map; Import / Export JSON Map.
  • Tile Group menu: Load & Stamp a .json tile group (live preview, right-click cancels), or Capture from Rectangle to save a selection as a tile group.
  • Open / Save Mission (.opm) — saving a mission also records the map it uses; opening one loads its .map.
  • Import Lua mission (.placement.lua).
  • Export OP2Lua mission — writes a deployable <name>.dll + <name>.placement.lua + <name>.lua + the .map; copy them into your OPU\maps folder to play.
  • Export TitanAPI C++ — a mission.cpp for the TitanAPI build.
  • Open/Edit Mission DLL — read any OP2 mission DLL's description + map, edit and save them, or load the referenced map into the editor.
  • Settings — point the editor at your OP2 1.4.1 folder (the one with Outpost2.exe and the OPU folder; used for tilesets, sheets, and finding a mission's .map), optionally set an explicit Assets folder (overrides the auto-detected bundled Assets; leave blank to use the bundled one), and set the default unit facing (West by default). Saved to op2mapeditor.ini next to the exe (GameDir / AssetsDir / DefaultDirection).

Structures use authoritative footprints from building.txt, show their healthy sprite and the auto-tube stubs the game adds; combat vehicles (Lynx/Panther/Tiger) show their weapon turret.

Layout

Assets\        Art (object sprites), Tilesets, Sheets (building.txt), BlankMaps,
               Vendor (LuaMission stub), sprite-manifest.json (healthy/turret frame map)
src\           OP2MapEditor.Core · OP2MapEditor (WPF) · OP2MapEditor.Tests
docs\          PLAN · ROADMAP · IDEAS · CHANGELOG · FORMATS · REPORT ·
               REVIEW-OP2MissionEditor · REVIEW-OP2Mapper2 · REVIEW-OP2Mapper3 ·
               REVIEW-OP2MapperQt (+ images)
OP2UtilityDotNet.dll, OP2MapJsonTools.dll   (prebuilt format libraries)

About

Outpost 2 map editor in C#

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages