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

In depth look at the WBS file

Discussion in 'Civ4 - Modding Tutorials & Reference' started by Dale, Oct 31, 2005.

  1. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,549
    Location:
    Auckland, NZ (GMT+12)
    BeginTeam has a couple of new lines to be added.

    VassalOfTeam=TTT is the team no that this team is a vassal of.
    VassalPower=VVV is the strength vassal in the relationship
    MasterPower=MMM is the strength of the master in the relationship
     
  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,015
    Location:
    DE/NL/FR
    :hatsoff: thanks, added them :).
     
  3. veBear

    veBear Slumerican Citizen

    Joined:
    Nov 9, 2008
    Messages:
    2,612
    Location:
    Norway
    Time to blow dust of this old thread... Anyone know how to get the CityList=ABCD thing to work? In my game, I'll always end up defeated when using it. The settler (which is placed on the map for real in WBS, not just through starting x and y) simply isn't there anymore. Also, the revealed tiles don't show. I'm just... defeated.

    Edit: Never mind, solved it. All new city-names must have a txt reference from a text xml sheet...
     
  4. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    @veBear: CityList=ABCD works for me without a text xml file.

    Maybe you can't type in special characters like accents. If you want those, you need a text xml file with the special character encoding like &#xyz; .

    Tested: yeah that's it: defeated!

    Python error:UnicodeDecodeError: 'ascii' codec can't decode ... etc.

    Edit: for information Character_entity_references_in_HTML
     
  5. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Per memory, as I really struggled with rivers for the first time. :)

    Rivers are only placed:
    - at the bottom of a plot (2 lines of code)
    - at the right edge of a plot (2 lines of code)
    - the combination of the two above: at the bottom of a plot AND at the right edge of it (4 lines of code)

    When they are placed like that, they can flow in two opposite directions.

    In other words, there are only 6 (edited: 8) combinations:

    1: river flows North (and is at right edge of plot)
    RiverNSDirection=0
    isWOfRiver

    2: river flows South (and is at right edge of plot)
    RiverNSDirection=2
    isWOfRiver

    3: river flows East (and is at bottom edge of plot)
    isNOfRiver
    RiverWEDirection=1

    4: river flows West (and is at bottom edge of plot)
    isNOfRiver
    RiverWEDirection=3

    5: river flows East then North
    RiverNSDirection=0
    isNOfRiver
    RiverWEDirection=1
    isWOfRiver

    6: river flows South then West
    RiverNSDirection=2
    isNOfRiver
    RiverWEDirection=3
    isWOfRiver

    EDIT:
    But then...
    7: a river can separate in two branches, one going NORTH, the other going WEST:
    RiverNSDirection=0
    isNOfRiver
    RiverWEDirection=3
    isWOfRiver
    or...
    8: two rivers can join, one coming NORTH going SOUTH, the other coming WEST going EAST:
    RiverNSDirection=2
    isNOfRiver
    RiverWEDirection=1
    isWOfRiver

    Further notes:
    - the 4 directions are: 0 = North; 1 = East; 2 = South; 3 = West
    - North/South references are always placed before East/West ones. It's acceptable to type them in a different order but the World Builder save will re-order them.
    - if you want a river at the top of a plot, then you should really place it at the bottom of the above plot!
    - likewise, if you want a river at the left of a plot, then you should really place it at the right of the adjacent western plot!
     
  6. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Apparently, putting a comma in the "Description" tag or in any "UnitName" tag of the file is not advisable. It will not be displayed and the rest of the sentence or name will be ignored.
     
  7. Harrier

    Harrier Deity

    Joined:
    Feb 19, 2002
    Messages:
    2,414
    Location:
    UK
    I find it much easier to place rivers in WorldBuilder.

    Shift - Left Click on a plot.

    Then select either or both of the river option boxes and choose the flow direction.
     
  8. Civ4_boi

    Civ4_boi Chieftain

    Joined:
    Feb 12, 2007
    Messages:
    75
    I am modifying the BTS Earth 1000AD scenario.

    If I leave the starting year unchanged, the game starts at 4000BC

    If I change it to 1000, I end up in 2300AD after 30 turns or so at normal speed.


    Original 1000AD
    Spoiler :
    BeginGame
    Era=ERA_ANCIENT
    Speed=GAMESPEED_NORMAL
    Calendar=CALENDAR_DEFAULT
    ForceControl=FORCECONTROL_SPEED
    Victory=VICTORY_TIME
    Victory=VICTORY_CONQUEST
    Victory=VICTORY_DOMINATION
    Victory=VICTORY_CULTURAL
    Victory=VICTORY_SPACE_RACE
    Victory=VICTORY_DIPLOMATIC
    GameTurn=160
    MaxTurns=340
    MaxCityElimination=0
    NumAdvancedStartPoints=0
    TargetScore=0
    StartYear=-4000
    Description=TXT_KEY_MAP_DESC_EARTH1000AD
    ModPath=
    EndGame


    My 1000AD
    Spoiler :
    BeginGame
    Era=ERA_ANCIENT
    Speed=GAMESPEED_NORMAL
    Calendar=CALENDAR_DEFAULT
    Option=GAMEOPTION_NO_CITY_RAZING
    Option=GAMEOPTION_FLIPPING_AFTER_CONQUEST
    Option=GAMEOPTION_NO_TECH_TRADING
    Option=GAMEOPTION_NO_TECH_BROKERING
    ForceControl=FORCECONTROL_SPEED
    Victory=VICTORY_CONQUEST
    Victory=VICTORY_DIPLOMATIC
    GameTurn=0
    MaxTurns=0
    MaxCityElimination=0
    NumAdvancedStartPoints=0
    TargetScore=0
    StartYear=1000
    Description=Earth 1000AD
    ModPath=
    EndGame


    Do I need to change Era to Medieval?
     
  9. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    The era is not the problem, either you set it to Medieval or it will adapt to the techs given at the start, but the era will not change the running of the years.

    The settings of the original scenario work fine, right? It starts at turn 160 in AD 1000 and for the next 50 turns, it is incremented by 10 years, then by 5 years for the next 60 turns, etc. After 340 turns, you are in AD 2050.

    The problem with your new settings is that the game applies the Gamespeed Normal settings from the start, but as from AD 1000. Then, for the next 75 turns, it is incremented by 40 years each turn. At the end of this first round of 75 turns, you are already in AD 4000 and after 500 turns in total in AD 7050.

    Look at the CIV4GameSpeedInfo.xml file in XML/GameInfo folder for all the settings.

    Solutions:

    1) leave the settings as they are

    or

    2) create your own mod with new settings for the Gamespeed Normal.

    It all depends on what you want to achieve, at which speed you really want to progress in the game.
     
  10. Civ4_boi

    Civ4_boi Chieftain

    Joined:
    Feb 12, 2007
    Messages:
    75
    Thanks very much for your help isenchine,

    I'll see what I can do.
     
  11. Civ4_boi

    Civ4_boi Chieftain

    Joined:
    Feb 12, 2007
    Messages:
    75
    I fixed it, by putting the settings back to how they were.

    I shouldn't have changed them since I made assumptions about their function.

    Providing that one knew what turn number 1000AD was, could one change the game speed correspondingly?

    Alternatively, could one allow various game speeds or would that require more work than altering the WBS file?
     
  12. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    1) Of course. The turn when AD 1000 comes is a computation, different for every game speed. You have all the elements to do the computation yourself in the GameSpeedInfo file.

    2) That's more complicated. You can always allow a different game speed in the customize section of the menu, but the results won't be comparable to the normal progression of the different game speeds. What you can do though is save different versions of the scenario for different gamespeeds!

    Edit on 2: the complication is because of the start in AD 1000. When the scenario starts in 4000 BC, you can switch between game speeds in the menu without problems. Alternatively, you still have the option of the small Mod to change the settings of the GameSpeedInfo file.
     
  13. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    BtS: Summary of computations of Turns/Years per different Game Speeds (see file Assets/XML/GameInfo/CIV4GameSpeedInfo.xml for reference).

    The Starting Year in BtS is defined in the XML/GlobalDefines.xml file as: START_YEAR = -4000 (read 4000 BC). In the WBS file, you can change it for your scenario with the tag "StartYear=" in the BeginGame section.

    In the GameSpeedInfo file, you will find listed all the different phases of the turns/years passing by per speed (GameTurnInfos, made up of iMonthIncrement and iTurnsPerIncrement, see table below).

    The Ending Year (for a Time Victory for example) is defined by the Starting Year and the computation of all GameTurnInfos (see table below). In the WBS file, you can change it for your scenario with the tag "MaxTurns=" in the BeginGame section.

    You can also enter your scenario at a specific turn/year with the tag "GameTurn=" in the BeginGame section. Usually, you would then adjust the tag "MaxTurns=" accordingly. Example in the AD 1000 scenario: with a GAMESPEED_NORMAL, you reach AD 1000 after 160 turns and 340 turns thereafter, you reach AD 2050 => "GameTurn=160" and "MaxTurns=340".


    In a table format, this is how it all computes:

    Note: Total Years = (iMonthIncrement / 12) * (iTurnsPerIncrement).

    Column 1
    GAMESPEED_MARATHON
    Month Turns Running Total Starting Ending
    Phase Increment per Incr. Total Turns Years Year Year
    1 180 100 100 1,500 -4000 -2500
    2 120 300 400 3,000 -2500 500
    3 60 170 570 850 500 1350
    4 24 201 771 402 1350 1752
    5 12 129 900 129 1752 1881
    6 6 180 1,080 90 1881 1971
    7 3 264 1,344 66 1971 2037
    8 1 156 1,500 13 2037 2050
    Total 1,500 6,050
    GAMESPEED_EPIC
    Month Turns Running Total Starting Ending
    Phase Increment per Incr. Total Turns Years Year Year
    1 300 140 140 3,500 -4000 -500
    2 180 90 230 1,350 -500 850
    3 120 40 270 400 850 1250
    4 60 90 360 450 1250 1700
    5 24 70 430 140 1700 1840
    6 12 100 530 100 1840 1940
    7 6 220 750 110 1940 2050
    Total 750 6,050
    GAMESPEED_NORMAL
    Month Turns Running Total Starting Ending
    Phase Increment per Incr. Total Turns Years Year Year
    1 480 75 75 3,000 -4000 -1000
    2 300 60 135 1,500 -1000 500
    3 240 25 160 500 500 1000
    4 120 50 210 500 1000 1500
    5 60 60 270 300 1500 1800
    6 24 50 320 100 1800 1900
    7 12 120 440 120 1900 2020
    8 6 60 500 30 2020 2050
    Total 500 6,050
    GAMESPEED_QUICK
    Month Turns Running Total Starting Ending
    Phase Increment per Incr. Total Turns Years Year Year
    1 720 50 50 3,000 -4000 -1000
    2 480 30 80 1,200 -1000 200
    3 360 20 100 600 200 800
    4 240 30 130 600 800 1400
    5 120 25 155 250 1400 1650
    6 60 40 195 200 1650 1850
    7 24 65 260 130 1850 1980
    8 12 70 330 70 1980 2050
    Total 330 6,050


    Of course, the game adjusts the Months/Years per turn and not just per phase. The more detailed table per turn, I leave it up to you to make it based on these parameters! :)
     
  14. hankinsohl

    hankinsohl Warlord

    Joined:
    Nov 16, 2001
    Messages:
    128
    Location:
    Seattle
    Is there any way to set starting techs for Barbarians in a world builder save file?

    If you manually set techs for Barbarians and then create a world builder save, Barbarian techs are not retained in the save file.

    If you attempt to edit the world builder save file and set starting techs for the barbarians, this too does not work. If you create a barbarian civilization with player number < 18, then you'll end up with two barbarian civilizations - the "real" barbarians (team 18) and the one you create. On the other hand, if you try to set starting techs for player 18 (i.e., the barbarian player), then these entries are ignored when the world builder save is loaded.
     
  15. Noble Zarkon

    Noble Zarkon Elite Quattromaster - Emperor (BTS) Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Sep 6, 2012
    Messages:
    5,621
    Gender:
    Male
    Location:
    Gibraltar
    Unfortunately not.
     
  16. Sam_Yeager

    Sam_Yeager Another Original Geezer

    Joined:
    Jan 11, 2006
    Messages:
    2,803
    Location:
    England
    Didn't Gyathaar do something like this in one of the SGOTM games? Maybe he had to hack the game somehow to achieve it though?
     
  17. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,549
    Location:
    Auckland, NZ (GMT+12)
    BArbarians tech level is generally set at just below the players lowest tech level
     
  18. hankinsohl

    hankinsohl Warlord

    Joined:
    Nov 16, 2001
    Messages:
    128
    Location:
    Seattle
    There are specific techs (hunting and archery) that Barbarians acquire at higher difficulty levels. In a World Builder save, it seems to be impossible to set those starting technologies for Barbarians. If you set starting techs for Barbarians in a World Builder save, they are not retained when the World Builder is opened once more.

    Nor does a World Builder game correctly set Barbarian starting techs based on the difficulty level that a player chooses.

    This appears to be a bug with no work around.
     
  19. Noble Zarkon

    Noble Zarkon Elite Quattromaster - Emperor (BTS) Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Sep 6, 2012
    Messages:
    5,621
    Gender:
    Male
    Location:
    Gibraltar
    SGOTM files are actual save files not World Builder, you can't edit Barbarian techs in a WBS file.
     
  20. FrozenShadows

    FrozenShadows Chieftain

    Joined:
    Jul 20, 2010
    Messages:
    22
    Gender:
    Male
    Location:
    Florida
    I have been trying to mod the earth 18 civs map recently. I was doing some terrain changes which worked all well and good but when trying to add more civs than the base 18 ive run up against a wall. The original 18 always show up (unless i make a horrendous typo while trying to figure out a way for it to work.) But not a single other civ I have tried to put in the game shows up in any manner. Do I also need to be placing their starting locations in the plot section? and if so how would that look. Im scratching at a brick wall at this point and cant think of anything else to try, Thankyou.

    Here is literally every inch of code.
    https://gist.github.com/anonymous/1168439febf02e6ab21025a27beb37b8

    OK. The civs are now at least allowed to be picked from when starting the scenario, but I still cannot get all 31 civs that I would like to use at once. (and i have a feeling the starting locations I gave still wont work but I wont know just yet.)

    Moderator Action: Fixed extra link on text --NobleZarkon
     
    Last edited by a moderator: Oct 1, 2017

Share This Page