-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per-tile item limit too low. #20483
Comments
Doubling to 8K isn't too problematic, but an option is right out, there's
no reason to clutter every users option menu as a workaround for one
misbehaving mod.
|
What's the reasoning behind the max? Avoiding a buffer limit somewhere? |
Items on a square are stored on a std::list (to avoid reference invalidation), if that list is allowed to grow without bound, the game can encounter severe performance issues as all operations that want to find items on the map must scan the entire list. Instead they are bumped to an adjacent square, which doesn't fix the problem per se, but it at least evens it out a bit. Unless you construct a pathological case for the map by either rounding up thousands of tiny objects (even then, a pile of 4,000 2-3 mL objects would easily overflow a tile) or removing the volume limit on a square (as blazemod does with the cargo dimension), it is impossible to hit this limit, you'll hit the volume limit for the tile instead. |
BTW, where is the item limit lurking in the code? |
game_constants.h
|
The current per-tile item limit is 4096. It's rarely achieved during normal gameplay (unless one drops a lot of 0.01 volume items on a tile), but it becomes a real nuisance when using cargo dimension (in blazemod). I suggest raising it to e.g 8192 or higher. Or make a mod named "More items per tile - 8192" and so forth until "More items per tile - 1 048 576". It's just supposed to be a power of two.
The text was updated successfully, but these errors were encountered: