Dungeon Defenders Guide

How to get DDDK working (without breaking DD!) for Dungeon Defenders

How to get DDDK working (without breaking DD!)

Overview

Want to make a new item or map on open mode? Get DDDK set up with this guide! 🙂

What is the DDDK?

The Dungeon Defenders Development Kit (DDDK) has several things you can use to make new content for Dungeon Defenders:

  • A map editor (Unreal Editor 3).
  • A special version of the game with development commands you can use to test your maps, create custom items, and so on.
  • The UnrealScript source code for the game, which you can edit and recompile to change the behavior of the game.

It’s really fun, and you can use it to design new maps, event items, and so on. But a lot of people have trouble getting it working 🙁

Who is this guide for?

Anyone who has the same problems I had with the DDDK. This guide is not going to teach you how to use the DDDK. It’s only supposed to help with getting it running in the first place, something that a lot of people seem to have trouble with.

I’ve included step-by-step instructions to get DDDK working, and hopefully they won’t be too difficult for beginners to follow. However, I’ve also included some more technical discussion of why things break or what specific error messages mean, so I hope this guide can be of use to more advanced users as well.

Why is it hard to get the DDDK working?

The game itself and DDDK share files with each other – they’re designed to be installed into the same directory. Unfortunately, the DDDK included with Steam is somewhat out-of-date, and it doesn’t work properly with the newest Dungeon Defenders files. That means that installing both DD and DDDK at the same time will usually break either one or the other!

The problems are mainly from the config files. When you install DD, you get new versions of these config files; when you install DDDK, you get old versions of these files. If you verify integrity of game files on either DD or DDDK, you can get the new or old versions, but you can’t have both at the same time.

To solve this problem, we’ll be creating two copies of the game. I’ll explain how a bit later.

Okay, but what specifically causes it to break?

There are two files that we care about, both of which live in UDKGame/Config:

UDKEngine.ini
Every time you rebuild scripts, the game searches the paths specified in UDKEngine.ini for UnrealScript files. The newer ini includes EditPackages paths which don’t exist in the old DDDK:

 EditPackages=DynamicGravityVolume
 EditPackages=CDT
 EditPackages=CDT3

With these paths in the list, the older DDDK outputs warnings every time you build, and it always thinks scripts need to be rebuilt – harmless, but annoying. When it’s working properly, it only prompts you to rebuild scripts when you’ve actually changed something.

DefaultDunDef.ini
The new ini file tells DD to load the Embermount tavern:

 DefaultGameplayLevel=LobbyLevel_Volcano.udk
 DefaultGameplayLevelRanked=LobbyLevel_Volcano.udk

But that tavern doesn’t exist in the old DDDK. You can only load a file in DDDK if you have the uncooked (.udk) version of the map, and the development kit only comes with the .udk file for the original tavern. When you try to do anything that loads the tavern with the new ini file, it fails to find the file and pops you to the main menu instead.

The same thing happens any time you try to load any of the other maps that are missing from the Steam DDDK. You can find CampaignLevelEntries for the following maps, but no corresponding uncooked files, so they won’t work:

 Temple o’ Love – DD_VDay2013.udk
 Tinkerer’s Lab – DD_TinkerLab.udk
 Lab Assault – DD_TinkerLab.udk
 Moonbase – CR4ZY_Moonbase.udk
 Buccaneer Bay – Pirate_Base_Gameplay.udk
 Pirate Invasion – Pirate_Base_Gameplay.udk
 Embermount – DD_Mines_Gameplay.udk

Due to an oversight, Magus Quarters is missing from the DDDK as well:

 Magus Quarters – TestMap_DD_Shell_04.udk
 Challenge: Warping Core – TestMap_DD_Shell_04.udk

There are other differences as well, but these are the main ones that lead to problems.

Unfortunately, we can’t have both versions of the ini files at the same time, so to solve these problems we’re going to be making two copies of the game.

How do I install DD and the DDDK separately?

Step 1: Make backups of anything you want to save, in particular:

  • If you have custom input settings, back up your UDKInput.ini now.
  • If you have open data you want to save, back up your DunDefHeroes.dun now.
  • If you have any other customizations or files (graphics settings, custom maps, non-Steam screen shots, etc.), back up the appropriate files now.

Step 2: Uninstall DD and DDDK if they are currently installed, and completely remove the “Dungeon Defenders” folder.

Step 3: Install DD, and then install DDDK. I suggest installing both to the default drive and path:

 C:Program Files (x86)steamsteamappscommonDungeon Defenders

Step 4: Edit UDKEngine.ini in WordPad, and remove the following lines:

 EditPackages=DynamicGravityVolume
 EditPackages=CDT

Step 5: (Optional) Edit DefaultDundef.ini in WordPad, and change the following lines:

 bNightmareUnlocked=false
 ShowTutorials=true

to

 bNightmareUnlocked=true
 ShowTutorials=false

Step 6: Rename “Dungeon Defenders” to “Dungeon Defenders Development Kit”

Step 7: Verify integrity of game files for DD (this will download another copy of DD).

Step 8: Restore your backup of UDKInput.ini now, and reinstall any controller emulator if necessary.

Now you have two copies of DD – one with the DDDK installed, and the other without.

How do I run DDDK?

If you’ve followed the instructions in this guide so far, your DDDK is installed in the following path:

 c:/Program Files (x86)/steam/steamapps/common/Dungeon Defenders Development Kit

There are two main programs you’ll want to run:

  • DunDefTool.exe (in Binaries). This is a launcher you can use to start up the map editor, and it’s also used to cook and publish your maps to the Steam Workshop once they’re done.
  • DunDefDevelopment.exe (in Binaries/Win32). This is a special version of the game with development tools and cheats enabled, which you can use to test your maps, design event items, and so on.

That’s all you need to know to run DDDK, although you can make a shortcuts to run DunDefDevelopment directly with specific arguments. For example:

 DunDefDevelopment.exe LobbyLevel -forcelogflush

This will skip directly to the tavern and skip the menu, allowing you to test things faster. The “force log flush” option makes DD flush the log file output after each line, which helps a lot with debugging things in UnrealScript.

 DunDefDevelopment.exe LobbyLevel?listen
 DunDefDevelopment.exe LobbyLevel 127.0.0.1

These two shortcuts start a local network game. The first starts a server, and the second connects to the server as another player.

Why does DDDK ask me “Scripts are outdated. Do you want to rebuild now?”

The core game behavior is written in UnrealScript, and you can change that behavior by editing the .uc files and rebuilding the scripts. Any time you try to start DDDK, if the scripts need to be updated, it’ll ask you if you want to do that. If you say yes, it rebuilds; if you say no, it runs DDDK.

The first time you run DDDK, you’ll need to build scripts, because they’ve never been built before. After that, you shouldn’t need to build unless you change something.

If it asks you to rebuild scripts every time, even if you haven’t changed anything, it’s likely because your UDKEngine.ini contains the EditPackages paths from the newer DD:

 EditPackages=DynamicGravityVolume
 EditPackages=CDT
 EditPackages=CDT3

Once you remove those lines, it should only prompt you to rebuild if you actually edit the UnrealScript.

Why does it say “Failed to find package Core for async preloading”?

This means your scripts haven’t been built properly (or at all). These are the .u files which live in UDKGame/Script, and Core.u is simply the first one it looks for, so that’s the one you get an error for.

How do I edit and rebuild the UnrealScript source code?

There are two copies of the UnrealScript included in DDDK:

  • One copy is for the game itself.
  • One copy is for the Total Conversion editor.

They’re exactly the same, so you can use either, but I recommend ignoring the Total Conversion and simply editing the main source for the game, which you can find here:

 Development/Src/

You’ll mostly want to edit stuff in UDKGame, which contains most of the core game logic itself, along with any of the directories that begin with DunDef, which mostly contain scripts for DLC content.

The scripts themselves are .uc files, and you can edit these with any text editor. For your changes to take effect, you’ll have to recompile; you can do this by trying to launch DDDK again. It should detect the changes and ask if you’d like to rebuild scripts. When I’m editing the source frequently, I just leave DunDefTool.exe open, and click “Launch Mod Editor” to recompile every time I save a change to disk.

When scripts build properly, they compile to .u files in UDKGame/Script. When these files are absent (for example, if your scripts failed to compile), DDDK will fail to launch with an error like “failed to find package Core for async preloading” (because Core.u is the first package it looks for). To solve this problem, fix your scripts and rebuild.

Builds will fail if DDDK is already open, because it won’t be able to overwrite the existing .u files. Your build may also fail if you use an editor that creates swap files in the source code directory if the compiler thinks these swap files are source code.

Why can’t DDDK find some wx*.dll files?

The wxWidgets DLLs are the first ones DDDK looks for when it starts up, so if it can’t find any DLLs, it’ll complain about those specifically. But really, the error probably means it can’t find any DLLs because it’s looking for them in the wrong place.

The DLL files are all installed along with the game itself, not the development kit. If you have DD and DDDK installed into separate paths, it may not be able to find them. That’s why we needed to have DD included as part of the DDDK install we made earlier. (If you follow the instructions in this guide, you end up with two copies of DD and one copy of DDDK.)

Some users have had this problem when they install to another drive besides the default C drive. I don’t know the details of their installs, so I can’t tell you precisely why, but it’s possible that someone hard-coded a reference to the C drive somewhere, and installing both DD and DDDK to the C drive may solve the problem.

Why does DDDK tell me Nightmare is locked every time I start?

Your DefaultDundef.ini has the following line:

 bNightmareUnlocked=false

You want to change this to say true. After that, it’ll stop bugging you.

Is there a way to launch DDDK from Steam Tools?

Yes, this IS possible, but it’s NOT necessary, so please feel free to skip this section.

Unfortunately, launching DDDK from Steam doesn’t work out-of-the-box, because DunDefToolLauncher.exe is currently missing from the DDDK. I’ve created a replacement for my own personal use:

This ZIP file contains an EXE with source code, which you can place into the following path:

 c:/Program Files (x86)/steam/steamapps/common/Dungeon Defenders/Binaries

If you’ve put DDDK somewhere other than the path this guide suggested, then right-click DDDK in Steam Tools, click Properties, click Launch Options, and type the path to DDDK in double quotes. Otherwise, it won’t work.

The main advantage of launching DDDK this way is that it will show up as “Dungeon Defenders Development Kit” on your friends list, so people will know you’re in the dev kit and not playing the game itself.

Why aren’t console commands to edit items working?

Once you’ve got DunDefDevelopment running, you can just look at an item and type a console command to edit the stats, damage, and so on for that item. But sometimes the commands stop working. Why?

Console commands to edit items look for the nearest item you can “activate” (in other words, pick up). If your item box is full, you can’t pick up the item you’re looking at, so the command won’t work on them.

If you need to clear out your item box to keep working on something, type “clearitembox”.

I’m still having problems. What should I do?

If you’re still having problems, try posting on the official Dungeon Defenders forums in the Community Development section:

 [link]

Hopefully someone will be able to help you there 🙂

SteamSolo.com