Auto Sorter

Adds the ability to upgrade all storage types to auto-sorters. Auto-sorters are able to transfer items from other storages on your raft automatically.


56 Likes

57089 Downloads
banner for the Auto Sorter mod

Summary

Adds the ability to add an auto-sorter module to all game storages. An auto-sorter module will automatically transfer items from all other storages on your raft.

You can drop all of your loot into one chest and let your auto-sorters take care of sorting them into your many storages on your raft.

Auto-sorters do not work in creative mode.

How to use

After installing the mod, open any storage on your raft. On the right-hand side, you should see the new auto-sorter UI. This is used to interact with your auto-sorter and configure e.g. item filters for the sorter to use.

Read through the initial help text to get an understanding of how the module works, and then close the help overlay (you can open it anytime later on) by hitting the "CLOSE" button in the bottom right corner.

You will now see the upgrade window. It will tell you which resources are required to install the auto-sorter module. By default, you require 20 Plastic, 10 Scrap, 8 Circuit boards and 1 Battery. If you want to change the costs to upgrade, you can do that using the config file (see description below).

Once you hit the "Upgrade" button, the storage will turn red and the auto-sorter menu will appear. That indicates to you that the auto-sorter module has been successfully installed.

If you want to hide the auto-sorter UI you can click on the small "eye" button in the upper right corner. This will hide the UI until you click on the button again.

The auto-sorter has two modes of operation:

  • Auto Mode: In this mode, the auto-sorter will automatically transfer all items from other storages that it currently has in inventory. It will transfer all items it can find, until there are no items left in other storages or the auto-sorter is full.
  • Manual Mode: In this mode, you are presented with a list of all items in the game and you can set what items and how many of those items the auto-sorter will transfer.

To switch between modes, simply check/uncheck the "AUTO MODE" checkbox in the sorter UI.

Manual Mode

When in manual mode the item filters are displayed but the UI will only ever display a few of them. To find a specific item, enter its name into the search field and wait a moment until the UI has re-filtered the list. To make the auto-sorter transfer an item, hit the checkbox on the right side of that item and the auto-sorter will search and transfer only this item to its storage.

If you only want to transfer a specific amount of items, click on the small "infinity" button to the left of the checkbox. This will give you a small input field where you can enter the amount you want to transfer. The auto-sorter will then only transfer this item until the entered amount is reached in its inventory.

You can also make use of the select/deselect buttons at the bottom of the filter list. The buttons on the right-hand side "DESELECT" and "SELECT" will deselect/select all items in your current search result, whereas the "DESELECT ALL"/"SELECT ALL" buttons will deselect/select all items regardless if they are displayed in the UI or not.

Search queries

You can use special search queries to find items in manual mode that have a specific configuration. To use the query, simply write it into the search field of the sorter while in manual mode. The following queries are available:

  • #active: will filter the list to only display all active items (items with the checkmark set)
  • #inactive: will filter the list to only display all inactive items (items without the checkmark set)
  • #amount: will filter the list to only display items that have a specific item amount configured.

Queries right now work with an OR connection. E.g. you can enter "#active plank" which will display all active items and all items that have the word "plank" in their name.

To have exact name matching when searching for items, put your search input into quotes. E.g. "Plank" will only find the plank item, but if you type it in without quotes will find all items that contain the word Plank.

Priority

You can use the priority setting to specify the order in which auto-sorters on your raft are checked. That way, you can specify the order in which items are transferred to your auto-sorters. A sorter with a higher priority number will receive items first.

Priority plays an important role when transferring items between sorters:

  • In general, items are not transferred between sorters if their priority is the same and they want to receive the same items.
  • Items are transferred if the sorters are configured to receive different items, regardless of their priority.
  • If one sorter has a higher priority, it will always receive items first and will also pull them from other auto-sorters with lower priority.
  • Lower priority sorters are allowed to transfer from higher priority sorters if the higher priority sorter has a specific item amount set to transfer. In this case, the lower priority sorter will transfer items if the higher priority sorter has more items than specified in its item amount.

Downgrade

You can uninstall the auto-sorter module anytime by hitting the red "DOWNGRADE" button in the auto-sorter UI. With the default settings however, you will only get back a percentage of the items you invested into upgrading, so keep that in mind.

Ignore

The small little button in the upper right corner of the mod UI (the one with the lock symbol) can be used to set any storage to be ignored by auto-sorters. This is helpful if you want to explicitly exclude storages from being considered by the auto-sorters.

Config/Settings

If you have Aidanamite's Extra Settings API mod installed, you can change any settings from the in-game settings menu.

If you do not have this mod there also is a config file available after the mod has been loaded for the first time. It is saved at C:\Users\<User>\AppData\LocalLow\Redbeet Interactive\Raft\Mods\AutoSorter\config.json.

If you want to change values in the config file directly, make sure you restart Raft for the changes to take effect. No restart is required if you use the settings API mod.

  • CheckIntervalSeconds: The interval in seconds in which all auto-sorters are checked and transfer items. If you have a lot of storages on your raft, you might want to increase this value to make sure everything still runs smoothly. Just keep in mind that it can take up to the set interval for items to be transferred.
  • UpgradeCosts (can only be changed in the config file): If you are not happy with the default costs I set, you can change them anytime using the config. You can add and remove any cost and set the desired amount.
  • ReturnItemsOnDowngradeMultiplier: The multiplier that is applied when determining how many items the user gets back on a downgrade. This is a percentage value 100% (you will get all items back), 0% (you won't receive any items back on downgrade). In the config file, this is represented as a number in the range of 0-1.
  • ChangeStorageColorOnUpgrade: Determines whether the storage color changes whenever you upgrade a storage to an auto-sorter. If you disable this, make sure you reload your world, so all storages get back to normal.
  • MaxSearchResultItems: The maximum amount of items displayed in the manual mode item filter list. Recreating those UI elements has a bit of a performance impact, so make sure you lower this value if you are having lags while opening the auto-sorter UI.

Uninstall

You can simply remove the mod from your mod directory to uninstall it. Keep in mind though that you will lose all items you invested to upgrade your storages. To make sure that does not happen, you can also downgrade all sorters before uninstall, so you get all the items back.

Multiplayer

The mod can be used in multiplayer. Make sure all connected players have the mod installed. Even though it likely works without issues, keep in mind that this mod has been mostly developed with singleplayer in mind and not been extensively tested in multiplayer.

Dedicated Server

I have created a plugin for the dedicated server which strips the mod from all client-side stuff which is not needed when running it on a headless server. If you are using the AutoSorter on RDS, just use the plugin instead of the mod.

Compatibility

The mod should be compatible with all other mods that add additional storages like the More Storages mod, as it does not change the way storages work but simply adds a module to the storage. If you experience any incompatibilities with other mods, please let me know on discord.

There is an issue when using this mod along with the Server Storage mod that does not allow the player movement to be locked when the search field is selected. This makes it harder to type into the search field and impossible to type the letter "e", as it will close the storage instead of typing.

Support

Should you need support or found a bug, head to the modding discords #mods-support channel and ping me there or contact me directly Pete#5177

If you like my work buy me a coffee or leave a like.

Description last changed on 2024-04-13