PDA

View Full Version : How to save mods


Kael
05-24-2011, 12:01 AM
Hi I am new to modding and cannot figure out how to make my mods actually work. I have gone into the assets folder and into assets 3, which is most up to date since I don't have the expansion. When I mod stuff in database, like classes.gdb, and save the text file it saves fine but the actual changes have not kicked in. What am I doing wrong?

Bluddy
05-24-2011, 03:30 AM
Hi I am new to modding and cannot figure out how to make my mods actually work. I have gone into the assets folder and into assets 3, which is most up to date since I don't have the expansion. When I mod stuff in database, like classes.gdb, and save the text file it saves fine but the actual changes have not kicked in. What am I doing wrong?

You don't want to change anything in assets03.zip. Just create a Din's Curse/Assets/Database directory and copy classes.gdb in there. Then modify to your heart's content.

Kael
05-24-2011, 12:17 PM
Doesn't that mean that I would have to do the overwrite command? I don't really undestand how to use that

Bluddy
05-24-2011, 12:34 PM
Doesn't that mean that I would have to do the overwrite command? I don't really undestand how to use that

You have 2 options, although they don't both work in all cases.

1. Copy a file from assets03.zip and place it exactly in the directory in which it's supposed to go. So if the file was in Database/monsters, you have to recreate Din's Curse/Assets/Database/monsters and place the file in there. What'll happen is that DC will look for the loose version of the file (not in a zip) and take that file INSTEAD of the file inside assets03.zip. You can also zip up the file in another zip file, and so long as the file is alphabetically higher than assets03.zip (for example, assets04.zip or assetsMod.zip) it'll load first which means your modded file will be used.

In this case, you have to include the WHOLE file as it is, changing only the things you want to change. Naturally this is a little problematic -- if Shadow updates that file in a patch, your mod wll no longer be compatible with the latest version since it uses the old file. Also, it's hard to find your changes in a big file. You have to compare your file to the original file, or leave comments (with //) to know where the changes you made are.

2. Create a file with any name you want and place it in Din's Curse/Assets/Database. For example, mymod.gdb. (I think it has to end with .gdb) In this file, all you have to put is the object you want to change, and you have to give it a new, unique name. Say I want to change BaseClass from classes.gdb. In my new file I'll write

BaseClassMyMod overrides BaseClass
{
...
}

Inside, where the ellipsis is, I'll only write the thing I want to change or add. Notice the name BaseClassMyMod. It doesn't matter what it is so long as it's unique.

The advantage of this approach is a file that's easy to maintain, as well as likely compatibility with new patches. I can also put this file in a zip file with any name I want, but inside the zip file, mymod.gdb must be in the /Database directory.

In this case, you're not replacing the original file, unlike option 1. You're just adding/changing stuff. So the original classes.gdb file in assets03.zip still gets loaded, and your mod file gets loaded later, modifying stuff from classes.gdb.

The down side of this approach is that it doesn't work for everything. Some commands can't be overridden -- specifically commands that take up multiple lines. As another example, you can't override stuff for localization files (in /loc). In these cases, you have to use option 1, even though it's not patch-friendly.

Caal
05-24-2011, 07:43 PM
The down side of this approach is that it doesn't work for everything. Some commands can't be overridden -- specifically commands that take up multiple lines. As another example, you can't override stuff for localization files (in /loc). In these cases, you have to use option 1, even though it's not patch-friendly.

It's true that you can't override files in the loc folder directly, but an entire text file does not need to be included in a mod just to replace a few lines. You can create small text files that will overwite what is in those files. I've done this and they appear to behave similarly to overrides. For example, a four line text (.trn) file with say,

NeckItemSlot "EMPTY - put amulets here"
Artifact "^c001Artifact^c145"
QuestItemName33 "Stalagmite"
CrystalModifierName1 "Ethereal"

if included in the Loc\English folder of a mod will replace just those text items, leaving all the other original text alone.

Bluddy
05-25-2011, 12:03 AM
It's true that you can't override files in the loc folder directly, but an entire text file does not need to be included in a mod just to replace a few lines. You can create small text files that will overwite what is in those files. I've done this and they appear to behave similarly to overrides. For example, a four line text (.trn) file with say,

NeckItemSlot "EMPTY - put amulets here"
Artifact "^c001Artifact^c145"
QuestItemName33 "Stalagmite"
CrystalModifierName1 "Ethereal"

if included in the Loc\English folder of a mod will replace just those text items, leaving all the other original text alone.

Sweet! I didn't know that!