Quality condenser

by Quezler

A recycler that returns the items themselves but a quality higher, success depends on quality modules.

Content
10 days ago
2.0
2.38K
Factorio: Space Age Icon Space Age Mod
Mining Manufacturing Storage

b Crash on overflow

2 months ago

When the quality condenser produces extra items, if there is no room for them, it crashes with the following error:

Error while running event quality-condenser::on_object_destroyed (ID 170)
quality-condenser/scripts/condense.lua:75: assertion failed!
stack traceback:
[C]: in function 'assert'
quality-condenser/scripts/condense.lua:75: in function 'trigger'
quality-condenser/control.lua:250: in function '?'
quality-condenser/control.lua:278: in function <quality-condenser/control.lua:275>

2 months ago

odd i had code in there that should have prevented it in theory, please give me an autosave that 100% crashes after loading it, ideally with a video too.

2 months ago
(updated 2 months ago)

Can't get it to happen without mods, since quality doesn't exceed 100%, but got it to happen five times now out of six attempts (one didn't hit 100%+ quality, so no extra items) Not sure how to get a save file to you, but https://mods.factorio.com/mod/reworked_quality can get above 100% quality and crash. I used six level 2 quality mods. Doesn't matter if you have a single type of item or multiple types.

Edit: of course I'm a dumbass and forget I can share via dropbox. Save: https://www.dropbox.com/scl/fi/tzz586vyrgc19f1pzpuq0/Quality-Condenser-Crash.zip?rlkey=ici7yd2cyft5bfxggnowzao89&st=cttqrgdq&dl=0

2 months ago

how many second after loading this autosave does it crash? either way I'll be able to whip up a fix in about 10 ish hours

2 months ago

Not sure, condenser is partway through the process, and it crashes as soon as it finishes. It shouldn't take long though. And that is pretty quick for a fix, thanks.

Also, unrelated to this topic, big fan of a ton of your mods, thanks for all the hard work you've put in.

2 months ago
(updated 2 months ago)

thanks for that wonderful minimalistic save, the crash with a quality percentage above 100% is now fixed.

edit: which of my mods do you like the most? curious :)

2 months ago

Glad you liked the small save. And one small question - would it be possible to have a setting to prevent creating new items? I like being able to pump it up with mods, but I dislike the item generation, so I've been trying to juggle module levels and qualities to get as close to 100% as possible. Would be much easier to just slap in a full set and not care.

For favorite of your mods, either this one, K2 air purifier helper, or underground heat pipes, though I like probably 20 or more of them, lots of QoL for SE back when I was playing it.

2 months ago

the "bonus items" kinda work both ways, they can both round up your item value and round down, take for example:

300 * 0.125 (12.5%) = 37.5, those 300 items would be worth 37 and a half items, so there's a 50% chance you get "only" 37 items, or boosted to 38 items,
ofc if you had 600 items you'd land on 75 which is a round number.

one way the mod "could have worked" is counting up, like 8 * 0.125 = 1 item, then the mod could just wait until a full number got reached, but what if you had 9 input items and the inventory is full, there'd be no space and it would be annoying to halt the machine or spill items on the ground.

or what if the input ratio of items to the quality percentage never even hits a full number? there are a lot of edge cases to consider.

so in the end for my own sanity i choose to just use the remainder as a chance to round up or down, its not exactly creating new items its just that the decimal point becomes the chance aspect, like quality kinda inheritly is.

i "could" store the remaining fractions as script data but that would just be a little nightmare and also unfair if you were to deconstruct it whilst there were still some percentage points inside.

if you have any clever ideas or things that come to mind you're free to voice them, whilst i could add an option to "never round up" (thus giving you a net loss) i don't really think that would be a sensible approach, ofc to get the lowest chance of the randomness making an impact its best to stuff the machine full of a single item and a single quality since the more items get inputted the higher the base guarantee and the least amount of random influwence.

oh yes i made a lot of space exploration addons and i look forward to porting some of them, k2 might very soon be on the horizon so that's one that will get a port for sure.

2 months ago

I've been pretty braindead for the last several years, so I'm afraid I can't come up with anything clever. If it is annoying to do, no big deal.

Glad to hear K2 might be returning soon, it had some pretty neat stuff in it. Maybe in a year I'll finish my first space age playthrough and consider adding a larger mod to it, I'm sure it'll be done by then.

a month ago

I am getting a new crash with 1.0.4
Here is the save. It sometimes happens 10 seconds in or it take a couple minutes at most to happen. (condensing science packs)
is it possible to put locks slots like the cargo wagon has? (though I do no know if it would help in this case or how)

https://www.dropbox.com/scl/fi/8kk0kfi72yh3mnspj8l7h/Crashing-Quality.zip?rlkey=h1os0jjb3t9o8fkjrbx4cbs71&st=w04g1yxj&dl=0

The mod Quality condenser (1.0.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event quality-condenser::on_object_destroyed (ID 170)
quality-condenser/scripts/condense.lua:75:assertion failed!
stack traceback:
[C]: in function 'assert'
quality-condenser/scripts/condense.lua:75: in function 'trigger'
quality-condenser/control.lua:312: in function '?'
--quality-condenser__/control.lua:340: in function
<quality-condenser/control.lua:337>

a month ago

Thanks for the bug report, whilst i'm not exactly sure what the exact conditions were (it felt random and there were a lot of different items) your world seems to not crash if i merge the stacks (like the player inventory and hubs do), so do try 1.0.5.

Also, i see you're using a speed beacon, note that this lowers the quality by 10.7%.

a month ago

And no, locking slots will break the entire logic that i currently have in place, and i do not plan to rewrite the machine to take them into account.

New response