Hi,
dark_background_icon is only used by the item for coal in the base game, as far as I can tell.
The wiki says that you can also use a dark_background_icons table for items. However for recipes which specify their own icon and produce very dark items, with or without layered icons, you don't seem to be able to specify a dark background icon - it's not in the recipe prototype on the wiki and I've tried anyway, it seems to be ignored.
For example: you have a recipe which produces crushed coal from coal, with a chance of byproducts, i.e. it has multiple results. The crushed coal item has a dark_background_icon specifed. But the recipe uses icons to layer various things, e.g. the crushed coal item icon at the bottom and then some other byproducts drawn on top. This recipe icons overrides the main product dark background icon, but since the coal gravel is black, you can't really see it on the alt-info icon-with-a-black-fuzz-around-it drawn on the machine.
I know that's barely readable but hopefully you get what I mean. Having dark_background_icon and dark_background_icons for recipes on a par with items would be useful, is all. It seems inconsistent that the game will render an item's dark_background_icon when it's the product of a recipe that doesn't specify an icon, but you can't specify a dark icon for recipes themselves.
[Request] dark_background_icon for recipes
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [Request] dark_background_icon for recipes
Would it work if the alt background came in a light version in addition to a dark version?
That way you wouldn't need to maintain two parallel sets of icons for some items/recipes. Instead, you could have an 'icon_is_dark' flag, perhaps?
Alternatively, could a shader be used to add a light highlight to the icon; it seems like it should be possible, and I don't think Factorio currently uses shaders particularly heavily at the moment, so there should be headroom available in terms of rendering performance.
That way you wouldn't need to maintain two parallel sets of icons for some items/recipes. Instead, you could have an 'icon_is_dark' flag, perhaps?
Alternatively, could a shader be used to add a light highlight to the icon; it seems like it should be possible, and I don't think Factorio currently uses shaders particularly heavily at the moment, so there should be headroom available in terms of rendering performance.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [Request] dark_background_icon for recipes
I suppose. It would certainly save hassle for modders. I don't know if it would look as good.mrudat wrote: Sat May 04, 2019 12:33 am Would it work if the alt background came in a light version in addition to a dark version?
Re: [Request] dark_background_icon for recipes
In this case, you can just use the 'dark_background_icon' in the recipe icons instead of the normal icon.Deadlock989 wrote: Fri May 03, 2019 10:58 pmBut the recipe uses icons to layer various things, e.g. the crushed coal item icon at the bottom and then some other byproducts drawn on top. This recipe icons overrides the main product dark background icon, but since the coal gravel is black, you can't really see it on the alt-info icon-with-a-black-fuzz-around-it drawn on the machine.
so instead of
Code: Select all
recipe.icons =
{
{icon = coal.icon, icon_size = coal.icon_size},
{icon = other_layer etc...}
}
Code: Select all
recipe.icons =
{
{icon = coal.dark_background_icon icon_size = coal.icon_size},
{icon = other_layer etc...}
}
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [Request] dark_background_icon for recipes
Then the recipe would always be shown with the optimised-for-dark-background icon, even on a light background, e.g. in crafting tabs. That's worse. I don't want glowing orange coal and coal-derived products everywhere, if I can avoid it.Klonan wrote: Sat May 04, 2019 11:18 amIn this case, you can just use the 'dark_background_icon' in the recipe icons instead of the normal icon.