From: tom@europa.lonestar.org (Tom Kimball)
Newsgroups: comp.sys.ibm.pc.games
Subject: CIV: Format Info Map (Version 1.3)
Date: 20 Nov 92 05:59:33 GMT
Organization: Moria Mining Guild (BBS) -- Dallas, Texas, USA


Some people didn't get this version so I am reposting it.

This is version 1.3 of the format map for saved games.  
Send me updates/corrections/etc
----------------------------------------------------------------------

CIVILIZATION V1.0 FORMAT INFO MAP   Version 1.3
Tom Kimball  
tom@europa.lonestar.org

This is a collective Usenet effort.  The following people supplied 
contributions and information:

Cordell Melgaard	cmelgarr@uwsuper.edu
Jasona			jasona@sco.com
Ralph Betza		uunet!ssiny!gnohmon
Charles Hughes
AI			syserror@sage.cc.purdue.edu
Rocky Brown    		ooprb@trex.oscs.montana.edu


1. SAVE FILES

civil0.sve - 1st game
civil1.sve - 2nd game
civil2.sve - 3rd game
civil3.sve - 4th game
civil4.sve - 3000 BC
civil5.sve - 2000 BC
civil6.sve - 1000 BC
civil7.sve - 1 AD 
civil8.sve - 1000 AD
civil9.sve - 1500 AD


2. CIVILIZATIONS INFO

NUMBERS	COLORS		CIVILIZATION	        MASK
0 	RED 		Barbarians		01
1 	WHITE 		Romans/Russians		02
2 	GREEN		Babylonians/Zulus	04
3 	DARK BLUE	Germans/French		08
4 	YELLOW		Aztecs/Egyptians	10
5 	LIGHT BLUE	Americans/Chinese	20
6 	PINK   		English/Greek		40
7 	GREY		Indians/Mongols		80


3. UNITS LAYOUT (12 bytes/Unit - Start at 0x26c0)

OFFSET	ITEM
0 	flags 
		0x20 = veteran
1 	latitude
2 	longitude
3 	unit type (sec 5)
4 	movement remaining X 3
5   	?
6	AI destination?
7	AI destination?	
8	number turns for settler?
9	flags
		  00 = normal
		0x02 = sentry
		0x08 = cannot move; on sentry, or settler finished op.
		0x10 =
		0x80 =
		0x40 =
10	pointer to next unit?
11 	controlling city (FF=none) [0x1508+(byte11)*28]


4. CITIES LAYOUT (28 bytes/City - Start at 0x1508)

OFFSET	ITEM
0-2   	city improvements mask	(sec 7)
3	?
4  	latitude
5  	longitude
6	?
7	size
8	?
9 	item under construction  (sec 5)
10	trade
11 	controlling civilization (sec 2)
12-13   current amount of food
14-15 	current amount of shields
16-18   land usage mask (sec 9)
19	number specialists x 4
20-21	specialists types in use (sec 9)
22	index to city names
23-25   indexes for the 3 trade routes [0x1508+byte*28] (FF=none)
26-27   ?


5. UNIT TYPES/CITY PRODUCTION (in hex)

00 - Settler
01 - Militia
02 - Phalanx
03 - Legion
04 - Muskeeteers
05 - Rifleman
06 - Cavalry
07 - Knights
08 - Catapolt
09 - Cannon
0a - Chariot
0b - Armor
0c - Mech Infantry
0d - Artillery
0e - Fighter
0f - Bomber
10 - Trireme
11 - Sail
12 - Clipper Ship
13 - IronClad
14 - Cruiser
15 - Battleship
16 - Submarine
17 - Carrier
18 - Transport
19 - Nuclear
1a - Diplomat
1b - Caravan
ff - destroyed/disbanded unit (sec 3)

ff - Palace (city production)
fe - Barracks
fd - Granary
fc - Temple
fb - Marketplace
fa - Library
f9 - Courthouse
f8 - City Walls
f7 - Aquaduct
f6 - Bank
f5 - Cathedral
f4 - University
f3 - Mass Transit
f2 - Colloseum
f1 - factory
f0 - Manufactureing Plant
ef - SDI Defense
ee - Recycling Center
ed - Power Plant
ec - Hydro Plant
eb - Nuclear Plant
ea - SS Structure
e9 - SS Component
e8 - SS Module

e7 - Pyramids
e6 - Hanging Gardens
e5 - Colossus
e4 - Lighthouse
e3 - Great Library
e2 - Oracle
e1 - Great Wall
e0 - Magellan's Expedition
df - Michelangelo's Chapel
de - Copernicus Observatory
d8 - Women's Suffrage


6. TECHNOLOGY MASKS/NUMBERS  (10 bytes/Civilization - Start at 0x4e8)

Tech Number is shift count of mask.

Mask			  Tech Number	Technology
0100-0000-0000-0000-0000  00		Code Of Laws
0200-0000-0000-0000-0000  01		Alphabet               
0400-0000-0000-0000-0000  02		Currency               
0800-0000-0000-0000-0000  03		Atomic Theory          
1000-0000-0000-0000-0000  04		Democracy              
2000-0000-0000-0000-0000  05		Monarchy               
4000-0000-0000-0000-0000  06		Astronomy              
8000-0000-0000-0000-0000  07		Map Making             

0001-0000-0000-0000-0000  08		Navigation             
0002-0000-0000-0000-0000  09		Mathematics            
0004-0000-0000-0000-0000  0a		Medicine               
0008-0000-0000-0000-0000  0b		Physics                
0010-0000-0000-0000-0000  0c		Engineering            
0020-0000-0000-0000-0000  0d		University             
0040-0000-0000-0000-0000  0e		Magnetism              
0080-0000-0000-0000-0000  0f		Electronics            

0000-0100-0000-0000-0000  10		Masonry                
0000-0200-0000-0000-0000  11		Bronze Working         
0000-0400-0000-0000-0000  12		Iron Working           
0000-0800-0000-0000-0000  13		Bridge Building        
0000-1000-0000-0000-0000  14		Invention              
0000-2000-0000-0000-0000  15		Computer               
0000-4000-0000-0000-0000  16		Writing                
0000-8000-0000-0000-0000  17		Steam Engine           

0000-0001-0000-0000-0000  18		Trade                  
0000-0002-0000-0000-0000  19		Ceremonial Burial      
0000-0004-0000-0000-0000  1a		Mysticism              
0000-0008-0000-0000-0000  1b		Nuclear Fission        
0000-0010-0000-0000-0000  1c		Philosophy             
0000-0020-0000-0000-0000  1d		Religion               
0000-0040-0000-0000-0000  1e		Literacy               
0000-0080-0000-0000-0000  1f		Horseback Riding       

0000-0000-0100-0000-0000  20		Feudalism              
0000-0000-0200-0000-0000  21		The Wheel              
0000-0000-0400-0000-0000  20		Gunpowder              
0000-0000-0800-0000-0000  23		Industrialization      
0000-0000-1000-0000-0000  24		Chemistry              
0000-0000-2000-0000-0000  25		Combustion             
0000-0000-4000-0000-0000  26		Flight                 
0000-0000-8000-0000-0000  27		Advanced Flight        

0000-0000-0001-0000-0000  28 		Space Flight           
0000-0000-0002-0000-0000  29		Mass Production        
0000-0000-0004-0000-0000  2a		Pottery                
0000-0000-0008-0000-0000  2b		Communism              
0000-0000-0010-0000-0000  2c		The Republic           
0000-0000-0020-0000-0000  2d		Construction           
0000-0000-0040-0000-0000  2e		Rocketry               
0000-0000-0080-0000-0000  2f		The Corporation        

0000-0000-0000-0100-0000  30		Metallurgy             
0000-0000-0000-0200-0000  31		RailRoad               
0000-0000-0000-0400-0000  32		Nuclear Power          
0000-0000-0000-0800-0000  33		Theory of Gravity      
0000-0000-0000-1000-0000  34		Steel                  
0000-0000-0000-2000-0000  35		Banking                
0000-0000-0000-4000-0000  36		Electricity            
0000-0000-0000-8000-0000  37		Refining               

0000-0000-0000-0001-0000  38		Explosives             
0000-0000-0000-0002-0000  39		Super Conductor        
0000-0000-0000-0004-0000  3a		Automobile             
0000-0000-0000-0008-0000  3b		Genetic Engineering    
0000-0000-0000-0010-0000  3c		Plastic                
0000-0000-0000-0020-0000  3d		Recycling              
0000-0000-0000-0040-0000  3e		Chivalry               
0000-0000-0000-0080-0000  3f		Robotics               

0000-0000-0000-0000-0100  40		Conscription           
0000-0000-0000-0000-0200  41		Labor Union            
0000-0000-0000-0000-0400  42		Fusion Power           
 

7. CITY IMPROVEMENTS MASK (in hex)

01-00-00 - Palace
02-00-00 - Barracks
04-00-00 - Granary
08-00-00 - Temple
10-00-00 - Marketplace
20-00-00 - Library
40-00-00 - Courthouse
80-00-00 - City Walls
00-01-00 - Aqueduct
00-02-00 - Bank
00-04-00 - Cathedral
00-08-00 - University
00-10-00 - Mass Transit
00-20-00 - Colloseum
00-40-00 - Factory
00-80-00 - Manufacturing Plant
00-00-01 - SDI Defense
00-00-02 - Recycling Center
00-00-04 - Power Plant
00-00-08 - Hydro Plant
00-00-10 - Nuclear Plant
00-00-20 - SS Structure
00-00-40 - SS Component
00-00-80 - SS Module


8. UNIT DEFINITIONS (34 bytes/Unit - Start at 0x2308)

OFFSET	ITEM

0-11	name
12-13   tech number in which unit is obsolete (sec 6)  (7f00 = never obsolete)
14-15	travel mode (0=land 1=air 2=sea)
16-17   movement per turn
18-19   turns of movement for air travel
20-21   offense value
22-23   defense value
24-25   cost x 10
26-27   vision distance?
28-29   transport amount
30-31   type of unit (0=expansion 1=ground offense 2=ground defense
	      3=sea offense 4=air defense 5=sea transport 6=other)
32-33   tech number unit is available at (sec 6)   (ffff = always available)


9. CITY POPULATION USAGE MASKS

City Square Numbers (Arbitrary)

   01 02 03
04 05 06 07 08
09 10 11 12 13 
14 15 16 17 18
   19 20 21

Production Square Number	Mask (offsets 16-18)
05				80-00-00
09				00-08-00	
14				00-00-04
15				40-00-00
16				04-00-00
19				00-00-02
20				00-04-00
21				00-00-01

Specialists			Values (offsets 19-21)
TX				04-01-00
RS				04-02-00
ET				04-03-00
TX-TX				08-05-00
ET-TX				08-07-00
TX-ET				08-0D-00
ET-ET				08-0F-00
ET-ET-ET			0c-3F-00
ET-ET-ET-ET			10-FF-00
ET-ET-ET-ET-ET			14-FF-03

TX=taxman RS=researcher ET=entertainer


10. .SVE FILE MAP

ITEM			ADDR 			SIZE (bytes)	RANGE
Turn Number		0-1			2
Human Player (sec 2)	2			2? 		0-7
Movement Mask? (sec 2)	4			2?
?			6			2?
Year        		8-9			2 
Difficulty Level	0x0a-0x0b		2		?
?			0x0c			2?
?			0x0e			2?

Leaders Names		0x10-0x79		14/name
Civil Name Plural	0x80-0xdf		12/name
Civil Name Singular	0xe0-0x137		11/name

Red Money     		0x138			2
White Money     	0x13a			2
Green Money     	0x13c			2
Dark Blue Money     	0x13e			2
Yellow Money     	0x140			2
Lt Blue Money     	0x142			2
Pink Money     		0x144			2
Grey Money     		0x146			2

Red Bulbs     		0x148			2
White Bulbs     	0x14a			2
Green Bulbs     	0x14c			2
Dark Blue Bulbs     	0x14e			2
Yellow Bulbs     	0x150			2
Lt Blue Bulbs     	0x152			2
Pink Bulbs     		0x154			2
Grey Bulbs     		0x156			2

Number Red Units 	0x158-			2/unit * 28 units
Number White Units 	0x190-			2/unit * 28 units
Number Green Units 	0x1c8-			2/unit * 28 units
Number Dark Blue Units 	0x200-			2/unit * 28 units
Number Yellow Units 	0x238-			2/unit * 28 units
Number Lt Blue Units 	0x270-			2/unit * 28 units
Number Pink Units 	0x2a8-			2/unit * 28 units
Number Grey Units 	0x2e0-0x317		2/unit * 28 units
(see section 5 for order of units; ff=disbanded=0)
(believed to be used by military advisor only)

?			gap

Number Technologies	0x4d8-0x4e7		2 bytes/civilization
(used for scoring and to determine how much next advance costs)

Technology Masks	0x4e8-0x537		10 bytes
Red Technology Mask	0x4e8-0x4f1		10 bytes
White Technology Mask	0x4f2-0x4fb		10 bytes
Green Technology Mask	0x4fc-0x505		10 bytes
Dk Blue Technology Mask	0x506-0x50f		10 bytes
Yellow Technology Mask	0x510-0x519		10 bytes
Lt Blue Technology Mask	0x51a-0x523		10 bytes
Pink Technology Mask	0x524-0x52d		10 bytes
Grey Technology Mask	0x52e-0x537		10 bytes
(see section 6)

?			gap

Red Tax Rate		0x738			2
White Tax Rate		0x73a			2
Green Tax Rate		0x73c			2
Dark Blue Tax Rate	0x73e			2
Yellow Tax Rate		0x740			2
Lt Blue Tax Rate	0x742			2
Pink Tax Rate		0x744			2
Grey Tax Rate		0x746			2

Total Population?	0x748-0x757		2/Civilization

?			gap

Cities Information	0x1508-0x2307		28 bytes/city
(see section 4)

Unit Definitions	0x2308-26bf		34/unit * 28 units
(see section 8)

Red Units Info 		0x26c0-			12 bytes/unit 
White Units Info 	0x2cc0-			12 bytes/unit 
Green Units Info 	0x32c0-			12 bytes/unit 
Dark Blue Units Info 	0x38c0-			12 bytes/unit 
Yellow Units Info 	0x3ec0-			12 bytes/unit 
Light Blue Units Info 	0x44c0-			12 bytes/unit 
Pink Units Info 	0x4ac0-			12 bytes/unit 
Grey Units Info 	0x50c0-0x56bf		12 bytes/unit 
(see section 3)

Explored Map Mask Start	0x56c0
Explored Map Mask End  	0x66df?
(see section 2)

?			gap

Roman City Names  	0x6970-0x6a3f  00-ff	13 bytes/name * 16
Babylonian City Names  	0x6a40-0x6b0f  10-1f	13 bytes/name * 16
German City Names  	0x6b10-0x6bdf  20-2f	13 bytes/name * 16
Egyptian City Names 	0x6be0-0x6caf  30-3f	13 bytes/name * 16
American City Names  	0x6cb0-0x6d7f  40-4f	13 bytes/name * 16
Greek City Names   	0x6d80-0x6e4f  50-5f	13 bytes/name * 16
Indian City Names 	0x6e50-0x6f1f  60-6f	13 bytes/name * 16
Russian City Names 	0x6f20-0x6fef  70-7f	13 bytes/name * 16
Zulu City Names 	0x6ff0-0x70bf  80-8f	13 bytes/name * 16
French City Names  	0x70c0-0x718f  90-9f	13 bytes/name * 16
Aztec City Names 	0x7190-0x725f  a0-af	13 bytes/name * 16
Chinese City Names 	0x7260-0x732f  b0-bf	13 bytes/name * 16
English City Names 	0x7330-0x73ff  c0-cf	13 bytes/name * 16
Mongol City Names 	0x7400-0x74cf  d0-df	13 bytes/name * 16
Extra City Names 	0x74d0-0x766f  e0-ff	13 bytes/name * 32
(256 cities total; field #3 used in section 4)

Historical Info?  	0x7670-0x866f

?			0x8670-0x8673

Pyramids		0x8674-0x8675		2
Hanging Gardens		0x8676-0x8677		2
Colossus		0x8678-0x8679		2
Lighthouse		0x867a-0x867b		2
Great Library		0x867c-0x867d		2
Oracle			0x867e-0x867f		2
Great Wall		0x8680-0x8681		2
Magellan's Expedition   0x8682-0x8683		2
Michelangelo's Chapel	0x8684-0x8685		2
Copernicus Observatory	0x8686-0x8687		2
remaining wonders	?			2/wonder
[ffff=not built; else city number (0x1508+byte*28)]

			?

ITEM			ADDR        		SIZE
Red Luxury Rate		0x8bb4			2
White Luxury Rate	0x8bb6			2
Green Luxury Rate	0x8bb8			2
Dark Blue Luxury Rate	0x8bba			2
Yellow Luxury Rate	0x8bbc			2
Lt Blue Luxury Rate	0x8bbe			2
Pink Luxury Rate	0x8bc0			2
Grey Luxury Rate	0x8bc2			2

?			gap

City Latitudes		0x91b8-0x92b7		1/city
City Longitudes		0x92b8-0x93b7		1/city

?			0x93b8-0x93bb

Total Civilizations	0x93bc			2?

?			0x93bd-0x93df
-- 
Tom Kimball  			tom@europa.lerctr.org    
tom@europa.lonestar.org		tom%europa@egsner.cirr.com