Provoked Posted September 24, 2021 Share Posted September 24, 2021 (edited) Hello Guys! I want to know how to store data in Don't Starve Together. Basically, all I want to is to store a single number and only that. This number will be created and it's initial value will be zero, but after world generation it'll store a single number (my mod is server-side). After that, this number will be loaded when the mod is enabled or when the master sim enters a world with the mod enabled. Can someone help me? Thank you Edited October 10, 2021 by Provoked Link to comment https://forums.kleientertainment.com/forums/topic/133936-solved-help-with-saving-single-variable-data/ Share on other sites More sharing options...
Monti18 Posted September 24, 2021 Share Posted September 24, 2021 There are a few possibilities: You can use the function TheSim:SavePersistenString to save a string into a file Or you can use the io commands of lua to create your own file with the number. Or you can make a dummy component that you add to TheWorld where you save your number. This will depend on what will be the best for you, the persistent string will be saved in the folder of the cluster, so you will need a new file for each world. Same goes for the dummy component. The created file will be saved in the data folder of Don't Starve Together, so it will be the same for each world. 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/133936-solved-help-with-saving-single-variable-data/#findComment-1498086 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now