I made a vscode extension for DK FX scripting. It provides simple auto completion, syntax checks, auto formatter and highlighting. I'll keep updating it with newest commands. As of 0.1.1 it's not completely finished yet, but all the critical stuff is already there, so it's ready to use.
CHANGELOG
I don't use VSCode, is it worth installing just for a couple of DK maps?
Yes, you can have the editor with extension ready in just two minutes.
I've never touched VSCode. How to install & use this extension?
Download and install VSCode. When done, right click the folder that contains DK maps and in the context menu click the item with a blue icon and text "Open with code".
On the panel to the left (shown here), click the extension icon (the 4 cubes):
Look for dungeon keeper and install Dungeon Keeper's scripting assistant.
Next look for an extension named 'Dracula official' and install it. This is an optional color theme for VSCode but I find the DK extension works the best with that theme.
Now any time you open a .txt file named 'map' followed by 5 numbers, the editor should recognize it is a dungeon keeper script.
What are some essential keyboard shortcuts?
For tabs it works like in browser (ctrl+pagedown,ctrl+w,ctrl+shift+t). Ctrl+Space for code completion. Ctrl+/ to (un)comment a line. Alt+shift+F to auto-format
Is there any way to browse just the script files?
Yes, I made a convenient script browser. When editing a dk script, open the command menu (CTRL+SHIFT+P), type 'dk browse', press enter.
Does it mean I don't have to check DK log after starting up a map to see if it has any errors?
You should still check logs for script errors. Remember it does not use any of DK's code to check for errors. It has its own checker that works differently.
Is there any way to temporarily add a custom command I'm working on?
Yes, go to your local .vscode directory, edit (for windows: ) current user directory/.vscode/extensions/(find dk-scripting-assist)/resources/custom_commands.yaml. Add commands in the same format as they are in commands.yaml
Is there any way to disable a diagnostic for one line?
Yes, for that line, include a comment that contains '@ignore"
How is it unfinished? What is it missing?
Currently only the newest commands are supported, the extension complains if you do not include the level_version(1) command.
Commands auto completion is upper case only.
Is there any way to add custom traps or disable diagnostics?
Yes, open settings (ctrl + ,), look for 'dungeon keeper' and edit the extension settings. Then restart the editor.
![]()