Blueprint parameter formula - Access to relative & absolute coordinates

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 631
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Blueprint parameter formula - Access to relative & absolute coordinates

Post by Gergely »

What?
Inside blueprint parameter formulas: Give access to variables that correspond to the absolute coordinates of the placement location, and when dragging, the coordinates relative to the first location. (Or the coordinates of the first location which can be used to compute relative coordinates.) And maybe a variable that is incremented for each successive placement.

Names could be x and y for absolute coordinates. off_x and off_y for offsets from first when dragging. I do not recommend dividing by the blueprint grid width and height, because it would needlessly complicate rotation and flipping. Tile coordinates are easily defined. Say, by using the center (flag) location.
Why?
This is likely simple to implement, and is rather versatile. Use cases:
  • Ability to unique ID different machines based on coordinates (Useful, when they interact through a network)
  • Quickly drop down constant combinators that successively use different values
  • N rows of display panels with selector combinators to display the first/last N signals
  • Row of assembling machines that enable based on incremental threshold conditions
  • Row of generic assembling machines that take turns picking recipe
  • Any general case of massively-repeated blueprint where it matters that different instances receive different constants. It is tedious to enter a different variable each time.
  • Lamp phases
Last edited by Gergely on Sat May 10, 2025 9:42 am, edited 5 times in total.
Epb7304
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Thu Feb 28, 2019 8:02 pm
Contact:

Re: Blueprint parameter - Access to relative & absolute coordinates

Post by Epb7304 »

+1

thats actually the most ideal solution to a circuit logic that I've been cooking for months now
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 392
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Blueprint parameter formula - Access to relative & absolute coordinates

Post by LuziferSenpai »

+1

Even when I wouldnt use it much, this would be a game changer.
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
Post Reply

Return to “Ideas and Suggestions”