ID:145859
 
Code:


Problem description:

I finally figured it out, I should have did a savefile to text sooner and just read what was being saved. Anyway, its the icon file itself, totalling to around 250k per icon saved. If they have 4 characters saved in the file its over 1000k. I'm using deadron's characterhandling and I
also have multiple icon files. I switch the character's icon file at different times, it looks like the icon file itself is only saved if it has been switched.

How do you suggest solving this problem?
Use only one icon file for the entire game and only switch icon states? ALso if I do that will I run into any problems having one file thats so big and has so many different icon_states in it? Are there any bad side effects for having HUGE one HUGE icon file?
    mob
Login()
switch(input("Do you want to start a new game or load", "New or Load", text) in list ("New","Load"))//This ask if you want to creat a new game or load one.
if("New")
var/savefile/F = new("players/[src.ckey].sav")//saves user name
Write(F)//this saves the vars
world<<"<FONT SIZE=-1><font color = black>[usr] has just joined for the first time."
usr.icon = /mob/usr/
usr.loc=locate(5,5,1)
sleep(10)
usr.gmcheck()
usr << "<FONT SIZE=-1><font color = black>Use Fix Black Screen verb you if have no icon or your screen black."

if("Load")
var/savefile/F = new("players/[src.ckey].sav")//reads and loads your name
Read(F)//reads the saved vars that you have
var/last_x//\__
var/last_y//This part of the code loads your last location.
var/last_z///---
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)
usr<<"<FONT SIZE=-1><font color = black>Your character has been sucessfuly loaded."
world<<"<FONT SIZE=-1><font color = black>[usr] has came back."
sleep(10)
usr.gmcheck()
usr << "<FONT SIZE=-1><font color = black>Use Fix Black Screen verb you if have no icon or your screen is black."


mob/Logout()
usr.Save()
sleep(10)
world << "<FONT SIZE=-1><FONT COLOR=purple>[src] has left this world!"
del(usr)



mob
verb
Save()
var/savefile/F = new("players/[src.ckey].sav")
F["last_x"] << x//\__
F["last_y"] << y//This is used to access an element of a list.
F["last_z"] << z///---
Write(F)//Saves the vars.
usr<<"Saving"
sleep(20)
usr<<"Your progress has been saved."
In response to Ripiz
Um, besides from the major usr abuse, that didn't answer his question. He said he made the save files, but he didn't know how to reduce the size of them, I think.
In response to Kalzar
Yeah, I already have the code. I edited the code used in deadron's library and managed to reduce the size a bit and then a bit more by making all objects variables tmp, the problem is that when a player's icon is diferent from that type's defined icon the icon itself is saved. The only way I know to fix this is to only use one icon, currently I use many and using only ne will require some changes. Does using only one sound like th eonly solution and do you know of any negative side effects for having over 100 icon_states on a single icon?