Adds three new Crusher variants which can select their recipes automatically. No more need to filter asteroid chunk belts.
Small changes concerning balance, gameplay, or graphics.
Furnaces, assembling machines, production chains.
Hello it's beed quite a while since I last used this mod.
After a long break I came back to Factorio and noticed that basegame crusher is missing vanilla basic and advanced crushing recipes while keeping modded ones and vanilla reprocessing.
I am confused as to why base game crusher is even modified since you added your own structures.
While chacking debug tags I noticed that recipes with crushing and asteroid-processing work but asteroid-crushing and advanced-asteroid-crushing did not get added.
I've tested it with mods and modded recipes regardles if they are advanced or not all have "crushing" tag and are added to the crusher but with or without other mods crushers only have reprocessing recipes and your "crushing" tag recipes but since vanilla ones are not modified they don't get added?.
Is there any chance you could fix this? I've tried without succes and don't know how long it will take me to find a workaround.
"Solved?"
I removed your recipe category reasigning for basic and advanced crushing and it resolved the issue for me however I still only use crusher reprocessor and suspect that this improvised "fix" breaks your other machines since they take recipes only with your tags
I don't quite follow what the issue is. I checked the mod on my side and it seems to assign recipes correctly. The Vanilla Crusher has access to all recipes, while modded Crushers have access to only their assigned ones.
The reason I'm modifying the Vanilla Crusher is due to how the game handles crafting categories. Recipes only have one category, but crafting machines can have multiple. For this reason, I'm adding my own custom categories (asteroid-crushing, advanced-asteroid-crushing, asteroid-processing) and reassigning existing "crushing" recipes to them, then simply adding all of those categories to the Crusher. That way, the Crusher can craft all of the various recipes, but each of my custom Crushers can only craft one.
Hmm... Although having said that, I notice an issue. I check for mod settings to see if you have each recipe category enabled when creating the various Automated Crushers, but I DON'T check for mod settings when reassigning recipe categories. So if you have any of the Automated Crushers disabled, their recipes will still be assigned to them but the Crusher won't be set to craft them. Have you changed mod settings? That might be causing it. I'll see about changing the internal structure to account for that.
edit
Yup, mod settings are the issue. Working on a fix.
Fixed in 1.0.4. Recipe category reassignment now properly checks for Mod Settings. If an Automated Crusher variant is disabled, then its associated recipes will no longer have their category reassigned.
Also, I checked previous discussions. I remember you :) You asked for options to disable some of the Crushers, which makes sense that you'd be using only the Preprocessor. Somewhere along the line, someone else asked for support for modded Crushing recipes, and I apparently screwed up implementing it. Thanks for the catch.
I didn't even consider that to be the issue. I'm glad it was that simple and not a massive rewrite.
However unless you specificly designate what mods get integrated than I'm afraid automatic mod integration doesn't work for your crushers. I didn't notice that because Spaceblock doesn't add reprocessing recipes. Both fully custom and modified vanilla recipes aren't added to your crushers no idea about reprocessing tho.
Both fully custom and modified vanilla recipes aren't added to your crushers no idea about reprocessing tho.
That depends on what those recipes are called. There's no reliable way to determine which recipe should go where except for their names. Right now, "crushing" recipes get sorted by whether they have "advanced" in their name, of not whether they have "crushing" in their name, and if not whether they have "reprocessing" in their name. That covers stuff from More Asteroids and the like, as those use vanilla-standard naming conventions. Modded recipes with different names probably won't work.
As to why modified vanilla recipes might not show up... that I'm not sure about. I tweak recipe categories at data-updates in order to let mods further tweak them at data-final-fixes - stuff like removing productivity restrictions. Although since I'm only changing one category, I could move that to data-final-fixes and hope it catches a few more mods which add their recipes at the data-updates tag.
If all else fails, I can add a manual whitelist. Can you give me examples of modded/tweaked recipes which don't show up in Automated Crushers? I'll experiment further as time permits.
edit
Suppose I could separate recipes by ingredients and results. Crushing recipes return their own input and one non-asteroid item, advanced crushing recipes return their own input and more than one non-asteroid item, reprocessing recipes return just asteroid items (including their input). That would involve creating a list of asteroid items, which I'm not sure how to do. Might be a bit more robust than going off of name alone, though it might not account for more complex recipes. I actually don't know if I ever did anything about some of the more advanced modded recipes requiring fluids.
Keep me posted, I'm not opposed to working on this further. No such thing as too many comments :)
You could separate them by one/more products instead of name.
However for example from Spaceblock "Alien/Stony/Scrap/etc. asteroid crushing" has recipe category set to "crushing" same for advanced versions. My guess is that it gets overriten. The modification path of a modifed vanilla recipe is "Space Age>Spaceblock>Automated Crushers>Spaceblock" and for modded chunk recipes is "Spaceblock>Automated Crushers>Spaceblock"
Here is an example recipe for scrap basic crushing
{
type = "recipe",
name = "scrap-asteroid-crushing",
enabled = true,
icon = "yunrus-space-block/graphics/icons/scrap-asteroid-crushing.png",
category = "crushing",
subgroup="space-crushing",
energy_required = 2,
ingredients = {{type="item", name="scrap-asteroid-chunk", amount=1}},
results = {
{type="item", name="scrap", amount=40},
{type = "item", name = "scrap-asteroid-chunk", amount = 1, probability = 0.2}
}
},
And here is modification to vanilla basic metalic
{
type = "recipe",
name = "metallic-asteroid-crushing",
icon = "space-age/graphics/icons/metallic-asteroid-crushing.png",
category = "crushing",
subgroup="space-crushing",
order = "b-a-a",
auto_recycle = false,
enabled = false,
ingredients =
{
{type = "item", name = "metallic-asteroid-chunk", amount = 1},
},
energy_required = 2,
results =
{
{type = "item", name = "raw-metals", amount = 5},
{type = "item", name = "metallic-asteroid-chunk", amount = 1, probability = 0.2}
},
allow_productivity = true,
allow_decomposition = false
},
I don't yet know what would cause this patch war between mods
If you are interested in figuring this out here is the link to Spaceblock since there are many mods with similar names https://mods.factorio.com/mod/yunrus-space-block
I figured it out. For whatever reason, yunrus-space-block (the mod you linked me to) runs its recipe creation script twice - once at the data stage, once at data-updates. My mod successfully catches the modified and new recipes from yunrus-space-block, but then yunrus-space-block just re-defines them a second time. If you want, I can solve this on my end by adding a soft/optional dependency. My recipe changes happen at the data-updates stage, so the dependency will ensure I change recipe categories AFTER they have been re-defined.
However, a proper fix would be for yunrus-space-block to not define recipes twice. There's really no reason to create recipes during data-updates, as they're defined raw - without trying to account for changes which other mods might have made. I recommend leaving a comment on the yunrus-space-block to let the mod author know. My guess is that this is an oversight. If the author did what I do (which is copy-paste Lua files and then edit them with new contents), then it's possible a couple of lines were left over from data into data-updates. Specifically, the following two:
require("prototypes.technology-updates")
require("prototypes.recipe")
On lines 157 and 158 of data-updates.lua. Removing those two lines from yunrus-space-block fixes the compatibility issue. In general, redefining entire recipes is poor form if you're only changing a few aspects. However, if you have to do full overwrites, then doing so at the data stage is preferable, since that's when data is supposed to be created. data-updates is for mods making changes to other mods.
edit
Having said all that: let me know if you have more examples and I'll look into them too :)
I informed mod creator of the issue.
Currently I don't have any more examples of mod conflicts of this nature. That was the only mod I ever used that added or changed asteroid recipes.
A while ago I came across a mod called "Asteroid Stone crushing" it also doesn't work with your mod but that is due to recipe names, added recipes contain "crush" instead of "crushing"
Yeah, I'll see when I want to do a more substantive redesign of recipe category allocation :) Should help alleviate some of that. You can actually help me in this regard, by the way. Do you know of a good set of rules to distinguish Basic/Advanced/Reprocessing recipe, for mods which may potentially want to add a fluid ingredient or do some weirder stuff. I've not looked at a lot of asteroid mods so I'm not sure.
The difficulty is not in what was already made but what can be made. Often great ideas are glanced over until someone proves their worth in practice.
TLDR:It is hard to predict what a modder will do if they have no idea what they want or are doing. Or even worse if they want to be too original.
I think starting by separating recipes in three categories will be a good foundation: single output, muliple outputs, output of a different chunk. All of them exclude chunk self retun only in name as it is optional but not manditory component of a recipe.
All of those categories have their own weaknesses if someone decides to be fancy or simply uses a wrong variation of a word. But those edge cases will have to be adressed as they pop up.
For example "Crush" instead of cruching, you could look for a sequence of letters since I don't expect it used anywhere else altho that recipe would warant a new crusher or being ignored nice it is a multiple of a vanilla chunk recipe thus breaking the rule of one recipe per item per machine.(New category "duplicates" that add multiple recipes for the same chunk)
Other issue are, as mentioned ,liquids due to compatibility reasons i don't think anyone would be reacless enought to modify vanilla crushers with pipe connections and they'd add a new crusher instead. If you locate a liquid involved you could push it into a new machine or add pipes to yours a good way to decide would be checking is that recipe is made in the crushier or a new structure.(New category "Fuild recipes"+possibly new building "hydro crusher")
There are three "good" ways to deal with all the unknowns: Dig through mods either manualy or with a script, Find a way to ask a lot of players for ideas on crusher recipes and their experience with modded crushing, Wait for something to break. I'd take the easy way out of this one. Do ingridient/product based recognition and than either wait for chaos or make a mod with weird crushing ideas like extra fluid input, fluid output, two inputs, more than two recipes per chunk and many more just to see what and how breaks.
You should also check it recipes allow crafing in space or not.
As menitoned before I never dove into asteroid mods moreover I am still on the fence whether I like the idea or not. Asteroids aren't ups efficient so without special space specific high effieciency recipes or alternative gathering methods I don't think they'll be a good source of high volume resources until a major rewrite of their code.
I welcome the challenge of finding the best solution to this problem but do keep in mind that perfect is the enemy of good. I believe that if something didn't break it's just because noone tried to break it the right way.
Regarding unchinged modder ideas.
If nothing changes I will at some point make a mod that takes 2 or 3 vanilla chunks for curshing to get planet unique resources. I am warning you in advance that it will break your mod in ways that I expect to be unsolvable using a furnace type building and expanding on this idea I don't think those kinds of recipes should be considered in your logic until you decide to automaticly analyse recipes for potencial conflicts.
Not necessarily "unsolvable" so much as they simply won't end up being available the Crushers. The thing is, even if I end up erroneously assign a recipe to one of the Automated Crushers that they can't craft, it just won't show up. The game is pretty good at filtering that on its own. As long as nothing crashes, it should be fine. I'll get around to redoing the recipe logic at some point, but probably not in the very short term. Apologies for being slow.
Didin't know that, but if I make a recipe "Specialised/Vulcanic metalic asteroid crushing" and make it cost 2 metalic chunks I think it would break the simple auto crusher since it falls under simple crushing but takes 2 chunks so it conflicts with vanille recipe.
That being said my original idea was M+C=Vuncalus M+I=Fulgora C+I=Gleaba M+C+I=Aquilo and no promitum recipe.
An alternative is 2M=V 2C=G 2I=F and no idea for Aquilo
There could be liquids involved but I don't like the idea withoud custom buildings, crushers are too small.
Any recipe which contains more than 1 item ingredient and 1 fluid ingredient is definitionally not going to work in the Automated Crushers, as it's outside the scope of a furnace prototype. It doesn't really matter where you put it, I can't shift it to an Automated Crusher :) I believe but am not sure that a furnace can craft recipes with both an item and an ingredient, but I don't believe I've checked. Basically, inserters pointing to a furnace need to know what items they can insert in the first place, which is determined by the recipe list. Fluids don't really interfere, because furnace fluid boxes will accept any fluid you pump in anyway.