Support for recipes with no result items

Post Reply
User avatar
<NO_NAME>
Filter Inserter
Filter Inserter
Posts: 291
Joined: Tue Aug 02, 2016 9:52 am
Contact:

Support for recipes with no result items

Post by <NO_NAME> »

I've created a mod which allows to create for free and then destroys some placeholder items. There is some problem with recipe for destroying items. I've managed to trick Factorio into doing this:

Code: Select all

  {
    type = "recipe",
    name = "remove-perfectly-generic-object",
    enabled = true,
    energy_required = 0.1,
    icons = {{icon = "__PerfectlyGenericObject__/graphics/icons/remove-perfectly-generic-object.png"}},
    icon_size = 32,
    ingredients =
    {
      {"perfectly-generic-object", 1}
    },
    result = "perfectly-generic-object",
    result_count = 0,
    main_product= "",
    subgroup = "belt",
    order = "e[perfectly-generic-object]-b[remove-perfectly-generic-object]",
  }
This works but isn't looks rather ugly because Factorio still show the item as a product of the recipe.
Zrzut ekranu z 2018-03-17 02-07-18.png
Zrzut ekranu z 2018-03-17 02-07-18.png (197.34 KiB) Viewed 1752 times
Would it be possible to allow recipes with no result item or at least do not show the it in GUI if 'result_count = 0'?
I am a translator. And what did you do for Factorio?
Check out my mod "Realistic Ores" and my other mods!

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Support for recipes with no result items

Post by Rseding91 »

What's the utility of a recipe which produces nothing?
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Support for recipes with no result items

Post by eradicator »

Rseding91 wrote:What's the utility of a recipe which produces nothing?
Various mods currently use recipes to destroy waste products. For example flare stacks to destroy fluids. And i've seen other mods that use recipes that produce "1x Void" with 0% probability to simulate waste disposal. For example you could have a furnace that produes slag alongside of metal plates, and a second machine would be used to dispose of the slag.

User avatar
<NO_NAME>
Filter Inserter
Filter Inserter
Posts: 291
Joined: Tue Aug 02, 2016 9:52 am
Contact:

Re: Support for recipes with no result items

Post by <NO_NAME> »

eradicator wrote:
Rseding91 wrote:What's the utility of a recipe which produces nothing?
Various mods currently use recipes to destroy waste products. For example flare stacks to destroy fluids. And i've seen other mods that use recipes that produce "1x Void" with 0% probability to simulate waste disposal. For example you could have a furnace that produes slag alongside of metal plates, and a second machine would be used to dispose of the slag.
Exactly. The purpose of this recipe is to destroy the item.
Let me explain why I want to destroy items: In this case, these items are just some dummy placeholders. They can be created for free. They are not supposed to be real things that are magazined somewhere when you have too much of them. You can easily create very big numbers of them so there has to be some way to get rid of them when they are no longer needed. You can see the screenshots attached to the mod to see why I need such items.
I am a translator. And what did you do for Factorio?
Check out my mod "Realistic Ores" and my other mods!

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7351
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Support for recipes with no result items

Post by bobingabout »

eradicator wrote:
Rseding91 wrote:What's the utility of a recipe which produces nothing?
And i've seen other mods that use recipes that produce "1x Void" with 0% probability to simulate waste disposal.
My mods do that on the gas venting recipes. And if anyone asked for a suggestion on how to do it, this is what I would recommend.
Create a dummy item that isn't used on any recipes (Important, because if you use one that is used, it attempting to load a tooltip of a recipe that uses this item can cause the game to lock up), and set that as a result with probability = 0.
I use Void as an item, mostly because I was deleting a fluid type (granted it's supposed to be a gas) and was reminded of the fluid void mod.

But yeah, that's a reason. The application is rather limited, but does exist.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Support for recipes with no result items

Post by Rseding91 »

Ok, in 0.17 you can now have a recipe that produces nothing.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Implemented mod requests”