[1.1.87] Bug with sprite prototype size.
Posted: Mon Jul 17, 2023 2:29 am
I've been struggling with this problem for days, where the sprite I create and send to chat is automatically scaled to the height of the line. I don't know how much it is in proportions, but for example it's 60 pixels. If I create a sprite that is 10 pixels high and 60 pixels wide, then in chat this image is stretched to 60*360. And I have no way to control this.
The scale parameter is completely ignored, shift works not as I would like it to.
For example, if you take any prototype, such as a recipe, item, technology, their icons are made with an offset and the offset works relative to the icon, not the screen. In the case of a sprite, the offset is relative to the screen. That is, if you scale the image, this offset is not scaled and is moved by the same number of pixels as it was. That is, images created with the offset just float away in different directions.
I tried using util.by_pixel(), but it didn't change anything and didn't help. I tried to create a sprite with layers, where the second layer (or the first one) is a completely empty square with a resolution of 60*60, in order to superimpose on top of those 10*60 and not get stretching of the image, but no, it also did not change anything.
It feels like the prototype sprite works completely differently than simple objects.
The scale parameter is completely ignored, shift works not as I would like it to.
For example, if you take any prototype, such as a recipe, item, technology, their icons are made with an offset and the offset works relative to the icon, not the screen. In the case of a sprite, the offset is relative to the screen. That is, if you scale the image, this offset is not scaled and is moved by the same number of pixels as it was. That is, images created with the offset just float away in different directions.
I tried using util.by_pixel(), but it didn't change anything and didn't help. I tried to create a sprite with layers, where the second layer (or the first one) is a completely empty square with a resolution of 60*60, in order to superimpose on top of those 10*60 and not get stretching of the image, but no, it also did not change anything.
It feels like the prototype sprite works completely differently than simple objects.