RimWorld

RimWorld

27 ratings
Stack By Weight
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.6
File Size
Posted
Updated
1.033 MB
11 Aug @ 4:56am
10 Sep @ 7:12am
5 Change Notes ( view )

Subscribe to download
Stack By Weight

Description
Stack By Weight - Define Your Stockpiles by Mass!

Ever wondered why a single tile can hold 75 chunks of heavy steel, yet also only 500 flakes of light gold?

Now, reshape your stockpiles with a unified standard of weight! This mod overhauls the vanilla stacking mechanics, replacing the rigid, fixed stack sizes with a more realistic and powerful system based on total weight.

Core Features
  • Stack by Mass: All item stack limits are calculated once at game startup, using the formula: "Max Weight per Tile / Item's Base Mass".

  • Fully Customizable: In the mod settings, freely define the "Max Weight per Tile" for your colony using a slider or a precise input field (default: 1000kg).

  • Smart UI: The settings menu provides a dynamic preview, showing you in real-time how many of a common resource you can stack with your current settings.

  • Override Rules:
    • Set custom stack limits for specific items to override the global weight rule.
    • Supports wildcard `*` matching (powered by regular expressions), allowing you to manage multiple items with a single rule like `*component*`!

  • Convenient List Management:
    • Adjust rule priority with intuitive drag-and-drop.
    • A one-click "Remove All" button with a confirmation dialog to prevent accidents.

Lightweight & Compatible
  • Zero Performance Impact: One-time calculation at startup with no running scripts, resulting in zero impact on game performance (TPS).

  • High Compatibility: No Harmony patches are used, which maximizes compatibility and reduces potential conflicts.

  • Standard Load Order: Follows standard load order behavior, playing nicely with other stacking mods (the last one loaded takes precedence).

How to Report Bugs
Please report any bugs in the "Discussions" tab. Be sure to include the following:
1. A link to your HugsLib log. 2. Detailed steps to reproduce the bug. 3. A list of any other relevant mods, if applicable.
A log is essential, otherwise I have no psychic powers to fix the bug.

Developer's Note
This mod was made with me providing the feature requests and testing feedback, while collaborating with Gemini on the programming. Therefore, finding any bugs is completely normal.

The current logic is not yet perfect, but using the "Lightweight Balancer" and "Custom Rules" should be sufficient for now. The next update is planned for October. Adjusting the UI takes too much time.

Update Log
07/09/25 - v3.2.8:
  • Added a "Lightweight Balancer" that can change the stack limit for an entire category of items. The calculation logic is: Stack limit of the selected item category / Weight calculation multiplier. The smart preset logic selects items with a weight below 0.25kg.
  • Optimized "Custom Rules" by adding a category option. The list within it references the category list in the game's storage zones.
  • Optimized UI.

13/08/25 - v1.7.2:
  • Fixed a sorting issue with the override rules.
  • Refactored code to optimize performance and logic.

12/08/25 - v1.6.2:
  • Added override rules to allow items to be divided into smaller stacks.
21 Comments
绝命神区  [author] 25 Oct @ 4:16am 
@ゆきんこ
一般是按照重量调整上限,自定义上限最高是999999
ゆきんこ 25 Oct @ 3:36am 
上限不能更高了嗎
绝命神区  [author] 25 Oct @ 2:54am 
@angel20015alejandro

No, this mod changes the stack limit of the items themselves, not the shelves.

You can use the "Overrides" tab in the mod settings to set any specific item's stack limit to 75. To change how shelves work, you would need a different mod.
angel20015alejandro 24 Oct @ 6:41pm 
Question, is there a way to for example make a small shelf only store the default stack of 75?
LS_Naix 7 Sep @ 2:53pm 
好好好:steamhappy::steamhappy:
绝命神区  [author] 7 Sep @ 8:17am 
@LS_Naix 已经添加这个功能了
绝命神区  [author] 1 Sep @ 8:15am 
@LS_Naix 下个更新添加这个功能,不过最近在忙别的,尽量在十月前搞出来吧
LS_Naix 31 Aug @ 1:39am 
@Ta 没法按照分类匹配吗?MOD金属的很多材料都没有重复的字...
绝命神区  [author] 30 Aug @ 9:36pm 
@LS_Naix 其实是有通配符的,输入*肉*,就可以一键将名字内含肉的物品的堆叠上限修改
LS_Naix 30 Aug @ 3:32pm 
自定义规则可否一个增加按照物品分类的通配符?金属这类高重量的一格堆不了多少,但是皮肉这种低重量的又堆太多了