Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Civilization III > Civ3-Creation > Civilization III BIC file format (2nd thread)
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
16.Sep: 7 NEW FILES
15.Sep: TRIAL + NO SLEEP = ONE GAME
13.Sep: PATCH THE PREVIOUSLY UNPATCHABLE

bottom of page
   - CIV3 CONQUESTS $29.99 - CIV3 from $9.99
Author
Thread   
Pages (3): [ 1   2   3   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
AlanH is offline AlanH
Settler

Jun 2003
time: 05:19
  Old Post 25-09-2003 00:53
Edit/Delete Message Reply w/Quote
#61 Report this post to a moderator
Re: How to compress/uncompress BIX files? Enter the AD-FREE zone

quote:
Originally posted by dreyk
... I hope that you know some way to decompress BIX files to make changes and then compress it again .....

I expect the BIX file compression process is the same as for BIC files. I found this reference describing the actual compression format, and there's Java source code available to implement the decompression in the MapStat Java source. I have successfully ported ChiefPaco's Java code into Objective C, and I'm sure it could be done for other languages.

It's not essential to compress copies of BIX files using the same format, as you can compress them using WinZip or whatever for efficient transfer over the Internet, and they can be installed uncompressed in the user's actual scenario folder. I suppose there's a bit of a benefit in disk usage, but at a dollar or two per gigabyte these days, disk capacity is not really a big issue.

-- Alan

dreyk is offline dreyk
Settler

Sep 2003
time: 05:19
  Old Post 25-09-2003 10:01
Edit/Delete Message Reply w/Quote
#62 Report this post to a moderator
Thank you, Alan Help yourself to an AD-FREE life

At first, thank you kindly for your reply!

If I understand you quite well (English is not my native language then Civ3 can work with uncompressed BIX files, isn't it?
If it's true - it's really great!
Then we can uncompress scenario file (BIX), make some changes with it and then just save file with old name. After we can load this scenario directly from game and play it.
Please, correct me if I wrong.

And one more question:
Maybe you know some way (utility etc.) to compress BIX back after we made changes?
For example: original_compressed.bix -> changed_uncompressed.bix -> changed_compressed.bix

AlanH is offline AlanH
Settler

Jun 2003
time: 05:19
  Old Post 25-09-2003 13:01
Edit/Delete Message Reply w/Quote
#63 Report this post to a moderator
Re: Thank you, Alan Get a bigger avatar today!

quote:
Originally posted by dreyk
At first, thank you kindly for your reply!

If I understand you quite well (English is not my native language then Civ3 can work with uncompressed BIX files, isn't it?
If it's true - it's really great!
Then we can uncompress scenario file (BIX), make some changes with it and then just save file with old name. After we can load this scenario directly from game and play it.
Please, correct me if I wrong.

I'm pretty sure that uncompressed files would work for .BIC files. I don't have PTW, so I can't be so sure about .BIX files, but it is unlikely that Firaxis changed it.

quote:
And one more question:
Maybe you know some way (utility etc.) to compress BIX back after we made changes?
For example: original_compressed.bix -> changed_uncompressed.bix -> changed_compressed.bix
It is possible, of course, but I have not seen any code to do it, only the description of the compression algorithm that I gave you. You could write your own compression program using that desription, but why bother if it works uncompressed?

-- Alan

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 25-09-2003 15:52
Edit/Delete Message Reply w/Quote
#64 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Just load and resave the file with the editor. (If possible without damaging your changes)

dreyk is offline dreyk
Settler

Sep 2003
time: 05:19
  Old Post 26-09-2003 06:43
Edit/Delete Message Reply w/Quote
#65 Report this post to a moderator
Thank you wery mach! Help yourself to an AD-FREE life

I have made test and... it's work!
Get a compressed.bix -> uncompress.bix -> make changes -> save it -> open with editor -> save by editor = compressed.bix with my changes.

I think, it's enough for my purposes, but maybe I'll write my own compressor... later.

Gurrie is offline Gurrie
Settler

Oct 2003
time: 05:19
  Old Post 02-10-2003 19:30
Edit/Delete Message Reply w/Quote
#66 Report this post to a moderator
Remove this text

I'm having a question bout .BIX as well. Maybe a silly one, don't know
My CivIII gives an error when i want to open a BIX-scenario-file. I don't know what the problem is, but I can only open BIC-files...
Anyone familiar with this?

Stuie is offline Stuie

King
Have a beer!
Sep 2001
time: 00:19
  Old Post 02-10-2003 19:48 Visit Stuie<br><a href=/members><img src=/forums/images/inmate-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#67 Report this post to a moderator
Browse Apolyton AD-FREE

quote:
Originally posted by Gurrie
I'm having a question bout .BIX as well. Maybe a silly one, don't know
My CivIII gives an error when i want to open a BIX-scenario-file. I don't know what the problem is, but I can only open BIC-files...
Anyone familiar with this?


.BIX files only work with PTW.

Gurrie is offline Gurrie
Settler

Oct 2003
time: 05:19
  Old Post 02-10-2003 20:19
Edit/Delete Message Reply w/Quote
#68 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

quote:
Originally posted by Stuie


.BIX files only work with PTW.


Ooh, it WAS a silly question then... Maybe i should install PTW

THNX A LOT

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 07-11-2003 05:27
Edit/Delete Message Reply w/Quote
#69 Report this post to a moderator
Help yourself to an AD-FREE life

I've taken a first view of the BIQ format, and there are quite some changes. the version is 12.06 and there are many additions to the ed of existing sections. There are also a new FLAV (Flavor) section

sabrewolf is offline sabrewolf

Emperor
turicum, helvetistan
Jun 2002
time: 06:19
  Old Post 28-12-2003 20:48 Visit sabrewolf<br><a href=/members><img src=/forums/images/supporter-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#70 Report this post to a moderator
Get a bigger avatar today!

has anyone got any further with the BIX/BIQ-format?

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 29-12-2003 14:36
Edit/Delete Message Reply w/Quote
#71 Report this post to a moderator
Get a bigger avatar today!

I have... But don't have any documentation of it.
Only some comments in my sourcecode to C3MT.

And right now I'm playing some games to get ennouge input to be able to update the SGE (and have some fun playing too ).

DrAlimentado is offline DrAlimentado
Settler

Apr 2003
time: 05:19
  Old Post 31-12-2003 07:51
Edit/Delete Message Reply w/Quote
#72 Report this post to a moderator
Avatar Enlargement: We've got the solution

Hi, first let me say thanks to all who have contributed to this excellent thread. I have been coding up a small app to do some map tweaking stuff (copy/paste, resizing etc.) and without the information I gleaned from here I would probably never have even started it. This thread has been a real godsend for me!

I'm having a problem with my bix reading code and the new FLAV section. It appears to break the regular format of; section header(4 bytes); No of sub-sections(4 bytes); length of this sub-section(4 bytes); rest of sub-section, next sub-section etc.

What I see in the FLAV section is "FLAV" then [1,0,0,0][7,0,0,0] then the seven flavour sections, each starting with [1,0,0,0]. Am I going nuts or have they really changed the format for this one section? I can't find a value that corresponds to the section length (292x7) anywhere in the FLAV section either I hope I am wrong here... I just can't see how at the moment.

Oh well, if it really is the case that they have changed the format then at least it appears that the FLAV section will be a fixed length.

I don't actually need the FLAV section at all as my code is just for map tweaking - I just need to be able to read past the section to get at the map data, it's annoying that the 'generic section reading' code I have won't do it though!

Last edited by DrAlimentado on 31-12-2003 at 08:28

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 01-01-2004 04:44
Edit/Delete Message Reply w/Quote
#73 Report this post to a moderator
Enter the AD-FREE zone

I'll see if I can post waht I on Sunday if you can wait until then.

DrAlimentado is offline DrAlimentado
Settler

Apr 2003
time: 05:19
  Old Post 02-01-2004 01:45
Edit/Delete Message Reply w/Quote
#74 Report this post to a moderator
Help yourself to an AD-FREE life

That would be great Gramphos

Thx in advance!

darndt is offline darndt
Settler

Dec 2003
time: 05:19
  Old Post 03-01-2004 14:15
Edit/Delete Message Reply w/Quote
#75 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Hi,

I'm writing a program that will convert a Civ3 map into a Civ2 map. Right now I only care about converting BIC files.

I believe that I have deciphered the "river info" part in the TILE section in BIC files. I'm basing my results on Civ3Edit v1.32.1 for Mac, which creates BIC files of v3.8.

The beginning of this thread shows the river info part as:

code:
2 short river info

I think it should be:
code:
1 byte river crossing data (binary): 00000000 crossing N .......1 crossing NE ......1. crossing E .....1.. crossing SE ....1... crossing S ...1.... crossing SW ..1..... crossing W .1...... crossing NW 1....... 1 byte ??? (0)

(How do I indent or preserve spacing without using the [ code ] tags?)

The river crossing data is like that posted by Gramphos for BIX 11.18 on page 2 of this thread. It's in a different part of the tile info, though.

I have also discovered some subtleties in how the data is stored. Namely, a bit value of 1 is present for the N, E, S, and W parts if the river continues going straight as it leaves the tile or if the river turns along the edge of the tile. However, a the bit value is 0 if the river turns away from the tile as it leaves, or if it is a point where the river begins/ends. The point where a river runs into the sea is an end of the river so it gets a bit value of 0.

Edit: If a river touches a corner of a tile but does not run along the adjacent edges, a bit value of 1 is used.

These rules seems to work for computer-generated rivers, but if you make your own kooky rivers that run along the coastline, the encoding is a bit different. I don't want to bother figuring it out.

Maybe the river crossing data in BIX 11.18 also follows the same rules.

I made a picture as I was figuring this out, and it should help illustrate.

Attachment: river_crossing.jpg
This has been downloaded 59 time(s).

Last edited by darndt on 04-01-2004 at 00:57

darndt is offline darndt
Settler

Dec 2003
time: 05:19
  Old Post 04-01-2004 02:51
Edit/Delete Message Reply w/Quote
#76 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

I've figured out a bit more about rivers in BIC files.

At the beginning of this thread, in the TILE section there is this part:

code:
2 short bonuses (binary): 00000000 bonus grassland .......1 player start ....1... snow-capped mts ...1.... pine forest ..1.....

I think it should be:
code:
1 byte bonuses (binary): 00000000 bonus grassland .......1 player start ....1... snow-capped mts ...1.... pine forest ..1..... 1 byte river source info (binary) 00000000 river in north .......1 river in west ......1. river in east .....1.. river in south ....1...

It appears that the "river source info" is only non-zero if the following conditions are met:
  1. The given location is the point where a river was started by a human using Civ3Edit. That is, when it was initially placed it was not an extension of an existing river. If a river is extended so it looks like it starts at a different location, the river source info remains unchanged. Single-point rivers are encoded in the river source info. I think that single-point rivers can only be created by starting a new river source, and not by deleting part of an existing river.
  2. The river still exists in the given location. It was not deleted and replaced by a river extension.
  3. The tile is a land tile.

The river source info is similar to the "river connection info" posted by Gramphos for BIX 11.18 on page 2 of this thread. Maybe that data follows the same rules.

David Arndt

DrAlimentado is offline DrAlimentado
Settler

Apr 2003
time: 05:19
  Old Post 04-01-2004 03:50
Edit/Delete Message Reply w/Quote
#77 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Interesting observations David I think you are right that the river connection info and river crossing data (as posted in p2 of this thread) are actually swapped over, and that the river crossing data is actually river source info.

I had noticed that something wasn't quite right with those parts but hadn't quite nailed it (ie. I had shelved it until I came to add overlay gfx to my utility). On a quick examination your observations seem to fit, thanks for the info

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 04-01-2004 16:48
Edit/Delete Message Reply w/Quote
#78 Report this post to a moderator
Get a bigger avatar today!

I can confirm that the observations by darndt are correct. (I've not had time to update this thread for too long. I actually worked on the rivers while making the Civ2->Civ3 mapconverter of C3MT)

(I'll try to post the BIQ format very soon now)

sabrewolf is offline sabrewolf

Emperor
turicum, helvetistan
Jun 2002
time: 06:19
  Old Post 04-01-2004 17:17 Visit sabrewolf<br><a href=/members><img src=/forums/images/supporter-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#79 Report this post to a moderator
Help yourself to an AD-FREE life

i'll be on holidays for 11 days beginning of february. with my notebook, but no internet connection.

if i can be of any help finding stuff, just tell me which sections (eg FLAV, UNIT, etc.) you havn't completed.

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 04-01-2004 19:34
Edit/Delete Message Reply w/Quote
#80 Report this post to a moderator
Remove this text

Give me another two hours to turn my code into a formatted post. But in general, I think that the C3C UNIT/CLNY/CITY sections are uninvestigated if ther are any changes.

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 04-01-2004 19:37
Edit/Delete Message Reply w/Quote
#81 Report this post to a moderator
Put an end to popups!

appart from that there are some binarry flags that I've not investigated fully (I know what the flags are for, but not the specific flag values)

sabrewolf is offline sabrewolf

Emperor
turicum, helvetistan
Jun 2002
time: 06:19
  Old Post 04-01-2004 20:14 Visit sabrewolf<br><a href=/members><img src=/forums/images/supporter-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#82 Report this post to a moderator
Browse Apolyton AD-FREE

no rush for me... my holidays are still several weeks away

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 04-01-2004 21:34
Edit/Delete Message Reply w/Quote
#83 Report this post to a moderator
Browse Apolyton AD-FREE

Well, I'm almost ready for posting now. Just have to put the things I know on thye maps together and post it.

Gramphos is offline Gramphos
ACS Civ III Files Manager, Prince of Development
Chalmers, Sweden
Apr 2001
time: 06:19
  Old Post 04-01-2004 23:13
Edit/Delete Message Reply w/Quote
#84 Report this post to a moderator
Help yourself to an AD-FREE life

http://apolyton.net/forums/showthre...threadid=105623

 
Pages (3): [ 1   2   3   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:19.
Apolyton Time is 00:19.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0509 seconds (92.19% PHP - 7.81% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net