Baron Many Little Things

by wasmoo

Intermediate recipes are replaced with smaller components. End products require many intermediate components. Larger machines are provided to accommodate the increased number of inputs.

Overhaul
8 months ago
0.18 - 1.1
319

g [DEFERRED] Too many Recipes

3 years ago

I am playing with TradeRoutesOverhaul mod. I have updated it to work with Factorio 1.1, unlocked it for mods usage and adapted it to also work with this mod.

The Traderoutes mod creates 22 recipes of every vanila recipe with various inputs and outputs. But it marks them as .hidden so they are not normally seen and craftable by hand.

Your mod as intended creates all posible variations of all those 22 recipes, and make them visible. Which ...

On one hand I can create everything just from Iron and Copper plates.
and
on another hand some recipes can be cheap and another recipes can be as resources sink.

For Instance i can have
3-11 Stone Wall for just 10x Protoboard and 10x wire bundle

The steel chest recipes needs
139-486 Iron gear
139-486 Engine block
278-972 Pipe

and with mods that add glass to vanilla recipes, yeah 972x glass. So there goes the sand and glass usage.

or other extremes of steel chest
872x (Protoboard, Wire bundle) + 436x (Transistors, Wire harness)

I am not complaing about this as bug or something bad.
But maybe if you want to look at this, you can check for .hidden flag of recipes and .hide them as well.

3 years ago

I'll definitely look into it. I suspect I'm not copying the "hidden" flag correctly. Thank you for spotting this!

3 years ago
(updated 3 years ago)

I also checked another thing, hoping to fix it on TradeRoutes side, but no luck.

All recipes created by the mod are also marked as

allow_as_intermediate=false,
allow_intermediates = false

so i dont know from where your mod are getting all those recipes.

3 years ago

I'm unable to reproduce this bug.

As far as I can tell, my mod only copies existing recipes and modifies them, so they shouldn't making recipes appear. However, it's possible the assemble / disassemble recipes are adding unexpected features to yours. Those recipes explicitly mark the *intermediates as false.

Do the recipes disappear if you change the mod settings "Enable assemble/disassemble recipes"?

3 years ago
(updated 3 years ago)

With Enabled "Enable assemble/disassemble recipes" the 22 recipes are still there.

The Trade routes work like this

It has set of items

[Code]
mall_items.t1 =
{
"transport-belt",
"underground-belt",
"splitter",
"loader",
"wooden-chest",
"inserter",
"long-handed-inserter",
"radar",
"repair-pack",
}
[/Code]

And set malls from them like 12 or so recipes per city

[Code]
data:extend({
{
type = "recipe",
name = "mall-1-"..i.."-1-"..z.."-"..r,
icon = "TradeRouteOverhaul/graphics/mall-1-"..i.."-1-"..z..".png",
icon_size = 64, icon_mipmaps = 4,
energy_required = .1,
enabled = true,
hidden = true,
subgroup = "tier-1",
ingredients =
{{desired_items.t1[i], math.floor(rate)+1 }},
results = {{mall_items.t1[z], 1 }},
allow_decomposition =false,
allow_as_intermediate=false,
allow_intermediates = false
}
})
[/Code]

Set trades with desired items

[Code]
desired_items.t1 =
{
"stone",
"coal",
"copper-ore",
"iron-ore",
[/Code]

And make trade recipes from them

[Code]
data:extend({
{
type = "recipe",
name = "Trade-1-"..i.."-1-"..z.."-"..r,
icon = "TradeRouteOverhaul/graphics/trade-1-"..i.."-1-"..z..".png",
icon_size = 64, icon_mipmaps = 4,
energy_required = .1,
enabled = true, hidden = true, subgroup = "tier-1",
ingredients = {{desired_items.t1[i], 10}},
results = { {name=desired_items.t1[z], probability=( rate )%1, amount=1 }, },
allow_decomposition =false, allow_as_intermediate=false, allow_intermediates = false
}
})
[/Code]

This is only snap shot from TradeRoutes originaly writen by DaveMcDave.

When writing this i noticed that recipes are writen as " data.extend() " so maybe this can be a problem ?

3 years ago
(updated 3 years ago)

I grabbed a copy of TradeRoutesOverhaul v0.0.4 and got it minimally working with my mod. I had to be more particular about the initial conversion, ensuring that at least one of the original ingredients was present. It also no longer crashes because assembly machines produce no emissions.

Give it a try with version 1.1.3 and see if it solves the problem.

Also, I'm curious to see what would happen if you moved your logic into the data-updates or data-final-fixes phase. BaronMLT creates the intermediate items and initial recipes in the data phase, and then the rest of the recipes in the data-updates phase. Based on alphabet sort, your mod will execute before mine does in each phase. (However, if you [optionally] depend on mine, mine will go first.)

3 years ago

Oh no all my precious cheaty recipes are gone. :) . but here is the deal

Case 1 - new version BaronMLT v1.1.3

All the recipes that the TradeRoutes and few other mod i have are gone. ( migrated content removed recipes )
But looking around i noticed that are no mention of Protoboard or wire bundle requirement in any recipes, vanilla recipes too.

So in conclusion this version disabled itself

Case 2 - optional dependency

I have reverted back to BaronMLT v1.1.1 and made optional dependecy to BaronMLT => 1.1.1 , but no luck
When starting Factorio there was that 1 minute loading BaronMLT mod so i know that it creates the TradeRoutes recipes.

Even if I made optional depedency to Baron library this also not helped.

Case 3 - changing data phase

This is not posible as those recipes are writen across 3 files.

I may try one more thing but you cant do with it anything anyway. I will try make BaronMLT optional denpedent on my TradeRoutes.
I also had an idea to publish a new mod with heavily edited TradeRoutes with some other mods included. But i have no idea when or if.

So in final conclusion . revert back to BaronMLT v1.1.1 and call this done. Thank you for looking at this.

3 years ago

I've removed the 1.1.3 release, so your mod should work. However, I'm not thrilled with that solution, since that means it will be difficult for me to adjust the mod if anyone else decides to include it.

However, until that time, I'll just leave this as-is. Good luck!

3 years ago
(updated 3 years ago)

Fixed on my end.

You were right about the Data-update stuff. I was not sure what to do with it at first.
I moved Require(prototypes ...) from data.lua to data-updates.lua and it worked. All TradeRoutes recipes were skipped. And your recipes are present.

So now i need to choose what recipes i want to hide and what to use. Since i dont need all of them.

New response