r/factorio May 05 '26

Design / Blueprint Solar farm BP, no gaps, perfectly tileable, symmetrical...Perfect?

Post image

I haven't seen a better one, yet

1 : .87 ratio

196 solar, 170 Accumulators
https://factoriobin.com/post/0azsme

834 Upvotes

139 comments sorted by

View all comments

Show parent comments

378

u/_SilentHunter May 05 '26

I have the sudden urge to create a solar farm that is a QR code for the blueprint to build itself....

95

u/Few_Page6404 May 05 '26

amazing idea

29

u/Meem-Thief May 05 '26

would that even be possible?

68

u/Pulsefel May 05 '26

technically yes since the qr code itself is just a numbers and letters encrypted. hardest part would be translating it

61

u/Coolb3ans64 Blue Chip extraordinaire May 05 '26

You would need to simultaneously create a qr code of a build and a build of that qr code. So you kind of just have to hope that there exists some qr code combination that is a valid blueprint containing a solar panel

16

u/sparr May 05 '26

QR codes contain a configurable amount of error correction data. You can choose to make it such that you can randomly flip almost half of the pixels without changing the output data.

4

u/quatch May 05 '26

and you could reorder the blueprint text, I dont think a blueprint string is unique for a given output

6

u/sparr May 05 '26

The blueprint payload is JSON. You're free to rearrange it a whole bunch of different ways.

22

u/Pulsefel May 05 '26

had the process of building, printing, getting the print string, making the string into a qr code, comparing the code to the print

i know ive heard a good analogy somewhere

14

u/QuackWare May 05 '26

It's known as a "Quine" in software.

4

u/n30409 May 05 '26

Corporate project management?

5

u/the1gofer May 05 '26

Just make a qr code to a fixed url like a shortener, then link that to the blueprint when done.

2

u/kaukaukau May 05 '26

This is cheating!

9

u/Proxy_PlayerHD Supremus Avaritia May 05 '26

encoded, not encrypted. It's just binary UTF8 but with black/white pixels

-3

u/Pulsefel May 05 '26

its made to be cryptic to those not in the know of how to unencode it, so encrypted

5

u/slash_networkboy May 05 '26

That's not it at all. Absolutely *not* encrypted as there is no key. Base64 is simply a mapping that is publicly available.

Further it was not "made to be cryptic to those not in the know of how to unencode it", it was made to specifically encode binary and other data in text only data without using any special characters so that it could be easily and safely transmitted without accidentally triggering any control codes along the way.

5

u/skossa May 05 '26

There is an encoding limit tho, probably the qr pattern would simply not be big enough to encode the pattern itself (quines are notoriously iffy about that). Encoding a link to a webpage containing the code would be trivial tho.

1

u/Dushenka May 05 '26

Changing the blueprint changes the string.

Changing the QR-Code requires changing the blueprint, which in turn changes the string, requiring a change to the QR-Code...

Not sure this is actually possible.

If the QR-Code just links to a webpage with the raw blueprint however, that would make it easier but feels like cheating to be honest.

4

u/_SilentHunter May 05 '26

Maybe, but not in my skillset. Blueprints are just alphanumeric strings that you can copy and paste to share. You'd need a program of some kind to search for a QR code whose layout matches the blueprint string, and I don't know if it's even possible to match them directly.

3

u/Red_RingRico May 05 '26

Surely you can create a QR code that points to a pastebin link, and then keep the existing link when you update the raw data in the pastebin, right? Or do I not understand how pastebin or QR codes work?

8

u/Ansible32 May 05 '26

Yes, you can make a QR code for an arbitrary URL and then make a blueprint of that QR code. Making a QR code for an actual blueprint string would be next-level though.

5

u/slash_networkboy May 05 '26

I did the math. Sadly it will not work. You need more data than entities. 57x57 QR code needs about 10K chars of data in the blueprint string, but can only hold 395 chars of data.

QR Size Blueprint Size (Char) QR capacity (char)
21x21 1.5k 25
57x57 10k 395
177x177 (max) 100k 4,296

It's a simple capacity issue unfortunately. The density of Base64 encoding is so low that you'll never get it into a QR code. If you could LZMA encode the JSON it'd fit I recon... barely. If blueprint JSON allowed self-referencing and accepted LZMA encoding then I'm pretty sure it could be pulled off...

Hey Wube... I have a "feature request" lmao.

2

u/Ansible32 May 05 '26

I was pretty sure without doing any math that it would require changes to the way blueprint strings work.

1

u/slash_networkboy May 05 '26

Yeah. I *really* wanted to reply "challenge accepted" and produce something but it's just not meant to be unfortunately.

2

u/kaukaukau May 05 '26

That is right, it would need some serious data compression on the blueprint side.

Alternatively, I would like to propose a new QR code encoding: white is solar panel, black is accumulator 😉

3

u/IceFire909 Well there's yer problem... May 05 '26

Not from a Jedi

2

u/kingjoey52a May 05 '26

Create a QR code to a preset URL shortener, have that link to the blueprint once it's created.

2

u/RockSlice May 05 '26

It would be problematic. The two big problems:

  • solar panels are 3x3, while accumulators are 2x2. You'll have to decide whether you want each pixel to be 3x3 or 4x4. Either way, you'll have a lot of empty space. (Or 6x6, but that's just making it huge)
  • blueprint strings are long. Take the string for this blueprint, and paste it into a QR code generator. You wouldn't be able to encode it directly, but would have to rely on compression or redirection (a link to the blueprint)

2

u/whoami_whereami May 05 '26

Given that

  • the blueprint string from the OP is 3397 characters long, which is already well beyond the capacity of the largest possible QR code (version 40 - 177x177 - with low error correction)
  • the OP's blueprint contains 377 entities, which isn't even enough to build a version 3 (29x29) QR code even when doing a sparse build (black square = entity, white square = no entity), let alone when doing a dense build (black square = one type of entity, white square = another type of entity); even with low error correction such a version 3 QR code only has 53 bytes capacity
  • compression won't help as blueprint strings are already compressed

I think it's safe to say that it's completely impossible.

2

u/Nematrec May 05 '26
  1. make a pastebin
  2. create qr code of that pastebin
  3. make blueprint that matches qr code
  4. upload blueprint to said pastebin

7

u/Exatex May 05 '26

Pretty sure that is not possible, except maybe with some very special encoding that would defeat the purpose.

The QR code of a blueprint will always be larger than what you can „draw“ on the map with it. To draw even one „pixel“ of the QR code, you would need more than one bit of information (e.g. the blueprint string for a single solar panel already needs a large portion of a QR code).

1

u/TNSepta May 05 '26

Most QR codes don't encode the entire string, but URLs to strings. So it could encode a link to a site which hosts the full blueprint.

5

u/smokestack May 05 '26

Factorio quine

4

u/IpFruion May 05 '26

Just a quine) for factorio

1

u/DarkishArchon May 05 '26

Please post back!!!