The .OBS Files used by the Scenario Editor

General Discussion, click here.
Adding new Objects, click here.
Object-Texture Combining, click here.
The 'SelectTexture' Window, click here.
Multiple Objects in one square, click here.
Forests and random placement, click here.
The 'lbValue' boxes, click here.
Marking telephone pole and wall 'objects' for easier recognition, click here.



General
One of the files used by the Scenario Editor for each scenario is the .OBS file which has the information for all objects used in the scenario.

The 'SelectTexture' window, which controls the use and maintenace of the .OBS file is opened by clicking on the window at the bottom of the 'Landscape' toolbar of the 'Tools' menu which is located on the left side of the Scenario Editor work space.

A few details of the file follow:
The list of object names starts in the first byte. They consist of 18-byte packets. Bytes 1-15 contain the object RRF filename, right-filled with hex-00. I do not know what byte-16 is for. Bytes 17-18 contain a two-byte counter starting at zero. There is room in the file for about 500 names because the vehicle, 'ab', 'ac', and 'ad' RRF names are present as well as the regular 'aa' objects.

Next, starting at about byte 9,553, come 328-byte packets. Bytes 1-2 have the pointer to the name in the list. Byte 3 has the 'rotation', byte 6 has the 'X-offset', and byte 7 has the 'Y-offset'. If bytes 6 and 7 are both zero, this is NOT a packet defining what appears in the 16x16 'Objects' window. The packet number (starting at 1) gives the location in the 'Objects' window. Example: object 32 is in column 1, row 3.

Next comes other unknown-to-me data. Starting in byte 93,185 is a list of all the 'group' names.

Starting in byte 98,309 is a list of 'texture-parts' (shadows) in 4-byte packets.

The rest of the file contains yet other unknown-to-me data.


SelectTexture Window
The pictures below show OBS files as displayed using the 'Objects' tab of the 'SelectTexture' window of the Scenario Editor. The picture on the right shows the center OBS file zoomed in. One can see, to a certain extent, what the image looks like. The selection shows in column 6, row 2 in the center picture.

There is one .OBS file for each scenario. It is maintained through the use of the 'SelectTexture' window. Using this window, selected items from the 60-odd original .RRF objects can be converted into 255 object combinations tailored to the needs of the particular scenario. Notice that the file shown on the left above has many buildings rotated plus-or-minus 45 degrees. The file in the center has only one. You can also see that most of the buildings appear in both N-S and E-W orientation.

Desert scenario 'Goubellat'

Normandy scenario 'Marigny'

Normandy 'Marigny', but larger.

Adding new Objects
There is a set of objects which can be used in a scenario. Each object is defined by having an .RRF file in folder \Desert_Obj\, \Italy_Obj\, or \Normandy_Obj\. If you have a new object which you wish to add, just copy the .RRF file to the \campaign_Obj\ folder where it will be used.

To add the new object to the 'objects' array, double click on an empty location in the 'Objects' array of the'SelectTexture' menu. This is where the new object will be placed.
The picture shows the window that opens when you double-click on an empty square. You can tell it is empty because there is no name showing in the white window. There fact that there is nothing in the gray area where the object would appear is not sufficient. Some of the town signs and telephone poles are so thin that they may not show either.

The similar picture shown just down the page shows the window when there is an object already there.

The picture to the right also shows the result of clicking on the list-opening arrow just below the white window. Every object that has a .RRF filename beginning with 'a' will be in this list, including 'aa', 'ab', 'ac', and a few antitank guns whose RRF filenames begin with 'AT'.

Note that you will have had to use the Object Editor program to color the new object, and may have also had to add new textures to the .BMP and .TLB files that contain the textures for the campaign.


Adding a second Object or Removing an Object
If you double-click on the building selected in the right-hand picture above, the object turns out to be a railroad station named 'aaBahnhof2.RRF'. It has also been moved from the center (128,128) to the right to location 193 and down to location 179. If it had been rotated counter-clockwise 90 degrees, the 'Rotation' box would say 64.

Telephone poles need to be present with various rotations at 45-degree intervals to match the directions of the roads they accompany.

I do not know what the four square boxes marked 'lbValue' and the 'Attribute' and 'Snap' boxes are really used for.

I have found one use for the 'lbValue' boxes. When a box is clicked on, a white stripe appears on that edge of the object when it is displayed on the map. If you use these stripes, you will be able to tell where your telephone poles are. Normally all poles look almost alike. Some are all but invisible. When you mark your pole object squares with white stripes and enlarge your map, you will be easily able to tell which poles are where. The same is true with walls and town signs.
If you click on the 'open' arrow under the square window on the right, a list of all the available objects will appear. The picture shows part of the list and the slider you use to move up and down the list.

If you wanted to have an outbuilding or a tree in the same 10x10-meter square, you could select that object and click on the 'Add Object' button. When you do that, the object will be added and the 'X Position', 'Y Position', 'Rotation', and other cells will be reset so you can position the newly-added object wherever you wish without disturbing the other(s).

You will now have two names in the square window. You can toggle between them to adjust and re-adjust the Rotations, x-Positions, etc. of the two objects as needed. I do not know how many objects you can have in a single square.

Object-Texture Combining
Note also that on the 'Landscape' toolbar, there is a checkbox labelled 'TexObj'. When box this is checked, a shadow or other ground texture will be applied whenever the object is placed on the terrain. Typical uses are for shadows under trees, and for smudges which will show on the ground when a building is destroyed. Most of the bigger trees have shadows, and nearly all buildings have smudges.

If you prepare a new object for use, typically by moving or rotating a standard one, or by combining two objects into one, you have to take this smudge-texture into account. For instance, if you make a new object by rotating a building, you may also need to select a rotated smudge to go under it.
Changing Combinations
* Open the 'ObjTexComb' menu and drag it to where you can control its sliders.
* Move so the combination you want to make the change is displayed.
* Open the 'SelectTexture' window. Select (click on) the texture you wish to put into an 'ObjTexComb' square.
* Then click on the square (for example, to the LEFT of a dark green square).
* You do NOT need to have 'Line' or 'Rect' selected. Lo-and-behold, that texture will appear in that square.
* You will now be able to apply that object with its new texture on dark green squares.
* To change the selection back to the little red dot, apply texture 1,1 (column1, row 1). The red dot means that you may NOT install this object on this terrain with the 'TexObj' checkbox ON.
* To get the little red 'ign.', apply texture 1,2 (column 1, row 2). The 'ign' means that if you have the 'TexObj' box ON, you will GET the object but NOT the texture.
* If the 'TexObj' checkbox is OFF, you can apply the object to any square.

Find what texture is actually being used with an object
* The way to determine what shadows are associated with which objects is a bit clumsy, but simple. The process involves (1) placing the object WITH its texture, (2) removing JUST the object, and (3) identifying which texture was left-behind. This is useful in cases where there are several ground textures which are similar.
(1) Placing the object WITH its texture
* Open the scenario whose 'ObjTexComb' menu is to be worked on.
* Go to a location on the terrain where you can easily add and delete objects and ground textures.
* With the 'TexObj' checkbox checked, place an object. The object and its ground texture (or shadow) will appear.
* You can now zoom in on the location. The object and its ground texture will show clearly.
(2) Removing JUST the object
* Turn the 'TexObj' checkbox OFF.
* In the 'SelectTexture' window, select OBJECT 1,1 (the 'eraser' object).
* Now click on the terrain square where the object was. The Object will be removed, but the ground texture will remain.
* Select the 'eyedropper' in the 'Landscape' menu and click on the ground texture. The ground texture will show in the 'Landscape' window.
(3) Identifying which texture was left-behind
* Click on the 'Landscape' window to open the 'SelectTexture' window again. Switch to 'Textures'.
* The ground texture will be outlined with a white square.
* CLICK on that square. Its number will show at the top of the 'SelectTexture' menu.
Detailed Examination of the Ground Texture
* If you move the Scenario Editor slider to the bottom for maximum enlargement, each of the 16x16 pixels of ground texture will be enlarged to 4x4 screen pixels.
* If you press the Print Screen button, you can paste the resulting image into the MS Paint program.
* There you will be able to examine the 16x16 individual pixels that make up the ground texture.
* This is where you can determine details such as whether the textures are centered.
* You may find that several textures are, in fact, identical.

Randomly Placing Objects
If you have several objects selected and select either 'Rect' or 'Line' to apply the objects, the Scenario Editor will randomly pick from the selected objects and place them in the chosen rectangle or line. It will do this random selection even if you only place them in a single square.

In this example we have clicked on the 'open' arrow under the square on the right. Then we have gone way down the list to an item named 'wald'. This shows the case where 95 objects are being selected at one time. The trees and bushes selected are the 22 squares in the upper left. The 73 other squares have nothing in them. This is from the desert scenario 'Sbeitla' where woods are very sparse. In this case only 22 squares out of 95 will have a tree or bush. The others will have nothing.

If you had any objects in the selected rectangle, they will be replaced even though the replacement is 'nothing'. If the new object does not have an associated 'TexObj', the original 'TexObj' will remain unaltered.

You select or deselect an object by clicking on it.
This picture shows collection 'wald' randomly applied to desert terrain by the Scenario Editor when 'Rect' was selected. You see how the empty squares have created very realistic-looking collection of trees and bushes.

Updated 1/20/02