Stack Size Fixed


Fixed/Updated version of 'Stack Size' by OpenBulochka. Change items' stack sizes, now with a multiplier and custom formula parsing.

Tweaks
8 days ago
2.0 - 2.1
216
Storage Cheats
Owner:
Factory077
Source:
https://github.com/J0ss077/StackSizeF...
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
1.1.4 (8 days ago)
Factorio version:
2.0 - 2.1
Downloaded by:
216 users

small considerably big upgrade for OpenBulochka's mod: Stack Size.

options

  • multiplier: multiply all stack sizes.
  • specific stack size: set a specific stack size for ALL items.
  • force stacking: force ALL items to be stackable.
  • custom formula: use a custom formula to calculate stack sizes (check guide below).

custom formula

if desired, you can use your own custom formula. the supported functions are:

  • unary operators: -a
  • binary operators: (a + b), (a - b), (a * b), (a / b)
  • trigonometric functions: sin(a), cos(a), tan(a), asin(a), acos(a), atan(a)
  • rounding functions: floor(a), ceil(a)
  • other functions: abs(a), sqrt(a), log(a), log10(a), exp(a), rad(a), deg(a)

formula examples

  • simple: x + 5 >> with x = 2, result 7.
  • medium: sin(x) * 2 + sqrt(x) >> with x = 4, result ≈ 0.49, final value of 1.
  • complex: sqrt(x^2 + 1) - cos(x) * 3 >> with x = 3, result ≈ 6.13, final value of 6.

Note: the formula SHOULD always use the variable x (current/old stack size of each item). without it, the size will be the same for all stacks.
Note: the final value will get its decimal part removed (the floor() operation), and won't be less than 1.

credits

original codes for the parsing logic made by ByteXenon. check the GitHub here.