Thread Tools
Old December 6, 2000, 16:58   #1
MarkG
Guest
 
Posts: n/a
description of the MAP FORMAT
just got this from Mr Ogre

quote:


The file is divided into blocks. Each block starts with a four character ID (as defined below) followed by 4 bytes for the size of the rest of the block (not counting the 4 byte header or the 4 bytes for size). All data is stored in Intel byte order. A TERR block, describing the map terrain, is required, but the rest are, at least theoretically, optional. A few of these blocks will still be read if present, but are not generated by the internal save code any more.


#define k_TERRAIN_HEADER 'TERR'
// sint16 width, height
// uint8[width * height]

#define k_TERRAIN_ENV_HEADER 'TENV'
// sint16 width, height
// uint32[width * height]

#define k_CITIES_HEADER 'CITY'
// sint32 numCities
// { numCities instances of:
// sint16 x, y
// sint32 size \
// uint64 improvements >-- MapFileCityData
// uint64 wonders /
// uint8 owner
// }

// Same, but has names too
#define k_NEW_CITIES_HEADER 'NCTY'
// sint32 numCities
// { numCities instances of:
// sint16 x, y
// sint32 size \
// uint64 improvements >-- MapFileCityData
// uint64 wonders /
// uint8 owner
// string name
// }

#define k_UNIT_TYPES_HEADER 'UTYP'
// sint32 numTypes
// { numTypes instances of:
// String db_ID_Name
// }

#define k_UNITS_HEADER 'UNIT'
// sint32 numCellsWithUnits
// { numCellsWithUnits instances of:
// sint16 x, y
// sint32 numUnits
// { numUnits instances of:
// uint8 owner
// sint32 type
// }
// }

#define k_IMPROVEMENT_TYPES_HEADER 'ITYP'
// sint32 numTypes
// { numTypes instances:
// String db_ID_Name
// }

#define k_IMPROVEMENTS_HEADER 'IMPS'
// sint32 numCells
// { numCells instances:
// sint16 x, y
// uint8 numImprovements
// { numImprovements instances:
// sint32 impType
// }
// }

#define k_VISION_HEADER 'VISN'
// uint8 player
// sint16 width, height
// uint16 [width * height]

#define k_ADVANCE_TYPES_HEADER 'ATYP'
// sint32 numTypes
// { numTypes instances:
// String db_ID_Name
// }

#define k_PLAYER_ADVANCES_HEADER 'PADV'
// uint8 player
// sint16 numAdvances
// uint8[numAdvances]


// MDS - 08/2000
#define k_HUTS_HEADER 'HUTS'
// uint32 value
// uint32 typeValue

// MDS - 08/2000
#define k_CIVS_HEADER 'CIVS'
// uint32 civ


[This message has been edited by MarkG (edited December 06, 2000).]
 
Old December 6, 2000, 19:19   #2
Mr Ogre
Warlord
 
Local Time: 09:43
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Azeroth
Posts: 147
I realize this isn't a very thorough description, but it should be accurate. If anyone's planning to work on an exporter to this format, I'll try and answer questions here. Poking around with a hex editor in some maps saved from the game with this document at hand might be helpful as well.
Mr Ogre is offline  
Old December 6, 2000, 22:40   #3
skorpion59
Prince
 
Local Time: 03:43
Local Date: October 31, 2010
Join Date: May 1999
Location: Tulsa, Oklahoma, USA
Posts: 716
I would like to clarify that this is the BINARY map format used by the 'Save Map' editor option.

While, the BMP2CtP2 program (mentioned in another thread) uses the TEXT map format used by the Chat Window's '/Importmap' option.

Thanks, Mr. Ogre

skorpion59 is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:43.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team