public class Connection
extends Object
This class provides a collection of RM commands concerning Connections.
Connections are special areas that are used to connect other areas. They are typically used to place land-bridges or mountain-passes among players. Connections must be placed after the areas they are trying to connect, but often need to be defined before those areas if the area needs the rmAddConnectionArea command.
Modifier and Type | Field and Description |
---|---|
int |
cConnectAllies |
int |
cConnectAreas |
int |
cConnectEnemies |
int |
cConnectPlayers |
Modifier and Type | Method and Description |
---|---|
void |
rmAddConnectionArea(int connectionID,
int areaID)
Adds an area to the connection.
|
bool |
rmAddConnectionConstraint(int connectionID,
int constraintID)
Add specified constraint to a connection.
|
bool |
rmAddConnectionEndConstraint(int connectionID,
int constraintID)
Add specified constraint for a connection end point.
|
bool |
rmAddConnectionStartConstraint(int connectionID,
int constraintID)
Add specified constraint for a connection start point.
|
void |
rmAddConnectionTerrainReplacement(int connectionID,
string terrainTypeName,
string newTypeName)
Adds a terrain replacement rule to the connection.
|
void |
rmAddConnectionToClass(int connectionID,
int classID)
Adds the connection to specified class.
|
void |
rmBuildConnection(int connectionID)
Builds the given connection.
|
void |
rmCreateConnection(string name)
Creates an connection.
|
void |
rmSetConnectionBaseHeight(int connectionID,
float width)
Sets the base height of a connection.
|
void |
rmSetConnectionBaseTerrainCost(int connectionID,
float cost)
Sets the base terrain cost for a connection.
|
void |
rmSetConnectionCoherence(int connectionID,
float width)
Sets area coherence (0.0-1.0).
|
void |
rmSetConnectionHeightBlend(int connectionID,
float width)
Sets how smoothly connection height blends into surroundings.
|
void |
rmSetConnectionPositionVariance(int connectionID,
float variance)
Sets the position variance of a connection.
|
void |
rmSetConnectionSmoothDistance(int connectionID,
float width)
Sets connection edge smoothing distance (distance is number of neighboring points to consider in each direction).
|
void |
rmSetConnectionTerrainCost(int connectionID,
string terrainTypeName,
float cost)
Sets the terrain cost for a connection.
|
void |
rmSetConnectionType(int connectionID,
int connectionType,
bool connectAll,
float connectPercentage)
Sets the connection type.
|
void |
rmSetConnectionWarnFailure(int connectionID,
bool warn)
Sets whether a connection warns on failure.
|
void |
rmSetConnectionWidth(int connectionID,
float width,
float variance)
Sets the width of a connection.
|
public final int cConnectAreas
public final int cConnectPlayers
public final int cConnectAllies
public final int cConnectEnemies
public void rmAddConnectionArea(int connectionID, int areaID)
public bool rmAddConnectionConstraint(int connectionID, int constraintID)
public bool rmAddConnectionEndConstraint(int connectionID, int constraintID)
public bool rmAddConnectionStartConstraint(int connectionID, int constraintID)
public void rmAddConnectionTerrainReplacement(int connectionID, string terrainTypeName, string newTypeName)
public void rmAddConnectionToClass(int connectionID, int classID)
public void rmBuildConnection(int connectionID)
public void rmCreateConnection(string name)
public void rmSetConnectionBaseHeight(int connectionID, float width)
public void rmSetConnectionBaseTerrainCost(int connectionID, float cost)
public void rmSetConnectionCoherence(int connectionID, float width)
public void rmSetConnectionHeightBlend(int connectionID, float width)
public void rmSetConnectionPositionVariance(int connectionID, float variance)
public void rmSetConnectionSmoothDistance(int connectionID, float width)
public void rmSetConnectionTerrainCost(int connectionID, string terrainTypeName, float cost)
public void rmSetConnectionType(int connectionID, int connectionType, bool connectAll, float connectPercentage)
connectionType
- This command determines which players are connected. The valid values are:
connectAll
- Set this parameter to true if you want all of the areas to get connected to all of the other areas.
Set it to false to have the areas connected sequentially where the first area gets connected to the second area,
the second area gets connected to the third area, etc.connectPercentage
- You can use this parameter to reduce the number of connections that are generated.
For example, if you set it to 0.5, then half of the connections will get generated. The ones that are generated are randomly chosen.
Some ES maps with connections connect all players when player number is small (less than 6) and uses a connection percentage on larger maps,
otherwise so many connections can get placed that the barrier (like water or rock) is obscured.public void rmSetConnectionWarnFailure(int connectionID, bool warn)
public void rmSetConnectionWidth(int connectionID, float width, float variance)