ID:161215
 
mob
var
stat
health=new(100,100)
stamina=new(100,100)
chakra=new(100,100)
exp=new(10,0)
speed=new(7.5,7.5)
endurance=new(5,5)
strength=new(5,5)
tai=new(5,5)
nin=new(5,5)
gen=new(5,5)
taiexp=new(5,0)
ninexp=new(5,0)
genexp=new(5,0)
weight=new(1,1)
spd=new(5,0)

I want to save mob/var/stat in one F[""]>>** / F[""]<<**.
Is that possible, and how'd I do that?

I figured that:
mob/Read(savefile/F)
F["icon"]>>icon
F["overlays"]>>overlays
F["contents"]>>contents
F["name"]>>name
F["health"]>>health.value
F["maxhealth"]>>health.max_value
F["chakra"]>>chakra.value
F["maxchakra"]>>chakra.max_value
F["stamina"]>>stamina.value
F["maxstamina"]>>stamina.max_value
F["exp"]>>exp.value
F["maxexp"]>>exp.max_value
F["taiexp"]>>taiexp.value
F["mtaiexp"]>>taiexp.max_value
F["ninexp"]>>ninexp.value
F["mninexp"]>>ninexp.max_value
F["genexp"]>>genexp.value
F["mgenexp"]>>genexp.max_value
F["speed"]>>speed.value
F["maxspeed"]>>speed.max_value
F["weight"]>>weight.value
F["maxweight"]>>weight.max_value
F["endurance"]>>endurance.value
F["maxendurance"]>>endurance.max_value
F["strength"]>>strength.value
F["maxstrength"]>>strength.max_value
is very unneficient for the save file size.
Well one option you have is just to save/load the datum directly, and create it anew if it's null after you load it. That won't save you space in a savefile though. The best way to save savefile space is to be sure you're not saving any icons and such.

Lummox JR
In response to Lummox JR
But if I leave out the icon/overlays, I don't have a icon. >_<
In response to Sokkiejjj
Sokkiejjj wrote:
But if I leave out the icon/overlays, I don't have a icon.

Leaving out the icons and overlays is one of the key aspects of saving in BYOND. They just take up valuable disk space. When you reload the character, just rebuild the icon and overlays from source files. You'll find your savefiles are a lot smaller that way.

Lummox JR
In response to Lummox JR
What about overlays, though?
In response to Sokkiejjj
Sokkiejjj wrote:
What about overlays, though?

Same deal. Cut the overlays out of the savefile completely--they'll all be bonded into a single overlay anyway, so if you want to preserve layers this is a must. When you reload your character, reapply the overlays.

The idea is to have a proc standing by that you use just after login. When you save, save any info that you need in order to rebuild the icon and overlays, such as what items are worn, what hairstyles were picked and which colors, etc.

Lummox JR
In response to Lummox JR
Ah, I see. Thanks for the information Lummox JR.
This will sure help me decreasing the save file size.