1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

BMP to WBS Converter

Discussion in 'Civ4 - Utility Programs' started by Rhye, Oct 31, 2005.

  1. MrCrush

    MrCrush Chieftain

    Joined:
    Nov 11, 2005
    Messages:
    11
    Guys, I'm having some problems here, the map-part is going smooth, had some trouble with startinglocations, but anyone noticed the # of civs isn't working (doesn't matter what value I insert I just keep getting the fewest of it's map-size) (2 for duel, 3 for Tiny, 5 for Small...)

    Now the big problem, my map is meant for 4 players...

    Any idea this is a local problem (my version), or is it everywhere?
     
  2. Osymandias

    Osymandias Grand King of Apes

    Joined:
    Apr 16, 2004
    Messages:
    450
    Location:
    In the heart of the Bavarian Forest
    i think you have to edit it manually, how many players there should be. it should be mentioned in the pdf. i think i have read it there already. i will have a look and report later. :)
     
  3. Door

    Door Chieftain

    Joined:
    Dec 16, 2003
    Messages:
    49
    If you change the map size parameter in the wbs it changes the default number of players, but it also changes other settings. I'm not to sure how to change the number of players without changing this though.
     
  4. Malkav

    Malkav Chieftain

    Joined:
    Nov 15, 2005
    Messages:
    3
    I tried using the converter and I got an error message that says :

    Code:
    Traceback (most recent call last):
      File "C:\Development\Python24\BMPtoWBSConverter186.py", line 273, in OnStart
        err = self.wxApp.ConvertBMP()
      File "C:\Development\Python24\BMPtoWBSConverter186.py", line 375, in ConvertBM
    P
        self.HeightMap = Image.open(self.HeightMap)
      File "C:\Development\Python24\Lib\site-packages\PIL\Image.py", line 1717, in o
    pen
        fp = __builtin__.open(fp, "rb")
    IOError: [Errno 2] No such file or directory: ''
    What do I need to do? I don't know any Python and I have a feeling it may be a simple config issue as it happens with the demo file too.
     
  5. Osymandias

    Osymandias Grand King of Apes

    Joined:
    Apr 16, 2004
    Messages:
    450
    Location:
    In the heart of the Bavarian Forest
    on page 28 in the pdf it says how to do.
    you have to edit it in the python-file.
    i think it should also work if you reedit your map in notepad. probably with the same coding....

    *4.2.3 Civilization Info
    For each player, the WBS should contain at least:
    BeginPlayer
    LeaderType=NONE
    CivType=NONE
    Team=#
    EndPlayer
    28
    With # as the player number, from 0 to 17 (18 is the barbarian civ).
    So, EmptyScenario.py contains inside getExtraWBSText_Civs:
    "\nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=0\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=1\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=2\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=3\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=4\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=5\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=6\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=7\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=8\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=9\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=10\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=11\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=12\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=13\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=14\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=15\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=16\nEndPlayer \
    \nBeginPlayer\n\tLeaderType=NONE\n\tCivType=NONE\n\tTeam=17\nEndPlayer"
    That is, no player info. In this case, the number of players will determines automatically from
    CIV4WorldInfo.xml, accordingly to your world size setting.
    We’ll add 3 civs: 1 playable and 2 not playable.
    \nBeginPlayer \
    \n\tTeam=0 \
    \n\tLeaderType=LEADER_MAO_ZEDONG \
    \n\tCivType=CIVILIZATION_CHINA \
    \n\tPlayableCiv=1 \
    \n\tHandicap=HANDICAP_NOBLE \
    \nEndPlayer \
    \nBeginPlayer \
    \n\tTeam=1 \
    \n\tLeaderType=LEADER_NAPOLEON \
    \n\tCivType=CIVILIZATION_FRANCE \
    \n\tPlayableCiv=0 \
    \n\tHandicap=HANDICAP_NOBLE \
    \nEndPlayer \
    \nBeginPlayer \
    \n\tTeam=2 \
    \n\tLeaderType=LEADER_BISMARCK \
    \n\tCivType=CIVILIZATION_GERMANY \
    \n\tPlayableCiv=0 \
    \n\tHandicap=HANDICAP_NOBLE \
    \nEndPlayer \
    Leader type and Civ type are simply the links to leader personality stored in
    CIV4LeaderHeadInfos.xml and to civilizations settings stored in CIV4CivilizationInfos.xml.*
     
  6. Door

    Door Chieftain

    Joined:
    Dec 16, 2003
    Messages:
    49
    Are you sure you used the file-->load BMP converter options or file-->set BMP converter options before you tried to convert? If you didn't you'd receive an error somewhat like this.
     
  7. NickSD

    NickSD History nerd

    Joined:
    Jan 12, 2002
    Messages:
    130
    Location:
    USA
    downloaded it all......wow.....
     
  8. MrCrush

    MrCrush Chieftain

    Joined:
    Nov 11, 2005
    Messages:
    11
    I could be wrong at this, but doesn't this part sets WHICH factions are playable, instead of setting the AMOUNT of players
     
  9. MrCrush

    MrCrush Chieftain

    Joined:
    Nov 11, 2005
    Messages:
    11
    Okay, we might have ourselves a breakthrough on the issue with the "# of players-topic"

    I've been having a closer look at some other scenarios (to be precise the US-revolution one) I've tried many lines that were in there, none did worked, then checked the mod, no trace of the default # of players being edited, anyway I turned back on the map file and after a while I tried these lines in the "blocked-player slots":

    BeginPlayer
    LeaderType=NONE
    CivType=NONE
    Team=4
    Color=NONE
    ArtStyle=NONE

    EndPlayer


    Note. Offcource it's Team=4 for player 5, Team=5 for player 6, etc...

    I'm not really sure you need both color=none as artstyle=none to make it work, but I'm a bit tired after all this so hell... it works :goodjob:
     
  10. tbear2520

    tbear2520 Warlord

    Joined:
    Oct 28, 2005
    Messages:
    103
    Please edit the manual. I think the manual should state in the very begining that you should work on a map the exact same size pix for each plot of land that the civ map will be. It has fowled me all up. It says it will do calculations to make the map smaller. Well the calculations 'suck'. I have played with large maps and worked extremely hard at making them very acurate only to have mountains appear like locusts. :mad: :mad: :mad: Then by sheer determination and effort I started resizing them smaller and smaller as well as cross checked all color issues. Which I did find myself not using a 24bit BMP. But I did that change as well. But still the mountains were like a plague. I felt like pharoah. The point be said the Manual in big bold letters should say right under the title. Use 24bit BMP's that use the exact size of the map you want (1 pixel should = 1 square of land in the game) ;) I would have been so much farther along and not have wasted three weekends fighting larger than life high-res nasa pictures to create a life like terrain of the middle east that ended up being a big blob of mountains.

    The tool is nice and the manual is much appreciated but please modify it and re-upload for the future scenario makers. :goodjob:

    Tbear2520
     
  11. Osymandias

    Osymandias Grand King of Apes

    Joined:
    Apr 16, 2004
    Messages:
    450
    Location:
    In the heart of the Bavarian Forest
    if you have read the manual carefully, you should have read this information earlier ;) so i did ;)
     
  12. NickSD

    NickSD History nerd

    Joined:
    Jan 12, 2002
    Messages:
    130
    Location:
    USA
    So THAT's why my East Asian map is so messed up.... Thanks.

    And can we have your middle east map and make scenarios with it? :D
     
  13. spincrus

    spincrus sol invictus...

    Joined:
    Dec 6, 2001
    Messages:
    1,079
    Location:
    Turkey, Austria, USA
    I have just tried this utility, and other than the fact that Python caused me billions of problems, it's an INCREDIBLE good script. My map came out exactly like I wanted (as I'm experienced with graphics editing and took every second to place the right pixels to the right spots), and I'm amazed by the end result.

    Now the only thing left is to make this user friendly and have couple of small fixes. It only needs a better GUI: one in which you can fill a form-like thing to add the civs yourself, maybe...
     
  14. thamis

    thamis King of Kish

    Joined:
    Jan 21, 2002
    Messages:
    1,577
    Okay, I got a serious problem here. I've converted a map from my BMP files before, and it worked fine, the result is up on the user created maps (Ancient Mediterranean). Now I've tried to add some starting locations in, and I get a serious error when the file is supposed to be written. I just can't figure it out. I updated to the latest version, the BMPs seem to be right, I've checked all the indentation... no clue. Can anyone have a look at this please?
     

    Attached Files:

    • TAM.zip
      File size:
      7.2 KB
      Views:
      141
  15. tbear2520

    tbear2520 Warlord

    Joined:
    Oct 28, 2005
    Messages:
    103
    TAM, here's a working version of the file.

    BeginPlayer
    LeaderType=LEADER_SALADIN
    CivType=CIVILIZATION_ARABIA
    Team=0
    PlayableCiv=1
    StartingX=73, StartingY=14
    Handicap=HANDICAP_NOBLE
    EndPlayer

    The order of above is crucial.

    Question though - how did you determine the numbers for the XY location you wanted them to start at. (Ruler in paint program?)

    Look in your Ancient Mediterranean Map forum for the attachment

    Tbear2520
     
  16. Rhye

    Rhye 's and Fall creator

    Joined:
    May 23, 2001
    Messages:
    9,594
    Location:
    Japan / South America

    Flip the image vertically, and any graphics program including MS Paint will show you the coordinates
     
  17. tbear2520

    tbear2520 Warlord

    Joined:
    Oct 28, 2005
    Messages:
    103
    Thanks Rhye, I was using Photoshop and paint seams much easier to locate the XY. :)

    Tbear2520
     
  18. tbear2520

    tbear2520 Warlord

    Joined:
    Oct 28, 2005
    Messages:
    103
    Well I got the river portion down pat. I spent all day putting in rivers on my new map. (Not yet released) Basically it's to early. It will become a full blown Mod when completed. But the land is coming together nice now. I will have to redo my feature map and put a bonus map together still, But it's 72x144. I had to srink it down to this to get it to load properly. Of course that was before the 1.09 patch. So who knows if the bigger one would now work better. Most of it is land and with a really awesome setup. I can't give to much away. It takes time to create and this project will be posted once the map is made. The Mod will take some more considerable time. Let's just say that I promise to post it when the map is up to par. ;) The scenario will be playing in the medieval era playing mostly on land with large armies, a total of twelve civ's. Thanks for the assistance in using this converter.

    Tbear2520
     
  19. Craig_Sutter

    Craig_Sutter Deity

    Joined:
    Aug 13, 2002
    Messages:
    2,747
    Gender:
    Male
    Location:
    Calgary, Canada
    Is your map 72 x-axis by 144 y-axis...? I'm interested because I'm working on a 128 X by 154 Y, and had earlier heard that there was a limit to 128 on the Y-axis. Does your map work ok?
     
  20. tbear2520

    tbear2520 Warlord

    Joined:
    Oct 28, 2005
    Messages:
    103
    Yes my map is 72 Wide and 144 Tall. I have no problems. The 1.09 patch did help some with the scrolling around and viewing it inside the world builder.

    Tbear2520
     

Share This Page