• Welcome to SC4 Devotion Forum Archives.

help on correct config.bmp sizes?

Started by greenbelt, July 01, 2010, 03:21:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

greenbelt

I enlarged a greyscale jpg from Simtropolis.  (A map of PEI by bmag_20  http://www.simtropolis.com/stex/details.cfm?id=16180)

Then I divided the map into 4 parts - PEI 1, PEI 2, etc.  And I tried to make a bitmap in Paint.  All large city tiles.  Almost but the size is wrong.  I divided by 72 to get the correct dots per inch.

PEI 1 = 2144 x 3584  config.bmp = 30x50
PEI 2 = 1845 x 2553  config.bmp = 26x36
PEI 3 = 2005 x 2837  config.bmp = 28x40
PEI 4 = 2902 x 2878  config.bmp = 41x40


thanks greenbelt

Could someone tell me what should be the correct sizes of my bitmaps.

Lowkee33

The Stex is giving me troubles.  In the details it says it is 2881 x 1409.  Is that true?  That is a much smaller map than you are working with.

This idea may work regardless  Render the whole region with large cities, and then quit SC4 and copy and paste it 3 times (so you have four copies).  Then use paint to color the pixels you do not want white.  This has worked for me to do things like take out empty ocean cities.  There are two files (other than city files) in a region, one is the config.bmp, and the other can be opened with notepad.  In that small file you will find (easy) a line to change the in-game name of your region.  You can then change the folder name of the region so that all four can exist in the SC4 Regions folder.

I assume you are doing this for a performance upgrade, but I am not sure if the city data is actually gone.  One thing to do maybe is open SC4 with the whited config, at which point SC4 will correct itself.  Then later resize the config so that it has no white.  Good thing you have 3 backups of the region Good luck

cogeo

Here is the correspondence between city sizes, config pixels and grayscale bitmap (map) sizes

City Size  Config Colour & Size  Grayscale Size
===============================================
Small             Red      1x1    64 x  64
Medium            Green    2x2   128 x 128
Large             Blue     4x4   256 x 256


The grayscale bitmap must be 1 pixel larger (in both dimensions), because each pixel represents the elevation of a vertex (the tiles' corners), rather than the elevation of the whole tile.

Of course, the size of the config.bmp and the grayscale image must be conforming. For example, for a region that's 4 large and 1 medium city wide, by 3 large and 1 small city deep (or "tall" if you prefer) you will need the following files:

Config.bmp:
- 4x4 + 1x2 = 18 px wide
- 3x4 + 1x1 = 13 px tall

Grayscale:
- 4x256 + 1x128 + 1 = 1153 px wide
- 3x256 + 1x64 + 1 = 833 px tall

The grayscale size can also be calculated from the config.bmp size, as each pixel in config.bmp corresponds to 64 pixels (ie a small city) in the grayscale image:
- 18x64 + 1 = 1153 px wide
- 13x64 + 1 = 833 px tall

Conversely, each dimension of the grayscale image MINUS 1, must be divisible by 64, for the grayscale to be correctly sized for import. Obviously, the dimensions you listed above are not. And how did you just "enlarge" the original grayscale jpg? This will make the region larger, and I can see problems here, eg slopes will be less steep, as you didn't scale up elevations (grayscale values) proportionally (or you did?). If you do so, you may run into other problems like running out of range (max height), so your mountain tops may look like chopped off. Not to mention that simple scaling may cause a "rounded" or "pixelated" look. Last but not least, the region will no longer be accurately scaled (this specific map isn't anyway). So scaling is generally not recommended, instead you may crop (original) grayscales to a smaller size. And a tip, such large maps are not easy to play, and the system may find it hard enough to process them, eg it may take quite a long time to exit a city, because the game has to generate the region view image for a larger region. I would recommend that you avoid making regions with more than 50 large cities, ie 6x8 or 7x7 large cities should rather be the max allowed region sizes.

greenbelt

Thank you for all the information.  Yes I simply enlarged the grayscale image using GIMP.  I wanted the original 2881X1409 map to be larger.  I'm not so concerned about a realistic scale but elevations are important.  I'm just experimenting at the moment.  I'll work with your ideas and see what happens.  Also I'll make the overall map smaller.  Thanks a lot for the useful information.

greenbelt