Difference between revisions of "Building structures"

From OrbiterWiki
Jump to navigation Jump to search
(Base building.)
(Block object.)
Line 1: Line 1:
A '''base''' (spaceport) is a construct in Orbiter which allows the user to create an area on a planet which contains various observer sites, structures, VORs, runways, and pads, and other objects contained in a file for that purpose. Base configuration files are contained in the appropriate folder (Orbiter\Config\<planet or moon>\Base). One can also edit an existing base by opening the <base>.cfg file with Notepad or other text editor.
+
A '''Block''' is an object that can be used to create structures on bases. It is a cube or rectangular prism consisting of three dimensions, length, width, and height, and it can use any of the textures that are listed in the base.cfg file (Orbiter\Config\base.cfg), although some may not be appropriate for a block.
  
==Objects==
+
The description of a block is written into the config file of a base (Orbiter\Config\<''Planet''>\Base\<''BaseConfig.cfg''>).
Objects contained in a base include:
 
*Block - cubic or rectangular structures
 
*Hangar - structure with curved roof
 
*Hangar2 - structure with triangular roof, like a house
 
*Hangar3 - structure with curved roof, reaching to the ground, Hangar without side walls
 
*Tank - circular structure with flat top
 
*Runway - where airplanes and spaceplanes land
 
*Runway lights - lighting for a runway
 
*Beacon array - linear lighting array, designed for taxiway
 
*Solar plant - an array of solar panels, self aligning to the Sun
 
*Train1 - Monorail train on a straight track
 
*Train1 - Suspension train on a straight track
 
*Lpad1 - Octagonal landing pad
 
*Lpad2 - Square landing pad
 
*Lpad2a - Square landing pad with a texture different from Lpad2
 
*Mesh - other meshes
 
  
==Creating a base==
+
So, let's build a block building. Open up a Base config file, here we will use the Bonneville.cfg file we created to build a sample base.
Bases can be defined in the planet or moon config folder, but, in the stock Orbiter 2016, the existing bases are each defined each by their own *.cfg file in the planet's Base subfolder.
 
  
To create a new base, open Notepad, or your favorite text editor, then type in the following:
+
Type in the word '''BLOCK'''.
 +
On the next line is the location within the base, the command is '''POS''' followed by three numbers, X, Y, and Z.
 +
X is meters north (-) or south (+) of the center of the base. Y is elevation in meters above or below ground, usually zero unless you are building a complex structure. Z is meters east (+) or west (-) of center.
  
; === Surface Base ===
+
So, type in '''POS -50 0 0'''. This will be 50 meters to the north, on the ground, and no offset to the east or west.
+
 
Name = Rincon de la vieja
+
The next line is the SCALE, which is how big in meters is the block, the first one is the width, or left to right dimension, the second is the height, and the third is the depth or length, front to back.
Size = 2000
+
 
ObjectSize = 2000
+
So, type in '''SCALE 10 1 1'''.
+
 
BEGIN_OBJECTLIST
+
Next line is ROT, rotation from east in degrees, 45 would face the block northeast, 135 northwest, 225 wouthwest, and 315 southeast.
LPAD2
+
 
POS 0 0
+
So, let's type in '''ROT 30'''.
SCALE 5 0.15 0
+
 
TEX Lpad02
+
The next line is TEX1 followed by a texture name and two numbers. This will place a texture on the front and back of the structure. Texture name is any texture listed in the Base.cfg file, but you may not want to select Runway2, for example. the first number is how many of this textures wide, and the last number is how many textures high.
NAV 128.05
+
 
END
+
So, let's type in '''TEX1 Fcd01 5 1'''.
END_OBJECTLIST
+
 
 +
Next line, TEX2 followed by a texture name and two numbers, but this is for the left and right face of the structure.
 +
 
 +
So, let's type in '''TEX2 Fcd03 1 1'''.
 +
 
 +
And the last line is TEX3 followed by a texture name and two numbers. This will place a texture on the top or roof of the structure, usually Roof01 or Roof02, again how many roof segments in width and length.
 +
 
 +
So, let's type in '''TEX3 Roof01 1 1'''.
 +
 
 +
Then the last thing is type in END on the last line. That tells Orbiter that this is the end of data for this block. The next line may begin a new object.
 +
 
 +
So, type in '''END'''.
 +
 
 +
Now, your block should be described as follows.
 +
 
 +
<code>
 +
BLOCK
 +
        POS -50 0 0  
 +
        SCALE 10 1 1
 +
        ROT 30
 +
        TEX1 Fcd01 5 1
 +
        TEX2 Fcd03 1 1
 +
        TEX3 Roof01 1 1
 +
END
 +
</code>
 +
 
 +
Save your config file, launch orbiter, and your structure should look something like this.

Revision as of 12:23, 25 October 2023

A Block is an object that can be used to create structures on bases. It is a cube or rectangular prism consisting of three dimensions, length, width, and height, and it can use any of the textures that are listed in the base.cfg file (Orbiter\Config\base.cfg), although some may not be appropriate for a block.

The description of a block is written into the config file of a base (Orbiter\Config\<Planet>\Base\<BaseConfig.cfg>).

So, let's build a block building. Open up a Base config file, here we will use the Bonneville.cfg file we created to build a sample base.

Type in the word BLOCK. On the next line is the location within the base, the command is POS followed by three numbers, X, Y, and Z. X is meters north (-) or south (+) of the center of the base. Y is elevation in meters above or below ground, usually zero unless you are building a complex structure. Z is meters east (+) or west (-) of center.

So, type in POS -50 0 0. This will be 50 meters to the north, on the ground, and no offset to the east or west.

The next line is the SCALE, which is how big in meters is the block, the first one is the width, or left to right dimension, the second is the height, and the third is the depth or length, front to back.

So, type in SCALE 10 1 1.

Next line is ROT, rotation from east in degrees, 45 would face the block northeast, 135 northwest, 225 wouthwest, and 315 southeast.

So, let's type in ROT 30.

The next line is TEX1 followed by a texture name and two numbers. This will place a texture on the front and back of the structure. Texture name is any texture listed in the Base.cfg file, but you may not want to select Runway2, for example. the first number is how many of this textures wide, and the last number is how many textures high.

So, let's type in TEX1 Fcd01 5 1.

Next line, TEX2 followed by a texture name and two numbers, but this is for the left and right face of the structure.

So, let's type in TEX2 Fcd03 1 1.

And the last line is TEX3 followed by a texture name and two numbers. This will place a texture on the top or roof of the structure, usually Roof01 or Roof02, again how many roof segments in width and length.

So, let's type in TEX3 Roof01 1 1.

Then the last thing is type in END on the last line. That tells Orbiter that this is the end of data for this block. The next line may begin a new object.

So, type in END.

Now, your block should be described as follows.

BLOCK

       POS -50 0 0 
       SCALE 10 1 1
       ROT 30
       TEX1 Fcd01 5 1
       TEX2 Fcd03 1 1
       TEX3 Roof01 1 1

END

Save your config file, launch orbiter, and your structure should look something like this.