How to read files on the device?

Place to get help with not working mods / modding interface.
adorableparker
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Aug 23, 2021 5:24 pm
Contact:

How to read files on the device?

Post by adorableparker »

I'm trying to make a mod that can backup blueprints by copying the "blueprint-storage.dat" file regularly, but Factorio doesn't seem to allow "io.open()" to read the file. What should I do?
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: How to read files on the device?

Post by eradicator »

adorableparker wrote: Mon Aug 23, 2021 5:39 pm What should I do?
Factorio mods are sandboxed. Access to any kind of non-game data is not allowed, to keep determinisim across all platforms. You'll have to do it as an external script, not as a mod.
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”