Recipe: show_products_on_tooltip
Recipe: show_products_on_tooltip
Request: a Boolean property in recipe prototype to enforce display of products on tooltip, even if there is only one product.
Currently, recipe products are shown on tooltip only if the recipe has more than one products. For recipes that have only one product, it is not shown, mainly because their recipe icons can already describe the products, as discussed here with klonan: viewtopic.php?f=66&t=33732
By setting main_product to empty string, we can enforce display of products. But it is a hack and it brings another issue: it requires recipe name, icon, subgroup and order to be set explicitly because the recipe can no longer determine based on its product.
So, by adding another Boolean specialized for enforcing display of products, the problem will be solved. And we can even make a mod to let people choose whether products for ALL recipes should always be shown on tooltip.
Edit: uploaded the mod so you can see the result: https://mods.factorio.com/mods/Mooncat/ ... e-products
Edit 2: simplified the title
Currently, recipe products are shown on tooltip only if the recipe has more than one products. For recipes that have only one product, it is not shown, mainly because their recipe icons can already describe the products, as discussed here with klonan: viewtopic.php?f=66&t=33732
By setting main_product to empty string, we can enforce display of products. But it is a hack and it brings another issue: it requires recipe name, icon, subgroup and order to be set explicitly because the recipe can no longer determine based on its product.
So, by adding another Boolean specialized for enforcing display of products, the problem will be solved. And we can even make a mod to let people choose whether products for ALL recipes should always be shown on tooltip.
Edit: uploaded the mod so you can see the result: https://mods.factorio.com/mods/Mooncat/ ... e-products
Edit 2: simplified the title
Last edited by Mooncat on Tue Oct 11, 2016 6:10 am, edited 1 time in total.
Re: Property to enforce showing recipe products on tooltip
I'd say this should be a toggle in the menu under game options, not just something mods toggle on/off as they wish. That way, players who want to see them can turn it on for everything, not just hope that modders add it.Mooncat wrote:Request: a Boolean property in recipe prototype to enforce display of products on tooltip, even if there is only one product.
Also, I'd like if products also had not just picture but also the name of whatever the recipe gives similarly to how we see names and icons of ingredients. With some mods, the icons between different things are relatively similar (Angel's petrochem) and it's not exactly easy to distinguish them.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Property to enforce showing recipe products on tooltip
Rather than having names shown next to icons, it would be better if there was just a well formed tooltip on hover.
That way the icons can be shown as a quick reference while taking up little screen space, and if I want more information I just hover the icon to see more elaborate details about it.
That way the icons can be shown as a quick reference while taking up little screen space, and if I want more information I just hover the icon to see more elaborate details about it.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: Property to enforce showing recipe products on tooltip
I have suggested that for the base game: viewtopic.php?f=66&t=33732hoho wrote:I'd say this should be a toggle in the menu under game options, not just something mods toggle on/off as they wish. That way, players who want to see them can turn it on for everything, not just hope that modders add it.
I agree with Klonan. product icons on tooltip is only needed for mod players, because the vanilla recipes can already show their products on icons clearly.
Tooltip on tooltip. hm....aubergine18 wrote:Rather than having names shown next to icons, it would be better if there was just a well formed tooltip on hover.
That way the icons can be shown as a quick reference while taking up little screen space, and if I want more information I just hover the icon to see more elaborate details about it.
Maybe something like the code hinting tooltip in Eclipse: when it shows up, you can press the hotkey (F2) to focus it, so it won't close when your cursor leaves its area, and hence you can open another tooltip on it.
But I think this will be beyond our power and will require the devs to implement it.
Re: Property to enforce showing recipe products on tooltip
"Problem" is, I wanted both icons and names of the products be visible in the tooltip. Having it behave consistently would also be nice.Mooncat wrote:I have suggested that for the base game: viewtopic.php?f=66&t=33732hoho wrote:I'd say this should be a toggle in the menu under game options, not just something mods toggle on/off as they wish. That way, players who want to see them can turn it on for everything, not just hope that modders add it.
I agree with Klonan. product icons on tooltip is only needed for mod players, because the vanilla recipes can already show their products on icons clearly.
Re: Property to enforce showing recipe products on tooltip
For recipes that have only one product, it would be ok. But for those that have multiple products, I wonder this will make the tooltip being too large, as each product will occupy a new line.hoho wrote:"Problem" is, I wanted both icons and names of the products be visible in the tooltip. Having it behave consistently would also be nice.Mooncat wrote:I have suggested that for the base game: viewtopic.php?f=66&t=33732hoho wrote:I'd say this should be a toggle in the menu under game options, not just something mods toggle on/off as they wish. That way, players who want to see them can turn it on for everything, not just hope that modders add it.
I agree with Klonan. product icons on tooltip is only needed for mod players, because the vanilla recipes can already show their products on icons clearly.
Re: Property to enforce showing recipe products on tooltip
Most result items I've seen so far has been 4 in some mod. Having that many new lines is not too large in my opinion.Mooncat wrote:But for those that have multiple products, I wonder this will make the tooltip being too large, as each product will occupy a new line.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Recipe: show_products_on_tooltip
One solution would be to have 2 column tooltip, with recipe etc shown on left side, and results etc shown on right side. Name and description could be shown above columns. Layout would be something like:
. . . . . . . . . name + description
reciperesults
. . . . . . . . . name + description
reciperesults
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: Recipe: show_products_on_tooltip
Don't forget the total raw. It can really take up space.
and it is causing lag. Re: Recipe: show_products_on_tooltip
Could you upload that mod set somewhere? I'd be interested in seeing what might cause that to be "slow".Mooncat wrote:Don't forget the total raw. It can really take up space.
...
and it is causing lag.
Also don't forget you're in cheat mode which makes "total raw" show far more than normal due to it thinking the player can craft any recipe so it degrades each item to the base materials.
If you want to get ahold of me I'm almost always on Discord.
Re: Recipe: show_products_on_tooltip
Sure. I will upload it when I get home. I think Yuoki Industries, Angel's mods and Bob's mods are the main cause for that because they bring many new raw materials.Rseding91 wrote:Could you upload that mod set somewhere? I'd be interested in seeing what might cause that to be "slow".Mooncat wrote:Don't forget the total raw. It can really take up space.
...
and it is causing lag.
Also don't forget you're in cheat mode which makes "total raw" show far more than normal due to it thinking the player can craft any recipe so it degrades each item to the base materials.
Good catch for cheat mode. I even didn't realize I had turned on it, because it is already part of the daily routine for me. (still updating Creative Mode)
Re: Recipe: show_products_on_tooltip
Here you are: https://drive.google.com/open?id=0B9Y5P ... 1lZSm9BVzg
But it lags only when cheat mode is on.
1) Start a game
2) game.player.force.research_all_technologies()
3) game.player.cheat_mode = true
4) open the crafting menu -> Combat
5) hover a MK6 equipments. e.g. Vehicle Fusion Reactor MK6. FPS is dropped slightly.
6) leave the equipment. It hangs for awhile.
Need bug report?
But it lags only when cheat mode is on.
1) Start a game
2) game.player.force.research_all_technologies()
3) game.player.cheat_mode = true
4) open the crafting menu -> Combat
5) hover a MK6 equipments. e.g. Vehicle Fusion Reactor MK6. FPS is dropped slightly.
6) leave the equipment. It hangs for awhile.
Need bug report?
Re: Recipe: show_products_on_tooltip
Nah, there's no bug. Cheat mode makes the recipe system "can craft count" work far harder than normal since it has to decompose every item to base materials instead of the normal furnace/machine recipes.Mooncat wrote:Here you are: https://drive.google.com/open?id=0B9Y5P ... 1lZSm9BVzg
But it lags only when cheat mode is on.
1) Start a game
2) game.player.force.research_all_technologies()
3) game.player.cheat_mode = true
4) open the crafting menu -> Combat
5) hover a MK6 equipments. e.g. Vehicle Fusion Reactor MK6. FPS is dropped slightly.
6) leave the equipment. It hangs for awhile.
Need bug report?
If you want to get ahold of me I'm almost always on Discord.
Re: Recipe: show_products_on_tooltip
But it feels a little bit weird that the lag occurs not when I hover the recipe, but when I leave it. Like it is struggling on recycling the resources used for displaying the tooltip.Rseding91 wrote:Nah, there's no bug. Cheat mode makes the recipe system "can craft count" work far harder than normal since it has to decompose every item to base materials instead of the normal furnace/machine recipes.Mooncat wrote:Here you are: https://drive.google.com/open?id=0B9Y5P ... 1lZSm9BVzg
But it lags only when cheat mode is on.
1) Start a game
2) game.player.force.research_all_technologies()
3) game.player.cheat_mode = true
4) open the crafting menu -> Combat
5) hover a MK6 equipments. e.g. Vehicle Fusion Reactor MK6. FPS is dropped slightly.
6) leave the equipment. It hangs for awhile.
Need bug report?
Re: Recipe: show_products_on_tooltip
Well I like optimizing things so I looked into it anyway. It was a 2 part thing: when you hover you don't move the mouse so it updates the tooltip once every tick (60 times per second). When you move the mouse every time the mouse moves it triggers a refresh of the tooltip to move it and so "moving off" actually causes it to do more work than just hovering as you pass over other recipes.Mooncat wrote:But it feels a little bit weird that the lag occurs not when I hover the recipe, but when I leave it. Like it is struggling on recycling the resources used for displaying the tooltip.
I also cached the decomposed recipe results in the tooltip so it knows if it needs to find the full decomposed recipe results and skips doing that most of the time.
So, for 0.14.14 it will be much quicker (instant in my testing).
If you want to get ahold of me I'm almost always on Discord.
Re: Recipe: show_products_on_tooltip
Not quite understand about the "moving off" part, but it is good that you fixed the lag. Helpful for testing things in cheat mode. Thanks.Rseding91 wrote:Well I like optimizing things so I looked into it anyway. It was a 2 part thing: when you hover you don't move the mouse so it updates the tooltip once every tick (60 times per second). When you move the mouse every time the mouse moves it triggers a refresh of the tooltip to move it and so "moving off" actually causes it to do more work than just hovering as you pass over other recipes.Mooncat wrote:But it feels a little bit weird that the lag occurs not when I hover the recipe, but when I leave it. Like it is struggling on recycling the resources used for displaying the tooltip.
I also cached the decomposed recipe results in the tooltip so it knows if it needs to find the full decomposed recipe results and skips doing that most of the time.
So, for 0.14.14 it will be much quicker (instant in my testing).