Announcement

Collapse
No announcement yet.

[Utility] BMP to WBS Converter

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by OzzyKP
    Does anyone know why when I convert a .bmp and load up the game, it immediately says that I have been defeated and closes?
    Same for me. When I take a look at the map when Im closing the game, it looks like only the coast was converted....

    Comment


    • #32
      Yea, same here.

      Though sometimes the land looks all like mountains or something.
      Captain of Team Apolyton - ISDG 2012

      When I was younger I thought curfews were silly, but now as the daughter of a young woman, I appreciate them. - Rah

      Comment


      • #33
        I think I found why but I am not sure yet if it was the problem. My BMP was in 16 bit format and I changed it to 24.
        I was able to go on the map with that only, but I need to try with every bmp converted

        Yeah, that was the problem. And I just read the PDF that it needed to be in 24 bits

        Edit: ... nope, didnt work. There is another problem
        Last edited by Julinoleum; November 6, 2005, 21:51.

        Comment


        • #34
          How do you set the world to appear as a globe when you push the ZOom Out button? My map works now but it appear as a traditional Civ map. Wrapped on X...

          Comment


          • #35
            if you post your files here in a zip, i can tell you what's wrong

            Comment


            • #36
              Originally posted by Julinoleum
              How do you set the world to appear as a globe when you push the ZOom Out button? My map works now but it appear as a traditional Civ map. Wrapped on X...
              I think you need to add the cheat code into the .ini file to make that work from the off otherwise you can only zoom out a little way.
              Currently working on:
              A Song of Ice and Fire Mod for Civ 4!
              Click me to find out more!

              Comment


              • #37
                There's an error in the PDF manual. It says on page 8 it says,

                "Actually, only the first is required to generate a map. You can just select the heights map, and press Cancel for the others."

                This is not true. A height map and a terrain map (atleast it needs to be competely green) are required to generate a map that you can actually open in world builder.

                I think perhaps this part of the manual is just mis-leading, ather than in error. You CAN generate a WBS with just a height BMP but it's completetly useless on its own inside the game. You need a terrain map to actually open it in Civ4. You do not make this clear at all.

                I think this is what's causing the problem when people are seeig the "You have been defeated." message as soon as they load up their own WBS, since there is no land on the map to start with at all!
                Last edited by Feet; November 8, 2005, 10:29.
                Currently working on:
                A Song of Ice and Fire Mod for Civ 4!
                Click me to find out more!

                Comment


                • #38
                  Can anyone help with the following error please?

                  Setting WBSPath to C:\Program Files\Python 2.4.2\default.Civ4WorldBuilderSave


                  Traceback (most recent call last):
                  File "C:\Program Files\Python 2.4.2\BMPtoWBSConverter186.py", line 273, in OnStart
                  err = self.wxApp.ConvertBMP()
                  File "C:\Program Files\Python 2.4.2\BMPtoWBSConverter186.py", line 375, in ConvertBMP
                  self.HeightMap = Image.open(self.HeightMap)
                  File "C:\Program Files\Python 2.4.2\Lib\site-packages\PIL\Image.py", line 1717
                  , in open
                  fp = __builtin__.open(fp, "rb")
                  IOError: [Errno 2] No such file or directory: ''


                  I think I've installed everything (python-2.4.2.msi, wxPython2.6-win32-ansi-2.6.1.0-py24.exe, PIL-1.1.5.win32-py2.4.exe) and copied the assets\python\system\wx to C:\Program Files\Python 2.4.2. So I thought I'd fire up the default scenario and try generating that as a test to see if everything is OK. Obviously not! Unfortunately I'm a Python newb and have no idea what the above means.

                  Comment


                  • #39
                    to the moderators: I need to update the file, but it doesn't let me overwrite it

                    Comment


                    • #40
                      I could use some help here. The prog is installed, and works perfectly. I have my terrain map and my heights map, both 600x660.
                      Did I understand it right that the prog will resize the actual map to 60x66?

                      Now for my problem: It seems no matter what I try the prog generates a map completly full of peaks (except 3 squares, wich I find rather strange). I have tried creating "empty_map.bmp" like in the default example, but it did not help.

                      Is my map not drawn good enough? (due to the size, I can imagine it is a bit too blury).
                      Is it the resizing thats not working as intended?

                      Many thanks in advance

                      Comment


                      • #41
                        blurry you say? It should strictly follow the pallete.

                        Comment


                        • #42
                          Fancy, sounds like your problem was the image being anti-aliased during resizing. That's what Rhye means by following the palette.

                          I make my maps at the resolution they'll need to be - resizing is imprecise, needs additional editing, and should be avoided in the first place. I think the sections on resizing in the PDF should have been labeled as a "just in case you make the mistake of creating your maps at the wrong resolution..."

                          Comment


                          • #43
                            well,

                            I got it to work once... then I tried to change the X and Y axis settings and it didn't work... now, it doesn't work at all with my custom maps.

                            although the original map still seems to be converted fine.


                            here's what the error says... I have no clue what it means.

                            Traceback (most recent call last):
                            File "C:\python24\BMPtoWBSConverter186.py", line 273, in OnStart
                            err = self.wxApp.ConvertBMP<>
                            File "C:\python24\BMPtoWBSConverter186.py", line 519, in Convert BMP
                            self.ConvertImage<>
                            File "C:\python24\BMPtoWBSConverter186.py", line 550, in ConvertImage
                            self.CountRiverPixels<>
                            File "C:\python24\BMPtoWBSConverter186.py", line 719, in CountRiverPixels
                            self.tRiverPixel = self.RiverMap.getpixel<>
                            File "C:\Python24\Lib\site-packages\PIL\Image.py", line 859, in getpixel return self.im.getpixel
                            IndexError: image index out of range



                            I also sometimes get this error instead....

                            File "C:\python24\BMPtoWBSConverter186.py", line 273, in OnStart
                            err = self.wxApp.ConvertBMP<>
                            File "C:\python24\BMPtoWBSConverter186.py", line 381, in CovertBMPself.RiverMap = Image.open
                            File "C:\Python24\Lib\site-packages\PIL\Image.py, line 1721, in open prefix = fp.read<16>
                            AttributeError: BmpImageFile instance has no attribute 'read'


                            hopefully the above makes some sense. For the record, I had H, F, and T maps, but no river or bonuses.

                            thanks

                            -Zen Blade
                            FARSCAPE......................

                            Comment


                            • #44
                              mmmm...try giving the converter the heights map as river map and see if it works

                              Comment


                              • #45
                                That seems to have worked Rhye. --using H map as the river map.

                                it has converted twice correctly... although I am now trying to figure out other tweaks (consistent forests is tough for the program, trying to fix that).

                                thanks!
                                -Zen Blade
                                FARSCAPE......................

                                Comment

                                Working...
                                X