Dear Wube,
It looks like the recycling time for an item is meant to be 16 times faster than the recipe craft time for that item (in practice, 8 times faster when taking the recycler 0.5 crafting speed into account). This is the case all items except the ones that have a recipe craft time of 0.5 seconds. Currently these items are recycled as if they have a 1 second craft time (they are recycled at a rate of 8 items/second).
From the lua code, it looks like recipes without a "energy_required" specified are defaulted to 0.5 seconds in most of the game, but in the Recycler code if "energy_required" is not present it defaults to 1 second. I'm assuming this was mainly meant for items that don't have a primary crafting recipe, like Ice cubes, but it has the effect of making these 0.5 second craft time items have an inconsistent recycling time to items that take longer to craft.
Apologies if this is not a bug and is intended for game balance.
Thanks,
PFR
[2.0.13] Recycling speed formula inconsistent between items
Re: [2.0.13] Recycling speed formula inconsistent between items
Hi thank you for the bug report, but would you mind to elaborate? Both ice cubes and iron gear wheels do seem to have energy_required in 1/16th which seems go go in line with other items?
- Stringweasel
- Filter Inserter
- Posts: 393
- Joined: Thu Apr 27, 2017 8:22 pm
- Contact:
Re: [2.0.13] Recycling speed formula inconsistent between items
In `quality/prototypes/recycling.lua:216` this line is incorrectly assuming the default value of energy_required is 1, while it's actually 0.5. This can explain what pfr is seeing.
I didn't verify in-game though, the code just seems suspicious.
Code: Select all
energy_required = (data.raw.recipe[item.name] and data.raw.recipe[item.name].energy_required or 1 )/16,
Alt-F4 Author | Factorio Modder
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock |Weasel's Demolition Derby
Official Contributor to Space Exploration
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock |
Official Contributor to Space Exploration
Re: [2.0.13] Recycling speed formula inconsistent between items
This is slightly breaking but i think it is an acceptable type of deal to avoid weird recycling time changes when a mod would set energy_required to default value, not expecting this to have any effects.
Fixed for 2.0.15.
Fixed for 2.0.15.