public class Area
extends Object
This class provides a collection of RM commands concerning Areas.
Areas are regions on a map. They are often irregular in shape, but can be rectangular as well. Some areas are used for placing specific terrain, like a cliff or ocean, while others are just used as boundaries for other areas. Special types of areas are player areas, which belong to a certain player, or team areas, which belong to a team. Saying these areas "belong" is just a convenient method of making sure other areas or objects are placed in that area.
Modifier and Type | Method and Description |
---|---|
void |
rmAddAreaCliffEdgeAvoidClass(int areaID,
int avoidID,
float minDist)
Adds a class for an area's cliff edge to avoid.
|
bool |
rmAddAreaConstraint(int areaID,
int constraintID)
Add specified constraint to an area.
|
void |
rmAddAreaInfluencePoint(int areaID,
float xFraction,
float zFraction)
Adds an area influence point.
|
void |
rmAddAreaInfluenceSegment(int areaID,
float xFraction1,
float zFraction1,
float xFraction2,
float zFraction2)
Adds an area influence segment.
|
void |
rmAddAreaRemoveType(int areaID,
string typeName)
Add an unit type that the specified area removes.
|
void |
rmAddAreaTerrainLayer(int areaID,
string terrain,
float minDist,
float maxDist)
Adds a terrain layer to an area.
|
void |
rmAddAreaTerrainReplacement(int areaID,
string terrainTypeName,
string newTypeName)
Adds a terrain replacement rule to the area.
|
bool |
rmAddAreaToClass(int areaID,
int classID)
Add given area to specified class.
|
int |
rmAreaID(string name)
Gets the area ID for given area name.
|
void |
rmBuildAllAreas()
Simultaneously builds all unbuilt areas.
|
void |
rmBuildArea(int areaID)
Builds the specified area.
|
int |
rmCreateArea(string name,
int parentAreaID)
Creates an area and returns the areaID.
|
void |
rmPaintAreaTerrain(int areaID)
Paints the terrain for a specified area.
|
void |
rmSetAreaBaseHeight(int areaID,
float height)
Sets the base height for an area.
|
void |
rmSetAreaCliffEdge(int areaID,
int count,
float size,
float variance,
float spacing,
int mapEdge)
Set cliff edge parameters for an area.
|
void |
rmSetAreaCliffHeight(int areaID,
float val,
float variance,
float ramp)
Set an area's cliff height.
|
void |
rmSetAreaCliffPainting(int areaID,
bool paintGround,
bool paintOutsideEdge,
bool paintSide,
float minSideHeight,
bool paintInsideEdge)
Set cliff painting options for an area.
|
void |
rmSetAreaCliffType(int areaID,
string cliffName)
Sets the cliff type for an area.
|
void |
rmSetAreaCoherence(int areaID,
float coherence)
Sets area coherence (0-1).
|
void |
rmSetAreaForestType(int areaID,
string forestName)
Sets the forest type for an area.
|
void |
rmSetAreaHeightBlend(int areaID,
int heightBlend)
Sets how smoothly area height blends into surroundings.
|
void |
rmSetAreaLocation(int areaID,
float xFraction,
float zFraction)
Set the area location.
|
void |
rmSetAreaLocPlayer(int areaID,
int playerID)
Set the area location to player's location.
|
void |
rmSetAreaLocTeam(int areaID,
int teamID)
Set the area location to team's location.
|
void |
rmSetAreaMaxBlobDistance(int areaID,
float dist)
Sets maximum blob distance.
|
void |
rmSetAreaMaxBlobs(int areaID,
int blobs)
Sets maximum number of area blobs.
|
void |
rmSetAreaMinBlobDistance(int areaID,
float dist)
Sets minimum blob distance.
|
void |
rmSetAreaMinBlobs(int areaID,
int blobs)
Sets minimum number of area blobs.
|
void |
rmSetAreaSize(int areaID,
float minFraction,
float maxFraction)
Set the area size to a min/max fraction of the map.
|
void |
rmSetAreaSmoothDistance(int areaID,
int smoothDistance)
Sets area edge smoothing distance (distance is number of neighbouring points to consider in each direction).
|
void |
rmSetAreaTerrainLayerVariance(int areaID,
bool variance)
Specifies if the area should vary the terrain layer edges.
|
void |
rmSetAreaTerrainType(int areaID,
string terrainTypeName)
Sets the terrain type for an area.
|
void |
rmSetAreaWarnFailure(int areaID,
bool warn)
Sets whether the area build process will warn if it fails.
|
void |
rmSetAreaWaterType(int areaID,
string waterName)
Sets the water type for an area.
|
public void rmAddAreaCliffEdgeAvoidClass(int areaID, int avoidID, float minDist)
public bool rmAddAreaConstraint(int areaID, int constraintID)
public void rmAddAreaInfluencePoint(int areaID, float xFraction, float zFraction)
public void rmAddAreaInfluenceSegment(int areaID, float xFraction1, float zFraction1, float xFraction2, float zFraction2)
public void rmAddAreaRemoveType(int areaID, string typeName)
public void rmAddAreaTerrainLayer(int areaID, string terrain, float minDist, float maxDist)
rmSetAreaTerrainType(areaID, "GrassA");
rmAddAreaTerrainLayer(areaID, "SnowGrass75", 13, 20);
rmAddAreaTerrainLayer(areaID, "SnowGrass50", 6, 13);
rmAddAreaTerrainLayer(areaID, "SnowGrass25", 0, 6);
public void rmAddAreaTerrainReplacement(int areaID, string terrainTypeName, string newTypeName)
public bool rmAddAreaToClass(int areaID, int classID)
public int rmAreaID(string name)
public void rmBuildAllAreas()
rmBuildArea(int)
public void rmBuildArea(int areaID)
rmBuildAllAreas()
public int rmCreateArea(string name, int parentAreaID)
public void rmPaintAreaTerrain(int areaID)
public void rmSetAreaBaseHeight(int areaID, float height)
public void rmSetAreaCliffEdge(int areaID, int count, float size, float variance, float spacing, int mapEdge)
count
- Number of cliff edges to create. The count times the size should not be more than 1.0. Defaults to 1.size
- This specifies how much of the area's outline should be turned into cliff edges. It should be between 0.0 and 1.0. Set to 1.0 to make the whole area surrounded. Defaults to 0.5.variance
- The variance to use for the size. Defaults to 0.0.spacing
- Spacing modifier. This should be between 0.0 and 1.0. The smaller this is, the closer together the cliff edges will be. Defaults to 1.0.mapEdge
- Specifies where the cliff edge should be in relation to the map edge. Set to 0 for any, 1 to be away from the map edge, or 2 to be close to the map edge. Defaults to 0.public void rmSetAreaCliffHeight(int areaID, float val, float variance, float ramp)
val
- Make positive for raised cliffs and negative for lowered cliffs. Defaults to 4.0.variance
- The variance to use for the height.ramp
- This is used to determine how quickly the height ramps up to the cliff height (it refers to steepness in this context, not pathable ramps to reach the top of a cliff). Defaults to 0.5.public void rmSetAreaCliffPainting(int areaID, bool paintGround, bool paintOutsideEdge, bool paintSide, float minSideHeight, bool paintInsideEdge)
paintGround
- Specifies if the ground should be painted or just left whatever it already is. Defaults true.paintSide
- Specifies if the cliff sides should be painted. Defaults true.paintOutsideEdge
- Specifies if the outside cliff edge should be painted. This is the area between the cliff side and the ground. Defaults true.minSideHeight
- Specifies the minimum height that a cliff tile must be sloped before treating it as a cliff side. Set to 0 to have the minimum amount of cliff sides painted. Defaults to 1.5.paintInsideEdge
- Specifies if the inside cliff edge should be painted. This is the area between the cliff side and the ground. Defaults true.public void rmSetAreaCliffType(int areaID, string cliffName)
public void rmSetAreaCoherence(int areaID, float coherence)
public void rmSetAreaForestType(int areaID, string forestName)
public void rmSetAreaHeightBlend(int areaID, int heightBlend)
public void rmSetAreaLocation(int areaID, float xFraction, float zFraction)
public void rmSetAreaLocPlayer(int areaID, int playerID)
public void rmSetAreaLocTeam(int areaID, int teamID)
public void rmSetAreaMaxBlobDistance(int areaID, float dist)
public void rmSetAreaMaxBlobs(int areaID, int blobs)
public void rmSetAreaMinBlobDistance(int areaID, float dist)
public void rmSetAreaMinBlobs(int areaID, int blobs)
public void rmSetAreaSize(int areaID, float minFraction, float maxFraction)
public void rmSetAreaSmoothDistance(int areaID, int smoothDistance)
public void rmSetAreaTerrainLayerVariance(int areaID, bool variance)
public void rmSetAreaTerrainType(int areaID, string terrainTypeName)
public void rmSetAreaWarnFailure(int areaID, bool warn)
public void rmSetAreaWaterType(int areaID, string waterName)