mob
proc
Save() // This is the proc that saves the player
// if(Savable)
if(onlogin)
return
if(key)
if(!src.loc)
return
if(src.loc==locate(37,239,28))
return
var/savefile/F=new("Save/[ckey]")
F["x"]<<x
F["y"]<<y
F["z"]<<z
F["Player Log"]<<PlayerLog
Write(F)
AutoSave()
Save()
spawn(rand(30,100))
AutoSave()
Load()
if(fexists("Save/[ckey]"))
var/savefile/F=new("Save/[ckey]")
Read(F)
F["x"]>>x
F["y"]>>y
F["z"]>>z
F["Player Log"]>>PlayerLog
loc = locate(x,y,z)
icon_state=""
pixel_y=0
pixel_x=0
see_in_dark=3
overlays-='AFK.dmi'
overlays-='SpeakBubble.dmi'
src.hud = new(src)
src.interface = new(src)
onlogin=0
Problem description:
My game was built with a save proc that i'm now learning isn't the most practical. This is what i have on it.
The problem is that after designing the game i discovered my skills aren't being saved on the character and i've been told it's because i didn't use a code similar to this...
client
proc
SaveMob()
var/char_ckey = ckey(mob.name)
F["players/[ckey]/[char_ckey]"] << mob
I've been told that because it's a client process and a mob save it actually saves everything including the skills which would solve my problem, furthermore since i also use an autosave system but im not sure how true this is.
My question is basically am i on the right track? Is it the fact that my save process is under a mob instead of client proc ?? Could i fix everything by switching that or is too much already reliant upon it?
If so are there any other easier ways to add the saving of abilities to my coding?