[tut] DBR Editing - a mini tutorial on how to do it efficiently.

https://notepad-plus-plus.org/
Use this instead of the default dbr editor.
Or any Texteditor with Search/Find & Replace in Files support.
There are various Tools, Scripting Languages and other means to get this done.

Unpack the game files with the Asset Manager, go to your working directory.
database/records/game/gameengine.dbr
open that file
look through what it has to offer for tweaking.
ie: playerRunSpeedCapMax,135.000000,
Change that line to
playerRunSpeedCapMax,350.000000,
or 800 or whatever else.

Save your changes, go to asset manager > Database Tab > Right Click where you can and “Build”.
>make certain that Mod>“none” is selected.< This will build a full db.
Better be careful before doing that though, have your install files ready or just work with a copy of your Grim Dawn install folder. (if you defined the build folder to be at the game install folder, which will speed up your workflow if you know you can do this without running into issues i am warning you about)
NOT where your savegames are.
Open the shortcut properties you start the game with to find out where it is.

Now 5 minutes later the game should have compiled the database for the campaign.
>Any subsequent runs take seconds depending on the changes made.<
If you haven’t set your build directory to the game install folder you will have to copy the files manually to notice changes.

If you have any skills or gear which would set you above 135% of runspeed.
check now and see that the change worked.

From here on, all you have to do is ie search the gameengine.dbr file for ie, “champions” “spawn” etc, and change the values.
be careful to always set the ,X.000000, and ,X, entries formatted as they were originally. And do not forget the commas.

repeat the process described in waay too much detail above.

Advanced Techniques:

Mass editing files.
Use the Find and Replace functionality of npp, our example texteditor and learn regular expressions and scripting. regex googling will help.

Then pick a good term after finding something, like “BothRarePrefixSuffix” and change that as you like.
Examine the Stock gamefiles and compare them with released mods to determine what has changed.
In some cases the stock gamefiles miss certain entries which prevent ie legendary items from rolling with affixes.
You can use the templates
in “database/templates”
to look at the possible fields.
protip: “name”
search for that to get all possible entrynames the template allows,
again, use the list all occurences checkmark in your texteditor find dialog of choice.
look at the entries to rarely find a description which explains what it actually does. usually you get something nondescript. so just skip this step if you lack time.

So, this is a wall of text aimed to reach the lowest common denominator.
If this helps, great.

Please credit the people who did work for you.

If you use someone else’s prior Art, the least you can do is give credit where it is due.
Otherwise talented people will not share their work.
Or offer any helpful information for that matter…
Respect makes the world go round.

I use Notepad++ for simple things like changing up file names and relinking files. But the provided DBR editor is fantastic in its organizational structure. Short of writing a program to autogenerate/edit .dbr’s, I think the DBR editor is a lot better than Notepad++. Not to mention you can open it straight from the Asset Manager by doubleclicking on a dbr name.

There is a reason why my mod V1 was finished last month despite the massive amount of files it involved.
doing that with the stock dbr editor is straight up unfeasible for people with lives.

The stock db editor is only useful to get an idea of the organization… until you open the template files in a texteditor,
make or use a premade syntaxfile to enable code folding and viola, faster and better overview than the dbr editor.

Generating dbr’s, there it might be of use, although just making or copying (and then editing) a stock file based on the template you want will take a millionth of the time it would take clicking through these options.

I haven’t even started on the options broken. bah,
honestly, the hours i wasted on that software, i want them back.

The most time consuming things imo for AssetManager are when you have to edit tons of levels for skills, and you are forced to click about 25 times to create 25 new variables and then fill in the blanks. In Notepad++, just edit the file, put each variable separated by a semi colon, and bam. Done.

That’s just one example… Text editing is way faster for most things, the only thing I prefer the dbr editor for is understanding where things are located to get a sense of hierarchy and using the array editor, to mass serial increase/% increase, etc. Very useful for making demo values for skills.

The DBR editor can do that too, btw.

So it does, ok.

It also has a great search function. I use SciTE for everthing except .Net (which probably too much) and it has the same features. Main thing it does that Notepad++ and variants don’t do is support Linux.

Do you build into the main campaign and not into a mod? You suggested or alluded to this I think, can’t be sure.

thanks rorschachrev, added that info to be unambiguous.
to the main campaign,

as a mod would really just take too much time to test things, set characters up etc, not to mention that apparently not everything is hooked so changes won’t stick for ie skills afair.

Yeah there are tons of good text editors, and npp is actually based on some *nix editor.

If we mod GD we do have to run windows, more or less anyway, so npp being windows only is not a problem.

Have you had any success with expanding the number of entries allowed in DBRs? For example, for item ransomizers (dyn tables), most are using 9 out of 10 of the available slots for normal suffixes which leaves only one available for new entries. Adding in a Suffix entry 11 via text editing or more doesn’t show up in the DBR editor and I really haven’t been able to tell if the game will even look there.

Unless I can somehow get nested affixtables to work, like having a ‘newsuffixes.dbr’ suffixtable on an item randomizer that itself contained pointers to suffixtables for various new affix types, it seems like modding is limited in amount of certain things you can add without a massive overhaul of the item loot system.

Nesting “yes” adding new entries is a “no” because the game engine interprets the data presented based on TPL files matching its internal logic. The TPL should (unless you’re trying to break things) be considered read only.

Thanks for the response, so I could, for example do the following with Dynamic Loot tables and Affix Tables?

The Dynamic Loot table for, say, Hands could have entries ‘gloves1’, ‘gloves2’, and so on, but there is a limit of about 70 items for Dynamic Loot tables. I would love to be able to have the Dynamic Loot table point to sub Dynamic Loot tables rather than specific items in order to segregate out new items and such without having to edit loot Master Tables so that my mod would be more compatible.

This is all stuff I’ve been brainstorming at work today, so I haven’t had a chance to really test it in game yet.

Plus the Overwatch open beta started, so I’ve was checking that out last night instead :smiley:

That’d be of interest to me too, as I do plan to make my own cherrypicked affix table ultimately going for handmade extra affixes.

the only way to know is to try out, though not for me, I haven’t had time to play my mod all week, so that is what i will do today~

Unfortunately, after testing with both affixes and items, I can’t seem to get nested tables to cooperate.

For example, I created Table A which contained a single Rare glove. I then created a Table B which contained a different Rare glove as loot item one and Table A as loot item two. Both these tables have had ‘disablelevellimits’ turned on so they will drop regardless of player level.

On testing Table B as drops from the test Raven and the first corpse by the town, nothing ends up dropping. When I change the loot table to just Table A, the expected item drops from both.

Ran into the same thing with Affixes as well where if a table was nested in, nothing would apply to the item.

Rorschachrev, how were you able to get them to work? Or could you point to where you might have seen examples in the files? I can post my set of test files a bit later if anyone wants to take a look.

I tried making the components autocomplete, but noticed that I had no control over the (completion)level they drop at, and apparently the completionbonus is similar to what crafters apply, an invisible bonus.
There was not much to be done to make this work perfectly, so I dropped it.

But knowing how the LootRandomizer tables work to apply such bonus “maker/completion” affixes would be neat. especially if that could be combined with what we already have for epics and legendaries.

Haven’t had a chance to test it, but I believe you can achieve what you want by going to the relics in the items/materia/ folder and changing the ‘completedreliclevel’ to 1 and editing the bonus arrays to only have one entry. It looks looks like one could also use the ‘bonusTablename’ dbr entry to assign a random affix by default. It seems like that might be a cool way to create random gems or different type of item ‘enchants’.

Thanks Wayback! Sounds neat, will give it a try.
Will be especially interesting to see if those “creations” could still work in an unmodded game.

So was wandering… with this method of replacing the original database for playing the mod…

How would you handle modified assets? Like particles. I presume we also have to then generate the whole FX.arc and overwrite just like the database?

If so, any idea what would be the easiest way to import all the particlesystems assets so we can build the new fx.arc?

EDIT: the problem I’m having with the above approach is that the FX.arc is filled with tex files and similar which can’t be generated as assets… So I’ve no idea how to build a new modified FX.arc file. Manually adding the textures to the asset folder generates a missing compiler error when building.

just copy the full /FX/ folder into your GD build directory, then Menu>Archive>Build.
This will fully build all archives which are available as directory tree in the build directory, which can be the install dir. Any directories not present will not be built, saving you time.

I’ve by now set the working/build/tools directories all to the game install dir.
The first build process will take a while but after that it is fairly quick and trouble free if you only use the Archive>Build menu entry for archives and rightclick>build in the database tab.

I would be pretty grateful if someone points out links to download AssetManager and DBREditor.

Thanks in advance.

They are in the Grim Dawn installation directory, assuming you didn’t pirate the game.