Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site forums as they ran on Ultimate Bulletin Board, 1998–2001. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 2005 site & forums

  Apolyton Civilization Site Forums
  CtP2-Creation
  description of the MAP FORMAT

Post New Topic  Post A ReplyPost A Reply In A New Window

profile | register | preferences | faq | search next newest topic | next oldest topic bottom of page
Author
Topic:   description of the MAP FORMAT Format for Better Printing
MarkG
Apolyton CS Co-Administrator
Greece
b.02-15-99
posted December 06, 2000 15:58   Click Here to See the Profile for MarkGClick Here to Email MarkG  send a private message to MarkGSend a Message to UIN: 2865183 Visit MarkG's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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).]
Mr Ogre
Activision
Venice, CA, USA
b.02-15-99
posted December 06, 2000 18:19   Click Here to See the Profile for Mr OgreClick Here to Email Mr Ogre  send a private message to Mr Ogre Visit Mr Ogre's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.
skorpion59
CTP Maps Webmaster
Tulsa, Oklahoma, USA, (GMT -6)
May 99
posted December 06, 2000 21:40   Click Here to See the Profile for skorpion59Click Here to Email skorpion59  send a private message to skorpion59Send a Message to UIN: 92173697 Visit skorpion59's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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

Apolyton Civilization Site Forums
> > > CtP2-Creation Forum

next newest topic | next oldest topictop of page

All times are EDT

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A ReplyPost A Reply In A New Window
Hop to:

Contact Us
Apolyton Civilization Site

Powered by: Ultimate Bulletin Board, Version 5.44a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.

Front Page | Civilization III | Dinosaurs | Civilization II | Call to Power | Call to Power II | Alpha Centauri | Alternative Civs | Misc | Links | About ACS | GameStats
GameLeague | Scenario League | Hodadian Award Central | Civilization Scenario Collection | Spanish CivII Site | Clash of Civs | CtP Maps | Art of War