I'm working on next relase of my mod and I've ran into a problem with sprite layers. I'm creating entity sprite as a lot of sprites in one layer. That is working great but problem is with circuit connectors.
Circuit connectors are drawn beneath entity sprite. See image 1. Not even entire circuit connector is drawn like that, led is shown.
If I don't add middle part of entity sprite (see image 2) the connector is shown, so it's definetly being drawn.
I tried to change entity sprite priorities, it seems to do nothing and result is always the same.
I'm attaching entire mod and save where I was testing it. In prototypes/entity.lua is line with HACK comment for hiding middle part of the chest.
[16.2] Circuit connectors drawn under entity sprite when modding
[16.2] Circuit connectors drawn under entity sprite when modding
- Attachments
-
- image with middle part of chest
- 1.png (185.53 KiB) Viewed 4854 times
-
- image without middle
- 2.png (147.26 KiB) Viewed 4854 times
-
- WideChests_1.9.3.zip
- mod
- (222.51 KiB) Downloaded 163 times
-
- merging.zip
- save
- (1.27 MiB) Downloaded 177 times
Re: [16.2] Circuit connectors drawn under entity sprite when modding
To clarify: It works if using single sprite as picture. Not working when using
Code: Select all
picture = { layer = { ...list of single picture sprites... } }
Re: [16.2] Circuit connectors drawn under entity sprite when modding
Thanks for the report.
The connector will render as 10th layer in 0.16.5
The connector will render as 10th layer in 0.16.5
Re: [16.2] Circuit connectors drawn under entity sprite when modding
This only moves the problem. If entity has more than 10 layers and 10th layer is at place of circuit connector it's still hidden. See image 1.posila wrote:The connector will render as 10th layer in 0.16.5
Or is there a way to put multiple sprites into one layer? Now i have:
Code: Select all
picture = {
layers = {
{
filename = ...
priority = ...
},
{
filename = ...
priority = ...
},
...a lot of other individual sprites...
}
}
I also just found another circuit connector sprite wierd behaviour. If I place normal steel chests below my entity at some point the circuit connector is drawn (see image 2). And when I pick those steel chests up the connector is not drawn again. The worst thing is that placing and picking up chests shows/hides the circuit connector randomly. Attaching new mod version and new save file.
- Attachments
-
- 10th sprite is hiding circuit connector
- 1.png (619.65 KiB) Viewed 4706 times
-
- circuit connector visible if steel chest is below it
- 2.png (738.18 KiB) Viewed 4706 times
-
- merging.zip
- new save
- (1.96 MiB) Downloaded 150 times
-
- WideChests_1.9.3.zip
- new mod version
- (24.88 KiB) Downloaded 154 times
Re: [16.2] Circuit connectors drawn under entity sprite when modding
It didn't occur to me that I can place those trouble making sprites in first 10 layers, so my problem is fixed but maybe that wierd glitch when placing entities near problematic entity is worthy of new bug report.
Re: [16.2] Circuit connectors drawn under entity sprite when modding
I forgot to respond yesterday, I am sorry.
Yes, you can define layers that are supposed to be under the connector first.
I have mixed feeling about this - composing graphics from repeating smaller parts is great for not increasing already high VRAM requirements; but drawing lot of layers is not great for performance either.
As for connector being visible or not depending on entities around - it's just undefined order in which sprites with the same layer will draw.
Yes, you can define layers that are supposed to be under the connector first.
I have mixed feeling about this - composing graphics from repeating smaller parts is great for not increasing already high VRAM requirements; but drawing lot of layers is not great for performance either.
As for connector being visible or not depending on entities around - it's just undefined order in which sprites with the same layer will draw.
Re: [16.2] Circuit connectors drawn under entity sprite when modding
Well if it's under insane numbers it will probably be fine. I wirtten on mod portal that tha game probably wouldn't like entities 1000 tiles long. I will add that it can have effect on game performance when massive chest is placed down.posila wrote:I have mixed feeling about this - composing graphics from repeating smaller parts is great for not increasing already high VRAM requirements; but drawing lot of layers is not great for performance either.
I don't need an answers, just wanting to be sure it really is not a bug:posila wrote:As for connector being visible or not depending on entities around - it's just undefined order in which sprites with the same layer will draw.
Shouldn't then be random if connector is visible or not (exactly 50:50) since there is 2 sprites in 10th layer (connector and small entity sprite) and when it comes to draw 10th layer the game can pick them in random order? And shouldn't this happen to both of bottom chests in that screenshot (cause it didn't)?