Programming a Scenario

A complete Outpost 2 scenario (or mission) requires 3 files to work: a DLL, a MAP file, and a tech tree file. This page focuses on programming the DLL file. Outpost 2 scenarios are coded in C++ and require using legacy features of the language. See the Software Development Kit Page for an overview of the MAP file and Tech tree file.

The required code for a scenario is stored in its own DLL (Dynamic Link Library) file. A DLL file contains code that can be linked into from other applications, like Outpost2.exe. DLLs are created by compilers that take code files and compiles them into and intermediate language or directly into assembly language. While many different programming languages can be compiled into DLLs, Outpost 2 scenarios are coded in C++.

Code is usually written in special text editors that have knowledge of the programming language. Notepad++ is a good example. After writing the code, you have to find a compiler to compile the code into a DLL (or other file type).

Text editors designed for coding are also included in an Integrated Development Environment (IDE). IDEs are software packages that usually contain both a special text editor and a compiler. This allows you to write the code and compile the program in the same application. A good example of an IDE is Microsoft Visual Studio.

The Outpost 2 SDK comes packaged in a Microsoft Visual Studio 2015 C++ solution. Unless you are already knowledgeable enough to transfer the SDK to another IDE, it is recommended that you use Visual Studio since it will be easier to start coding without worrying about compiler setup requirements. Microsoft Visual Studio is free to use.

The filename of a scenario DLL must follow strict naming conventions to be recognized by Outpost 2. See the Scenario Naming Conventions Page for details.

Programming Outpost 2 scenarios requires detailed knowledge of Integrated Development Environment (IDE) setup. The best way to share your scenario source code and access other Outpost Universe source code is through the Outpost Universe Repository.

Development Environment Settings

Typically, Outpost 2 scenarios are created using an Integrated Development Environment (IDE). Since new scenarios must be compatible with the Outpost 2 executable, which was compiled in 1997, several unusual IDE Project and compiler settings must be selected. See the Project Creation Page for detailed instructions.

Once you have an Integrated Development Environment (IDE) installed and editing scenario DLLs, review Advanced Project Settings Page for additional recommended settings that streamline the build process and debugging process.

Outpost Universe Repository

Source code meant for public access should be stored on the Outpost Universe Repository under the Outpost2 folder. For more information on how to use the repository, go to the Outpost Universe Repository Wiki Page.

Outpost2 Repository Location: https://svn.outpostuniverse.org:8443/!/#outpost2

Project Management

The Outpost 2 SDK project management is handled on the Outpost Universe Redmine site. Reporting bugs or requesting new features can be made here. Read more at the Outpost Universe Redmine Wiki Page.


- Go Back to Software Development Kit
- Go Back to Outpost 2 Main page
- Go Back to Wiki Home Page

  • op2_sdk/programming_scenario_dlls.txt
  • Last modified: 2017/01/03 05:55
  • by vagabond