Is there smth like read_file?

Place to get help with not working mods / modding interface.
avatarDr
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Jul 06, 2016 1:53 pm
Contact:

Is there smth like read_file?

Post by avatarDr »

We have write_file method that allows custom data to be stored. Is there corresponding method exists to get that data?
Specifically I'm looking for a way to save/load player's inventory to transfer it from one map to another. Probably, there is another way to do so?

User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 253
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: Is there smth like read_file?

Post by DedlySpyder »

No you can't read files. I think the reasoning is for Multiplayer desyncs.

You could try to do something like blueprint string though.

avatarDr
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Jul 06, 2016 1:53 pm
Contact:

Re: Is there smth like read_file?

Post by avatarDr »

DedlySpyder wrote:No you can't read files. I think the reasoning is for Multiplayer desyncs.
Well, this can be easily avoided by making file saving-loading have player as argument.
I'm new here, is it reasonable to write 'bout this issue in interface request section?

Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Is there smth like read_file?

Post by Zeblote »

avatarDr wrote:I'm new here, is it reasonable to write 'bout this issue in interface request section?
Yes. Maybe at some point they will realize that a file API is really essential.

User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 253
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: Is there smth like read_file?

Post by DedlySpyder »

You can try, but it's been suggested and shot down before IIRC

Post Reply

Return to “Modding help”