pictures and priority ?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

pictures and priority ?

Post by binbinhfr »

Hi,

I wonder what the "priority" variable in a "picture+filename" of a prototype is used for (with value like "medium", "high", "extra-high").
I thought it was for top-down-layers display priorities, but it does not seem to have that effect.

For example, if I want to create 2 "decoratives" at the same place, but with the first of them always on top of the second one ?

The render_layer seems to have an influence, but it's rapidly limited if you want to deal with the layer-priority of other entities.

So any hint about this display-priority management ?
My mods on the Factorio Mod Portal :geek:

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: pictures and priority ?

Post by binbinhfr »

up.

no idea ?

I still have no explanation about this priority variable... :(
My mods on the Factorio Mod Portal :geek:

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: pictures and priority ?

Post by Arch666Angel »

I had some experiments with layered sprites and what it came down to was: Ignore the priority settings, what really matters is how the sprites are named. So 1name.png is rendered before 2name.png is. Don't know why it behaves like that, but it worked for having multiple layers of sprites on the same entity. My guess is that something like that works for entities that are hardcoded on the same layer level.

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: pictures and priority ?

Post by binbinhfr »

well i have several type = "decorative" objects, with the same render_layer = "decorative"
in their picture, i have the same priority = "low"
and if i change the filename to test alphabetical order, it does not change the display order.
Infact, when I have numerous objects like this on the map, I can see that display is random : sometimes 1 is on the top of 2, or the inverse...
I tried adding an order = "..." but it does not change anything.
The name of the entity does not change either...

The only trick I found is to place the two objects on the ground with a very small y change of 0.005 (too small to be seen, but enough for the engine to think that one is in front of the other)

I still wonder what are these "priority" variable with low/high/etc...
My mods on the Factorio Mod Portal :geek:

User avatar
Cheata
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Sun Aug 17, 2014 6:46 am
Contact:

Re: pictures and priority ?

Post by Cheata »

sorry about reviving an old thread but i'm working on a mod with some relation to this question.

My first thought would be that it relates to the render priority, how likely the game is to render the picture compared to other pictures

during periods of poor fps/ups it would determine which objects get rendered first... eg you want things like projectiles and mobs to be high priority but decorations aren't as important so would be low priority

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

Re: pictures and priority ?

Post by Rseding91 »

Priority is used when you select sprite quality, anything below normal will start down-scaling sprites at lower priority to save on video memory size and render time.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Cheata
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Sun Aug 17, 2014 6:46 am
Contact:

Re: pictures and priority ?

Post by Cheata »

thanks, i knew it had to have something to do with the rendering :)

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: pictures and priority ?

Post by posila »

It also determines which sprites will be put to sprite atlas on different levels of Video memory usage setting. For example decoratives, which are sprites of small size and are rendered very often should have extra-high priority, so they are included in atlases on any Video memory usage setting.

Post Reply

Return to “Modding help”