script name: invdb.lic
Cross-character searching & tracking of inventory, lockers, bank accounts, and other data.
tldr: run `;invdb` to load your stuff, then `;invdb thing` to find your thing. More options? read the rest.
If you find a bug, send me a message on discord Xanlin#4407
getting started:
note: If you don't have premium lockers, your locker location is just listed as `locker`Code:+---------------------------------------------------------------+ ;invdb help > help text (this) ;invdb menu > basic starter menu ;invdb examples > examples ;invdb changelog > changelog first parameter: action (default to refresh all if no parameters provided) options: refresh, query, sum (or total), export, reset, delete, drop refresh load/update your database query prints out results to your story window sum less detail than query, aggregates by type and item export export table or query to a file reset clear everything and start over delete delete stuff, can be complicated, more on this later drop drops a table, (item|bank|char) second parameter: target (defaults to all or item) options: bank, char, item, inv, locker bank bank account & silvers char character info item both inventory and lockers inv inventory, but not lockers locker locker(s), but not inventory optional parameters: char=name # supports wildcards game=gsiv # ignore this if you only play one game type=gem # based on your GameObj type data. amount(<|<=|=|>|>=)42 # amount greater than, equal to, etc a number qty(<|<=|=|>|>=)42 # qty greater than, equal to, etc a number noun=stone # buggy on items from locker manifest, grabs the last word in the name path=backpack # all items that start in a backpack stack=(jar|bundle|stack|pack) # only jars implemented so far status=(empty|partial|full) # to help find empty or full jars marked=Y # not recorded in standard lockers registered=Y # not recorded in standard lockers worn= # not yet implemented delay=5 #adds a delay before doing stuff useful for adding to autostart All other input is used as a search string in the primary name in the target. If no parameters are provided, defaults to `refresh all` If no applicatable action & target are specified, defaults to querying for items based on other input +---------------------------------------------------------------+ exporting: ;invdb export (char|item|inv|locker|bank) (optional parameters) - additional optional export parameters: format=(csv|txt|pipe) default = csv dir="directory path" default = $lich_dir\\inv\\ file="filename.ext" default = (params)_target_timestamp.csv +---------------------------------------------------------------+ most commands have abbreviations: q = query c = char m = marked i = item g = game r = registered in = inv t = type s = stack l = locker n = noun status = status b = bank p = path w = worn +--------------------------------------------------------------+ | invdb | +--------------------------------------------------------------+ Run #1 first if your database is empty: 1: ;invdb refresh all to create/update the database some examples: 2: character list ;invdb query char 3: bank accounts ;invdb q bank 4: landing bank total ;invdb sum bank amount>100000 elan 5: all gems in inv(s) ;invdb q inv type=gem 6: your stuff ;invdb q item c=Xanlin 7: all locker stuff ;invdb q locker 8: all empty jars ;invdb type=jar status=empty 9: total gems ;invdb sum type=gem 10: total uncut diamonds ;invdb sum type=gem =uncut dia* Add an optional delay for autostart: ;autostart add invdb delay=3 +--------------------------------------------------------------+
After you've run ;invdb on each of the characters you want to load:
example in-game output:
searching for something related to button:
finding where you stashed some gems:Code:>;inv q button --- Lich: invdb active. ... loc: location of the item (hands|inv|locker|town abbr if multi locker) ... path: the path to an item, e.g. `backpack > box` is in a box, in a backpack ... type: object type, per GameObj.type_data ... stk: stack, a non-standard container, e.g. jar|bundle|voucher pack ... epf: status (empty|partial|full) for jars/stacks ... m: marked (Y or blank) ... r: registered (Y or blank) ------------------------------------------------------------------------------------------------------- name |loc | path | qty|type |stk|epf|m|r| item ------------------------------------------------------------------------------------------------------- Somealt1 |locker| locker | 1|armor | | | | | reinforced silver-buttoned leathers Xanlin |locker| locker | 1| | | | | | silvery moon-shaped button painted with the words, "Community. Unity. Icemule. Vote Tawariell." ------------------------------------------------------------------------------------------------------- matched 2 rows from item. --- Lich: invdb has exited.
getting a total number of an item:Code:>;inv type=gem =uncut diamond --- Lich: invdb active. -------------------------------------------------------------------------------------------------------- name |loc | path | qty|type |stk|epf|m|r| item -------------------------------------------------------------------------------------------------------- Somealt1 |inv | satchel | 2|gem | | | | | uncut diamond Mule1 |inv | sack > jar | 100|gem |jar| | | | uncut diamond Mule2 |hands | jacket > jar | 42|gem |jar| | | | uncut diamond Mule2 |inv | greatcloak > jar | 63|gem |jar| | | | uncut diamond Mule3 |inv | bag | 1|gem | | | | | uncut diamond -------------------------------------------------------------------------------------------------------- matched 5 rows from item. --- Lich: invdb has exited.
Code:>;inv sum type=gem =uncut diamond --- Lich: invdb active. -------------------------------------------------------------- type | amount | item -------------------------------------------------------------- gem | 208 | uncut diamond gem | 208 | total -------------------------------------------------------------- matched 2 rows from item. --- Lich: invdb has exited.
bank accounts:
Can't remember how much that one character has in their bank?
total up all your bank accounts:Code:>;inv q bank char=xanlin --- Lich: invdb active. ------------------------------------------------------------------------ name | bank | amount | updated ------------------------------------------------------------------------ Xanlin | First Elanith Secured Bank | ###,### | 06/25/18 Xanlin | Great Bank of Kharam-Dzu | ##,### | 06/25/18 Xanlin | Vornavis Bank of Solhaven | ###,### | 06/25/18 Xanlin | Bank of Torre County | ###,### | 06/25/18 Xanlin | Icemule Trace Bank | #,###,### | 06/25/18 Xanlin | Bank of Kharag 'doth Dzulthu | ##,### | 06/25/18 Xanlin | United City-States Bank | #,###,### | 06/28/18 Xanlin | Cysaegir Bank | ##,### | 06/26/18 Xanlin | Total | #,###,### | 06/28/18 ------------------------------------------------------------------------ matched 9 rows from bank. --- Lich: invdb has exited.
Get your total at just one bank if you prefer:Code:>;inv sum bank --- Lich: invdb active. -------------------------------------------------------------- bank | amount | characters -------------------------------------------------------------- Bank of Kharag 'doth Dzulthu | ##,### | Xanlin, Somealt Bank of Torre County | ###,### | Xanlin, Somealt, Somealt2 Cysaegir Bank | ##,### | Xanlin, Somealt, Somealt2 First Elanith Secured Bank | ###,### | Xanlin, Somealt, Somealt2 Great Bank of Kharam-Dzu | ##,### | Xanlin, Somealt, Somealt2 Icemule Trace Bank | #,###,### | Xanlin, Somealt, Somealt2 United City-States Bank | #,###,### | Xanlin, Somealt, Somealt2 Vornavis Bank of Solhaven | ###,### | Xanlin, Somealt, Somealt2 grand total | #,###,### | Xanlin, Somealt, Somealt2 -------------------------------------------------------------- matched 9 rows from bank. --- Lich: invdb has exited.
Code:>;inv sum bank elan --- Lich: invdb active. -------------------------------------------------------------- bank | amount | characters -------------------------------------------------------------- First Elanith Secured Bank | ###,### | Xanlin, Somealt, Somealt2 -------------------------------------------------------------- matched 1 rows from bank. --- Lich: invdb has exited.
Don't care for the in game queries and prefer your spreadsheets instead? You can export to csv (or tab/pipe delimited) and do whatever you want with it:
item_2018-06-28_12-59-35.csv :Code:>;inv export item --- Lich: invdb active. exported 1166 rows from item to C:/.../lich/inv/item_2018-06-28_12-59-35.csv. --- Lich: invdb has exited.
New as of v0.1.9:Code:name,loc,path,qty,type,stk,epf,m,r,item Xanlin,inv,"",1,clothing,"", ,"","",thick ebonwood armband Xanlin,inv,"",1,clothing,"", ,Y,"",translucent spidersilk backpack Xanlin,inv,"",1,jewelry,"", ,"","",copper-bound linen badge Xanlin,inv,"",1,clothing,"", ,Y,"",oiled light leather courier bag with polished faenor buckles Xanlin,inv,"",1,"","", ,Y,"",black leather disarming case Xanlin,inv,"",1,clothing,"", ,Y,Y,translucent spidersilk cloak Xanlin,inv,"",1,"","", ,Y,Y,pair of rolaren-studded gauntlets Xanlin,inv,"",1,"","", ,Y,"",pair of black-tinted glasses Xanlin,inv,"",1,"","", ,Y,"",onyx-studded shadowy black hip-satchel Xanlin,inv,"",1,"","", ,"",Y,black hand insignia Xanlin,inv,"",1,clothing,"", ,Y,Y,silver locksmith kit Xanlin,inv,"",1,jewelry,"", ,"","",tiny iron catapult pin Xanlin,inv,"",1,magic,"", ,Y,"",dull gold ring Xanlin,inv,"",1,clothing,"", ,Y,"",matte black satchel Xanlin,inv,"",1,"","", ,Y,"",dark leather scalemail Xanlin,inv,"",1,"","", ,Y,"",leather swordbelt Xanlin,inv,"",1,"","", ,Y,"",emerald-hued imflass trident symbol adorned with blue coral Xanlin,inv,backpack,1,magic,"", ,"","",white flask Xanlin,inv,backpack,1,herb,"", ,"","",ambrominas leaf Xanlin,inv,backpack,1,lockpick,"", ,"","",copper lockpick Xanlin,inv,backpack,1,magic,"", ,"","",flawless gold ring Xanlin,inv,backpack,1,magic,"", ,"","",small statue Xanlin,inv,bag,1,magic,"", ,"","",ruby amulet Xanlin,inv,bag,1,"","", ,Y,Y,thin coarse linen blindfold Xanlin,inv,bag,3,"","", ,"","",crisp parchment bloodscrip Xanlin,inv,bag,1,clothing,"", ,Y,Y,pair of rolaren-toed boots Xanlin,inv,bag,2,gem,"", ,"","",uncut star-of-Tamzyrr diamond
Added extra columns for some types (gem,reagent) for sum/total queries to help differentiate between jarred and non-jarred (loose) gems/reagents:
These aren't included in ;inv help yet, pending further testing (but seem to be stable so far).
Code:>;inv sum type=gem --- Lich: invdb active. ... type: object type, per GameObj.type_data -------------------------------------------------------------------------------- type | amount | loose | jarred | item -------------------------------------------------------------------------------- gem | 1 | 1 | 0 | black deathstone ... (more rows) gem | 208 | 58 | 150 | violet sapphire gem | 218 | 18 | 200 | white opal gem | 287 | 8 | 279 | uncut emerald gem | 313 | 13 | 300 | star sapphire gem | 7,871 | 1,105 | 6,766 | total --------------------------------------------------------------------------------Added preliminary support for changing the order of rows, and optional grouping for sum/total queries using orderby= and/or groupby=Code:>;inv sum type=reagent --- Lich: invdb active. ... type: object type, per GameObj.type_data -------------------------------------------------------------------------------- type | amount | loose | jarred | item -------------------------------------------------------------------------------- reagent | 1 | 0 | 1 | crimson troll king bezoar reagent | 1 | 0 | 1 | vial of farlook vitreous humor reagent | 5 | 0 | 5 | inky necrotic core reagent | 7 | 0 | 7 | tiny golden seed reagent | 11 | 0 | 11 | glowing violet essence shard reagent | 35 | 0 | 35 | n'ayanad crystal reagent | 51 | 0 | 51 | ayanad crystal reagent | 111 | 0 | 111 | total --------------------------------------------------------------------------------
for order by, ascending is assumed if not included:
desc = descending = from highest to lowest value
asc = ascending = from lowest to highest value
If I want to see how many gems I have that I haven't jarred yet, I can do something like this:
If I like being able to see the total amount of an item I have without all the extra rows and path information, but don't want to run a query with a character filter, I can add an optional grouping by character with groupby=characterCode:>;inv sum type=gem orderby="jarred desc,loose asc" --- Lich: invdb active. ... type: object type, per GameObj.type_data -------------------------------------------------------------------------------- type | amount | loose | jarred | item -------------------------------------------------------------------------------- ..... (lots of rows)... gem | 8 | 8 | 0 | piece of blue quartz gem | 8 | 8 | 0 | rock crystal gem | 10 | 10 | 0 | piece of yellow jasper gem | 12 | 12 | 0 | banded sardonyx stone gem | 15 | 15 | 0 | piece of black jasper gem | 26 | 26 | 0 | star diopside -------------------------------------------------------------------------------- matched 163 rows from item.
Code:>;inv sum statue groupby=character --- Lich: invdb-test active. ... type: object type, per GameObj.type_data ----------------------------------------------------------------------------- type | amount | name | item ----------------------------------------------------------------------------- magic | 1 | Mule1 | jacinth-inset lounging cat statue magic | 2 | Alt1 | small statue magic | 2 | Alt2 | small statue magic | 2 | Alt3 | small statue magic | 5 | Alt4 | small statue magic | 8 | Mule1 | small statue magic | 9 | Alt5 | small statue magic | 9 | Xanlin | small statue magic | 17 | Mule2 | small statue magic | 55 | total | total ----------------------------------------------------------------------------- matched 10 rows from item.