Make LuaEntity::selection_priority modifiable at runtime

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
braxbro
Inserter
Inserter
Posts: 37
Joined: Sun Jan 01, 2023 2:54 am
Contact:

Make LuaEntity::selection_priority modifiable at runtime

Post by braxbro »

Currently, the selection priority of an entity is set in the prototype and cannot be changed at runtime. However, with the creation of elevated rails and the inability to interact directly with things underneath said elevated rails, there is now a base-game need for the ability to either ignore specific entity types when selecting entities or adjust selection priorities at runtime.

This would also enable mods with similar layered construction more easily.

I propose handling this through simply making the selection_priority modifiable at runtime. (or possibly giving players a list of ignored entity prototypes for selection?) This would allow for flexible custom solutions to these problems, among other ideas I'm sure mod developers would come up with.
protocol_1903
Fast Inserter
Fast Inserter
Posts: 204
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Make LuaEntity::selection_priority modifiable at runtime

Post by protocol_1903 »

Perhaps having a per-player property, modifiable by mods, to ignore selection boxes of a specified priority range, or of specific flags? That way you could just ignore the elevated rails, or just ignore belts, etc
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
curiosity
Filter Inserter
Filter Inserter
Posts: 607
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Make LuaEntity::selection_priority modifiable at runtime

Post by curiosity »

Yes, putting this into entity seems like a wrong approach to the problem.
Post Reply

Return to “Modding interface requests”