Log Files

From WinBolo

Revision as of 17:39, 26 November 2008 by John (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Winbolo log files are server recorded files that allow a game to be replayed via the Log Viewer application.

Contents

File Format

Log files are stored in a zip compressed file with the extension of wlg. The zip file contains a single file log.dat which contains the log file data.


Header

The header of the log file is as followed

  • 8 byte header WBOLOMOV
  • 1 byte version number (currently 0)
  • Map name stored as a Pascal String
  • 1 byte Game Type
  • 1 byte boolean allow hidden mines setting
  • 1 byte AI Type
  • 1 byte boolean password used
  • 1 byte maximum number of players in the game
  • 1 byte WinBolo major version number
  • 1 byte WinBolo minor version number
  • 1 byte WinBolo revision version number
  • 4 bytes server IP address (sprintf(serverIP, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);)
  • 2 bytes server port in host network byte order.
  • 4 bytes game creation time in network byte order.
  • 32 byte WBN server key (all 0's for non participant)


The last byte of the creation time (network byte order) becomes the first encryption key.

The header must be immediately followed by a snapshot.


Snapshot

Log Items

The list of log items that are stored in the log file are located in bolo/log.h. The are:

/* The events we record in our log file */
typedef enum {
log_PlayerJoined=1,
log_PlayerQuit,
log_PlayerLocation,
log_LgmLocation,
log_MapChange,
log_Shell,
log_SoundBuild,
log_SoundFarm,
log_SoundShoot,
log_SoundHitTank,
log_SoundHitTree,
log_SoundHitWall,
log_SoundMineLay,
log_SoundMineExplode,
log_SoundExplosion,
log_SoundBigExplosion,
log_SoundManDie,
log_MessageServer,
log_MessageAll,
log_MessagePlayers,
log_ChangeName,
log_AllyRequest,
log_AllyAccept,
log_AllyLeave,
log_BaseSetOwner,
log_BaseSetStock,
log_PillSetOwner,
log_PillSetHealth,
log_PillSetPlace,
log_PillSetInTank,
log_SaveMap,
log_LostMan,
log_KillPlayer,
log_PlayerRejoin,
log_PlayerLeaving,
log_PlayerDied
} logitem;
Personal tools