Tutorial; MappingStartPositions - HWRM/KarosGraveyard GitHub Wiki

Go Back to MappingTutorial

5. Adding Player Start Position Information

Now add in this text:

addPoint("StartPos0", {X, Z, Y,}, {A, B, C,});
addPoint("StartPos1", {-X, Z, -Y,}, {A, B, C,});

"StartPos0" is the starting position for player 1, "StartPos1" is the start position for player 2, and so on up to "StartPos5" for a six-player map.

The first brackets, the {X, Z, Y,} ones, determine the location of each start point relative to the origin (the point where the crosshairs meet in sensors manager when the map first starts).

Notice the format of the coordinates: {X, Z, Y,}. X controls "side-to-side" position, Y controls "up-and-down" position, and Z controls height above or below the default plane of movement.
Note: in HW2, X is to the left, Y is up, and Z is forward when looking at the 180 marker on the Sensors Manager pie-plate. In HW1, X is to the right, Z is up, and Y is forward when looking at the 300 marker on the Sensors Manager. Both games use a right-handed coordinate system. This is probably why Malignus has the order of the Y and Z coordinates reversed. -Mikali

So, suppose you want to start each player 51 km to the side of the origin, 9 km above the origin on the Y-axis, and in line with the default plane of movement. You'd type something like this:

addPoint("StartPos0", {-51000, 0, 9000,}, {0, 0, 0,});
addPoint("StartPos1", {51000, 0, -9000,}, {0, 180, 0,});

Simple enough, eh? Notice that the X and Y values are inverted to keep the playing area symmetrical. A 4-player map using those values might look like this:

addPoint("StartPos0", {-51000, 0, 9000,}, {0, 0, 0,});
addPoint("StartPos1", {51000, 0, -9000,}, {0, 90, 0,});
addPoint("StartPos2", {-51000, 0, -9000,}, {0, 180, 0,});
addPoint("StartPos3", {51000, 0, 9000,}, {0, 270, 0,});

Of course, this isn't really symmetrical, since players one and three would be very close to one another, and so would players two and four. But you get the idea.

Keep in mind when setting distances that it takes a scout squad three and a half minutes of uninterrupted travel to move 100 km on conventional drives. That's a pretty long time, and you can expect capital ships to take much much longer when traversing the same distances.

You can measure distance in the Sensors Manager by counting prongs along the movement plate axes. As you can see on the left, the distance between each prong is 5 km by default, or 10.5 seconds of scout traveling time. Plan distances accordingly.

The next bracket set, {A, B, C}, determines the angle of rotation of each player's mothership. Only put in a value for B. A and C should be left at zero (if you change them, they'll tilt the mothership at bizarre angles at the beginning of each map. It will then take 20 or 30 seconds to right itself).

Using B, you can set each player's starting orientation (which way his carrier and mothership are facing). If B is set to 90, the player's carrier and MS will hyperspace into the level facing towards 90 degrees on the Sensors Manager compass. Generally it pays to have your ships facing more or less towards the center of the map.
Note: actually, by default the player faces the 180 degree marker on the Sensors Manager pie-plate. Then, as you change the value for B, the mothership is rotated in the opposite direction (i.e., counter-clockwise) than what the numbers indicate. Oddly, Malignus is correct when he states that setting B to 90 will point the mothership toward the 90 degree marker, as 180 - 90 = 90. -Mikali

6. Sizing the Map

Now set the size of your map:

setWorldBoundsInner({0, 0, 0,}, {X, Z, Y,});

Don't change the values in the first bracket! Those effect position, and may give you a lopsided map if changed from 0. The second bracket has the X, Z, and Y size values you want.

Comments

Page Status

Updated Formatting? Initial
Updated for HWRM? Initial