Display Shelver and Unshelver

Darzil

Developer
Have (with the help of Bale in this thread : http://kolmafia.us/showthread.php?11563-Display-Case-Commands) put together a couple of scripts which may help someone other than me.

Basically you create a tab delimited datafile that shows each item you'd want Display Shelver to consider adding to your Display Case, called DisplayShelver_charactername_Data.txt.

Field 1 : The item to consider
Field 2 : The number of items to try to have in your display case (* for all) when running Display Shelver
Field 3 : The number of items to try to have in your inventory (* for all) when running Display Unshelver
Field 4 : The shelf upon which Display Shelver should put the items

You can then just run DisplayShelver.ash to add items to your Display Case, and DisplayUnshelver.ash to remove them.

I wrote it so I could keep my event collections together most of the time, but pull useful bits with Unshelver if spending time in aftercore, and put them back before ascending again, in the right places.

Place the datafile in the data folder, and the ash scripts in the scripts folder.

Any thoughts, comments, suggestions?


Known bug : Needs a display case refresh at the end, or display case functions to update the display case, bug added to bug report forum.

Edit -
v0.3 If you already have some of an item in a display case, display_shelver takes account of it.
v0.2 Impoved performance, now checks to see if items in your display list are in your inventory, rather than checking if items in your inventory are in your display list. Well, improves performance if you have more items in inventory than your list, anyway.
 

Attachments

  • Display_Unshelver.ash
    2.1 KB · Views: 87
  • DisplayShelver_charname_Data.txt
    798 bytes · Views: 54
  • Display_Shelver.ash
    2.5 KB · Views: 57
Last edited:

Darzil

Developer
Yes, it works with numbers, and with fuzzy matches (through the genius that is mafia / ash).

If you are wanting to use numbers to do something like having a list of all numbers so you can populate a display case with one of everything, I'd recommend changing the code to look at each item in inventory and see if it is on the display list, rather than each item in the display list to see if it is in inventory, for performance reasons.
 
Last edited:

Darzil

Developer
Bump to v3, now display_shelver now handles situations where you have some of an item in display case, and want to transfer more.
 
Top