Enable layer property in SpriteVariations type
Posted: Wed Apr 08, 2020 11:51 pm
https://wiki.factorio.com/Types/SpriteVariations
Currently SpriteVariations inherets all the properties of the Sprite prototype, but Layers is specifically disallowed.
Icon/icons is able to have multiple layers (allowing one to, for example, have a tintable mask), but the pictures definition does not share this ability (as far as I understand the definition?).
In my mods I use masks to color entities, and I had been hoping to provide for two main abilities where the icons are concerned:
1. Have configurable icon colors, so the player can choose what the colors are
2. Choose whether or not to display "tier" pips.
Discussed in particular in this thread: viewtopic.php?p=484140#p484140
The issue is that without layer support in SpriteVariations, I can't do both 1 and 2 at the same time, and avoid having the pips appear when an item is on the ground:
I had hoped to avoid having pips on items on the ground by using the pictures field per Posila's comment, but it turns out I can't use the pictures field with layer masks (I believe?). I don't want to abandon the dream of user-customizable color settings... if possible.
I understand there are performance concerns with having layered icons (why can't we bake these during startup, excluding the runtime masks, and avoid the trouble? D:) but I hope maybe for modding purposes the property would be enabled?
Semi-related, as an aside: Is there a way to disable rendering the additional icon layers with a shadow?
Currently SpriteVariations inherets all the properties of the Sprite prototype, but Layers is specifically disallowed.
Icon/icons is able to have multiple layers (allowing one to, for example, have a tintable mask), but the pictures definition does not share this ability (as far as I understand the definition?).
In my mods I use masks to color entities, and I had been hoping to provide for two main abilities where the icons are concerned:
1. Have configurable icon colors, so the player can choose what the colors are
2. Choose whether or not to display "tier" pips.
Discussed in particular in this thread: viewtopic.php?p=484140#p484140
The issue is that without layer support in SpriteVariations, I can't do both 1 and 2 at the same time, and avoid having the pips appear when an item is on the ground:
I had hoped to avoid having pips on items on the ground by using the pictures field per Posila's comment, but it turns out I can't use the pictures field with layer masks (I believe?). I don't want to abandon the dream of user-customizable color settings... if possible.
I understand there are performance concerns with having layered icons (why can't we bake these during startup, excluding the runtime masks, and avoid the trouble? D:) but I hope maybe for modding purposes the property would be enabled?
Semi-related, as an aside: Is there a way to disable rendering the additional icon layers with a shadow?