Liking the new tooltips a lot.
One minor oddity: items which place an entity which is powered by a void energy source have a broken-looking "Consumes" line (see pic). I don't have an immediate suggestion about what it should say, but they don't consume anything really.
Related question: where is the icon for the new "Consumes" line defined? For burners, it's a flame, for electricity, a lightning bolt. For every other fuel category, it's the pictured "going through a door" icon. Can we define those ourselves?
[Twinsen] [0.17.75] Tooltips for items which place entities with a void energy source
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
[Twinsen] [0.17.75] Tooltips for items which place entities with a void energy source
- Attachments
-
- Untitled.png (75.75 KiB) Viewed 2399 times
Last edited by Deadlock989 on Mon Nov 04, 2019 6:47 pm, edited 1 time in total.
Re: [0.17.75] Tooltips for items which places entities with a void energy source
It uses a sprite of the name tooltip-category-<category-name>, so for example tooltip-category-electricity. You can find the sprites defined in prototypes\utility-sprites.lua in both the core and the base mod. As far as I can see, for your custom fuel categories, the fuel category name is used in the sprite name, so if the fuel category name is "carrot", the sprite should be named "tooltip-category-carrot".Deadlock989 wrote: Mon Nov 04, 2019 5:56 pm Related question: where is the icon for the new "Consumes" line defined? For burners, it's a flame, for electricity, a lightning bolt. For every other fuel category, it's the pictured "going through a door" icon. Can we define those ourselves?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [0.17.75] Tooltips for items which places entities with a void energy source
Those sprites are mipmapped at 2 levels, right?Bilka wrote: Mon Nov 04, 2019 6:01 pmIt uses a sprite of the name tooltip-category-<category-name>, so for example tooltip-category-electricity. You can find the sprites defined in prototypes\utility-sprites.lua in both the core and the base mod. As far as I can see, for your custom fuel categories, the fuel category name is used in the sprite name, so if the fuel category name is "carrot", the sprite should be named "tooltip-category-carrot".Deadlock989 wrote: Mon Nov 04, 2019 5:56 pm Related question: where is the icon for the new "Consumes" line defined? For burners, it's a flame, for electricity, a lightning bolt. For every other fuel category, it's the pictured "going through a door" icon. Can we define those ourselves?
Re: [0.17.75] Tooltips for items which places entities with a void energy source
They are, but you don't have to define mipmaps, just don't set it in the lua definition of the sprite.
Re: [Twinsen] [0.17.75] Tooltips for items which places entities with a void energy source
Does it make sense that the entire category and it's consumption are not shown for void energy sources?
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [Twinsen] [0.17.75] Tooltips for items which places entities with a void energy source
For the category, I think it's always going to be a tough one because different modders use void energy to fake different things. So not showing anything might be the best solution, they/we can always show contextual info in the tooltip now that there's more predictable tooltip behaviours.Twinsen wrote: Mon Nov 04, 2019 6:19 pm Does it make sense that the entire category and it's consumption are not shown for void energy sources?
For the copper lamp above, I did rig it so that the equivalent of 9.6 kW is sort-of consumed, because it fakes a burner lamp. But I would rather it showed nothing than showed something wacky, it doesn't really matter in this use case. Other modders might feel differently *shrug*
Last edited by Deadlock989 on Mon Nov 04, 2019 6:26 pm, edited 1 time in total.
Re: [0.17.75] Tooltips for items which places entities with a void energy source
Icons and sprites that are defined with flag "icon" or "gui-icon", are all sorted into single atlas texture which has 4 mipmap levels. The game loads sprites into atlases, auto-generates mipmaps and then overwrites regions that have custom mipmap definitions. So regardless of how many mipmap levels you define, there will be always 4 and some may be autogenerated.
Because GUI scales from 75% to 200% it was deemed only 2 mipmap levels will be ever used (200%, and 100%), so we define just the 2.
For completeness ... difference between "icon" and "gui-icon" flags is that "icon" uses trilinear filtering; "gui-icon" bilinear filtering with using ceil to determine from which miplevel it should filter bilinearly (so GUI scale 125% uses 200% version of the icon).
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [Twinsen] [0.17.75] Tooltips for items which places entities with a void energy source
Bingo.
- Attachments
-
- Untitled.png (170.88 KiB) Viewed 2350 times
Re: [Twinsen] [0.17.75] Tooltips for items which places entities with a void energy source
Not to me, void energy source is a 'It just works'Twinsen wrote: Mon Nov 04, 2019 6:19 pm Does it make sense that the entire category and it's consumption are not shown for void energy sources?
Re: [Twinsen] [0.17.75] Tooltips for items which place entities with a void energy source
Fixed by not showing this information for void energy sources.
Changed in Version: 0.17.76.
Changed in Version: 0.17.76.