Log in

View Full Version : Adding an augment slot to armor pieces


Fridgecritter
07-13-2017, 02:19 PM
I am still learning SQL context and queries, and hoping someone can teach me something here. I want to run a query on the database in the ITEMS table that:


Adds a second augment slot if one is not present, but only adds the second slot to armor pieces with a required level of 55 or higher.
Adds a third augment slot if one is not present, but only to armor pieces with required level of 65 or higher


I figure once I know how to format this query, I can make my own for other solutions. Thanks a ton in advance.

Burningsoul
07-13-2017, 04:13 PM
It's been awhile since I dug around the database, this is rough and might not work but it looks ok - Somebody can probably chime in if my syntax is screwy..

update items set augslot2type=7 and augslot2visible=1 where augslot1type>0 and augslot2type=0 and reqlevel>54 AND damage=0

update items set augslot3type=7 and augslot3visible=1 where augslot2type>0 and augslot3type=0 and reqlevel>64 AND damage=0

You'll need to change the 7's to the bitmask for augtypes you want in there. Fingers crossed it helps or at least points you in the right direction. Damage=0 should make it ignore weapons, although I'm not sure how it'll play with other non-equipment items - could always add in a "and ac>0" to the end.. except augs might end up getting augslots. Augception.

Fridgecritter
07-13-2017, 04:24 PM
When I run that I get

1054 - Unknown column 'reqlvl' in 'where clause'
1054 - Unknown column 'reqlvl' in 'where clause'

Burningsoul
07-13-2017, 04:30 PM
EDIT: reqlevel, not reqlvl. I miss obvious things too much. Sorry aboot that

Kingly_Krab
07-14-2017, 05:25 PM
If you run that query in that order, you'll just add 2 augment slots to any item with 1 augment slot. You need to run them in reverse.

Burningsoul
07-14-2017, 11:45 PM
Even with both lines checking for a greater than zero in augslot2type in addition to the reqlevel check per query? I'll admit I'm self learned so I'm probably missing something, I'll read up a bit when I'm not exhausted. Thanks for the heads up Krabbers.

Fridgecritter
07-14-2017, 11:48 PM
Yeah I had to fix it, but it taught me how to fix it by making this mistake after logging in and seeing what it did, then looking in the database. That, and I changed one of the armor aug slots to type 7 in Navicat and then looked at the bottom and it actually gives you a query for what you just did, that you can copy paste in a console and edit.

Burningsoul
07-15-2017, 12:44 AM
Apologies for gettin it backwards now I know. Plus that's a handy tip fridge, thanks to both of you.