Character progress
Character select stores an opaque ID in each entry of characters.xml and passes it to the game. Older entries acquire IDs when loaded. IDs distinguish duplicate names and a deleted character from a newly created one. Progress files use the ID, not the displayed name, and are resolved through the engine save directory.
On map change, disconnect and shutdown, the game writes a versioned, checksummed snapshot to a temporary file and atomically replaces the previous save. It restores a selected character after player initialization. It preserves backpack and bank contents, copper, experience, learned Fireball rank, quest state and kill progress, reward flags, known taxi nodes and explored-area bits and action-slot bindings. Bindings are restored only for spells allowed by the character class and learned rank; empty slots remain empty. Map transitions retain pending teleport behavior and preserve the in-memory progress even if writing fails. A failed write is reported; switching characters is rejected when the outgoing character could not be saved.
Missing saves start fresh. Invalid or unreadable saves do not partially modify game state, and the session does not overwrite such a file. Sessions without a selected character ID are transient. Inventory, bank and progression persist; world state, position, flight in progress, and transient windows do not. Version 1 uses a fixed C structure and requires the same byte order and compatible structure layout; cross-architecture migration is not yet implemented. Character IDs are published only after the roster is atomically written; migration failures leave the session without a persistent ID. ID allocation checks for existing character save files.