|Subject:||Re: [Adonthell-devel] charedit file format|
|Date:||Thu, 7 Jun 2007 20:23:04 -0500|
On 6/7/07, Andrew Phillips < address@hidden > wrote:
Hey, welcome back :-).
> I've established some very limited attribute and property classes, though I
> have yet to integrate them with the existing character class. I'd like to
> get cracking on charedit's file operations as well, so I'd like to make sure
> there isn't already a desired file format for characters. If it does exist,
> where in CVS should I be looking? If not, what should it look like?
So far, there isn't. There also isn't any specific way it should look
like. Form follows function in this case. The only real requirement is
to stick with the general "conventions" for loading/saving:
I.e. all classes have the pair of methods
void put_state (base::flat & file) const
bool get_state (base::flat & file)
As an addition, the rpg/character class might also get the pair
bool save (const std::string & fname) const
bool load (const std::string & filename)
The first pair can be used to save/load a whole list of characters
into/from a stream, the second pair would save/load one character
into/from a file it creates itself. A good example would be
A general example for the saving/loading mechanism is
When saving to a file you have the option to create a GZ_FILE or an
XML_FILE. I suggest using latter, so you can more easily look at the
contents of the file and modify it.
Let me know if you have further questions.
P.S.: What's your current development environment? Do you still work
on Windows? And if so, did you get a chance to follow that
Adonthell-devel mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|