Philter, the inventory cleanup script

philmasterplus

Active member
This is the "home" thread for Philter. Report bugs, give hugs, and discuss features.
We recently renamed from "OCD-Cleanup" to "Philter". While you can continue to use Philter as-is, we recommend reinstalling Philter (please check our
migration guide). For details, see the separate thread or the GitHub issue.

Philter is an inventory cleanup script. It is a fork of @Bale's OCD Inventory Control.
Philter lives in GitHub, under the wings of Loathing Associates Scripting Society.

What does it do? How do I get it?​

Philter purges (i.e. "filters") junk in your inventory. Mallsell, autosell, pulverize, you name it. It's great for cleaning up items you accumulated during ascension, a dungeon run, or a day of farming.

To install Philter, enter the following into the KoLmafia gCLI:
Code:
svn checkout https://github.com/Loathing-Associates-Scripting-Society/philter/trunk/release/

Philter can live side-by-side with OCD Inventory Control, but you may run into some issues. In this case, you can uninstall OCD Inventory Control. Don't worry, you won't lose your data.
Code:
svn delete bale-ocd

Philter uses the same files and configs used by OCD Inventory Control, so your migration should be uneventful. If your scripts or aliases were using OCD Inventory Control.ash, modify them to use ocd-cleanup.ash instead.

So it's a copy of Bale's OCD? What's wrong with the old one?​

Nothing! You can continue to use OCD Inventory Control if you want.

However, Bale has not been around us for a while. OCD Inventory Control has been collecting subtle and dangerous bugs (example). Eventually, a KoL change made it unusable without a (pretty simple) fix. This motivated us to create a fork which became OCD-Cleanup.

I thought it was named "OCD-Cleanup"? Why rename it again? And why "Philter"?​

Yes, it was! After receiving multiple requests, we decided to move away from the old name which included ableist language. Check out user opinions at the rename thread. We eventually held a poll to choose the new name, "Philter".

Renaming the script will break my workflow!​

We're trying hard to make it as painless as possible for everyone involved. More updates will be posted here, with technical details available on the GitHub issues board.

What's with the "alpha" page?​

It's the new relay UI for Philter! I've been working on replacing the old UI for a while. Although it is still incomplete, I felt it was ready for a preview.

The "classic" Manager will stay around until we're confident that the new one is just as good, if not better. Expect updates within the next few weeks. Please report bugs and request features here (or on GitHub)!
 
Last edited:
Just a question on the classic and new UI. What do they show. Do they just show the inventory, do they include hagnks, closet, clan stash? If the later of the 3 can you add a preference for what you want it to show?
 

philmasterplus

Active member
Right now, both Managers show uncategorized items in your inventory, though we also display their quantities in the closet, DC, and Hagnk's--check out the "C", "S", and "D" columns in the item tables.

Clan stash is not included, which is probably a good thing since other people can add items to/take items from the clan stash "in the background", making the displayed values inaccurate. Same thing can be said for your inventory, but at least that is in your control.

Could you describe your problem in detail? Is it because you feel the UI is too cluttered? Or do you want to inspect your closet without taking items out into your inventory?
 
Many thanks for maintaining this script. How do I prevent it asking me to stop to categorise new items? The OCD version used to skip over this part and continue without complaining, so I must have altered something, but I can't remember what!
 

philmasterplus

Active member
When we forked OCD Inventory Control we retained the behavior of asking once on each invocation. I can't recall there being a setting, so it's possible that you manually edited the ASH code to comment out the popup code.

No promises, but I'll see if I can add a setting that suppresses the popup.
 
When we forked OCD Inventory Control we retained the behavior of asking once on each invocation. I can't recall there being a setting, so it's possible that you manually edited the ASH code to comment out the popup code.

No promises, but I'll see if I can add a setting that suppresses the popup.
That would be great; in the meantime I'll just comment some bits out and see what happens. Thank you!
 

Bombastus

New member
Tnanks for maintaining and updating. I've noticed that when trying to smith via Innabox, if the number of each item isn't the same, it aborts instead of making the max possible number.
Code:
Verifying ingredients for icy-hot katana (94)...
You need 8 more icy katana hilt to continue.

And (unrelated) when using the new interface, I get this pop-up when I change black pixel to mall sale.
1622808398841.png
 
Last edited:

philmasterplus

Active member
For the crafting thing, I believe there's a checkbox next to the Action field that controls how much Philter will make. I haven't looked at the code in a while so I might be wrong.

The popup is intentional. Currently, when you change the action for an item in a subtab, the item is immediately moved to another subtab without any visual feedback. If you misclick an action, you can lose track of where the item now is. The popup is a helpful reminder.

But it's a hack and I'm not happy with it. Do you feel showing a popup all the time is too annoying? I would appreciate suggestions on UI improvements.
 

Bombastus

New member
The popup is a helpful reminder.

But it's a hack and I'm not happy with it. Do you feel showing a popup all the time is too annoying?
Sorry, I was unclear. I think the pop up is okay. But it was showing a different item (which wasn't even in my list): black pixel != pirate shirt, so I wasn't sure what was going on and went back to the classic view.
 

Bombastus

New member
Thanks for looking into the issue above.

I'm seeing the script override existing prices in my store when it cleans my inv and autosets prices. I would expect (and want) it to just add to the store inv without adjusting prices if the item is already in the store. It undoes a bit of manual work, otherwise.
 

Curundu

New member
Thanks for this script. I had a question. I have no problem going through and picking what items go where. Yet, when I save my preferences, nothing happens. The stuff I want to go to my closet (for example) stays in my inventory. Is there a step I am missing? Thanks.
 

philmasterplus

Active member
Thanks for this script. I had a question. I have no problem going through and picking what items go where. Yet, when I save my preferences, nothing happens. The stuff I want to go to my closet (for example) stays in my inventory. Is there a step I am missing? Thanks.

You're supposed to run the cleanup command. Enter ocd-cleanup in the gCLI. (The new command is philter, but it's under development)
 
Hi, just trying this for the first time. I haven't used OCD before this either. I don't like the default actions set for my items, is there a way to select all the items and change them to "keep" by default? Then I'll go through them one by one and change the action if I don't want to keep them. With the default settings which "mall" or autosell many of my items, I can't even test out the script because I don't want a large portion of my items to be gone.
The "Keep all" button for uncategorised items was helpful, I'd like something similar even for categorised items. Eg if I could go to "Edit database", select all items under a certain category (like "mall"), and change them all to "keep". Thanks!
 

philmasterplus

Active member
That would be neat. I'll have to figure out how an operation like this (select multiple & edit) could be implemented.

Please understand that my backlog is getting somewhat long, so a change would take some time to arrive.
 
Last edited:

fronobulax

Developer
Staff member
Bale's file format was easily manipulated as a spreadsheet and I understand the file format has not changed. I would import them into a spreadsheet as a tab delimited text file, use sort and filtering operations to identify things I wanted to change, change them and then just make sure that I saved the result as a text file. So there is a way to have the capability but it requires skills and software beyond KoLmafia :)
 
Philmasterplus, Fronobulax, thanks! Frono, I've come across other forum posts suggesting changing the files directly like you suggested, but my problem is that I'm using a Mac (OS Big Sur, v 11.4) and I don't know where my KOLMafia directory is. I've tried searching "KoLmafia", "OCD" and "Philter" in my Finder, searching for "use_for_items.txt" in the Finder, and looking in my Applications library, but I don't know where to find a file that I can modify. If anyone has Mac experience I'd appreciate it!
(I don't know if maybe I could have avoided using the defaults by NOT clicking "Add defaults" under "Add items" when I was setting up for the first time? I clicked everything when I was trying to understand how Philter works.)
 
Philmasterplus, Fronobulax, thanks! Frono, I've come across other forum posts suggesting changing the files directly like you suggested, but my problem is that I'm using a Mac (OS Big Sur, v 11.4) and I don't know where my KOLMafia directory is. I've tried searching "KoLmafia", "OCD" and "Philter" in my Finder, searching for "use_for_items.txt" in the Finder, and looking in my Applications library, but I don't know where to find a file that I can modify. If anyone has Mac experience I'd appreciate it!
(I don't know if maybe I could have avoided using the defaults by NOT clicking "Add defaults" under "Add items" when I was setting up for the first time? I clicked everything when I was trying to understand how Philter works.)
It should be at ~/Library/Application Support/KoLmafia
You might not be able to see Library, but you can get to it from the 'Go' menu in the Finder if you hold down Option, or you can use shift-command-G to use the 'Go to Folder…' command to get there.

Edit: I've put a copy of my data file at https://controlc.com/7491ad33 with everything changed to KEEP. You're welcome to use it, with the proviso that I *believe* I've changed everything to keep, but I'd suggest running it in simulate mode just to make sure. Also, part of the fun for me was running the script and seeing what new items I'd picked up from various places; having everything already listed means that won't happen.
 
Last edited:
Top