Player/var/Team/team
Player
proc/saveCharacter()
....
Write(F)
proc/loadCharacter()
....
Read(F)
Player
Write(savefile/F)
..()
[Deals with saving coordinates]
Read(savefile/F)
..()
[Deals with loading coordinates]
Team/var/Monster/monster1
Problem description:
Essentially I have three datum based things to save, the mob based Player Datum, which has a Team datum, containing mob based Monster Datums.
Now, I'm working under the assumption that when the Player saves, the team will save, and the monsters, etc. And for the most part it's worked.
But, I'm noticing problems. Specifically, the monsters aren't saving correctly. I don't believe any of the actual vars of the monsters are saving, such as name, gender, or stats.
I think that the problem may be with my New procs. I pass arguments into my Monster/New(), for example, to deal with original stats and such for new monsters. Are these procs getting in the way of the load, possibly?
You don't need to call Read() and Write() manually. They are called every single time an atom is written directly to a savefile. I think it is always better to just write the variables directly to the savefile, skipping those that aren't necessary to save (see: icon in the reference). It really does help avoid some unnecessary problems you may come across.
Now when saving atoms, anything that isn't /tmp, /const, /global, or equal to its initial() value is saved. This is all handled by Read() and Write() functions of the atom. New() technically does nothing at all unless otherwise defined, so that is not the source of your problem. Of course, the exception there is that you may be overwriting the saved stats. Keep in mind that New() is only called after the object has been created and has had all of its variables initialized.
So I'm going to blame your problem on the possible overwritten Read() and Write() functions of your code. Make sure you look not only for the derivative /Monster type functions, but also for the parent_type of /Monster's functions and anything else that may follow, for example:
It is also possible that you have some other problems with stuff like cross-referencing between savefiles. Take a look at the following article, it may be a great help:
The Pitfalls of Savefiles
Good luck with HAH!