Creating new levels - dkfans/keeperfx GitHub Wiki

1. Introduction

This page explains how to make a level that can be played with KeeperFX. A level consist of a Map, a Script and may come bundled with custom content like configuration files, new creatures or special traps.

2. Making a Map

Making new maps can be done with the Unearth map editor.

3. Making a level script

Each level needs a script to function. Dungeon Keeper has it's own script language with script commands we call DK script. KeeperFX has expanded this script with many new commands to give the mapmaker more options in mapmaking. It is a simple script language, and quite easy to learn. A very basic DK script can be generated from 'Unearth'. If your map has number 707, your DK script can be found in map00707.txt.

Information on writing DK script can be found on the DK Level Script page.

In 2025 KeeperFX added support for the Lua programming language. With it is is possible to make maps fully in Lua, or add Lua components in a map mostly made with DK script. It allows for very advanced map scenarios, but it requires programming in Lua language. If your map has number 707, your Lua script can be found in map00707.lua.

Information on using Lua to make levels can be found on the Lua Level Script page.

4. Map specific content, rules and configurations

Maps can be bundled with translation files, custom configuration files and sprites. These files need to be bundled in the same folder with the other map files and starting with the map number. This means if you have a level with number 707, where you have map00707.txt for your DK script file, you could have:

  • Language files named map00707.eng.dat for English or map00707.dut.dat for Dutch.
  • Config files like map00707.objects.cfg or map00707.effects.toml.
  • Unit config files like map00707.bile_demon.cfg and map00707.evil_pony.cfg
  • A zip file called map00707.zip holding custom sprites and custom icons needed by map specific content.

5. Testing

Thoroughly test your map. Check keeperfx.log for any script errors. Play test to make sure all your scripts work. Play test to make sure the map is fun. Consider people do not know what you do and might dig in other directions and accomplish goals in a different order from what you'd expect.

Consider having somebody else play test your map too after you are fully convinced that the map completely works and is fun but before you consider sharing your map with a wider public.

6. Upload your map to the workshop

Zip up your map and upload it to the workshop. Make sure the players only need to extract it to their keeperfx directory and do not need to edit files, select folders or put stuff together before they can play.