Custom scaling of alt-info icons

Coming soon!
Post Reply
User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat May 08, 2021 2:36 am
Contact:

Custom scaling of alt-info icons

Post by Wiwiweb »

screenshot_48120_672x352.jpg
screenshot_48120_672x352.jpg (65.23 KiB) Viewed 2663 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?)
Last edited by Wiwiweb on Wed Oct 19, 2022 8:40 pm, edited 1 time in total.

User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat May 08, 2021 2:36 am
Contact:

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Post 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 2612 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 2612 times
We're trying to get an in-between option.
Last edited by Wiwiweb on Wed Oct 19, 2022 8:41 pm, edited 1 time in total.

User avatar
snouz
Inserter
Inserter
Posts: 27
Joined: Sun Jan 03, 2021 6:01 pm
Contact:

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Post by snouz »

+1, I got the same problem on big entities in BioIndustries.
Graphically contributed to : Bio Industries (soon) | Warehousing | MFerrari's mods | Brevven's mods | Bob Artisanal Reskins | Mining Drones | Teleporters | Emoji signals

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

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Post 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.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat May 08, 2021 2:36 am
Contact:

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Post 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.

gdubrocks
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Sep 25, 2022 5:38 am
Contact:

Re: Inconsistency between scale_info_icons and scale_entity_info_icon

Post by gdubrocks »

Support. It would be nice for many mods!

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Custom scaling of alt-info icons

Post 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...

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Custom scaling of alt-info icons

Post 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).
Image

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Custom scaling of alt-info icons

Post 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.

Post Reply

Return to “Implemented for 2.0”