Mission Resource Text

Each setting on this page is followed by numeric parameters (except for !ENABLE_ALL_HOUSES).

This page is unfinished!

[GLOBAL_MAP_SETTINGS]

These values set the basic map information from defining the players to their alliances and the graphics used.

  • !GLOBAL_SET_MAP ###
    Sets active map (200 to 209)
  • !GLOBAL_SET_BOBS #
    Sets which MIS#BOBS.LST file to use for special mission only graphics (0 to 5)
    MISBOBS.LST

    1. 2 graphics
    2. 10 graphics
    3. 5 graphics
    4. 1 graphic
    5. 1 graphic
    6. 4 graphics

     

  • !GLOBAL_SET_HQ_BOBS #, #, #
    Changes headquarters graphic.
    First number is internal file ID for a graphic from loaded MIS#BOBS.LST file. Trying to give other than graphic will crash the game.
    Second number if shadow graphic.
    Third number is yet unknown.

  • !GLOBAL_ADD_COMPUTER_PLAYER # #
    Adds a computer player. First value = player color (1 to 6):

    1. Blue (human player only)
    2. Yellow
    3. Red
    4. Purple
    5. Grey
    6. Green
    7. Orange


    Second value = which person (0 to 11)
    :

    1. Octavianus (human player is always Octavianus)
    2. Julius
    3. Brutus
    4. Erik
    5. Knut
    6. Olof
    7. Yamauchi
    8. Tsunami
    9. Hakirawashi
    10. Shaka
    11. Todo
    12. Mnga Tscha

     

  • !LOAD_MISSION_TEXTS #
    Sets which DATA\TXT\MISS_0##.RTX file to use (1 to 10)
  • !GLOBAL_SET_COMPUTER_BARRIER # # #
    Disallows AI players to build buildings within that area.Numeric parameters are as follows:

    1. Radius
      Should be atleast 10, preferably a bit more, so that AI won’t build a fortress as a worst case scenario, making the barrier almost useless.
    2. X location of barrier on the map
    3. Y location of barrier on the map

     

  • !GLOBAL_SET_COMPUTER_ALLIANCE # #
    Sets alliance between ALL players (not only between computer players).

[MAPCOMMANDS]

  • !SET_HOUSE # # #
    Adds a building (ie. 24 = headquarters) to specified X & Y position.
  • !ENABLE_HOUSE #
    Allows currently active player to build given building type.
  • !ENABLE_ALL_HOUSES
    Allows building all building types.
  • !DISABLE_HOUSE #
    Removes building type from being available to build.
  • !ADD_WARE # #
    Sets resource’s amount for active player. The first value is a type ID that ranges from 0 to 30.
  • !ADD_PEOPLE # #
    Like resources but with worker types. The type ID values range from 0 to 29 where last five values set the amount of soldiers of each type.
  • !SET_ACT_PLAYER #
    Changes the active player for which the above rules apply. When this is not yet given the rules apply to human player (player 0).
  • !ADD_ANIMAL # # #
    Adds animal (0 to 9) to given X & Y location.

Scripted mission events

  • !MET_DIRECT_EVENT
  • !MET_HOUSE_ENABLING
  • !MET_POSITION_EXPLORED
  • !MET_POSITION_OCCUPIED
  • !MET_END_EVENT
  • !MET_SET_FINAL_EVENT
  • !MET_SET_MAP_ELEMENT
  • !MET_ADD_AS_ACT_EVENT

[ENDE]

The last byte of the file is often 0x1A, you can write this by pushing ALT down and then push 0, 0, 2 & 6 on numpad. However it seems like this is not required, you don’t even need ENDE at the end of the file for your own mission text file to work.

  • Aden Kuenzi

    For the !ADD_WARE and !ADD_PEOPLE commands, I didn’t see information on the type ID. Perhaps it’s somewhere else or yet to be added, but if not, here is my understanding of the type IDs.

    !ADD_WARE:

    0 = Logs
    1 = Lumber
    2 = Stone
    3 = Pigs
    4 = Wheat
    5 = Flour
    6 = Fish
    7 = Meat
    8 = Bread
    9 = Water
    10 = Beer
    11 = Coal
    12 = Iron Ore
    13 = Gold
    14 = Iron
    15 = Coins
    16 = Tongs
    17 = Axe
    18 = Saw
    19 = Pick-Axe
    20 = Hammer
    21 = Shovel
    22 = Crucible
    23 = Fishing Pole
    24 = Scythe
    25 = Cleaver
    26 = Rolling Pin
    27 = Bow
    28 = Sword
    29 = Shields
    30 = Boats

    !ADD_PEOPLE

    0 = Helper
    1 = Woodcutter
    2 = Fisherman
    3 = Forester
    4 = Sawyer
    5 = Stone Mason
    6 = Hunter
    7 = Farmer
    8 = Miller
    9 = Baker
    10 = Butcher
    11 = Miner
    12 = Brewer
    13 = Pig Breeder
    14 = Donkey Breeder
    15 = Iron Founder
    16 = Coin Minter
    17 = Metal Worker
    18 = Armorer
    19 = Builder
    20 = Digger (Planer)
    21 = Geologist
    22 = Private
    23 = Private 1st Class
    24 = Sergeant
    25 = Officer
    26 = General
    27 = Scout
    28 = Shipwright
    29 = Pack Donkey

    • Merri

      Now I don’t have to do this again ­čÖé I had these once figured out years ago, but I lost a source code to one of my unreleased programs and since then I just haven’t had the time/interest to go ahead and test.

      • Nick Beer

        The building numbers are also not present for !DISABLE_HOUSE #, so I’ll contribute them. Even though I’m not sure if anyone reads this page anymore, seeing the comments are 2 years old.

        0 – Woodcuter
        1 – Forester
        2 – Quarry
        3 – Fishery
        4 – Hunter
        5 – Sawmill
        6 – Farm
        7 – Pig Farm
        8 – Donkey Breeder
        9 – Slaughterhouse
        10 – Mill
        11 – Bakery
        12 – Iron Smelter
        13 – Metal Works
        14 – Armory
        15 – Mint
        16 – Shipyard
        17 – Brewery
        18 – Gold Mine
        19 – Iron Mine
        20 – Coal Mine
        21 – Granite Mine
        22 – Storehouse
        23 – Harbor
        24 – UNUSED (HQ perhaps, but you can’t build it anyway)
        25 – Barracks
        26 – Guard House
        27 – Watchtower
        28 – Fortress
        29 – Lookout Tower
        30 – Well
        31 – Catapult

        I’ve recently finished writing a program that let’s you convert any map you make in build-in map editor into a mission and easily set all the nice stuff like custom alliances, starting people and items for every players, disabled buildings, barriers, custom mission goal and intro text. And you don’t even have to input player positions and numbers since those are read from the map file itself. I plan on publishing the program shortly.

        The info I found on this page was a great help in the process of creating that program. I’m sure I couldn’t have made it on my own, especially as I’m not a programmer, but a web designer. The Settlers 2 is my favorite strategy game of all times, I have huge huge sentiment for it. It always bothered me that the functionality to make your own missions was not part of the game. When you beat all campaign missions and play a couple of unlimited plays you realise that you don’t have anything else to do. The unlimited games are all similiar to one another. It’s really such a shame, if you could do your own scenerios, like say in HOMM games, then I’m sure S2 would be much more popular then it is now.

  • lttlb

    Does a map have to be a ‘mission’ map in order to make these kinds of edits to games? Is there any way with a nonmission map to make alterations, such as the amount of resources in each player’s headquarters (!ADD_WARE), or where a computer player is not allowed to go (!GLOBAL_SET_COMPUTER_BARRIER)?

    • Merri

      I think on the first version of the game V1.01 or V1.02 you could set these things as there are extra RTX files for each map file. Any later version however, V1.50, Mission CD or Gold Edition, does not depend on these files anymore. So you can only replace existing mission maps to make use of RTX files in your own maps.

      However there might be a small possibility that barrier data is saved directly into savegame maps, so one could figure out where in the mapdata it should be and then try adding it into an existing map. It either works or it doesn’t. But it is certain the data is not saved in the header of the map as that part of the map file is 100% known.

      • lttlb

        Does RttR have a mechanism to do these kinds of things? It just seems it would be nice to be able to make these specifications for a game on a player-by-player basis if desired.