Whistle Stop Factories


Spawns massive furnaces and assembly machines around the map to make the game all about building trains to connect them

Content
3 years ago
0.16 - 1.1
2.74K
Manufacturing

g doesn't unlock recipe in savegames and litters up crafting menu

5 years ago
(updated 5 years ago)

when installing this on an existing save, it only unlocks the starting recipes instead of big versions for all recipes you have researched.
btw, please don't use reset_technology_effects, because it causes bugs with other mods, for example
Quality of Life research.
for cleaning up the player's crafting menu, i suggest hiding all big recipes except when a big crafting machine gui is opened
/c
script.on_event(defines.events.on_gui_opened, function(event)
if event.entity and event.entity.name == "wsf-big-assembly" then
for _, recipe in pairs(game.players[1].force.recipes) do
if string.sub(recipe.name, -3)=="big" and game.players[1].force.recipes[string.sub(recipe.name,1,-5)].enabled and not game.players[1].force.recipes[string.sub(recipe.name,1,-5)].hidden then
recipe.enabled=true
end
end
end
end)
script.on_event(defines.events.on_gui_closed, function(event)
if event.entity and event.entity.name == "wsf-big-assembly" then
for _, recipe in pairs(game.players[1].force.recipes) do
if string.sub(recipe.name, -3)=="big" then
recipe.enabled=false
end
end
end
end)
you just have to extend it for the furnaces
btw: its really hard to read your code if you use so many functions and different files^^

5 years ago

Wow! Thank you! One of the #1 complaints about my mod was the big recipes cluttering up the other menus, and I didn't realize there was a way to fix that. Can't wait to try it out! I spent some time searching for a way to do it, but never figured one out. Ended up doing an modding feature request for recipes to be hidden from the players crafting menu. Still hope they implement that, but I didn't think of doing it this way.

Also, I'll fix the issue with adding it to an existing game. Didn't really come up much because this uses world gen, so it'd be like adding RSO to an existing save, except worse because you wouldn't have any big factories in your already explored area. But it wouldn't hurt to fix it anyway.

5 years ago
(updated 5 years ago)

well, this broke my setup with crafting combinator :D

is there a way to set the recipe to hidden, instead of disable?

5 years ago
(updated 5 years ago)

the hidden property is just readable :/
you could go into control.lua and delete the whole script.on_event(defines.events.on_gui_closed, block (at the end of the file

5 years ago
(updated 5 years ago)

nvm, i thought the big-crafting-machine spawning was broken

5 years ago

yep, i edited this already.
thought someone would come up with an idea to workaround the hidden thing.
Something like https://mods.factorio.com/mods/atchoum/recipe-why-are-you-hidden does or else.

sadly im not used to lua to reengineer that :(

5 years ago
(updated 5 years ago)

that mod only sets recipes to enabled, but try this one:
[link removed,wasn't really ups friendly]

5 years ago

there you go:
https://www.dropbox.com/s/5ggj10mixpc0aw3/crafting_combinator_0.0.12.zip?raw=1
(delete other versions of the crafting combinator or it will load those instead because this one has a lower version number)

5 years ago
(updated 5 years ago)

update: fixed a crash and another enabled-check
https://www.dropbox.com/s/eft3uebntdypp6n/crafting_combinator_0.0.13.zip?raw=1
(delete other versions of the crafting combinator or it will load those instead because this one has a lower version number)

5 years ago
(updated 5 years ago)

wow, will try it.
is there a way you could provide this to the CC original author to merge your code on his branch?

edit: nice, works flawless!

5 years ago

done.

5 years ago

Thanks again OwlyMe! I appreciate you looping in the crafting combinator author. In the meantime the latest patch makes the recipe hiding optional. Patching crafting combinator is probably the better way to go, but not everyone is going to see the modified version you created.

New response