Adjustable Recycler


Let you set what percentage of the items recycler return upon recycling process. It does not change the probabilities of items from scrap, only the low level ingredients that does not return lower ones (like plates, plastic etc.)

Tweaks
3 months ago
2.0
191
Manufacturing Cheats

g Change later ingame

4 months ago

When I change the % far after I "started" the run it does not work.
Can I somehow change it during a run (maybe xml stuff editing etc.)?

4 months ago
(updated 4 months ago)

I looked through the code.

There seems to be no "result.probability"

recipe.results looks e.g. like this

{
[1] = {
[type] = item,
[name] = advanced-circuit,
[amount] = 1.25,
[extra_count_fraction] = 0.25,
},
[2] = {
[type] = item,
[name] = electronic-circuit,
[amount] = 1.25,
[extra_count_fraction] = 0.25,
},
}

4 months ago
(updated 4 months ago)

DELETED

4 months ago
(updated 4 months ago)

DELETED

4 months ago

I tested around with normal and recycling recipes.

"amount" IS the discrete amount of items gained back.
But its often fractioned and influenced by "extra_count_fraction"

4 months ago

This seems to finally work for me:

for _, recipe in pairs(data.raw.recipe) do

if recipe.category == "recycling" and recipe.results then

    local orig_recipe = data.raw.recipe[recipe.ingredients[1].name]
    if orig_recipe then

        recipe.results = orig_recipe.ingredients

        for _, result in pairs(recipe.results) do
            result.amount = result.amount * return_rate
            result['extra_count_fraction'] = 0
        end
    end
end

end

3 months ago

For me the mod works like intended. It does not change any probabilities of the items alone. Just the probability of the item be received back.

The items that you get from scrap or are recycled (like red chips) have their own probability if there are multiple items received. If there is only 1 item, then the % in the settings mean what is the probability of getting that item.

In the base game if you want 1 iron plate back from recycler using iron plates, you need 4 of them. Basically that is that 25% probability.
With this settings you can change this probability.

It's in the description that this works only for the low low basic items that you can get scrapped like this in vanilla.
And because it is changed when you start the game. It is changed in the entity itself therefore it works even when you are in already created save even before you downloaded the mod itself.

New response