Generate an export of data.raw?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Perlin
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Jan 13, 2019 5:27 am
Contact:

Generate an export of data.raw?

Post by Perlin »

Hello,

Is there a way to generate an export of the content of data.raw ?

I would like to generate the same type of output than this one : https://gist.githubusercontent.com/Bilk ... 3c1ae7/raw

I just need to do it with my mod activated, so I have also access to the data of my mod.

Thank you

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Generate an export of data.raw?

Post by eradicator »

Code: Select all

log(serpent.block(data.raw))
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Generate an export of data.raw?

Post by darkfrei »

eradicator wrote:
Wed Nov 06, 2019 6:07 pm

Code: Select all

log(serpent.block(data.raw))
Without sorting:

Code: Select all

log(serpent.block(data.raw, {sortkeys=false}))
https://github.com/pkulchenko/serpent

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Generate an export of data.raw?

Post by eradicator »

darkfrei wrote:
Wed Nov 06, 2019 6:12 pm
eradicator wrote:
Wed Nov 06, 2019 6:07 pm

Code: Select all

log(serpent.block(data.raw))
Without sorting:

Code: Select all

log(serpent.block(data.raw, {sortkeys=false}))
https://github.com/pkulchenko/serpent
The example linked by the @OP is clearly sorted.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Generate an export of data.raw?

Post by Bilka »

eradicator wrote:
Wed Nov 06, 2019 6:54 pm
The example linked by the @OP is clearly sorted.
There is also the part where it says the mod name used to generate it in the first line.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Generate an export of data.raw?

Post by eradicator »

Bilka wrote:
Wed Nov 06, 2019 7:02 pm
eradicator wrote:
Wed Nov 06, 2019 6:54 pm
The example linked by the @OP is clearly sorted.
There is also the part where it says the mod name used to generate it in the first line.
Very sharp of you to notice :lol:. Now hopefully nobody looks at the url ... /gotta go now
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Modding help”