Ingredient_Scrap

by yokmp

Adds scrap results and amounts depending on the recipes ingredient types.

Content
2 months ago
0.18 - 1.1
296
Manufacturing
Owner:
yokmp
Source:
https://github.com/Yokmp/Ingredient_Scrap
Homepage:
https://github.com/Yokmp/Ingredient_Scrap
License:
MIT
Created:
3 years ago
Latest Version:
1.1.10 (2 years ago)
Factorio version:
0.18 - 1.1
Downloaded by:
296 users

1.1.10 - fluids are now handled separately; adios infinite resources
1.1.8 - adds in a new setting about calculating your precious scrap results: * The new setting for the probability calculation allows you to specify how your set percentage is used. The new method "clamps" the results based on your probability setting.

1.1.7 - things happened: * You can now set the calculation method to like it was previously or set it so that the amount of scrap is based on the added ingredient amounts instead of their count. * Also there is a blacklist setting in which you can enter a comma separated list of scrap-names which recycle recipes you want to have unlocked at game start. * SeaBlock is partially supported. There are some recipes left wich don't generate scrap.

A small Mod that adds scrap results and amounts based on the recipes ingredient type.

eg:

a Gun Turret needs

  • 10 iron-gear-wheel
  • 10 copper-plate
  • 20 iron-plate

1: by counting ingredients:

1 copper-scrap and 1-2 iron-scrap are added as results (*probability).

2: by adding ingredient amounts:

1-10 copper-scrap and 1-30 iron-scrap are added as results (*probability).

new 1.1.8 setting:

0-4 copper-scrap and 4-10 iron-scrap are added as results (if used with option 2).
24% copper-scrap and 48% iron-scrap are added as results (id used with option 1).

Note:

5 (or whatever amount you set in your mod settings) scrap items are needed to produce 1 basic item of that type:
eg.: 5 iron-scrap to 1 iron-plate.
You should adjust that number according to your result settings so you don't end up negating costs of recipes (or doing the opposite).


How it basically works:

The mod looks through all recipes and checks the ingredient names against a list of strings with possible scrap types.
If it finds a recipe like the Gun Turret it will match iron with iron-plate and iron-gear-wheel and adds 1-2 iron-scrap as a result and
the same happens with the copper-plate, 1 copper-scrap is added as a result. The amount depends on your settings as stated above.

This means that bobs cobalt-steel needs to be checked first and then cobalt itself. Keep that in mind if you want to alter the mod.
(When you unzip the mod and look into mods.lua; youll find some code which helps you to patch things to your likings.
Also, there are 9 different scrap colors with 3 variations each so you have a total of 27 scrap icons to use.)


Currently tested:

Krastorio 2
Bobplates
Industrial Revolution 2
Lead
Titanium
Tungsten
angelssmelting (it seems to work correctly but haven't played it yet)
SeaBlock

Other Mods should work too. If they introduce a material which isn't found then please let me know.