ID:1099414
 
This is a two part question. If you only answer one, I'd still be extremely grateful.

These both have to do with saving, slightly.

I would like to know how to have a player write in a journal, and have that file saved, so they can access it even if the server is rebooted. I also want the journal to be orderly, and allow the player to set titles for every entry they make, or sort the entry in a category. For instance, I DON'T want the following code.

obj
journal
icon='Bleh.dmi'
icon_state="BlehJournal>:("
name="Player Journal"
text=""
Click()
var/ask=input("Write or Read?")in list("Write","Read","Cancel")
if(ask=="Write")
var/entry=input("Add what to the Journal?")
src.text+=entry
else
if(ask=="Read")
usr<<text



In my opinion, that's just lazy coding, and extremely messy when the player reads it. I would be open to text2file() and file2text() suggestions, I just don't know how to go about that.





My second problem is map saving. I know perfectly well how to save a player's vars, inventory (contents), and available verbs, but I have no idea how to save the world's map. In the game I'm making, players can change the environment and build onto it. I don't want the map to be reset every time the server reboots or crashes. Any suggestions are welcome.


Thank you very much for reading all of this, and I appreciate any help anyone can offer me. I've coded for a while, but these are two problems that have always confronted me. Thanks again!
text2file() appends text to a file. file2text() reads text from a file. F1 should explain it pretty well.

Saving the map is done with LummoxJR's swapmaps library. It's not terribly easy to understand but the examples help you figure it out.
In response to Lugia319
Lugia319 wrote:
text2file() appends text to a file. file2text() reads text from a file. F1 should explain it pretty well.

Saving the map is done with LummoxJR's swapmaps library. It's not terribly easy to understand but the examples help you figure it out.

So for the text2file thing, would it create a file on the player's computer, or mine? Every player would need a separate journal, but I don't want a new text file for every player that goes in the game.
You can pick whether or not you want it on your computer or theirs.
In response to Lugia319
How could I go about that? Is it an option in the proc?
No. Look up client side saving.