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:
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:
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.
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.
Comment