i ran into an issue working with loaders that their selection priority was 45 instead of the default/assumed 50.
we modders often use (entity.selection_priority or 50) + 1 to make sure something is above or below a certain entity, but there are a bunch of exceptions.
i found 3 of those that are documented, though one of which is an override:
https://lua-api.factorio.com/latest/pro ... n_priority
https://lua-api.factorio.com/latest/pro ... n_priority
https://lua-api.factorio.com/latest/pro ... n_priority
however as SelectionPriorities in EntityPrototype.hpp around line 513 suggests there are more exceptions, like 45 for belt stuff, 40 for ores, etc.
(and possibly mention that in entity-util.lua there's a premade list referencable by lua, i was not even aware it existed until the comment pointed it out)
selection_priority does not always default to 50
selection_priority does not always default to 50
- Attachments
-
- Screenshot 2026-02-27 at 12.02.09.png (45.3 KiB) Viewed 93 times
Re: selection_priority does not always default to 50
entity-util.lua also says
It would be good if the treshold at which the entity becomes unselectable was documwnted as welleditor_only = 20, -- entities not selectable by normal player (e.g. corpses, projectiles), but by editor in entity mode
Re: selection_priority does not always default to 50
i was curious about that one too but from what i can find that treshold does not actually prevent an entity from being selected, they'd still need the `selectable_in_game = false` but it seems to be more of an internal convention to set those to selection priority 20.Osmo wrote: Fri Feb 27, 2026 6:00 pm entity-util.lua also saysIt would be good if the treshold at which the entity becomes unselectable was documwnted as welleditor_only = 20, -- entities not selectable by normal player (e.g. corpses, projectiles), but by editor in entity mode

