The Hazardous Realm
The Hazardous Realm

The forum is now in read-only mode! It's only kept around for informative purposes and to prevent deadlinks!
Use e-mail to contact me instead. Any announcements would be made on my twitter account and any discussions would use some public platform instead.

DbtS Modding Basics

All topics related to the game 'Die by the Sword' and it's add-on 'Limb from Limb' go into this board!

DbtS Modding Basics

by Hazard » 30 Aug 2012 15:42

Die by the Sword Modding Basics

Finally i was able to write down some basics on how to get started with DBTS modding. I had planned on doing so for ages, but just now had the time and the right mood to do so. I hope to further expand this over time.

1) What do i need for mods to work
2) How to open and modify ATD package content
3) How to create Mods for the Mod Manager and create DMOD packages
4) How to get started with creating an own arena
5) The Treyarch Documentation

1) What do i need for mods to work

You need an installation of Die by the Sword and the add-on Limb from Limb! Also many things described here won't work without my DBTS Xtended mod, as it does a lot of helpful things to make modding easier.

2) How to open and modify ATD package content

DBTS stores all it's content in ATD packages, which can be found in the "data" subfolder of the game. Those basically work like ZIP files, but need special tools to create/extract. My ATD Packer is a tool like that. Unpacking an ATD file will create a folder of the same name, containing all the ATD contents.

By default the game only uses files contained within ATD packages. Thus, before Xtended existed, you had unpack the ATD, make your changes to the files and pack it up again to be able to mod the game. This was a tedious process and also modified the original ATD files, which could result in a broken game and the need to reinstall it after messing something up.
I improved this with Xtended by adding the "Filesystem" option to the Xtended Launcher (xLauncher). Change the setting from "Only package content" to "Prefer unpacked files on disk". The game will now use the extracted game files and only revert back to the ATD content if the file on disk is not found. When you want to mod content now, you only need to unpack the ATD once and are able to make the changes and test them directly without the need to pack the ATD up again. This is a lot quicker and you don't run into the risk of messing up the original ATD files.

3) How to create Mods for the Mod Manager and create DMOD packages

The xLauncher includes a Mod Manager to make installing mods with Xtended as easy as possible. Mods are stored in the "mods" subfolder of your DBTS installation. The folder can contain mods as folders, or as a DMOD package.

To create your own mod:
- Create a subfolder inside the "mods" folder and give it a name that suits your mod. I personally like to prefix the filename with either an "a" for arenas or a "c" for characters, like "aMyGreatArena" or "cMyAwesomeKnight". You can rename it later on at any time.
- Any subfolders that you create in your mod will work like ATD packages when the mod is installed. For example, when you have a file that is supposed to go into the "scenes.atd", just create a subfolder "scenes" and put the file into it. Putting an ATD file into the mod, however, will not work! Exrtact it instead before putting it into your mod.
- Inside the newly created folder for your mod, create a new textfile and name it "modinfo.xml". Open it with Notepad and copy the following text into it:
<DbtsMod Name="Big Orcs" Type="Char">
<Author Name="Whateveryournameis" Mail="" />
<Description>This tunrs orcs into giants! Whoa!</Description>
<Image File="modpreview.jpg" />

- Adjust the data in the "modinfo.xml" as you need it. See below for more infos on the values in "modinfo.xml".
- The mod should now already appear in the list of the Mod Manager, but won't do anything because we didn't add any modified game files.
- Now copy new and modified files into the folder, using the same structure as in the "data" folder. For example, if we want to turn Orcs into giants, we create a "orc" subfolder and copy only the ORC.ATT file from the orc.atd package into it. Now open the copied ORC.ATT, find the line "SIZE = 1.000000" and turn it into "SIZE = 2.000000". Make sure to include only files that are new or have been modified in your mod, because including files that didn't change just bloats up your mod and slows down mod installing without actually doing anything.
- You can now install the Mod from the Mod Manager and et voilĂ , the normal Orcs in the arena are now twice as large.
- To turn your Mod into a DMOD package for easy distribution, just select it in the Mod Manager and click on the ZIP symbol in the bottom-right corner. You'll find a DMOD package of your mod in the "mods" folder afterwards. Others only need this single DMOD file to install your mod.

modinfo.xml Values:
- Mod Name, Description as well as Author Name and Mail can be chosen freely.
- "Type" can be anything, but should ideally be "Arena", "Char", "Gametype" or "Skin", as appropriate. If unsure, you can just remove the "Type" field.
- Set "Image File" to the name of a screenshot that you put into your mod folder. The screenshot will then be shown in the Mod Manager when you select the mod. Remove the whole line when you don't have a screenshot.
- "Requirements" contains a list of filenames of mods that are required for your mod to work. In most cases your mod won't have to rely on other mods, in which case the whole line can be removed from the file. It's especially handy when you create an arena that needs modded characters to work. For example, if your arena uses the Giants and Knight from my modpackage it would look like this: <Requirements>cKnight,cGiants</Requirements>

Alternative file locations for special cases:
DBTS expects some files to be in folders that are impractical for mods. The default character moves for example are stored in the "moves" subfodler of the DBTS installation instead of the character data folder. Yet, those moves are required if you want to redistribute your new character, or the game will crash. I've changed that with Xtended. Just put the 4 "mychar_default*.dmv" files into the data folder of your char instead and the game will find them.

4) How to get started with creating an own arena

The easiest way to get started with modding arenas is to copy an existing one.

The traditional way to create an arena that works even without Xtended is quite complicated and detailed in this example:
- First unpack the scenes.atd and a simple arena like the arena6.atd.
- Now rename the new "arena6" folder into the desired filename of your arena like "myarena" or whatever.
- Also copy the "arena6.evt" that's in the "scenes" folder and name the copied file like your arena (ie. "myarena.evt")
- Open your "myarena" folder and look for all files that start with "arena6" and rename them so that they start with "myarena" too.
- Open "myarena_spec.lst" in Notepad and edit the name as you wish.
- The arena should now be playable. You can start modding from here on.
- "myarena_spec.lst" contains general settings, "myarena.ter" contains the level layout by listing all OFF model fixtures, "myarena_thumb.bmp" is the preview image (has to be a 256 color image, palatte has to stay the same), EVT files contain scripts, OFF files contain 3D-geometry.

But the traditional level format has always been annoying to work with and so i introduced an easier format that only works with Xtended.
To get started with this new arena format try this example:
- Unpack the arena6.atd and rename the resulting "arena6" folder to "myarena".
- Delete all files in "myarena" except "arena6_thumb.bmp", "", "chgfloor.bmp" and "chgwall.bmp"
- Rename "arena6_thumb.bmp" to "levelthumb.bmp"
- Create a new textfile called "levelinfo.xml" and copy the following text into it with Notepad:
<Arena Name="My Great Arena" ShortName="My Arena" />

<Fixture ID="1" Model="" Position="0,0,0" />
<KingOfTheHillFlag Position="0,0,0" Rotation="0,45,0" />


<StartPosition Position=" 10,0.5,-10" />
<StartPosition Position=" 10,0.5, 10" />
<StartPosition Position="-10,0.5,-10" />
<StartPosition Position="-10,0.5, 10" />

- That's it! The "levelinfo.xml" replaces the LST, TER and EVT files of the default file format, to create one centralized file for all level info.

5) The Treyarch Documentation

The Treyarch team was so generous to release some pieces of their internal documentation about DBTS files many years ago. The following files were released:

- General Files - General Notes about filetypes and directories
- Character files - More detailed look at files used for characters
- Attributes - List of Attributes usable in character's ATT files
- Scripting - Detailed look at the scripting language used in EVT files (invaluable!)
- TOME - Information about The Old Move Editor (doesn't seem to be usable anymore, though)
Hazardous Code Monkey
Posts: 187
Joined: 05 Jan 2006 19:49

Re: DbtS Modding Basics

by Hazard » 30 Aug 2012 15:45

[reserved for later use]
Hazardous Code Monkey
Posts: 187
Joined: 05 Jan 2006 19:49

Re: DbtS Modding Basics

by Blinn » 05 Sep 2012 13:27

You should post this on GOG if you haven't already. This thread deserves more attention. :)
Posts: 48
Joined: 10 May 2011 23:04

Return to 'Die by the Sword' Fan and Modding Community