[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] charedit file format

From: Andrew Phillips
Subject: Re: [Adonthell-devel] charedit file format
Date: Thu, 7 Jun 2007 20:23:04 -0500

Right now, I'm doing the new first attempt on Endor, my alma mater's linux box. My windows box at home is still flaky and unstable (I'm hard on hardware, I guess), so I've abandoned it as a dev environment. Once I've got a basic, terminal-based form of charedit working on Endor and a trustworthy box of my own, I'll probably continue under Win32 via Eclipse. However, I will read readme.win32 just for information's sake.

I'll bear the get/set standard in mind. I noticed the base classes as well.

My definition of basically working is:
saves to and loads from file(s)
calculates dependent values based on input
allows for character creation from templates (racial, etc)

My main question, given the lack of a file format spec is:
Do we want all the characters in a delimited flat file, or should each character have a separate file?

At this point, since we are only tracking a limited number of well-defined values, a singe flat file might work just fine.

On 6/7/07, Kai Sterker <address@hidden > wrote:
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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]