Philter is an inventory cleanup script for KoLmafia. Run Philter to sell and remove junk items you collected while exploring the Kingdom, after an ascension, or a day of farming.
Philter began as a fork of OCD Inventory Control 3.10, created by Bale. Philter is mostly compatible with OCD Inventory Control; it uses the same settings and ruleset files used by OCD Inventory Control.
Report bugs and suggest new features in our KoLmafia forum thread or the issues board.
Philter requires KoLmafia r20566 or later. Download the latest version of KoLmafia by visiting the latest build page and clicking the "KoLmafia-NNNNN.jar" link (where NNNNN is the build number).
To install Philter, enter the following into KoLmafia's graphical CLI ("gCLI"):
git checkout https://github.com/Loathing-Associates-Scripting-Society/philter.git main
We recently renamed our project to Philter. If you were using OCD-Cleanup, please follow the renaming guide.
Philter can be installed together with OCD Inventory Control. Nevertheless, we recommend uninstalling OCD Inventory Control to avoid any potential problems:
svn delete bale-ocd
svn delete Loathing-Associates-Scripting-Society-OCD-Inventory-Control-trunk
Then install Philter as normal.
With Mafia support now implemented for git you can now remove the old SVN repo and convert to git.
svn delete Loathing-Associates-Scripting-Society-philter-trunk-release
Then install Philter as normal.
Philter requires a cleanup ruleset to work. To create one, follow these steps:
(Note: These instructions are for the "new" Manager UI.)
If you were using OCD Inventory Control, Philter will automatically use any ruleset files you already have.
To run Philter, type in philter
in the gCLI. This instructs Philter to look at your ruleset file and clean up items appropriately.
If you haven't categorized all items yet, Philter will ask you whether to continue. If you click "Yes", Philter will quit immediately. If you click "No", Philter will clean up only those items that have rules in your ruleset file.
Philter can be configured using ZLib variables. To set a variable, type zlib <variable name> = <value>
in the gCLI.
ℹ️ For backwards compatibility with OCD Inventory Control, Most variable names begin with BaleOCD_
.
BaleOCD_MallMulti
Name of the mall multi account to use. This is used if it is not an empty string and BaleOCD_UseMallMulti
is true
.
BaleOCD_UseMallMulti
true
(default), false
If set to true
and BaleOCD_MallMulti
is not an empty string, Philter will send all "Mall sale" items to a mall multi account.
BaleOCD_MultiMessage
Mall multi dump
Message to use when sending items to the mall multi.
BaleOCD_DataFile
Specifies the name of the cleanup ruleset file.
For example, if BaleOCD_DataFile = foobar
, then Philter will load cleanup rules from OCDdata_foobar.txt
.
BaleOCD_StockFile
Specifies the name of the stocking ruleset file.
For example, if BaleOCD_StockFile = foobar
, then Philter will load the stocking rules from OCDstock_foobar.txt
.
BaleOCD_Stock
0
(default), 1
If set to 1
, Philter will use the stocking ruleset file to stock up on items.
BaleOCD_Pricing
auto
(default), max
Controls the pricing mode for "Mall sale" items.
If set to auto
, Philter will use the lowest mall price for each item (returned by historical_price()
or mall_price()
, so it's actually the 5th lowest mall price), subject to minimum price rules.
If set to max
, Philter will use the maximum mall price (999,999,999), or the current price if the item is already in your store.
BaleOCD_Sim
false
(default), true
If set to true
, Philter will run in simulation mode, reporting what items will be cleaned up without actually cleaning up or stocking items.
BaleOCD_EmptyCloset
0
(default), 1
If set to 1
and Hagnk's has not been emptied in the current ascension, Philter will take all items out of your closet for cleanup.
This setting is ignored if you have already emptied Hagnk's.
BaleOCD_EmptyHangks
0
(default), 1
This setting is currently unused. Philter will empty Hagnk's if KoLmafia's autoSatisfyWithStorage
property is set to true
.
BaleOCD_MallDangerously
false
(default), true
If set to true
, Philter will mallsell uncategorized items.
BaleOCD_RunIfRoninOrHC
ask
(default), never
, always
Controls how Philter behaves when your character is in Ronin/Hardcore.
ask
: Ask for confirmation to proceed.never
: Philter will refuse to run (no prompts) if in Ronin/HC.always
: Philter will always run, even if in Ronin/HC.Note: This setting only takes effect when Philter is run directly.
It is not used when ocd_control()
is called from another script.