Cosmo Savegame Format

From ModdingWiki
Jump to navigation Jump to search

File Format

The Cosmo Savegame Format is an uncompressed file with extension .SV# (where # is a number from 1 to 9), used to store savegame information to be retrieved later by the game engine.

Data type Description
UINT16LE iHealth Player's health (0 to 6; 1 means no bars left, 0 means dead)
UINT32LE iScore Current score
UINT16LE iStars Number of collected stars
UINT16LE iMapOn Current level number
UINT16LE iBombs Number of bombs in the inventory (0 to 9)
UINT16LE iHealthBars Number of health bars the player has (3 to 5)
UINT16LE iCheated 1 if cheats have been used, 0 otherwise
UINT16LE iHasHadBomb Hint system: 1 if cosmo has ever had a bomb, 0 otherwise (controls whether help text is shown when no bombs are present)
UINT16LE iKnowsHowToKill Hint system: 0 to start with, 1 if cosmo took damage and so the "jump on top of enemies to defend yourself" help should be shown, and finally 2 once either cosmo has jumped on an enemy or the help text has been shown
UINT16LE iKnowsAboutPowerups Hint system: 0 to start with, 1 if the "power up modules increase cosmo's health" help text has been shown
UINT16LE iChecksum Must match iHealth + iStars + iMapOn + iBombs + iHealthBars

If the user tries to load a savegame with an invalid checksum, the game will show an error message and quit to DOS.

Credits

This file format was reverse engineered by K1n9_Duk3. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)