Announcement

Collapse
No announcement yet.

Civilization III BIC file format

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    The width and height are somewhere in the WCHR or WMAP sections. Those two sections seem to contain some general map info, but I haven´t looked in them too well yet.

    Finally someone else! Keep it coming.
    Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

    Comment


    • #17
      The section marked huts is actually some of the overlays work off of bitwise flags where:

      0x01 - road
      0x02 - railroad
      0x04 - mine
      0x08 - irrigation
      0x10 - fortress
      0x20 - goody huts
      0x40 - pollution
      0x80 - barbarian camps

      combining them in weird ways doesn't do anything, but if you try and do a combiation of road and railroad the road basically gets ignored
      Xris, Mag Force Seven signing off.....

      Comment


      • #18
        I think I can round out the Advances section.

        TECH SECTION (Civilization Advances)
        4 char "TECH"
        4 long number of advances

        For each advance 108 bytes:
        4 long 104, remaining length of advance data
        32 string advance name
        32 string advance civilopedia entry
        4 long cost in shields
        4 era era index (0=Ancient times, etc.)
        4 long advance icon index
        4 long Coord X on tech tree chart
        4 long Coord Y on tech tree chart
        4 long Prereq advance 1 index
        4 long Prereq advance 2 index
        4 long Prereq advance 3 index
        4 long Prereq advance 4 index

        1 byte Allows (binary) 00000000
        diplomats .......1
        irrigation w/o fresh water ......1.
        bridges .....1..
        no disease on floodplain ....1...
        conscription ...1....
        mobilisation ..1.....
        recycling .1......
        smart bomb 1.......

        1 byte Allows (binary) 00000000
        mutual protection pact .......1
        right of passage agreement ......1.
        military alliance .....1..
        trade embargo ....1...
        2xwealth improvements ...1....
        sea trade ..1.....
        ocean trade .1......
        map trading 1.......

        1 byte Allows (binary) 00000000
        comms trading .......1
        not req. to go to next era ......1.
        double workrate .....1..

        1 byte Spare (binary) 00000000



        .. the Worker Jobs section. Note that "turns to complete" is modified by the movement cost of the terrain.
        The value given in this section applies to terrain with a movement cost of 2 (e.g. Forest).
        Terrain with a movement cost of 1 is worked in half the time, terrain with a movement cost of 3 needs 50% more turns to work.

        TFRM SECTION (Worker Jobs)
        4 char "TFRM"
        4 long number of worker jobs

        For each job 116 bytes:
        4 long 112, remaining length of job data
        32 string worker job name (e.g. Mine)
        32 string worker job civilopedia entry
        4 long turns to complete
        4 long prerequisite advance
        4 long required resource 1 index
        4 long required resource 2 index
        32 string text of order (e.g. Build Mine)


        .. and the Terrain section

        TERR SECTION (Terrain)
        4 char "TERR"
        4 long number of terrains

        For each terrain 115 bytes:
        4 long 111, remaining length of terrain data
        4 long Number of possible resources (22)
        3 byte The bit corresponding to the resource index is on if the resource is allowed
        32 string worker job name (e.g. Mine)
        32 string worker job civilopedia entry
        4 long Additional food if irrigated
        4 long Additional shields with mine
        4 long Additional gold with road
        4 long Defense value
        4 long Move cost
        4 long Food
        4 long Shields
        4 long Gold
        4 long Additional worker job index (e.g. plant forest)
        4 long pollution effect (index to resulting terrain)

        Comment


        • #19
          -- Removed --
          Last edited by Gramphos; December 15, 2001, 14:50.
          Creator of the Civ3MultiTool

          Comment


          • #20
            The last bit of your last post isn´t entirely in it yet, Gramphos, but I believe the rest is there...

            I have a TV program to see
            Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

            Comment


            • #21
              added
              Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

              Comment


              • #22
                Gramphos, Mercator,

                Please do not be concerned you are on your own, it is just that I am stunned with amazement how you come up with these things!!! What tool do you use for this type of analysis??

                Currently I am thinking how to make custom made civs available to the community, but I have not yet received the game. Are all civs stored in the .bic file, if so could they be swapped easily (i.e. have a list of files that are inserted).

                Thanx

                Comment


                • #23
                  Originally posted by Beammeuppy
                  What tool do you use for this type of analysis??
                  I use a hexeditor, my tool (to get the index of the stuff without counting), screenshots, bic-files and the civilopedia. I believe Mercator also uses the editor.

                  Currently I am thinking how to make custom made civs available to the community, but I have not yet received the game. Are all civs stored in the .bic file, if so could they be swapped easily (i.e. have a list of files that are inserted).

                  Thanx

                  You read my mind. I've planned to add a function to my tool to extract certain civs units and so on to a separate file in the BIC format with another extension and also allow my tool to combine them again. But I'll need some more time for that.
                  Creator of the Civ3MultiTool

                  Comment


                  • #24
                    Hi Gramphos,

                    I am, uh, not a real techie, but used my Norton Commander hexeditor to go through a bic file a picked up in another forum and could find most of the file structure you described back. I am in the meantime working on a spreadsheet / csv file where new custom civs can be maintained. Any good?

                    Comment


                    • #25
                      ???

                      Well... what are all these numbers and files? I just wanted to know if it would be possible to instruct technical newbie as me about the subject of all this technical stuff
                      Go GalCiv, go! Go Society, go!

                      Comment


                      • #26

                        BLDG SECTION (Improvements and Wonders)
                        4 char "BLDG"
                        4 long number of building types

                        For each building type 252 bytes:
                        4 long 248, remaining length of building data
                        64 string description
                        32 string building name
                        32 string building civilopedia entry
                        4 long index # of building whose happiness is to be doubled
                        4 long index # of free building for all cities in the empire
                        4 long index # of free building for all cities on same continent as wonder
                        4 long index # of prerequisite building
                        4 long cost
                        4 long culture
                        4 long bombardment defense
                        4 long naval bombardment defense
                        4 long defense bonus
                        4 long naval defense bonus
                        4 long maintenance cost
                        4 long happy faces in all cities
                        4 long happy faces in this city
                        4 long unhappy faces in all cities
                        4 long unhappy faces in this city
                        4 long number of prequisite buildings that must exist
                        4 long air power
                        4 long naval power
                        4 long pollution
                        4 long production
                        4 long index # of prerequisite government
                        4 long part # of spaceship part (-1 = N/A, 0 = part 1, etc.)
                        4 long prerequisite tech #
                        4 long made obsolete by (tech #)
                        4 long index # of 1st required resource
                        4 long index # of 2nd required resource
                        4 long improvement effects (binary)
                        low order byte 00000000
                        centre of empire .......1
                        veteran ground units ......1.
                        +50% research .....1..
                        +50% luxuries ....1...
                        +50% tax ...1....
                        no pollution from population ..1.....
                        less pollution from buildings .1......
                        resists propaganda 1.......

                        2nd lowest order byte 00000000
                        reduces corruption .......1
                        doubles city growth rate ......1.
                        increases luxury trade .....1..
                        allows city size 2 ....1...
                        allows city size 3 ...1....
                        replaces any building with this flag ..1.....
                        must be near water .1......
                        must be near a river 1.......

                        3rd lowest order byte 00000000
                        can explode or melt down .......1
                        veteran sea units ......1.
                        veteran air units .....1..
                        allows capitalisation ....1...
                        allows water trade ...1....
                        allows air trade ..1.....
                        reduces war weariness .1......
                        increases shields in water 1.......

                        4th lowest order byte 00000000
                        increases food in water .......1

                        4 long characteristics (binary)
                        low order byte 00000000
                        coastal .......1
                        can give military civ golden age ......1.
                        wonder .....1..
                        small wonder ....1...
                        continental (not city) mood effects ...1....
                        can give scientific civ golden age ..1.....
                        can give commercial civ golden age .1......
                        can give expansionist civ golden age 1.......

                        2nd lowest order byte 00000000
                        can give religious civ golden age ......1.
                        can give industrius civ golden age ......1.

                        4 long small wonder effects (binary)
                        low order byte 00000000
                        increases chance of leader appearing .......1
                        build arimies without leader ......1.
                        build larger armies .....1..
                        treasury earns 5% ....1...
                        build spaceship parts ...1....
                        reduces corruption ..1.....
                        missile attack success down 75% .1......
                        allows spy missions 1.......

                        2nd lowest order byte 00000000
                        allows healing in enemy territory ......1.
                        required goods must be in city ......1.

                        4 long wonder effects (binary)
                        low order byte 00000000
                        safe sea/ocean travel .......1
                        gain any tech owned by 2 civs ......1.
                        double strength against barbarians .....1..
                        +1 ship movement ....1...
                        double research ...1....
                        +1 trade each trade producing tile ..1.....
                        halves unit upgrade cost .1......
                        pays maint for all trade buildings 1.......

                        2nd lowest order byte 00000000
                        all civs can build nuclear devices ......1.
                        city growth is 2 citizens not 1 ......1.
                        2 free techs .....1..
                        reduces war weariness in all cities ....1...
                        doubles city defenses ...1....
                        allows diplomatic victory ..1.....
                        Last edited by Nero Would; November 16, 2001, 14:55.

                        Comment


                        • #27
                          Originally posted by Beammeuppy
                          Hi Gramphos,

                          I am, uh, not a real techie, but used my Norton Commander hexeditor to go through a bic file a picked up in another forum and could find most of the file structure you described back. I am in the meantime working on a spreadsheet / csv file where new custom civs can be maintained. Any good?
                          We maybe should make sure to use the same format for them.
                          Creator of the Civ3MultiTool

                          Comment


                          • #28
                            The same format would be useful. Right now I am waiting at home for my UPS delivery from the US!!!

                            Once installed it is probably easier to determine the format.

                            Comment


                            • #29
                              I'm almost ready with the format I'll use. If you haven't started yet you should work with the same as I use.

                              This is the basic idea (I'll be more specific when I'm at home)

                              First I'll have something to indicate the format maybe "CIV3MOD" +1 byte fileformatversion.
                              Then I'll have the name of the mod. (Variable lenght start with 1 byte specifying the lenght of that). After that the creator's name in the same way. Ending the header with a description of the mod started by a short defining its lenght.

                              After that will the civ came in the exact way it appear in the BIC-files. (includeing the RACE part.) I don't know yet if I'll allow more then one civ per file.
                              Then I'll have a section connected to the civ (I'll increase the lenght of the civ section) defineing what units that civ can use that are not allowed by everyone in the original file. It should be done as follows:

                              4 byte long defineing the number of specific units.
                              for each unit: the unit index of that unit.

                              Then a section of any units that all civs have access to that this civ shall NOT have access to in the sme way as the section of specific units.

                              After that I'll have a unit section with any units that should be added. These units will be stored in the same way as the original unit, but with one difference. The avialabity to flag will not be used. Instead another flag will be used for the civs in the file. that can have some settings. IE: All Civs, only added civs, all but added civs. Maybe some more will be added later.


                              For the civ the unicolor will be a prefered color, but if used another color would be given. the civID will be given in the merge.


                              This is from my memory, so I might have forgotten something.
                              Creator of the Civ3MultiTool

                              Comment


                              • #30
                                Great work everyone... Everything´s added again, although I didn´t "test" any of Nero´s last post. The hexadecimals section had to go too (sorry, Trifna ) I was over the maximum message length.
                                Maybe I can turn my second post into a more extensive explanation of all the jibberish in the first post.
                                Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                                Comment

                                Working...
                                X