Methods to normalize blueprint entity positions and/or enable snapping at the blueprint size

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Methods to normalize blueprint entity positions and/or enable snapping at the blueprint size

Post by sparr »

In the GUI I can check "Snap to grid" on a blueprint and the width/height will be calculated automatically while the positions of the entities within the blueprint are shifted to put a corner of the blueprint at the origin.

I'd like a way to trigger one or both of these behaviors (or at least produce the relevant values) in a script, rather than having to duplicate all of the relevant logic and calculations in Lua.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Methods to normalize blueprint entity positions and/or enable snapping at the blueprint size

Post by sparr »

I discover that I need this again now, as I'm trying to create blueprints programmatically that need to have entities with normalized positions as if the player had created/manipulated them manually. So... bump?
protocol_1903
Fast Inserter
Fast Inserter
Posts: 140
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Methods to normalize blueprint entity positions and/or enable snapping at the blueprint size

Post by protocol_1903 »

+1
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.
Post Reply

Return to “Modding interface requests”