Crafting Combinator Xeraph's Fork

by Xeraph

Includes combinators that allow you to set or read the recipe of any crafting machine, get ingredients or products of a recipe and more!

Content
1 year, 2 months ago
1.1
6.08K
Circuit network Manufacturing

b crash

3 months ago
(updated 3 months ago)

I don't have a reproduction for you because this my combinator work :(

The mod Crafting Combinator Xeraph's Fork (0.4.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event crafting_combinator_xeraph::on_tick (ID 0)
Value (inf) outside of range. The data type allows values from -2147483648 to 2147483647 in property tree at ROOT[17].count
stack traceback:
    [C]: in function '__newindex'
    __crafting_combinator_xeraph__/script/rc.lua:200: in function 'find_recipe'
    __crafting_combinator_xeraph__/script/rc.lua:147: in function 'update'
    __crafting_combinator_xeraph__/control.lua:300: in function 'run_update'
    __crafting_combinator_xeraph__/control.lua:356: in function <__crafting_combinator_xeraph__/control.lua:304>
3 months ago
(updated 3 months ago)

we have it again. each time when i disconnected a wire that was upstream of some recipe combinator. i didn't think what i was doing would even affect the inputs to the recipe combinator, this time, though :(

it's not like i'm doing anything unusual, just calculating space exploration space science input chains. no alphabet combinators, no signals that would crash paste signals like in https://mods.factorio.com/mod/PasteSignals/discussion/657f9bc9b8d1685ebac27261

~  diff error_a error_b
5c5
< Value (inf) outside of range. The data type allows values from -2147483648 to 2147483647 in property tree at ROOT[17].count
---
> Value (inf) outside of range. The data type allows values from -2147483648 to 2147483647 in property tree at ROOT[0].count
3 months ago

ROOT[30].count
:(

3 months ago

it keep doing :c bringing unhappiness

i have a save now that will consistently crash about 60 ticks after i load it. i can upload it, if you want? it's like 60mb and has moderately many mods

2 months ago
(updated 2 months ago)

this one brain cell realized it's dividing by zero. if a recipe produces 0-5 items, divide results by product/ingredient count breaks this section of code

https://lua-api.factorio.com/latest/concepts.html#Product claims that amount_min has no effect if amount is specified, uh...

in any case, whether this mod works accurately on amount ranges or not, you can at least stop it from crashing by replacing round(count/result.amount) with ( result.amount == 0 and 1001001 or round(count/result.amount) ) in rc.lua

yeah using a 1001001 multiplier as an error code is sludge

New response