[Vanilla] Board - itb-community/ITB-ModLoader GitHub Wiki
This page describes the vanilla functions of Board
.
- For a page about the
Board
class functions added by the mod loader, see Board. - For a page about the
Board
class functions added by the memedit, see Board.
Table of Contents
- Board
- AddAlert
- AddAnimation
- AddBurst
- AddEffect
- AddPawn
- AddShield
- AddTeleport
- AddUniqueBuilding
- BlockSpawn
- Bounce
- ClearBlockSpawns
- ClearSpace
- Crack
- DamageSpace
- Fade
- GetAnotherPlayerPawn
- GetBuildings
- GetBuildingCount
- GetBusyState
- GetCustomTile
- GetDeployLocScore
- GetDistance
- GetDistanceToBuilding
- GetDistanceToPawn
- GetEnemyCount
- GetHealth
- GetInfectedCount
- GetItem
- GetMechDamage
- GetPath
- GetPawn
- GetPawns
- GetPawnCount
- GetPawnSpace
- GetPawnTeam
- GetRandomBuilding
- GetReachable
- GetSimplePath
- GetSimpleReachable
- GetSize
- GetTerrain
- GetTurn
- GetZone
- IsAcid
- IsBlocked
- IsBuilding
- IsBusy
- IsCrackable
- IsCracked
- IsDamaged
- IsDangerous
- IsDangerousItem
- IsDeadly
- IsEdge
- IsEnvironmentDanger
- IsFire
- IsFrozen
- IsItem
- IsPawnAlive
- IsPawnSpace
- IsPawnTeam
- IsPod
- IsPowered
- IsSafe
- IsSmoke
- IsSpawning
- IsTargeted
- IsTerrain
- IsUniqueBuilding
- IsValid
- IsVines
- IsWall
- LockBomb
- MarkFlashing
- MarkSpaceColor
- MarkSpaceDamage
- MarkSpaceDesc
- MarkSpaceImage
- MarkSpaceSimpleColor
- Ping
- RandomizeTerrain
- RemovePawn
- RemoveShield
- SetAcid
- SetCustomTile
- SetDangerous
- SetFrozen
- SetHealth
- SetItem
- SetLava
- SetPopulated
- SetSmoke
- SetTerrain
- SetTerrainIcon
- SetWall
- SetWeather
- Slide
- SpawnPawn
- SpawnQueued
- StartMechTravel
- StartPopEvent
- StartShake
- StopWeather
Board
AddAlert
void
Board:AddAlert(tile, alert)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to add the alert on |
alert |
string | The text to display |
Displays text at the chosen tile.
AddAnimation
void
Board:AddAnimation(location, animationId, delayIndex)
Argument name | Type | Description |
---|---|---|
location |
Point | The board tile we want to add the animation to |
animationId |
string | The id of the animation we want to add |
delayIndex |
number | An index specifying the direction of the animation, and whether it makes the board busy |
Adds an animation to the board at the specified location. The animation id is the name of the animation in the table ANIMS
, which holds all animations.
Delay index:
Index | Global name | Direction | Busy Board |
---|---|---|---|
1 | ANIM_NO_DELAY | forward | no |
2 | ANIM_DELAY | forward | yes |
4 | ANIM_REVERSE | reverse | no |
6 | - | reverse | yes |
AddBurst
void
Board:AddBurst(Point, string, int)
Missing argument list
Missing description
AddEffect
void
Board:AddEffect(SpaceDamage)
void
Board:AddEffect(SkillEffect)
Argument name | Type | Description |
---|---|---|
spaceDamage |
SpaceDamage | The SpaceDamage object we want to apply to the board |
skillEffect |
SkillEffect | The SkillEffect object we want to apply to the board |
Applies a SkillEffect object to the board, which is essentially a list of SpaceDamage objects carried out in sequence; or applies a single SpaceDamage object to the board.
AddPawn
Point
Board:AddPawn(pawnType, zone)
Point
Board:AddPawn(pawnType, location)
Point
Board:AddPawn(pawnType)
Point
Board:AddPawn(pawn, zone)
Point
Board:AddPawn(pawn, location)
Point
Board:AddPawn(pawn)
Argument name | Type | Description |
---|---|---|
pawnType |
string | The name of the pawn we want to add |
pawn |
BoardPawn | The BoardPawn object we want to add to the board |
location |
Point | The zone we want to add the pawn to |
zone |
string | The zone we want to add the pawn to |
Adds a unit to the board, with several possible signatures. The first argument specified what to place. The second argument, if any, specified where to place it.
- If a
pawnType
is specified, a unit with this type will be created and placed according to the second argument - If a
pawn
object is specified, this unit will be placed according the second argument - If a
location
is given, the unit will be placed there - If a
zone
is given, the unit will be placed on one of the remaining available tiles in that zone. Otherwise it will not be placed - If there is no second argument, the unit will be placed on a random location
AddShield
void
Board:AddShield(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The board tile we want to add the shield to |
Adds a shield to Mountains, Buildings or the unit occupying the specified tile.
AddTeleport
void
Board:AddTeleport(tileA, tileB)
Argument name | Type | Description |
---|---|---|
tileA |
Point | The board tile of the first end of the teleporter |
tileB |
Point | The board tile of the other end of the teleporter |
Adds two teleporter pads that teleport between each other. The first call to this function creates red teleporter pads. The second, and every subsequent call adds blue teleporter pads. It is possible to remove teleporter pad graphics by changing the terrain; but there are currently no known ways to remove their effect once they have been placed.
AddUniqueBuilding
Point
Board:AddUniqueBuilding(buildingType)
Argument name | Type | Description |
---|---|---|
buildingType |
string | The type of the unique building |
Changes a random building into a unique building of the specified type, and returns the tile that was changed.
BlockSpawn
void
Board:BlockSpawn(location, blockDurationIndex)
Argument name | Type | Description |
---|---|---|
location |
Point | The location of the board tile we want to block |
blockDurationIndex |
number | An index specifying how long the spawn block will last |
Block units that have random spawning locations from spawning on the specific tile. Does not block spawning units if their spawn location is specified with tile or zone.
Block duration index:
Index | Global name | Duration |
---|---|---|
1 | BLOCK_TEMP | 1 turn |
2 | BLOCK_PERM | Until mission end |
Bounce
int
Board:Bounce(tile, height)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to bounce |
height |
int | The amount of bounciness |
Visually moves a tile up or down, then returns it to its original position. Positive values move it down, negative values move it up. A value of 0 makes the tile invisible until the board graphics are updated (unsure this is the correct term, it reappears on turn reset), even if damaged.
ClearBlockSpawns
void
Board:ClearBlockSpawns()
Clears blocked spawns set by BlockSpawn.
ClearSpace
void
Board:ClearSpace(location)
Argument name | Type | Description |
---|---|---|
location |
Point | The location we want to clear |
Clears the specified tile on the board for most things. Removing any units on it, and changing it to TERRAIN_ROAD.
Note: There are certain features that will not be removed by this function.
Crack
void
Board:Crack(int)
Missing argument list
Missing description
DamageSpace
void
Board:DamageSpace(Point, int)
void
Board:DamageSpace(SpaceDamage)
Missing argument list
Missing description
Fade
void
Board:Fade(int)
Missing argument list
Missing description
GetAnotherPlayerPawn
int
Board:GetAnotherPlayerPawn(int, int)
Missing argument list
Missing description
GetBuildings
PointList
Board:GetBuildings()
Missing argument list
Missing description
GetBuildingCount
int
Board:GetBuildingCount(int)
Missing argument list
Missing description
GetBusyState
int
Board:GetBusyState()
Returns an integer larger than 0 if the board is busy, or 0 if the board is busy. The return value indicates what the Board is busy doing.
GetCustomTile
string
Board:GetCustomTile(Point)
Missing argument list
Missing description
GetDeployLocScore
number
Board:GetDeployLocScore(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Unknown.
GetDistance
int
Board:GetDistance(Point, Point, int)
Missing argument list
Missing description
GetDistanceToBuilding
int
Board:GetDistanceToBuilding(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns the distance from tile
to the closest building. Returns 0 if tile
contains a buillding.
GetDistanceToPawn
int
Board:GetDistanceToPawn(tile, team)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
team |
int | The constant representing the team of the pawn |
Returns the closest pawn to tile
that belongs to team
. Returns 0 if a pawn of team
is on tile
. team
takes values like TEAM_ENEMY
, TEAM_PLAYER
, or TEAM_ANY
.
GetEnemyCount
int
Board:GetEnemyCount()
Missing argument list
Missing description
GetHealth
int
Board:GetHealth(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns the health of a board tile; intact mountains return 2, damaged mountains return 1, buildings return however many buildings are still standing on that tile. Returns strange results for ground tiles.
GetInfectedCount
int
Board:GetInfectedCount()
Unknown.
GetItem
string
Board:GetItem(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns the string of the item definition that is on the specified tile
, or a blank string if there is none.
GetMechDamage
int
Board:GetMechDamage()
Returns the total amount of damage currently taken by mechs. This is used in the "finish battle with less than 4 Mech Damage" objective.
GetPath
PointList
Board:GetPath(start, end, pathProfile)
Argument name | Type | Description |
---|---|---|
start |
Point | The board tile we want to start from |
end |
Point | The board tile we want to end at |
pathProfile |
int | The path profile governing movement |
Returns a PointList
consisting of the path a pawn with pathProfile
would use to move from start
to end
.
For a pawn with 4 movement, it would contain up to 5 points, starting with start
and ending with end
.
GetPawn
Pawn
Board:GetPawn(int)
Pawn
Board:GetPawn(Point, bool)
Pawn
Board:GetPawn(Point)
Missing argument list
Missing description
GetPawns
IntList
Board:GetPawns(team)
Argument name | Type | Description |
---|---|---|
team |
int | The team whose pawns you want |
Returns a list containing the IDs of all pawns on the board in team
. You can also use TEAM_ANY
as the value for team
to get all pawns.
GetPawnCount
int
Board:GetPawnCount(int)
int
Board:GetPawnCount(string)
Missing argument list
Missing description
GetPawnSpace
Point
Board:GetPawnSpace(int)
Missing argument list
Missing description
GetPawnTeam
int
Board:GetPawnTeam(int, int)
int
Board:GetPawnTeam(Point)
Missing argument list
Missing description
GetRandomBuilding
Point
Board:GetRandomBuilding(bool)
Missing argument list
Missing description
GetReachable
PointList
Board:GetReachable(originTile, distance, pathProfile)
Argument name | Type | Description |
---|---|---|
originTile |
Point | The board tile we want to start from |
distance |
int | The max distance from originTile |
pathProfile |
int | The path profile governing movement |
Returns the list of all points a pawn with pathProfile
in originTile
can move to within a distance of distance
or less.
GetSimplePath
PointList
Board:GetSimplePath(originTile, destinationTile)
Argument name | Type | Description |
---|---|---|
originTile |
Point | The board tile we want to start from |
destinationTile |
string | The board tile we want to end up at |
Returns a PointList of Points between originTile
and destinationTile
. If a simple path cannot be found, and empty PointList will be returned. (needs more investigation regarding what constitutes a simple path)
GetSimpleReachable
PointList
Board:GetSimpleReachable(originTile, distance, flag)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
distance |
int | The distance from the original tile we want to travel |
flag |
boolean | unknown - something with diagonals |
Returns a PointList of Points. (needs more investigation)
GetSize
Point
Board:GetSize()
Returns a Point with x and y equal the size of the Board.
GetTerrain
int
Board:GetTerrain(int, int)
int
Board:GetTerrain(Point)
Missing argument list
Missing description
GetTurn
int
Board:GetTurn()
Missing argument list
Missing description
GetZone
PointList
Board:GetZone(zone)
Argument name | Type | Description |
---|---|---|
zone |
string | The name of the zone we want to retrieve the PointList for |
Some maps have special "zones" defined in the map file. These "zones" are a list of Point
s on the board, and are usually used by the missions to place units, or interact with certain tiles in some way.
Some examples of deployment zones used in vanilla maps. Modded maps could have additional zones defined.
Zone | Description |
---|---|
acid | unknown |
barrels | Barrel locations |
belt | Belt locations |
deployment | Custom deployment zone used in some maps. Most maps use the default 3x6 deployment zone minus invalid deployment tiles |
disposal | Disposal Unit locations |
enemy | Enemy deployment zone |
falling | Falling tiles when the first phase of the final battle is over. Does not account for Mechs standing outside this region, whose tiles collapse as a special hard-coded case |
filler | Earth Mover locations |
lasers | Laser locations |
pistons | Piston locations |
pylons | Pylon locations in the final battle |
return | seems to be used in some unused capture the flag maps |
satellite | Satellite Rockets locations |
IsAcid
bool
Board:IsAcid(Point)
Missing argument list
Missing description
IsBlocked
boolean
Board:IsBlocked(tile, pathing)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
pathing |
int | The pathing type we want to check |
Returns true
if the tile
is blocked for the specified pathing
type; otherwise false
.
IsBuilding
bool
Board:IsBuilding(int, int)
bool
Board:IsBuilding(Point)
Missing argument list
Missing description
IsBusy
boolean
Board:IsBusy()
Returns true
if the Board is busy doing something; otherwise false
.
IsCrackable
boolean
Board:IsCrackable(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if the tile is crackable; otherwise false
. NOTE: This function was not available last I checked, but maybe it is available in a newer version of the game.
IsCracked
boolean
Board:IsCracked(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if the tile is cracked; otherwise false
.
IsDamaged
bool
Board:IsDamaged(Point)
Missing argument list
Missing description
IsDangerous
boolean
Board:IsDangerous(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if the specified tile
is marked as dangerous with SetDangerous; otherwise false
.
IsDangerousItem
boolean
Board:IsDangerousItem(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if there is a dangerous item on the specified tile
; otherwise false
. A dangerous item is an item that deals damage. (needs verification)
IsDeadly
boolean
Board:IsDeadly(spaceDamage, pawn)
Argument name | Type | Description |
---|---|---|
spaceDamage |
SpaceDamage | The damage event we want to test on a target pawn |
pawn |
Pawn | The pawn we want to test the damage event on |
Returns true
if the specified spaceDamage
would kill the specified pawn
if applied to the Board; otherwise false
.
IsEdge
bool
Board:IsEdge(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Checks whether a given tile is on the edge of the board(x = 1 or x = 8 or y = 1 or y = 8). Used for vanilla position score: Veks on the edge are hard to push, so they are discouraged from moving to an edge.
IsEnvironmentDanger
boolean
Board:IsEnvironmentDanger(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if there is an environement danger on the specified tile
; otherwise false
. Unknown what consitutes environment danger.
IsFire
bool
Board:IsFire(Point)
Missing argument list
Missing description
IsFrozen
bool
Board:IsFrozen(Point)
Missing argument list
Missing description
IsItem
boolean
Board:IsItem(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if there is an item on the specified tile
; otherwise false
.
IsPawnAlive
bool
Board:IsPawnAlive(int)
Missing argument list
Missing description
IsPawnSpace
boolean
Board:IsPawnSpace(tile)
boolean
Board:IsPawnSpace(tile, flag)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
flag |
boolean | unknown |
Returns true
if there is a pawn on the specified tile
; otherwise false
. Unknown what the flag does.
IsPawnTeam
bool
Board:IsPawnTeam(int, int, int)
bool
Board:IsPawnTeam(Point, int)
Missing argument list
Missing description
IsPod
boolean
Board:IsPod(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Returns true
if there is a pod on the specified tile
; otherwise false
.
IsPowered
bool
Board:IsPowered(Point)
Missing argument list
Missing description
IsSafe
bool
Board:IsSafe(Point)
Missing argument list
Missing description
IsSmoke
bool
Board:IsSmoke(Point)
Missing argument list
Missing description
IsSpawning
bool
Board:IsSpawning(Point)
Missing argument list
Missing description
IsTargeted
bool
Board:IsTargeted(Point)
Missing argument list
Missing description
IsTerrain
bool
Board:IsTerrain(Point, int)
Missing argument list
Missing description
IsUniqueBuilding
bool
Board:IsUniqueBuilding(Point)
Missing argument list
Missing description
IsValid
boolean
Board:IsValid(tile)
boolean
Board:IsValid(x, y)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
x |
int | X coordinate of the board tile we want to check |
y |
int | Y coordinate of the board tile we want to check |
Returns true
if the specified tile
is on the Board; otherwise false
.
IsVines
bool
Board:IsVines(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Used for a scrapped enemy that spread "vines" on the battlefield. The corresponding SpaceDamage field does nothing when applied; this function likely does nothing.
IsWall
bool
Board:IsWall(Point, int, int)
Missing argument list
Missing description
LockBomb
void
Board:LockBomb()
Missing argument list
Missing description
MarkFlashing
void
Board:MarkFlashing(Point, bool)
Missing argument list
Missing description
MarkSpaceColor
void
Board:MarkSpaceColor(Point, GL_Color)
Missing argument list
Missing description
MarkSpaceDamage
void
Board:MarkSpaceDamage(SpaceDamage)
Missing argument list
Missing description
MarkSpaceDesc
void
Board:MarkSpaceDesc(Point, string, bool)
void
Board:MarkSpaceDesc(Point, string)
Missing argument list
Missing description
MarkSpaceImage
void
Board:MarkSpaceImage(Point, string, GL_Color)
Missing argument list
Missing description
MarkSpaceSimpleColor
void
Board:MarkSpaceSimpleColor(Point, GL_Color)
Missing argument list
Missing description
Ping
void
Board:Ping(Point, GL_Color)
Missing argument list
Missing description
RandomizeTerrain
void
Board:RandomizeTerrain(int, int)
Missing argument list
Missing description
RemovePawn
void
Board:RemovePawn(Pawn)
void
Board:RemovePawn(Point)
Missing argument list
Missing description
RemoveShield
int
Board:RemoveShield(Point)
Missing argument list
Missing description
SetAcid
void
Board:SetAcid(Point, bool)
Missing argument list
Missing description
SetCustomTile
void
Board:SetCustomTile(Point, string)
Missing argument list
Missing description
SetDangerous
boolean
Board:SetDangerous(tile)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
Marks the specified tile
as dangerous. This will make the function IsDangerous return true
for this tile
until the start of the next enemy turn. A tile that is marked as dangerous affects Vek AI (needs verification for whether it is any next turn or the next enemy turn, and how this affects Vek AI)
SetFrozen
void
Board:SetFrozen(Point, bool)
Missing argument list
Missing description
SetHealth
void
Board:SetHealth(Point, int, int)
Missing argument list
Missing description
SetItem
void
Board:SetItem(tile, itemType)
Argument name | Type | Description |
---|---|---|
tile |
Point | The location of the board tile we want to check |
itemType |
string | The item definition of the item we want to create |
Creates an item of the specified itemType
on the specified tile
.
SetLava
void
Board:SetLava(Point, bool)
Missing argument list
Missing description
SetPopulated
void
Board:SetPopulated(bool, Point)
Missing argument list
Missing description
SetSmoke
void
Board:SetSmoke(Point, bool, bool)
Missing argument list
Missing description
SetTerrain
void
Board:SetTerrain(Point, int)
Missing argument list
Missing description
SetTerrainIcon
void
Board:SetTerrainIcon(Point, string)
Missing argument list
Missing description
SetWall
void
Board:SetWall(bool, Point, int)
Missing argument list
Missing description
SetWeather
void
Board:SetWeather(intensity, weather, startLoc, endLoc, duration)
Argument name | Type | Description |
---|---|---|
intensity |
int | The intensity of the weather |
weather |
int | The kind of weather |
startLoc |
Point | The first point affected |
endLoc |
Point | The last point affected |
duration |
int | The duration in seconds |
Sets the weather over a part of the board.
intensity
determines the amount of rain drops/snowflakes falling, visually speaking.
weather
determines the kind of visual effect playing. It can be either RAIN_NORMAL, RAIN_ACID, or RAIN_SNOW.
startLoc
determines the first tile affected.
endLoc
determines the last tile affected.
duration
determines the duration of the weather in seconds.
Note that only one weather may be active at once; even if they don't overlap, creating a second weather will cancel the first.
Slide
void
Board:Slide(int)
Missing argument list
Missing description
SpawnPawn
int
Board:SpawnPawn(string)
int
Board:SpawnPawn(string, string)
int
Board:SpawnPawn(string, Point)
void
Board:SpawnPawn(Pawn)
void
Board:SpawnPawn(Pawn, string)
void
Board:SpawnPawn(Pawn, Point)
Missing argument list
Missing description
SpawnQueued
void
Board:SpawnQueued()
Missing argument list
Missing description
StartMechTravel
void
Board:StartMechTravel()
Missing argument list
Missing description
StartPopEvent
void
Board:StartPopEvent(message)
Argument name | Type | Description |
---|---|---|
message |
string | The message to display |
Displays a message from a populated building. The possible values for message
are:
Opening, Closing, Closing_Dead, Closing_Perfect, Closing_Bad, Threatened, Killed, Shielded, Frozen, Wind_Triggered, Smoked.
StartShake
void
Board:StartShake(duration)
Argument name | Type | Description |
---|---|---|
duration |
float | The duration, in seconds, for which to shake the board |
Visually shakes the board for a given duration.
StopWeather
void
Board:StopWeather()
Missing argument list
Missing description