• Moose
  • Announcements

    • Dirktator

      Please help us for July   06/30/2017

      This month we're hoping for a little bit of a boost this month or next, in addition to covering the regular bills, we could benefit from some hardware upgrades. STEX Collector's Set gifts can now be sent to you via digital download as well as regular mail if you wish! Every donation dollar goes toward keeping Simtropolis online and humming along. Your contribution counts! Hardware Upgrades As our website community software improves with more and more features, and as we bolt on additional features such as chat, the increased load to handle all these new toys is taking the server a bit to task. You may have noticed that we'd been forced to temporarily disable the chat as we worked out allocating resources for more optimal performance. Following this, we've applied a number of 'soft' changes such as caching options and experimented with server configurations (nginx as proxy, for example), so the hardware aspect is also an area we'd like to focus on. The last time we upgraded hardware was back in 2012, prior to the release of SC13. Your contribution means a lot! Your donation will go toward helping us to 1.) migrate to a newer server or 2.) at least get some ram/cpu/storage updates and any other infrastructure hardware or services. Donate and Get a Gift or Donate Any Amount Thanks so much! - Dirktator & The Admins
  • Sign in to follow this  
    Followers 0

    Config.bmp: How to Make it Yours


    Birdin

    Making a basic config.bmp that works is really simple, and probably not even worthy of an article in the Omnibus. In fact it's easier than I make it sound just below, but I wanted to be thorough for the engineering types who want to understand every detail. But I figure it's a good place to start before I get to the more fun part of the article.

    First, there's really only one rule regarding how a region is divided into cities: that each city is a square of 1km, 2km, or 4km on a side (aligning to a 1km grid) and the cities can't overlap. For simplicity, most people make their regions so that the cities fill a rectangle (often 16km x 16km) but this isn't completely necessary, as we'll see later.

    Anyway, the config.bmp file is a standard Windows (or OS/2) Bitmap file. The color depth should always be 24 bits (true color) and the width and height in pixels should equal the east-west extent and north-south extent of the region in kilometers, respectively.

    Each pixel represents one square kilometer in the region, and the color of the pixel is determined by the size of the city covering that square. Red (RGB=255,0,0) is for small (1km) cities, green (RGB=0,255,0) for medium (2km), and blue (RGB=0,0,255) for large (4km) cities. For example, a 9x7km region might be divided like this:

    ConfigExample1.gif

    And the config.bmp (enlarged 4x here for clarity) would look like this:

    ConfigExample2.gif

    While I'm at it, I'll note that the dimensions of the greyscale heightmap image can be obtained by multiplying the dimensions of config.bmp by 64 and adding 1. So a 9 by 7 kilometer region would need a greyscale heightmap image of size 577 by 449 pixels.

    All of this so far is just about common knowledge. So far.

    The first "secret" I'm going to tell is how SimCity interprets the colors in config.bmp. Each pixel doesn't have to be one of pure red, green, or blue. In fact, *any* color can theoretically be used in a config.bmp file.

    When SimCity looks at a pixel in config.bmp, all it really cares about is whether or not each channel of the color is 255. Any other value from 0 to 254 might as well be zero. Now any pixel where the red value is 255 and the other two values are not 255, the pixel is considered to be red. Similarly, any color where the red and blue values are 254 or less and the green value is 255 is considered to be green, and any pixel with a blue value of 255 while the red and green values are both not 255, is considered blue. On top of that, any pixel where *no* channel has a value of 255, or if more than one channel has a value of 255, the pixel is considered "other."

    What does SimCity do with "other" pixels? It leaves that part of the region empty. In this way, one can create a region with an irregular shape, even holes or "islands" that aren't connected (even by ocean) to other parts of the region.

    This can actually be useful in reducing import times for custom regions, as SimCity won't take the time to process parts of the region that aren't covered by cities. If a large section of a region is ocean, those parts of the region can be left not covered by cities, and only the playable cities will need time to import.

    One last secret. If possible, SimCity will reduce config.bmp to the smallest possible rectangle containing its red, green, and blue pixels, eliminating "other" pixels on the bottom (south) and right (east) edges.

    Note, SimCity will not crop out pixels that actually represent cities, only empty areas. It will then look for a greyscale heightmap in the *new* dimensions calculated based on the cropped config.bmp.

    This means that theoretically, one can take a 640x480 (or larger) digital photograph, make sure none of the pixels are lighter than (254,254,254) and then place a proper config.bmp in or near the upper-left corner. I wouldn't suggest doing this on Simtropolis's Map Exchange, however, because a .bmp file at that size would be ridiculously large to download, and your map will probably be deleted from the STEX.

    It can be fun, though, to put a nice frame around your config.bmp (leaving extra space in your greyscale image on the top and left sides for the frame, since SimCity won't crop on those sides) or play around with the colors inside the map itself as long as care is taken to make sure you don't change how a pixel will be interpreted by SimCity. Here's an example.

    Config_Example.jpg

    A simple application of this is Fertile Coast in the STEX There, the colors between the cities are varied a little bit so different cities can be distinguished by a human viewer. Phil's Country and Columbus* show some more advanced techniques. There are endless ways in which people can personalize their config.bmp files. Please use good taste.

    * Columbus was not yet uploaded at the time of this writing, but an enlargement of its config.bmp can be found in the City Journals forum.


    huzman and CorinaMarie like this
    Sign in to follow this  
    Followers 0


    User Feedback


    nick96st

    Posted

    dude pls make a video how to make a simple bmp cuz i try but i dont know what should do when i create one...if u make one(video) , pls join the part when u create the bitmap ....send me message with link then... you could upload in youtube as example

    Share this comment


    Link to comment
    Share on other sites
    mido1960

    Posted

    Thanks for your effort, but this is not very clear. Can't you just explain how to start from scratch, e.g. use this programm..., create a blank..., next step and etc.?

    Share this comment


    Link to comment
    Share on other sites
    Dragontempest

    Posted

    I have made an all blue (RGB=0,0,255) config.bmp for my city and it is still making its own config.bmp for it. I dont want any small cities, should I be IN the folder of the map I am trying to create? Is there something that I am doing wrong (btw win 7 64bit) everything else seems fine

    Share this comment


    Link to comment
    Share on other sites
    Magneto

    Posted

    Useful info, thanks for sharing

    Share this comment


    Link to comment
    Share on other sites
    GEyes91

    Posted (edited)

    Thanks man, I didn't understand a thing...

     

     this video tells me more than this article...


      Edited by Cyclone Boom

    Language.
    huzman likes this

    Share this comment


    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an Account  

    Sign up to join our friendly community. It's easy!  :thumb:


    Register a New Account

    Sign In  

    Already have an account? Sign in here.


    Sign In Now

  • New Articles

  • Recently Browsing   0 members

    No registered users viewing this page.