1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

The Civilization III Save Format

Discussion in 'Civ3 - Tutorials, Reference, & Guides' started by Sirp, Mar 21, 2003.

  1. jimmywfl

    jimmywfl Chieftain

    Joined:
    Oct 10, 2009
    Messages:
    47
    Location:
    Vienna, Austria
    What happened to GOTM 161? not listed in results, closed, or anywhere I can find?
     
  2. Adrain

    Adrain Chieftain

    Joined:
    May 3, 2004
    Messages:
    77
    Gender:
    Male
    Location:
    UK
    Hi Jimmy. What are you referring to by "creation files"?
     
  3. Adrain

    Adrain Chieftain

    Joined:
    May 3, 2004
    Messages:
    77
    Gender:
    Male
    Location:
    UK
    I'm moving some posts about the Civ III Conquests SAV file (BIC) into here from where I posted them originally (In Meet The Modders.) as this appears a more appropriate place for them. I'll leave links in the original places so no-one should get thrown by their disappearances.

    These posts are not very dissimilar from some I posted earlier in this thread but they may have been updated over the years as I discovered new stuff. They'll all be in one place too which is a benefit I believe.
     
  4. Adrain

    Adrain Chieftain

    Joined:
    May 3, 2004
    Messages:
    77
    Gender:
    Male
    Location:
    UK
    TILE section:
    Tiles are listed in Left-to-Right WITHIN Top-to-Bottom order.
    IE.
    0,0 0,2 0,4 ... 1,1 1,3 1,5 ... 2,0 2,2 2,4 ... until last tile of map.

    Code:
    Actual Tiles (TILE) type A
    strSearch(08):  TILE{24 00 00 00} - Length including this = 002C (44)
    chrRiver:       0000:   River info (extra gold)
    chrInfluence:   0001:   Civ whose influence runs in this tile
    lngResource:    0004:   Resource Index (See GOOD - Goods table)
    lng?:           0008:   Used if CITY
    'NB. Images always centred at top corner of tile.
    chrImage:       000C:   Image within .Pcx file.
    chrFile:        000D:   Pcx files - 0=xtgc, 1=xgpc, 2=xdgc, 3=xdpc, 4=xdgp, 5=xggc, 6=wcso, 7=wsss, 8=wooo.
    Code:
    Table to show basic combinations for terrain types
    0 Desert        00 03 xdpc              6 Mountain      00 05 xggc
    1 Plains        00 01 xpgc              7 Forest        00 05 xggc
    2 Grassland     00 05 xggc              8 Jungle        00 05 xggc
    3 Tundra        00 00 xtgc              9 Coast         00 06 wCSO
    4 Flood Plain   00 03 xdpc              A Sea           00 07 wSSS
    5 Hills         00 05 xggc              B Ocean         00 08 wOOO
    Code:
    *chrImps:       0010:   Improvement flags: bit0=Road, bit1=Rail, bit2=Mine, bit3=Irrigation, bit4=Fortress, bit5=Goody hut, bit6=Pollution & bit7=Barbarian encampment.
    *chrTerr;       0011:   Terrain type: Index into TERR in both nibbles.  Second nibble=Base *terrain, First nibble overlay (Jungle, Forest) IE. Forest on Grassland =72.
    *intTBonus:     0012:   Terrain Bonus: bit0=Grassland shield, ... bit3=Player start, bit4=*Snow-capped mts, bit5=Pine forest.
    *chrOnTile:     0013:   -1=Nothing, 4B=Barbarian camp.
    *intCity:       0016:   Id of City or {FF}{FF} if none.
    *intContinent:  001A:   id of continent.
    River Basics:
            Top-Right       07      0000 0111       03      0000 0011
            Bottom-Right    18      0001 1000       0C      0000 1100
            Bottom-Left     30      0011 0000       30      0011 0000
            Top-Left        C1      1100 0001       C0      1100 0000
    Actual Tiles (TILE) type B
    strSearch(08):  TILE{0C 00 00 00} - Length including this = 0014 (20)
    chrImps:        0000:   Improvement flags: bit0=Road, bit1=Rail, bit2=Mine, bit3=Irrigation, bit4=Fortress, bit5=Goody hut, bit6=Pollution & bit7=Barbarian encampment.
    chrTerr;        0005:   Terrain type: Index into TERR in both nibbles.  Second nibble=Base terrain, First nibble overlay (Jungle, Forest) IE. Forest on Grassland =72.
    *intTBonus:     000A:   Terrain Bonus: bit0=Grassland shield, ... bit3=Player start, bit4=Snow-capped mts, bit5=Pine forest.
    Code:
    *Actual Tiles (TILE) type C
    *strSearch(08): TILE{04 00 00 00} - Length including this = 000C (12)
    Code:
    Actual Tiles (TILE) type D
    strSearch(08):  TILE{80 00 00 00} - Length including this = 0088 (136)
    lngVisCivs:     0000:   Bits indicating which civs can see tile.  Bit0 (val=1) indicates barbarians; other bits in order of turns (where AI civs come after any human players so single player is bit1 (val=2)).
    lngVisUnit:     0004:   This says which civs can see it currently (brighter on map) due to units.
    *lngVisMap:     0008:   This says which civs can see it currently (brighter on map) due to map sharing.
    lngVisHome:     000C:   This says which civs can see it currently (brighter on map) due to culture.
    intProcess:     0014:   Id of City whose citizen is processing this tile or {FF FF} if none.
    NB. Certain things have moved around since earlier versions hence you'll see Improvement flags listed in Type A @ 0010 (No longer active) as well as in Type B @ 0000. Only the latter has any effect, for the BIC version at least.
     
    Last edited: Jul 20, 2019
  5. Adrain

    Adrain Chieftain

    Joined:
    May 3, 2004
    Messages:
    77
    Gender:
    Male
    Location:
    UK
    Meta Data on CITYs from within a CivIIIC BIC SAV file.
    Code:
    Actual Cities (CITY) type A
    strSearch(08):  CITY{04 00 00 00} - Length including this = 000C (12)
    Code:
    Actual Cities (CITY) type B
    strSearch(08):  CITY{88 00 00 00} - Length including this = 0090 (144)
    lngID           0000:   Individual City ID
    intX:           0004:   X Position (X + Y must be even)
    intY:           0006:   Y Position (X + Y must be even)
    chrLeader:      0008:   00=Barbarian; 01=Player (See LEAD - Leader table)
    lngMaint:       000C:   Maintenance cost per go
    lngFood:        0020:   Food stored
    lngShields:     0024:   Shields accumulated
    lngBuild:       002C:   See table given below (lngBuildType)
    lngBuildType:   0030:   01=BLDG table; 02=PRTO table (see lngBuild)
    lngInfluence:   003C:   Cultural influence range
    lngContent:     0040:   Causes of Contentment (Content Faces)
    lngHappy:       0044:   Causes of Happiness (Happy Faces)
    Code:
    Actual Cities (CITY) type C
    strSearch(08):  CITY{10 00 00 00} - Length including this = 0018 (24)
    Code:
    Actual Cities (CITY) type D
    strSearch(08):  CITY{24 00 00 00} - Length including this = 002C (44)
    Code:
    Actual Cities (CITY) type E
    strSearch(08):  CITY{A4 00 00 00} - Length including this = 00AC (172)
    lngCultTurn:    0000:   Culture contributed per turn
    alngCulture:    0008:   Culture accumulated to date (Array for all nations)
    lngTotFood:     008C:   Total food harvested
    lngTotProd:     0090:   Total production (before effect of factories etc)
    lngTotComm:     0094:   Total commerce
    Code:
    Actual Cities (CITY) type F
    strSearch(08):  CITY{94 00 00 00} - Length including this = 009C (156)
    strName(18):    0000:   Name of city
    lngFoodUsed:    0064:   Food used for current population
    lngWastage:     0068:   Production lost to wastage
    lngCorruption:  006C:   Commerce lost to corruption
    lngFoodSpare:   0070:   Food available for population growth
    lngProdUsed:    0074:   Total available production (Total - Wastage)
    lngCommerce:    0078:   Total available commerce (Total - corruption)
    lngCommEnt:     007C:   Available commerce assigned to Entertainment
    lngCommSci:     0080:   Available commerce assigned to Science
    lngCommCur:     0084:   Available commerce assigned to Currency
    Code:
    City Population (POPD)
    strSearch(08):  POPD{08 00 00 00} - Length including this = 0010 (16)
    lngSpec:        0000:   No of Specialists
    lngPop:         0004:   Total no of Citizens
    Code:
    Citizen (CTZN)
    strSearch(08):  CTZN{2C 01 00 00} - Length including this = 0134 (308)
    strDesc(??):    0002:   Description (modified by happiness in game)
    lngPos:         0118:   Position of citizen in city (First = 00)
    lngLeader:      0120:   Nationality 00=Barbarian; 01=Player (See LEAD - Leader table)
    lngOwner:       0124:   Owner Nationality (As lngLeader if foreign otherwise FFFFFFFF)
    Code:
    Bit Flags (BITM)
    strSearch(08):  BITM{28 00 00 00} - Length including this = 0028 (40)
    strBldgs(0A):   0000:   String of flags for buildings and improvements built in city (See BLDG - Building table)
                            Each bit set indicates that the building in position n of the table is built - where n is the bit number and the first byte is the LEAST significant.  EG. Marketplace is the 5th building (bit 4) and Hospital the 20th (bit 19) so, to indicate these are both built the string would be 10 00 08 00 00 ...
    lngStratRes     0020:   Total Strategic Resources for city
    lng             0024:
    NB. Obviously this includes other class objects than just the various CITY ones as population/citizens/etc are all related to individual cities too.
     
  6. Adrain

    Adrain Chieftain

    Joined:
    May 3, 2004
    Messages:
    77
    Gender:
    Male
    Location:
    UK
    UNIT data in the BIC SAV file.
    Code:
    Actual Units (UNIT)
    strSearch(08):  UNIT{D8 01 00 00} - Length including this = 01E0 (480)
    lngID:          0000:   Individual Unit ID
    lngX:           0004:   X Position (sum of X & Y must be even)
    lngY:           0008:   Y Position (sum of X & Y must be even)
    lngPrevX:       000C:   Previous X Position
    lngPrevY:       0010:   Previous Y Position
    lngLeader:      0014:   00=Barbarian; 01=Player (See LEAD - Leader table)
    lngRace:        0018:   (See RACE table)
    lng:            001C:   Unknown
    lngUnitCode:    0020:   (See PRTO - PRoTOtype table)
    lngRank:        0024:   (See EXPR - EXPeRience table)
    bln:            0028:   0010 0000 (20) = Leader created
    lngHits:        002C:   Hits taken
    lngMovement:    0030:   Movement points x 3 (taken already this turn)
    lngJobTurns:    0034:   2 per turn if native - only 1 if foreign
    lngWorkerJob:   0038:   (See TFRM - Terra-Form table)
    int:            003C:   0001 when not loaded but 0000 when loaded
    int:            003E:   Unknown
    lngContained:   0040:   ID of containing unit if Loaded
    lngState:       0044:   Fortified?  00000001 if Loaded
    strName(20):    0054:   New name of unit (after leader created)
    lngPrincipal:   01B0:   Unit ID of first contained unit
    lngHolding:     01B4:   Number of units contained
     
    Last edited: Jul 20, 2019
  7. Adrain

    Adrain Chieftain

    Joined:
    May 3, 2004
    Messages:
    77
    Gender:
    Male
    Location:
    UK
    LEAD data in the BIC SAV file.
    Code:
    Leaders (LEAD)
    strSearch(08):  LEAD{9C 15 00 00} - Length including this = 15A4 (5,540)
    lngLEAD:        0000:   The index of this LEAD entry.
    lngRACE:        0004:   The RACE this leader is associated with.  -1 means unused.
    lngPower:       000C:   Power accumulated so far.
    lngCapital:     0010:   CITY ID of capital.
    lngDIFF:        0014:   Difficulty level.
    lngEndGA:       0020:   Golden Age end turn.
    lngPlayerFlags: 0024:   Flags for player.
    lngGold1:       0028:   With lngGold2 stores the gold accumulated.
    lngGold2:       002C:   See lngGold1 above.
    dblScore:       0030:   Score.
    lngAnrchyTns:   0084:   Turns of anarchy when changing government.
    lngEra:         00D8:   Era.
    lngBeakers:     00DC:   The number of beakers of TECH research so far accumulated.
    lngTECH:        00E0:   The TECH currently being researched.
    lngTurns:       00E4:   No of turns since last TECH was researched.
    lngFutureTechs: 00E8:   No of Future Techs discovered.
    lngArmies:      016C:   The number of armies.
    lngUNITs:       0170:   The number of UNITs.
    lngCITYs:       0178:   Number of CITYs.
    lngCLNYs:       017C:   Number of colonies (CLNY).
    lngLuxury:      0188:   Luxury rate (x10%).
    lngScience:     018C:   Science rate (x10%).
    lngTax:         0190:   Tax rate (x10%).  Always 10 - (lngLuxury + lngScience).
    lngColour:      10DC:   Colour used.
    strName(20):    10E0:   Leader name.
    strTitle(18):   1100:   Leader title.
     
    Last edited: Jul 20, 2019

Share This Page