Announcement

Collapse
No announcement yet.

Civilization III BIC file format

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

  • #76
    Yes, Width and Height are common terms. Try to load Marla's map and check the sizes and the coordinates...

    That's why I got confused.
    Creator of the Civ3MultiTool

    Comment


    • #77
      TILE Section

      Although I have not yet produced a useful tool, I spent already some time exploring the bic format. Hereby some not yet piblished info.

      TILE Section

      for each tile:


      long length of tile data (22 bytes)
      00 short river info
      02 long resource number, -1 = nothing
      06 byte image number
      07 byte in file: 0 = xtgc.pcx, 1 = xgpc.pcx, 2 = xdgc.pcx,
      3 = xdpc.pcx, 4 = xdgp.pcx, 5 = xggc.pcx,
      6 = wcso.pcx, 7 = wsss.pcx, 8 = wooo.pcx
      08 short 0 (always?)
      0a byte binary flags as indicated in overview
      0b nibble terrain: 0 = desert, 1 = plains, 2 = grassland,
      3 = tundra, 4 = floodplain, 5 = hills,
      6 = mountain, 7 = forest, 8 = jungle,
      9 = coast, a = sea, b = ocean
      nibble basic terrain: only 0,1,2,3,9,a,b
      0c short binary flags as indicated in overview
      0e short ff ff (-1) = nothing
      4b 00 (75) = barbarian camp
      10 long -1 (always?)
      14 short continent number


      CONT Section

      for each continent:

      long length of continent data (8 bytes)
      00 long 1 = land, 0 = water
      04 long number of tiles


      It seems always to start with the land and with the largest
      first.

      Comment


      • #78
        VB Code to read the .BIC file

        I found this thread on Sunday although I wish I'd found it earlier. Since Tuesday of last week, I've been working on my own editor for the .BIC files and that means that up until Sunday, I'd been decoding the .BIC format on my own.

        Now, this does mean a few things that may be of help...

        First, I've got a set of VB6 class files that can read the entire .BIC file and break it down into its component variables with the sole exception of the map areas. If this would be helpful to anyone please let me know and I'll be glad to send/post the source.

        Second, I'm currently in progress (and hope to be done tomorrow) writing the additional code into the class files so they can write the information back into a complete and correctly formed .BIC file. So you may want to wait a day or two for that source code...

        Third, there's the obvious question, why am I writing an editor when there's a perfectly good one supplied with the game? Simple... aside from the ability to add which the Civ3CopyTool does admirably, I'm adding to it the ability to maintain a library of Civ3 datatypes so you can store all those cool units, governments, tech advances and so on without having to keep them in your main civ3mod.bic file. I'm also adding the ability to export and import pieces of the .bic file so that if you come up with a cool new government, you can export just that part of your .bic file, post it on a site like this one, and someone else can import it into theirs without having to retype all the info or download a full .bic and manually transfer just that one government.

        This does have some limitations currently. The initial release won't support the other data files that store things like the Civilopedia or graphics. This will make the app a little less useful but I'm hoping to add such functionality in subsequent releases. Any suggestions or requests for features out there, please feel free to make them.

        Lastly, I did note that there were a couple errors in the format that's been compiled on this thread... I'll try to take some time today and compare the format listed against my source and come up with a decent list.

        And finally... thank you. This thread has been an immense help and I look forward to being able to contribute usefully to it rather than just using the great information you guys have put together.

        Adam (Hastur)

        Comment


        • #79
          Hastur,
          see this thread for the format I use when I export Units and Civs. I'll make some changes in it to hold icon graphics latert, but that will be version 2 of it.
          Creator of the Civ3MultiTool

          Comment


          • #80
            Excellent point there. I'd figured I'd use the .BIC format for the export file but to be honest, I hadn't thought ahead to the point of "cross-table" references as it were such as the unit table referencing the civs that can build that unit. I'm taking a look at your format for exports and will be glad to follow through on it and make suggestions where possible. Thank you for the info!

            Adam (Hastur)

            Comment


            • #81
              WMAP section

              WMAP is after the length indicator a list of longs

              - nr of resources (normally 22)
              - 22 times a number indicating the occurence of that resource
              - nr of continents
              - width of map
              - distance betweens civs
              - nr of players
              - ? a number which also changes with the map size
              - 0 (in all my tests)
              - height of map
              - -1
              - seed value (?) per civ
              - filler with a lot of -1
              - seed value of map
              - 5

              When the random map option was used in Civ3Edit these values are correct. When editing values manually, often they are not or they get disturbed by something. So I doubt if they are really used by something.

              Comment


              • #82
                Re: WMAP section

                Originally posted by Tventano
                WMAP is after the length indicator a list of longs
                ...
                -CUT-
                ...
                When the random map option was used in Civ3Edit these values are correct. When editing values manually, often they are not or they get disturbed by something. So I doubt if they are really used by something.
                The last 5 can be 1 of the Polar Ice is turned off.
                I guess that I might have to modify my map Export again. I got the Width and Height right as well as nr of players.

                If I only could find the other values in the SAV.
                Creator of the Civ3MultiTool

                Comment


                • #83
                  The Last Byte of the WMAP section is a binary value.

                  The following two values are uses AFAIK

                  00000000
                  Round World .......1
                  Polar Ice .....1..
                  Creator of the Civ3MultiTool

                  Comment


                  • #84
                    FYI

                    From CivFanatics:

                    http://forums.civfanatics.com/showth...0&pagenumber=4 (very bottom)


                    quote:
                    --------------------------------------------------------------------------------
                    Originally posted by Dark Sheer

                    So, we are going to get an updated CivilizationIII.exe, Civ3Edit.exe and also a Civ3mod.bic not to mention Civilopedia.txt.

                    I wonder how this would affect the mods and editors that are currently available And can the hacked editor still be used if a new Civ3mod.bic is downloaded? If not then mod maker will no longer be able to add resources and such

                    All in all still a good patch
                    --------------------------------------------------------------------------------

                    Don't forget civ3edit.hlp!

                    old BIC files should be compatible, however the BIC file format can and does change as we add things in to the editor, so there is a good chance the "hacked" editor won't play nice with new BIC files. As long as the "hacked" editor obeys the rules of the BIC format, though, BIC's created with it should still work. No guarantees, though.

                    Dan (Magaha)



                    Will this affect the file mapping you've done so far? I hope not.

                    Now, a question: given that you've decoded the file, would it be possible to write a program that randomizes civ attributes? A program that reallocates the attribute pairings (commercial/religious, etc.) to random civs? That would be awesome, as such a feature probably won't ever make it to the editor.

                    Good job guys.

                    Comment


                    • #85
                      Just in for the patch...

                      As I said in an earlier post, I've been working on an editor using VB6. I've now gotten to the point that it's reading the .BIC file and parsing it fully into appropriate objects and properties. In addition, it's now able to write that information back into a .BIC file. I've found a couple small errors but hope to have them resolved early tomorrow. From there, I'll be adding in the editing interface.

                      As we all will, I'll be awaiting the patch with baited breath to see if it makes any major changes to the format (not to mention I really want to play too!). If there are changes, of course I'll be updating my source.

                      If the source can be of help to anyone out there, please let me know and I'll be glad to send it on to you...

                      Adam (Hastur)

                      Comment


                      • #86
                        I think that no sections will be added, but the length of some sections might change. I'm ready to find any changes in the format, and hope to be able to update C3CT as fast as possible.
                        Creator of the Civ3MultiTool

                        Comment


                        • #87
                          The New DIFF section:

                          4 long Length (changed to 108)
                          64 string Name
                          4 long Citizens born content
                          4 long Max gov. transition time
                          4 long Number of defensive land units AI start with
                          4 long Number of offensive land units AI start with
                          4 long Extra Start unit #1
                          4 long Extra Start unit #2
                          4 long Additional free support
                          4 long Bonus for each city
                          4 long Attack bouns against Barbarians
                          4 long Cost factor
                          4 long Percentage of optimal cities


                          More Sections to come
                          Creator of the Civ3MultiTool

                          Comment


                          • #88
                            The value that was 5 in the header before is now 10

                            The BLDG -section is extended 4 bytes with a long representing "Number of armies required"
                            Creator of the Civ3MultiTool

                            Comment


                            • #89
                              The Rulesection is extended with 20 bytes (5 longs) as follows

                              ...
                              4 long Border factor
                              4 long Future Tech cost
                              4 long Golden Aged Duration
                              4 long Maximum research time
                              4 long Minimum research time
                              Creator of the Civ3MultiTool

                              Comment


                              • #90
                                I can't find any more changes in the BIC.
                                Creator of the Civ3MultiTool

                                Comment

                                Working...
                                X