Lich:Script invdb

The official GemStone IV encyclopedia.
Revision as of 21:25, 26 April 2023 by GS4XANLIN (talk | contribs)
Jump to navigation Jump to search

Cross-character searching & tracking of characters, inventory, lockers, bank accounts, and other data

Now including support for family vaults!

author: Xanlin (Xanlin#4407 on discord)

Getting Started

tldr: run ;invdb to load your stuff, then ;invdb thing to find your thing.

Help

;invdb help

    ;invdb help      > help text (this)
    ;invdb examples  > examples
    ;invdb menu      > basic starter menu
    ;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
        count     shows totals by character and location
        export    export table or query to a file
        reset     clear everything and start over
        delete    delete stuff, can be complicated, more on this later

    second parameter: target (defaults to all or item)
      options: bank, char, item, inv, locker, tickets
        bank      bank account & silvers
        char      character info
        item      both inventory and lockers
        inv       inventory, but not lockers
        locker    locker(s), but not inventory
        tickets   ticket balance information

    optional parameters:
      char=name                      # supports wildcards
      game=gsiv                      # defaults to the current game
      type=gem                       # based on your GameObj type data.
      noun=stone                     # filter by item noun
      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
      groupby=char                   # adds char column to sum/total queries
      orderby="path asc, qty desc"   # customize result order
      delay=6                        # delay N seconds before doing stuff (e.g. 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 applicable action & target are specified, defaults to searching items
    +---------------------------------------------------------------+
    exporting:
      ;invdb export (char|item|inv|locker|bank|tickets|sbank|stickets) (optional parameters)
      - additional optional export parameters:
        format=(csv|txt|pipe)         default = csv
        dir="c:\usersme\desktop"   default = $lich_dir\inv\
        file="filename.ext"           default = target_(params)_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
    +---------------------------------------------------------------+
    settings (on/off is converted into true/false)
      ;invdb --settings lists your current settings
      ;invdb --jar=on/off will turn on/off looking in jars
      ;invdb --stack=on/off will turn on/off reading stacks of notes (light and deep notes)

Menu

;invdb menu

  +--------------------------------------------------------------+
  |                          invdb                               |
  +--------------------------------------------------------------+

      Run #1 first if your database is empty:
       1: ;invdb refresh all to create/update the database

       other 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*
      11: locker counts        ;invdb count char=Xanlin

      Add an optional delay for autostart:
          ;autostart add --global invdb delay=6 @no_squelch
      To set autostart ;repository to download updates:
          ;autostart add --global repository download-updates
      To set invdb to auto-update:
          ;repository set-updatable invdb
      To update just your character info on logout:
          ;alias add --global quit=;eq Script.run('invdb','refresh char');fput 'quit'
  
  +--------------------------------------------------------------+
  • If you don't have premium lockers, your locker location is just listed as `locker`. If you don't have a paid subscription, you need to run the script at each locker that has contents with the locker open.

Default Query

After you've run ;invdb or ;invdb refresh all on each of the characters you want to load:

example searching for something containing the word button:

;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)
...     h: hidden (Y or blank)
-----------------------------------------------------------------------------------------
 name    | loc   | path       | qty | type     | stk | epf | m | r | h | item
-----------------------------------------------------------------------------------------
 Xanlin  | inv   |            |   1 | unknown  |     |     | Y | Y |   | black suede pants caught with horn buttons
 SomeAlt1| inv   |            |   1 | clothing |     |     | Y |   |   | dark silver-buttoned breeches
-----------------------------------------------------------------------------------------
matched 2 rows from item.
--- Lich: invdb has exited. 

finding where you stashed some gems:

;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. 

getting a total number of an item:

>;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

Can't remember how much that one character has in their bank?

>;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. 

total up all your bank accounts:

>;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. 

Get your total at just one bank if you prefer:

>;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. 

Export

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:

>;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. 

item_2018-06-28_12-59-35.csv :

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 

Other useful commands

Want to delete a character?

;invdb delete character char=<name>

How about a partial match when you want anything containing one word?

;invdb shimmering *orb

Third-Party Software - edit
Lich Installation: Lich
Downloadable Lich Scripts: Go2 | Map | Repository | Popular Scripts
Return to the top of this page.