Page 1 of 1

Scale recipe cost+output when crafting speed exceeds 1 craft per tick

Posted: Tue Jan 16, 2024 4:23 pm
by BLucky
TL;DR
Make multiple crafts' worth of products in a single tick if the crafting speed exceeds 1 craft per tick

What ?
Right now, if you have a high crafting speed (beacons/modded entities/etc), the rate at which crafts complete is 1 time per tick. There are recipe compression mods that address that, but it's manual, clutters the recipe list, increases load time, and those mods may not be compatible with other mods. My idea is to calculate the speed at which one craft would complete (which is being done already), and if it's less than 1 tick, scale the recipe's cost and yield by the excess speed, with the scaling factor probably rounded towards zero to not deal with fractional outputs/inputs.
Why ?
This would improve UPS by letting fast crafters do cheap recipes in bulk, reducing the amount of entities in the world, especially in megabases with beaconed crafters and modded bases with modded crafters that are potentially faster. This shouldn't incur a performance hit since the scaling factor can be saved and only recalculated on crafting speed/recipe change, and it most probably either too much work to add

Re: Scale recipe cost+output when crafting speed exceeds 1 craft per tick

Posted: Tue Jan 16, 2024 5:30 pm
by Rseding91
As part of work on 2.0/Space Age we ran into the "> 1 crafts per tick" limit in base game and re-worked crafting machines so they are able to handle it correctly.

So this idea will be obsolete when 2.0/Space Age is released and > 1 crafts per tick "just works".

Re: Scale recipe cost+output when crafting speed exceeds 1 craft per tick

Posted: Tue Jan 16, 2024 9:11 pm
by Koub
[Koub] OK I'll move this to Implemented for 2.0 then.