Skip to content

update for 2.1#179

Open
protocol-1903 wants to merge 3 commits into
mainfrom
2.1-prep
Open

update for 2.1#179
protocol-1903 wants to merge 3 commits into
mainfrom
2.1-prep

Conversation

@protocol-1903

Copy link
Copy Markdown
Contributor
  • Updated to Factorio 2.1
  • Removed RECIPE.change_category, added add_category, remove_category, replace_category, has_category, and has_categories
  • Updated annotations for emmylua integration
  • Updated py.farm_speed and py.farm_speed_derived to use 0-indexed module slots with a building at native -100% speed
  • Updated certain tests for new prototype properties
  • Updated global checker
  • Updated py.pipe_pictures to load graphics definitions directly from base instead of inferring them, allowing more to be used
  • Fixed a potential crash when no tools are defined

@AverageCoder777

AverageCoder777 commented Jun 30, 2026

Copy link
Copy Markdown

return desired_speed / (num_slots / module_bonus) / module_bonus in lib/data_stages.lua:154 are incorrect.

For yotoi: farm_speed(33, 1.3, 0,3) equals 1.3 / (33/0.3)/0.3 = 1.3/110/0.3 = 0.039 base speed
0.039 * 9.9 from modules = 0.3861 final speed instead 1.3
I don't know why there's such a complicated formula here when you can just use desired speed / (num_slots * module_bonus) and that's it.
With this formula we get: 1.3/9.9 = 0.13(13), 0.13(13)*9.9 = 1.3
A very simple reversal of the original calculation formula

Default formula
image

Modified formula
image

This problem didn't exist in the master branch for version 2.0. I noticed this glitch at 2.1 because my aloe production dropped by a factor of 4, and I started running out of it for cellulose.

@protocol-1903

Copy link
Copy Markdown
Contributor Author

return desired_speed / (num_slots / module_bonus) / module_bonus in lib/data_stages.lua:154 are incorrect.

For yotoi: farm_speed(33, 1.3, 0,3) equals 1.3 / (33/0.3)/0.3 = 1.3/110/0.3 = 0.039 base speed
0.039 * 9.9 from modules = 0.3861 final speed instead 1.3
I don't know why there's such a complicated formula here when you can just use desired speed / (num_slots * module_bonus) and that's it.
With this formula we get: 1.3/9.9 = 0.13(13), 0.13(13)*9.9 = 1.3
A very simple reversal of the original calculation formula

Default formula
image

Modified formula
image

This problem didn't exist in the master branch for version 2.0. I noticed this glitch at 2.1 because my aloe production dropped by a factor of 4, and I started running out of it for cellulose.

Gonna hold off on that for now, I'm looking into a minor rebalance of AL module scaling anyway so numbers and things are subject to change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants