Ok. Here goes.

I am writting an RPG engine. :-P

I want the map format to be a single file. It will include all the data for all the effects (scripts and whatnot), the map's name, NPC lists, width/height, yadda yadda.

Here's the question.

I have almost no experience with file i/o with C/C++. How would I implement such a thing to read/write these types of files?

And as an added question, the NPC's that walk around. I figure their behavior could be done using a script. How would I save a script to a file that I could later call up? Naturally, the NPC's would some sort of struct or class or something (yet to be determined).

Any help would be much appreciaited. I really don't have much knowledge in writting these kinds of things in C/C++.

Thanks!

Leeor...