Storing variables

Place to get help with not working mods / modding interface.
revol_
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Oct 30, 2016 12:31 pm
Contact:

Storing variables

Post by revol_ »

Currently working on a mod that should add editable text signs and I am almost done. After a while I realized that the texts were stored on a table that was client side, but I want my mod to work for servers as well and I want to store the sign texts on the server and preferably even in a way the game puts them in safefiles. How do I do this?
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5412
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Storing variables

Post by Klonan »

Put them in a global table

Ie if you say global.sign_text = "hello"

It will be preserved across save/load and won't desync
Post Reply

Return to “Modding help”