按重量/价值/价重比排序(Sort by weight/value/ratio)

If you liked this item, please rate it up on Steam Workshop page.

Author: JMC

Last revision: 3 Nov, 2025 at 04:03 UTC (3)

File size: 2.59 MB

On Steam Workshop

Description:

// Generated with the help of GPT

Sorting by Weight/Value/Value-to-Weight Ratio

1. Introduction

After playing the game for a while, I wanted to sort items by price or weight to make it easier to throw away junk. After waiting for several days without anyone creating this mod, I decided to make it myself.
GitHub Link [github.com]
Demo Video (Bilibili) (Old) [www.bilibili.com]
Demo Video (Bilibili) [www.bilibili.com]
Demo Video (YouTube)

2. Features
  • Added an extra row of sorting options below the “Sort” button in the backpack and stash, allowing sorting by Value, Weight, and Val/Weight.
    By default, Left-click sorts in descending order, and Right-click sorts in ascending order.
    You can change this behavior via a configurable parameter to swap the order directions.
  • The mod supports customizable visibility for buttons and texts.
    By default, the following are enabled: Sort by Price, Sort by Weight, Sort by Price/Weight Ratio buttons, and Item Price Text;
    and the following are disabled: Sort by Rarity, Sort by Unit Price, Sort by ID buttons, and Price/Weight Ratio Text.
    To customize, go to your save folder (not the game folder — the path can be found on the save selection screen), locate DuckSortConfig.json (launch the game once if it doesn’t exist; delete to reset defaults), and set the corresponding keys to true or false.
  • To change settings in-game, subscribe to and enable ModConfig, and place it above this mod (a restart is required the first time).
    Once enabled, you can modify the settings directly in-game.
3. Notes
  • This mod includes its own item price display, and when enabled together with other price display mods, duplicate prices may appear. In that case, disable this mod’s price display as described above.
  • Sort by Rarity uses the game’s built-in rarity system, similar to Colorful Fancy Items & Sounds.
  • Sort by Unit Price is mainly intended for players using infinite stack mods.
  • The localization texts (including buttons and README) for this mod, except for the Chinese language, were generated with the help of automatic translation. Contributions for text improvements are welcome. You can submit a PR or leave a comment. The Japanese translation was kindly provided by my friend さっちゃん.

4. Compatibility
  • This mod involves UI changes. Mods that heavily modify the UI may conflict with this one.
  • This mod uses the Harmony framework. Other mods that conflict with Harmony might cause issues with this mod.
  • This mod heavily relies on reflection, so it may become incompatible after future game updates.

5. TODO
  • The UI is quite basic at the moment and may be improved in the future.
  • Currently, the mod sorts in descending order by default. I may add an ascending/descending toggle button in the future. ✔️
  • A configuration menu may be added to quickly enable/disable certain features. ✔️
  • The code is a bit rough at the moment and will likely be optimized in the future. ✔️
  • The sorting seems a bit slow, and I will look into performance optimization later. ✔️

6. Others

If you have any feedback or suggestions, feel free to leave a comment in the discussion section or open an issue on GitHub.
You can view the changelog by clicking " Change Notes ( view ) " in the upper-right corner.

If you like this Mod, please consider giving it a thumbs-up!

You may use my code, but at least let me know in the comments and credit this mod’s Workshop page in your description.

Download
Required items:

Click the title to search on this site.


JmcModLibSteam Workshop
ModConfigSteam Workshop
Revisions:

Old revisions of this mod are available below. Click the link to download.