Quasimorph

Quasimorph

260 ratings
Sort To Tabs
11
4
5
7
6
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
192.133 KB
13 Jul, 2024 @ 2:07pm
29 Aug @ 1:51pm
12 Change Notes ( view )

Subscribe to download
Sort To Tabs

In 2 collections by nbk_redspy
Hotkeys and Click Reduction Pack
9 items
Oops! All QoL!
33 items
Description
Quasimorph Sort To Tabs


Docs

A mod to automatically move items to specific tabs using rules defined by the user.

For example, weapons to the first tab, ammo on the second, armor on the third, etc.

Press F5 to apply the move rules for the items on that tab. Press S to invoke the game's normal sort.

The rules and hotkeys can be changed in the configuration file. See the Configuration section below.

Default Rules

The default rules are:
Item
Destination Tab
Emergency case
1
Weapons
1
Placeable items (turrets, mines, etc.)
1
Grenades
1
Ammo
2
Armor
3
Medical and Food
4
Repair Items
5
Containers, robots, resources, barter items, quest items
6
All other items
1

Support

If you enjoy my mods and want to buy me a coffee, check out my Ko-Fi[ko-fi.com] page.
Thanks!

Configuration

Files

This mod supports the Mod Configuration Menu. Some of the values can be configured in the Mods folder, while others can only be changed in the config file.

The configuration file will be created on the first game run and can be found at %AppData%\..\LocalLow\Magnum Scriptum Ltd\Quasimorph_ModConfigs\QM_SortToTabs\QM_SortToTabs.json.

See the rules section below.

Shortcut Keys

The refresh and sort keys can be found in the config file. Valid keys can be found at the bottom of https://docs.unity3d.com/ScriptReference/KeyCode.html

Rules

The rules search for a match from top to bottom. First match wins.
The rules have the following optional parts: Id (ex: army_knife), Type (ex: ArmorRecord), SubType (ex: QuestItem), and Category (Tezctlan). Any blank values will not be used to match an item.

Any item that does not have a matching rule will not be moved.

Most rules will only need a single value such as Type or Id.

A rule with all blank values will match every item. This should be put at the end of the rules.

The data for every item is exported to DataExport.csv. See the Data section below for more info.

Example rules:
TabNumber
Id
Type
SubType
ItemClass
Category
Result
4
Alcohol
Moves all alcohol items to tab 4
5
Tezctlan
Moves all Tezctlan items to tab 5
1
army_knife
Moves all army knives to tab 1
2
WeaponRecord
Moves all weapons to tab 2
2
AmmoRecord
Moves all ammo to tab 2
7
QuestItem
Moves all Quest items to tab 7
6
(All Blank) moves all unmatched items to tab 6

Example Entry in the config file:
{ "TabNumber": 1, "AltTabNumber": 0, "ItemMatch": { "Id": "", "RecordType": "WeaponRecord", "SubType": "", "Category": "", "ItemClass": "" } },

Category Note

While items can have more than one category, the rule's Category property only supports one item.

Example from the DataExport.csv:
Id
Type
SubType
ItemClass
Categories
venus_knife_1
WeaponRecord
Weapon
Tezctlan XiomaraMasks

To match all Tezctlan and XiomaraMasks, there would need to be one rule for each. Using "Tezctlan XiomaraMasks" will not work.

Data

The mod will export all of the items' info to %AppData%\..\LocalLow\Magnum Scriptum Ltd\Quasimorph_ModConfigs\QM_SortToTabs\DataExport.csv.

Example data from DataExport.csv:
ItemName,Id,Type,SubType,ItemClass,Categories claw,common_knife_1,WeaponRecord,,Weapon,Military Police Common Medical Science CResistance UnchainedBelt SheduThousand Elite Knife,military_knife_1,WeaponRecord,,Weapon,Managment Military Police CResistance UnchainedBelt SheduThousand shiv,miner_knife_1,WeaponRecord,,Weapon,Miner Common Worker CResistance UnchainedBelt

The ItemName column is the item's name as displayed in the game, and is not use by the rules.
The Categories column contains one or more value and is separated by spaces.

Special Recycling Rules

If the ship a recycler and the recycler is not in use, the rules will treat the recycler as an eighth tab.

If a rule targets the eighth tab but the recycler is not available or in use, the rule will not move the item.
However, if the property AltTabNumber is set, that tab will be used as the target instead.

This allows a user to create a staging tab until the recycler is available. When the recycler is ready, running the sort on that tab will move the staged items to the recycler.

Example:
{ "TabNumber": 8, "AltTabNumber": 7, "ItemMatch": { "Id": "pmc_pistol", "RecordType": "", "SubType": "", "Category": "", "ItemClass": "" } },

Bad Config File

If the configuration has a loading issue (such as it being incorrectly formatted), the game will use the defaults.
There will be an error in the log player.log indicating this, but will not be obvious to users otherwise.

To recover, delete the config file and restart the game. A new config file with the defaults will be created.

Debugging

To assist with debugging the rules while running the game, the mod will reload the configuration any time the file is saved.

The config optionDebugLogMatches can be enabled to log which rule matched the item. This will write every item and the rule that matched that item to the game's Player.log.

The game's log can be found here %AppData%\..\LocalLow\Magnum Scriptum Ltd\Quasimorph\Player.log

Change Log

Due to Steam's Workshop description character limit, the change log can be found here[github.com]

Credits
  • Special thanks to Crynano for his excellent Mod Configuration Menu.
  • Thanks to GitHub user WiliamRogers1886 for providing an interim 0.8.5 patch.

Source Code

Source code is available on GitHub https://github.com/NBKRedSpy/QM_SortToTabs
Popular Discussions View All (4)
5
26 Jul @ 5:41pm
Adding a rule to the config file.
nbk_redspy
2
18 Aug @ 6:59pm
gog install
RiceTheCross
4
10 May @ 10:51am
Suggestion for tez items
Ragnaman
111 Comments
nbk_redspy  [author] 28 Sep @ 6:29am 
For the 0.9.6 opt in beta, please unsubscribe from this mod. The functionality is either now in the game, or is functionality very similar.

* Sort To Tabs Note: The game now supports mapping a tab to items. It is very similar to the Sort to Tabs mod. While it is less granular than STT (e.g. it cannot specify a specific item), it is close enough for the majority of users.

The compatibility info for all of my mods can be found here:
https://gist.github.com/NBKRedSpy/c48ca611b47e905158f972990f0ed83f
Quadbear 10 Sep @ 12:06pm 
Thanks a ton for this. I love this game but the inventory sorting was driving me nuts.
Kaz 28 Aug @ 3:15pm 
Then I'm not certain. I didn't change any mods up, it just started working, where it wasn't before. I wonder if the key simply wasn't bound but I also didn't change any keybinds.
nbk_redspy  [author] 28 Aug @ 11:28am 
The mod doesn't require an item to be hovered to invoke the "Sort To Tabs" functionality (F5 in your example). The user just needs to be on a screen with a storage tab.

If that is not your experience, try disabling other mods to see if there is a conflict.

If you continue to have issues, please create a discussion here or @ me on the game's official Discord server.

Thanks.
Kaz 28 Aug @ 11:20am 
I don't know why I had trouble getting this to work, but I had to hover over an item within the cargo hold to sort to tabs with F5. I was hovering over the tab itself and I don't know why I didn't try hovering an item sooner. Basically, I failed to realize that F5 = Sort Item to Storage. Hope this helps others.
Sanderin [PL] 14 Aug @ 6:59am 
good mod, very nice
nbk_redspy  [author] 12 Aug @ 6:27pm 
Not currently. I would like to keep this mod as simple as possible.
However, you can press S to sort the current tab.
Skrypt 12 Aug @ 5:21pm 
@nbk_redspy Is there a way to make items stack into existing stacks when the items are moved into their respective tabs?

Currently when I press the hotkey, it moves the items but never stacks them with any of the existing stacks that were already in that tab. So I end up with like 5 different partial stacks of that item that have to be manually combined.
Niric 6 Aug @ 2:52am 
Seems to be working with 0.9.5! Thank you, the 'press F5 to quick tab sort' is awesome! I've not tried customizing the default sort but I think the default is good as is!
nbk_redspy  [author] 25 Jul @ 12:40pm 
I'm glad you like the mod!

Steam has a character limit for comments, so I have to continue this in the Discussions tab:

https://gtm.steamproxy.vip/workshop/filedetails/discussion/3288631292/604162514919546094/