Create your own maps and campaigns for KeeperFX and DK1 with Unearth.

You can find it here.

Lua Sample Maps

Submitted by Trotim
Category Map Pack
Rating 5 / 5 10 ratings
Difficulty 1.83 / 5 6 ratings
Submission date 2025-05-22
Last updated 2025-08-01
Min. game version Latest KeeperFX alpha patch
Filesize 163.47KiB
Downloads 131
This workshop item uses unreleased KeeperFX functionality and requires the latest alpha patch to work correctly.
File Filesize Downloads Date
luasamples_aug01.zip 163.47KiB 14 2025-08-01
luasamples_may29.zip 163.07KiB 71 2025-05-29
luasamples.zip 207.19KiB 46 2025-05-22
Description

7 heavily commented maps showing off various aspects of KeeperFX Lua level scripting:

  • Basics & Triggers - Simple intro map. Script comments are an introduction to Lua
  • Randomization - Gold seams, hero waves, and room, spell, trap and door availability is random each play
  • Slab Manipulation - Dig a gold seam to unleash waves of lava that transform the map
  • Limited Vision - You can only see near your own creatures and Alarm Traps
  • Custom Keeper Power - New custom spell Blizzard that keeps freezing every creature in an area for a time
  • Custom Thing Functions - New functional objects: Gold Statues give income, Holy Candles heal heroes and hurt evil, Necronomicon keeps creating Skeletons

Primarily intended as a tutorial / showcase for map designers, but playable and beatable.

Installation Instructions

Extract into your game directory so that you have a \levels\luasamples.cfg and a \levels\luasamples\ folder. Find them in Free Play levels.

More items by Trotim

Comments

Login or register to comment on this workshop item.

aqualakitu πŸ‡©πŸ‡ͺ

These have been super helpful to get a look into the syntax of it and how to make a level with Lua.

Highly recommended to other map makers, to take a look at these and see what it can do!

axidal πŸ‡ΈπŸ‡ͺ

This is a really nice introduction to Lua, both as a tutorial and as a inspiration for possible mechanics. I also have a few nitpicks though.

  • There was no luasamples.cfg in my download, so I had to create my own.
  • The gold statues are treated as literal gold by your imps, so if you build a treasure room your imps will pick your statues up, making them disappear.
  • While each other level is very well commented, I found the documentation of the custom keeper power script a bit lacking. In particular, there is no mention of the map00205.magic.cfg file and the reference to the Lua templates could be clearer about where to find that file (as is it in the script to the custom thing functions map).

Again, as a whole I think these are great examples. Thank you for writing these!

Trotim Submitter

Oh you're totally right about the lack of luasamples.cfg, sorry! Fixing that right now. Maybe I can look into these other issues later. Glad the maps are helpful!

Yani πŸ‡§πŸ‡ͺ Admin

There's some very good examples in these lua scripts. Thanks a lot for sharing Trotim.

Hi there, these maps will help a lot. Thanks!!!

Busidrio πŸ‡ͺπŸ‡Έ • Edited

i loaded the maps in unearth but it shows me that the script file is empty, do you know what could be causing the issue?

Edit: Nevermind, i was trying to find the scripts with an older version of Unearth. Now it works, thanks!

Here you will find a lua script guide: https://github.com/dkfans/keeperfx/wiki/Lua-level-script

Busidrio πŸ‡ͺπŸ‡Έ

thank you a lot! i couldn't find documentation for it. Also does the level have to be in a specific folder? some lua commands such as "ConcealMapRect" simply don't work when the level is in the personal folder. Thanks!

Should work everywhere.

Hi there, I have extracted the files as per instructions but the map pack doesn't appear in the 'free play levels' list. I have the most recent alpha. Any idea what I might be doing wrong? Thank you

EDIT: It showed up once I restarted the game. duh. Thanks for the maps!