OpenMW
components/esm/loadnpcc.hpp
Go to the documentation of this file.
00001 #ifndef OPENMW_ESM_NPCC_H
00002 #define OPENMW_ESM_NPCC_H
00003 
00004 #include <string>
00005 
00006 // TODO: create implementation files to remove this
00007 #include "esmreader.hpp"
00008 
00009 namespace ESM {
00010 
00011 class ESMReader;
00012 class ESMWriter;
00013 
00014 /*
00015  * NPC change information (found in savegame files only). We can't
00016  * read these yet.
00017  *
00018  * Some general observations about savegames:
00019  *
00020  * Magical items/potions/spells/etc are added normally as new ALCH,
00021  * SPEL, etc. records, with unique numeric identifiers.
00022  *
00023  * Books with ability enhancements are listed in the save if they have
00024  * been read.
00025  *
00026  * GLOB records set global variables.
00027  *
00028  * SCPT records do not define new scripts, but assign values to the
00029  * variables of existing ones.
00030  *
00031  * STLN - stolen items, ONAM is the owner
00032  *
00033  * GAME - contains a GMDT (game data) of unknown format
00034  *
00035  * VFXM, SPLM, KLST - no clue
00036  *
00037  * PCDT - seems to contain a lot of DNAMs, strings?
00038  *
00039  * FMAP - MAPH and MAPD, probably map data.
00040  *
00041  * JOUR - the entire journal in html
00042  *
00043  * QUES - seems to contain all the quests in the game, not just the
00044  * ones you have done or begun.
00045  *
00046  * REGN - lists all regions in the game, even unvisited ones.
00047  *
00048  * The DIAL/INFO blocks contain changes to characters' dialog status.
00049  *
00050  * Dammit there's a lot of stuff in there! Should really have
00051  * suspected as much. The strategy further is to completely ignore
00052  * save files for the time being.
00053  *
00054  * Several records have a "change" variant, like NPCC, CNTC
00055  * (contents), and CREC (creature.) These seem to alter specific
00056  * instances of creatures, npcs, etc. I have not identified most of
00057  * their subrecords yet.
00058  *
00059  * Several NPCC records have names that begin with "chargen ", I don't
00060  * know if it means something special yet.
00061  *
00062  * The CNTC blocks seem to be instances of leveled lists. When a
00063  * container is supposed to contain this leveled list of this type,
00064  * but is referenced elsewhere in the file by an INDX, the CNTC with
00065  * the corresponding leveled list identifier and INDX will determine
00066  * the container contents instead.
00067  *
00068  * Some classes of objects seem to be altered, and these include an
00069  * INDX, which is probably an index used by specific references other
00070  * places within the save file. I guess this means 'use this class for
00071  * these objects, not the general class.' All the indices I have
00072  * encountered so far are zero, but they have been for different
00073  * classes (different containers, really) so possibly we start from
00074  * zero for each class. This looks like a mess, but is probably still
00075  * easier than to duplicate everything. I think WRITING this format
00076  * will be harder than reading it.
00077  */
00078 
00079 struct LoadNPCC
00080 {
00081     static unsigned int sRecordId;
00082 
00083     std::string mId;
00084 
00085   void load(ESMReader &esm)
00086   {
00087     esm.skipRecord();
00088   }
00089   void save(ESMWriter &esm) const
00090   {
00091   }
00092 };
00093 }
00094 #endif