factorio-blueprint-decoder icon indicating copy to clipboard operation
factorio-blueprint-decoder copied to clipboard

Extend version parser with qualityVersion

Open danielniccoli opened this issue 1 year ago • 4 comments

https://github.com/asheiduk/factorio-blueprint-decoder/blob/d6cd1562f52e715721ce448be977e2d4fc71600a/decode#L2538

The above line is the qualityVersion.

image

Typically set to 0, although I don't know when it's set to a different value.

image

I think that should be part of the version parsing.

danielniccoli avatar Oct 18 '24 10:10 danielniccoli

@danielniccoli Where did you get this struct?

I'm trying to do my own decoder in TypeScript supporting Space Age as well: https://github.com/cinderblock/factorio-blueprint-converter

cinderblock avatar Feb 08 '25 08:02 cinderblock

I got the struct by decompiling Factorio.

danielniccoli avatar Feb 08 '25 09:02 danielniccoli

I've been looking with Ghidra but I haven't used it before... a lot to go through, even with the debug symbols. Did you find the function that decodes the blueprint dat files?

cinderblock avatar Feb 08 '25 09:02 cinderblock

As far as I remember there was a lot of abstraction and I gave up understanding the encode and decode process.

danielniccoli avatar Feb 08 '25 14:02 danielniccoli