Well, okay… Summoning Wall o’ text…
There are two ways to explore the game database to find the prefix you might be interested in.
- “db” command
This lets you walk through all records in the database by path. It’s able to just match the path “partially” also to help reduce typing. If you give it enough info in the path to uniquely identify 1 record, it will show you the contents of that record.
For example:
> db r/items/affix
records/items/lootaffixes/broken
records/items/lootaffixes/completion
records/items/lootaffixes/completionrelics
records/items/lootaffixes/crafting
records/items/lootaffixes/prefix
records/items/lootaffixes/prefixunique
records/items/lootaffixes/suffix
records/items/lootaffixes/suffixunique
8 matches
> db r/items/affix/prefix
records/items/lootaffixes/prefix/aa000_base_blank.dbr
records/items/lootaffixes/prefix/aa002a_exp_01.dbr
records/items/lootaffixes/prefix/aa002a_exp_02.dbr
records/items/lootaffixes/prefix/aa003a_light_01.dbr
...
2692 matches
As you can see, things can get unwieldy pretty quickly. That’s when you need…
- “q(uery) command”
The query command lets you search db records by specifying some kind of criteria to help you explore and narrow down your choices.
Let’s start with something basic where you just want to say “I want to look at all the prefixes”.
> q recordname~prefix
...
0-10 / 2828 matched records
> qn
...
10-20 / 2828 matched records
That query says to retrieve all records where the “recordname” has the word “prefix” in there somewhere. A recordname is just the path to some unique game db record. Remember the path we were seeing in the “db” command outputs? Those are recordnames.
So now we’ve kind of replicated what the db command was doing, except now you have more control. Still, that returned 2828 records. The editor outputs 10 records at a time and you can use “qn” to display the next 10. This is still a lot of things to look though though.
Let’s try to narrow the search a bit. BTW, you can press the up arrow key to get at commands you’ve entered earlier. Helps save a few keystrokes and avoid mistakes. =)
> q recordname~prefix key~offensive
...
1909 matched records
This says to retrieve records that have the string “prefix” in it’s record name, and also if any of the key-value pairs has a key that contains the string “offensive”. Still too many records. Let’s try to be a bit more specific about the effects.
> q recordname~prefix key~offensivepoison
...
67 matched records
This one looks neat:
records/items/lootaffixes/prefix/ao011a_acid_08.dbr
Class: LootRandomizer
characterBaseAttackSpeedTag: CharacterAttackSpeedAverage
itemClassification: Magical
levelRequirement: 80
lootRandomizerCost: 3700
lootRandomizerJitter: 10.0
lootRandomizerName: Corrosive
marketAdjustmentPercent: 100.0
offensivePoisonMax: 16.0
offensivePoisonMin: 10.0
templateName: database/templates/lootrandomizer.tpl
The “lootRandomizerName” field says it’s named “corrosive”. Great. We can create something with that prefix.
> set inv1/items "corrosive scrapmetal sawblade"
Item placed in inventory-sacks/1/inventory-items/23
Corrosive Scrapmetal Sawblade
augment-name : ""
augment-seed : 0
basename : records/items/enemygear/skeletons/a01_axe001.dbr
modifier-name : ""
... [omitted] ...
records/items/lootaffixes/prefix/ao011b_acid_09.dbr
Class: LootRandomizer
characterBaseAttackSpeedTag: CharacterAttackSpeedAverage
conversionInType: Physical
conversionOutType: Poison
conversionPercentage: 10.0
itemClassification: Magical
levelRequirement: 90
lootRandomizerCost: 5500
lootRandomizerJitter: 8.0
lootRandomizerName: Corrosive
marketAdjustmentPercent: 110.0
offensivePoisonMax: 30.0
offensivePoisonMin: 18.0
templateName: database/templates/lootrandomizer.tpl
Great, looks like the item has been placed into bag 1 (inv/1/items). The editor will print out the record that represents the axe itself and any records that the item references. This includes a “corrosive” prefix.
It looks like the prefix the editor put on the axe is has a level 90 requirement though. I wanted to level 80 variant. Since the editor told me where it put the new axe, I can just use that information with another command to get the right variant.
> swap-variant inv/1/items/23 prefix
Pick a variant for the prefix-name of Corrosive Scrapmetal Sawblade
1) records/items/lootaffixes/prefix/ao011a_acid_01.dbr
lootRandomizerCost : 200
2) records/items/lootaffixes/prefix/ao011a_acid_02.dbr
3) records/items/lootaffixes/prefix/ao011a_acid_03.dbr
levelRequirement : 16
...
8) records/items/lootaffixes/prefix/ao011a_acid_08.dbr
levelRequirement : 80
offensivePoisonMax : 16.0
offensivePoisonMin : 10.0
... [omitted] ...
> 8
The editor prints out a big list of possible variants for you to choose from. I found the level 80 one I wanted. It was listed as #8. Entering 8 in the command prompt confirms the choice.
It’s a bit unfortunate that the editor doesn’t print out anything after that command. But you can confirm that the item has been changed by doing
> show inv/1/items/23
...
records/items/lootaffixes/prefix/ao011a_acid_08.dbr
Class: LootRandomizer
characterBaseAttackSpeedTag: CharacterAttackSpeedAverage
itemClassification: Magical
levelRequirement: 80
... [omitted] ...
Yep, looks like that’s the one. Hitting “w” writes out the character file as usual. You’re free to enjoy your new axe. =)
If you made it here…
Congratulations! Determination +1 for you!
Commandline tools do look scary. The custom “query language” shown here certainly doesn’t help. But for item creation, I think it can hardly get any more straightforward than just typing in the name of the item and getting what you want.
Anyway, if you do want to keep trying this editor, don’t forget to use the “help” command. You can also find docs on the commands here: https://odie.github.io/gd-edit-docs/commands/
Happy Gaming!