Announcement

Collapse
No announcement yet.

Standard Format for utilities

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Standard Format for utilities

    I don't know if there are any other people working with tools to export things from the BICs.

    But if there is I think it is important that all developers use the same format to save the extracted files. Therefore have I stared this thread to allow all developer to post the formats they use, and also maybe get help selecting a useful format for a tool.

    Why is a standard format important?
    The main reason is that these tools are made to make moding easier, and would it be easier if a file created with one tool can't be loaded with another? I don't think so.

    Today I added a part to my tool that can save a civ separate from the BIC. I couldn't just save the race structure, as I also needed to know what unit the civ could build. To do so I created a format for my extracted civ file, that can be used to extract other stuff as well.

    The format I used, and hope that other developers will use as well, is as follows:
    File Header
    bytes type value
    -------------------------------------------------------------------------------------
    7 string "CIV3MOD"
    1 byte 1, file format version
    1 byte length of name excluding the ending 0x00
    1-256 string name terminated by 0x00
    1 byte length of creator excluding the ending 0x00
    1-256 string creator terminated by 0x00
    2 short length of description excluding the ending 0x00
    1-65536 string description


    The body is built on the same way as the BIC-format.
    Some changes has to be made to the different structures to make them "free" form their old BIC.

    The following has been done to the RACE structure:

    The structure has been increased in length as follows. (The length variable in the beginning updated as well)
    After the "plurality" flag the following is added:

    4 long Number of units that not are set to all civs
    that the civ can build for each of that
    4 long Index of unit that shall be set to be available
    to that civ
    4 long Number of units that not are set to all civs
    that the civ can't build for each of that
    4 long Index of unit that shall not be set to be
    available to that civ


    I'm not quite sure how I'll make the units yet.
    I believe I will add one long flag that can have different values depending on how it shall be added.

    0 would be no changes (load with the available to set as saved in the file.)
    1 would be available to all civs
    2 would be available to all civs but barbarians
    3 would be civspecific unit for added civ(s) corresponding to the available to flags as stored in file

    This are the one I've currently defined.


    If you have changes to suggest please post here. New formats for the rest things can be added until they are posted once. After that changes to this format should be done in discussion. Also maybe all new formats should be evaluated in this thread before adopted as standard, as something important might be missing, and increasing the version flag for that isn't the best we can do.

    Let me know what you think. Adding flags to the unit part could be done a little easier. We must however make sure that the same flag isn't used more then once, and that other developers can add them when added to the format. Therefore we should keep track of them.
    Last edited by Gramphos; November 5, 2001, 17:07.
    Creator of the Civ3MultiTool

  • #2
    I will add some more unit flags to the format. (this does not mean that I'm going to use all for export, but I'll make sure the import will handle them)

    This is how it goes:
    If the MSB of the flag is set the rest of the flag is what civ specific bonus(es) that should have acces to that unit.
    Creator of the Civ3MultiTool

    Comment


    • #3
      duouble post (the last post didn't connect to the server when tried to load, and I got a "Page can not be viewed" error) Then it took me 25 minutes to post it once again dyue to the forum busy thing
      Last edited by Gramphos; November 6, 2001, 17:29.
      Creator of the Civ3MultiTool

      Comment


      • #4
        The following unitflags will be added:
        4 - All Civs+Flags for extracted
        5 - All Civs but barbarians+Flags for extracted
        Creator of the Civ3MultiTool

        Comment

        Working...
        X