Page 1 of 1

Custom scaling of alt-info icons

Posted: Thu Nov 18, 2021 10:37 pm
by Wiwiweb
screenshot_48120_672x352.jpg
screenshot_48120_672x352.jpg (65.23 KiB) Viewed 3449 times
Left is Container#scale_info_icons
Right is CraftingMachine#scale_entity_info_icon

https://wiki.factorio.com/Prototype/Con ... info_icons
https://wiki.factorio.com/Prototype/Cra ... _info_icon

scale_info_icons ends up almost covering the entire container, whereas scale_entity_info_icon scales to a more reasonable size that's still visible while not hiding the building.

Instead of the size of the icon being decided by the type of the entity, it would be nice if we could decide what size the icons should be. (`info_icons_size_scale` default 0?)

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Posted: Sat Nov 20, 2021 3:35 am
by Wiwiweb
By the way, if you're wondering why I'm asking this. It's for Space Exploration's cargo rocket launch pads.

As it is right now, the alt-info is ridiculously small:
screenshot_37964_864x544.jpg
screenshot_37964_864x544.jpg (120.32 KiB) Viewed 3398 times
But with the scale_info_icons option on, it becomes ridiculously big:
screenshot_38353_864x544.jpg
screenshot_38353_864x544.jpg (81.96 KiB) Viewed 3398 times
We're trying to get an in-between option.

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Posted: Mon Nov 22, 2021 6:28 pm
by snouz
+1, I got the same problem on big entities in BioIndustries.

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Posted: Sat Dec 04, 2021 4:16 pm
by Rseding91
The purpose of those values is to retain the scale percent that the base game uses for those entity types.

So for containers the base game shows the icon over the 1x1 entity. So if you make it a 5x5 entity it still shows the icon over the full 5x5 entity: the ratio has been maintained. Same thing for crafting machines: base game crafting machines scale the icon to keep a decent amount of the machine visible and if you scale up the machine it scales up the icon with it in the same ratio.

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Posted: Tue Dec 07, 2021 6:20 pm
by Wiwiweb
I realize that's working as intended, but it makes assumptions that are specific to vanilla. So I guess consider this a feature request instead? :D

The bigger the entity is, the less ratio you would want its altinfo to occupy. 1x1 entities need 100% of it to be covered to stay legible. 3x3 can get away with 80%. 5x5 or more look silly with more than 50% of their surface covered.

The only reason why the "scale to 100%" option is locked to containers and the "scale to 80%" option is locked to crafting machines is because vanilla uses 1x1 containers and 3x3 or 4x4 crafting machines.

Ideally the ratio of an altinfo icon when using the `scale` option would depend on the size of the entity, regardless of its type. But an easier solution would be to have an optional `scale_info_icons_multiplier` float, which would let us control that ratio ourselves for each building.

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Posted: Thu Oct 13, 2022 7:07 pm
by gdubrocks
Support. It would be nice for many mods!

Re: Custom scaling of alt-info icons

Posted: Mon Oct 31, 2022 7:51 pm
by Oktokolo
Also support this.

In my opinion, the maximum size for an info icon should be fixed to 1¾ tile². But a mod tuning scale_info_icons_multiplier on each entity prototype would be easy to make...

Re: Custom scaling of alt-info icons

Posted: Thu Nov 10, 2022 1:25 am
by Deadlock989
Support this, but a scale multiplier is also needed for labs - very large labs have very large science pack icons, and you don't even have the option of scale_info_icons. In general it would be nice if things like the entity_info_icon_shift, scale_info_icons etc. were consistently available across all entities which have alt-mode info icons (example, example).

Re: Custom scaling of alt-info icons

Posted: Tue Nov 28, 2023 4:59 pm
by Klonan
I went through and cleaned it all up

In 2.0, there will be a 'icon_draw_specification' for all entity prototypes, and it will control how the alt-mode icons are drawn, scale, shift, etc.
It is all unified in this 1 place, so it will also be easy to add new features or requests in the future without needing to worry about specific entity types.