Home › Lua API › Plot

Available out of the box. Usable from Lua in the unmodified game.

Plot

90 methods. Symbol/current columns are function addresses (RVA) of the native wrapper.

Community reference for this object: Plot (Sukrit Tan, external).

Signatures are recovered from the game code. ⚠ = partly understood (arguments may be missing or approximate). ? after a name = optional argument. Types: integer/number are Lua numbers, enum-typed arguments show the C++ type in brackets. Two signatures mean the method is registered separately for the UI and the gameplay state and each wrapper was decoded on its own. "same code as" in the Symbol column means the compiler merged identical functions: those methods share one wrapper and cannot be told apart by address.

Method Signature Where Reference Symbol Current
CanHaveDistrict Plot:CanHaveDistrict(arg1?: number, arg2?: number, arg3?: number) → boolean
args: arg2 — Id of a player.; arg3 — Id of a city (city:GetID()).
✓ exists at runtime (not called)
gameplay yes ↗ 0x1be90 0x1c380
CanHaveWonder Plot:CanHaveWonder(arg1?: number, arg2?: number, arg3?: number) → boolean
args: arg2 — Id of a player.; arg3 — Id of a city (city:GetID()).
✓ exists at runtime (not called)
gameplay yes ↗ 0x1bfa0 0x1c490
GetAdjacencyBonusTooltip Plot:GetAdjacencyBonusTooltip(arg1?: number, arg2?: number, arg3?: number, arg4?: number) → string, string
args: arg1 — Id of a player.; arg2 — Id of a city (city:GetID()).
✓ exists at runtime (not called)
gameplay yes ↗ 0x1c0b0 0x1c5a0
GetAdjacencyBonusType Plot:GetAdjacencyBonusType(arg1?: number, arg2?: number, arg3?: number, arg4?: number) → number, number
args: arg1 — Id of a player. (inferred); arg2 — Id of a city (city:GetID()). (inferred)
✓ exists at runtime (not called)
gameplay yes ↗ 0x1c4e0 0x1c9d0
GetAdjacencyYield Plot:GetAdjacencyYield(arg1?: any[HksObject], arg2?: number, arg3?: number, arg4?: number) → number
args: arg1 — Id of a player. (inferred); arg2 — Id of a city (city:GetID()). (inferred)
✓ exists at runtime (not called)
gameplay yes ↗ 0x1c660 0x1cb50
GetAirUnits Plot:GetAirUnits() → Unit[] (or nothing)
✓ called in the game (returned nothing in that state)
gameplay yes ↗ 0x1c790 0x1cc80
GetAppeal Plot:GetAppeal() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1c950 0x1ce40
GetArea Plot:GetArea() → MapArea
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1c9a0 0x1ce90
GetAreaID Plot:GetAreaID() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1c9d0 0x1cec0
GetComponentID Plot:GetComponentID() → 1 values ⚠
✓ exists at runtime (not called)
gameplay yes ↗ 0x1ca50 0x1cf40
GetContinentType Plot:GetContinentType() → number
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Continents table: the scripts look it up with GameInfo.Continents[result].
gameplay yes ↗ 0x1caa0 0x1cf90
GetDefenseModifier Plot:GetDefenseModifier() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1cb10 0x1d000
GetDistrictID Plot:GetDistrictID() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1cb70 0x1d060
GetDistrictType Plot:GetDistrictType() → number
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Districts table: the scripts look it up with GameInfo.Districts[result].
gameplay yes ↗ 0x1cbd0 0x1d0c0
GetFeature Plot:GetFeature() → MapFeature (or nothing)
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1cc40 0x1d130
GetFeatureType Plot:GetFeatureType() → number
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Features table: the scripts look it up with GameInfo.Features[result].
gameplay yes ↗ 0x1cc80 0x1d170
GetImprovementOwner Plot:GetImprovementOwner() → number
✓ called in the game: 1 value(s) as documented
returns: Id of a player: the scripts use the result as Players[result].
gameplay yes ↗ 0x1cce0 0x1d1d0
GetImprovementType Plot:GetImprovementType() → number
✓ called in the game: 1 value(s) as documented
returns: Index of a database row (compared with row.Index).
gameplay yes ↗ 0x1cd30 0x1d220
GetIndex Plot:GetIndex() → number
✓ called in the game: 1 value(s) as documented
returns: Plot index: the scripts pass the result to Map.GetPlotByIndex. (inferred)
gameplay yes ↗ 0x1cd80 0x1d270
GetMovementCost Plot:GetMovementCost() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1cdd0 0x1d2c0
GetNationalParkName Plot:GetNationalParkName() → string
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1ce30 0x1d320
GetNearestLandArea Plot:GetNearestLandArea() → MapArea
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1cf40 0x1d430
GetNearestLandPlot Plot:GetNearestLandPlot() → MapPlot
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1cf80 0x1d470
GetOwner Plot:GetOwner() → number
✓ called in the game: 1 value(s) as documented
returns: Id of a player: the scripts use the result as Players[result].
gameplay yes ↗ 0x1cfc0 0x1d4b0
GetProperty Plot:GetProperty()
✓ called in the game: 0 value(s) as documented
gameplay yes ↗ 0x1d010 0x1d500
GetResourceCount Plot:GetResourceCount() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d050 0x1d540
GetResourceType Plot:GetResourceType() → number
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Resources table: the scripts look it up with GameInfo.Resources[result]. (inferred)
gameplay yes ↗ 0x1d0a0 0x1d590
GetResourceTypeHash Plot:GetResourceTypeHash() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d100 0x1d5f0
GetRiverCrossingCount Plot:GetRiverCrossingCount() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d170 0x1d660
GetRiverEFlowDirection Plot:GetRiverEFlowDirection() → number (FlowDirectionTypes)
✓ called in the game: 1 value(s) as documented
returns: Value of the FlowDirectionTypes enum (a type index).
gameplay yes ↗ 0x1d1c0 0x1d6b0
GetRiverSEFlowDirection Plot:GetRiverSEFlowDirection() → number (FlowDirectionTypes)
✓ called in the game: 1 value(s) as documented
returns: Value of the FlowDirectionTypes enum (a type index).
gameplay yes ↗ 0x1d210 0x1d700
GetRiverSWFlowDirection Plot:GetRiverSWFlowDirection() → number (FlowDirectionTypes)
✓ called in the game: 1 value(s) as documented
returns: Value of the FlowDirectionTypes enum (a type index).
gameplay yes ↗ 0x1d260 0x1d750
GetRouteType Plot:GetRouteType() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d2b0 0x1d7a0
GetTerrainClassType Plot:GetTerrainClassType() → number (TerrainClassTypes)
✓ called in the game: 1 value(s) as documented
returns: Value of the TerrainClassTypes enum (a type index).
gameplay yes ↗ 0x1d300 0x1d7f0
GetTerrainType Plot:GetTerrainType() → number
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Terrains table: the scripts look it up with GameInfo.Terrains[result].
gameplay yes ↗ 0x1d360 0x1d850
GetUnitCount Plot:GetUnitCount() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d3c0 0x1d8b0
GetWonderType Plot:GetWonderType() → number
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Buildings table: the scripts look it up with GameInfo.Buildings[result].
gameplay yes ↗ 0x1d410 0x1d900
GetWorkerCount Plot:GetWorkerCount() → number
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d470 0x1d960
GetX Plot:GetX() → number
✓ called in the game: 1 value(s) as documented
returns: The scripts pass the result to Map.GetPlotXY. (inferred)
gameplay yes ↗ 0x1d4c0 0x1d9b0
GetY Plot:GetY() → number
✓ called in the game: 1 value(s) as documented
returns: The scripts pass the result to Map.GetPlotXY. (inferred)
gameplay yes ↗ 0x1d510 0x1da00
GetYield Plot:GetYield(eYield?: number) → number
✓ exists at runtime (not called)
gameplay yes ↗ 0x1d560 0x1da50
HasFeatureBeenAdded Plot:HasFeatureBeenAdded() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d6b0 0x1dba0
IsAdjacentOwned Plot:IsAdjacentOwned() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d6f0 0x1dbe0
IsAdjacentPlayer Plot:IsAdjacentPlayer(ePlayer: integer[PlayerTypes], bLandOnly: boolean) → boolean
args: ePlayer — Id of a player (as in Players[id]).
✓ exists at runtime (not called)
gameplay yes ↗ 0x1d740 0x1dc30
IsAdjacentToArea Plot:IsAdjacentToArea(iAreaID: MapArea) → boolean
✓ exists at runtime (not called)
gameplay yes ↗ 0x1d7c0 0x1dcb0
IsAdjacentToLand Plot:IsAdjacentToLand() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d830 0x1dd20
IsAdjacentToShallowWater Plot:IsAdjacentToShallowWater() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d880 0x1dd70
IsAt Plot:IsAt(x: integer, y: integer) → boolean
✓ exists at runtime (not called)
gameplay yes ↗ 0x1d8d0 0x1ddc0
IsCanyon Plot:IsCanyon() → boolean (the wrapper calls a stub that returns a constant (0, 1, false or a table of zeros))
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d960 0x1de50
IsChokepoint Plot:IsChokepoint() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1d9b0 0x1dea0
IsCity Plot:IsCity() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1da30 0x1df20
IsCoastalLand Plot:IsCoastalLand(iMinWaterSize: integer) → boolean
✓ exists at runtime (not called)
gameplay yes ↗ 0x1da80 0x1df70
IsFlatlands Plot:IsFlatlands() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1dae0 0x1dfd0
IsFreshWater Plot:IsFreshWater() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1db70 0x1e060
IsHills Plot:IsHills() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1dbc0 0x1e0b0
IsImpassable Plot:IsImpassable() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1dc10 0x1e100
IsImprovementPillaged Plot:IsImprovementPillaged() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1dc50 0x1e140
IsInternalOnlyDistrict Plot:IsInternalOnlyDistrict() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1dc90 0x1e180
IsLake Plot:IsLake() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1dd20 0x1e210
IsMountain Plot:IsMountain() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1dd70 0x1e260
IsNEOfCliff Plot:IsNEOfCliff() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1ddd0 0x1e2c0
IsNEOfRiver Plot:IsNEOfRiver() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1de10 0x1e300
IsNWOfCliff Plot:IsNWOfCliff() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1de50 0x1e340
IsNWOfRiver Plot:IsNWOfRiver() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1de90 0x1e380
IsNationalPark Plot:IsNationalPark() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1ded0 0x1e3c0
IsNaturalWonder Plot:IsNaturalWonder() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1df80 0x1e470
IsNone ★ Plot:IsNone() → boolean
⚠ test call in the game raised: Instance does not exist. stack traceback: [C]: in function 'lIsNone' [string "lo
gameplay yes ↗ 0x1dfd0 0x1e4c0
IsOpenGround Plot:IsOpenGround() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e010 0x1e500
IsOwned Plot:IsOwned() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e0a0 0x1e590
IsRiver Plot:IsRiver() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e0f0 0x1e5e0
IsRiverAdjacent Plot:IsRiverAdjacent() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e130 0x1e620
IsRiverConnection Plot:IsRiverConnection(eDirection: integer[DirectionTypes]) → boolean
args: eDirection — Value of the DirectionTypes enum (a type index).
✓ exists at runtime (not called)
gameplay yes ↗ 0x1e180 0x1e670
IsRiverCrossing Plot:IsRiverCrossing(eIndex: integer) → boolean
✓ exists at runtime (not called)
gameplay yes ↗ 0x1e1e0 0x1e6d0
IsRiverCrossingFlowClockwise Plot:IsRiverCrossingFlowClockwise(eDirection?: number) → boolean
✓ exists at runtime (not called)
gameplay yes ↗ 0x1e250 0x1e740
IsRiverCrossingToPlot Plot:IsRiverCrossingToPlot(arg1: MapPlot) → boolean
✓ exists at runtime (not called)
gameplay yes ↗ 0x1e2d0 0x1e7c0
IsRiverSide Plot:IsRiverSide() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e430 0x1e920
IsRoughGround Plot:IsRoughGround() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e480 0x1e970
IsRoute Plot:IsRoute() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e510 0x1ea00
IsRoutePillaged Plot:IsRoutePillaged() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e550 0x1ea40
IsShallowWater Plot:IsShallowWater() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e590 0x1ea80
IsStartingPlot Plot:IsStartingPlot() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e5e0 0x1ead0
IsUnit Plot:IsUnit() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e620 0x1eb10
IsValidFoundLocation Plot:IsValidFoundLocation() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e660 0x1eb50
IsWOfCliff Plot:IsWOfCliff() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e6d0 0x1ebc0
IsWOfRiver Plot:IsWOfRiver() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e710 0x1ec00
IsWater Plot:IsWater() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e750 0x1ec40
IsWonderComplete Plot:IsWonderComplete() → boolean
✓ called in the game: 1 value(s) as documented
gameplay yes ↗ 0x1e7a0 0x1ec90
SetOwner ★ Plot:SetOwner(owner: integer[PlayerTypes], city: integer[IDType]) (or nothing)
args: owner — Id of a player (as in Players[id]).
gameplay yes ↗ 0x1e810 0x1ed00
SetProperty Plot:SetProperty() (or nothing) gameplay yes ↗ 0x1e870 0x1ed60
SharesAdjacentArea Plot:SharesAdjacentArea(pPlot: MapPlot) → boolean
✓ exists at runtime (not called)
gameplay yes ↗ 0x1e930 0x1ee20

Notes (★)

IsNone

Only valid on a 'none' plot instance.

SetOwner

Sets the owning player and city of a plot.

See also: WorldBuilderCityManager.SetPlotOwner