MainiacJoe wrote:I noticed too that the bones files themselves are very small, so the information they need is in another file or files somewhere that would need to be uploaded too and kept together.
EDIT: I'm guessing it's just the morgue .txt file that has the same timestamp in the filename as the bones file's "date created" OS timestamp.
The bones file is all you need. Remember that bones in Crawl don't include the level, only the ghost(s) itself. There's not all that much info for a ghost, and it is all encoded numerically other than the name. Some of the values are only relevant for panlords, ugly things, or dancing weapons (which use the same data structure), but they are stored anyway:
- name (2 bytes + length of name)
- species (2 bytes)
- job (2 bytes)
- religion (1 byte)
- best skill (2 bytes)
- level of best skill (2 bytes)
- xl (2 bytes)
- maxhp (2 bytes)
- evasion (2 bytes)
- AC (2 bytes)
- base damage (2 bytes)
- speed (2 bytes)
- move energy (move speed) (2 bytes)
- see invis (1 byte)
- attack brand (2 bytes)
- attack type (not used for player ghosts) (2 bytes)
- attack flavor (not used for player ghosts) (2 bytes)
- resistances (2-5 bytes-ish)
- colour (not used for player ghosts) (1 byte)
- flying (always true for player ghosts) (1 byte)
- spells (1 byte + 5 bytes per spell)
So somewhere around 37-70 bytes per ghost, plus the length of the name, plus a little extra for file headers, number of ghosts, etc.
As for versions: Crawl can detect when the bones file is for too old or too new a version, and just refuses to load it. But you can determine that a priori by looking at the first couple of bytes and comparing those to the "Save file version" printed by crawl -version. If the first byte equals the major version (currently 34, since 0.12 or so) and the second byte is less than or equal to the minor version (currently 157 in trunk), then the bones file can be loaded.
Edit: forgot the name