Home › Lua API › Map

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

Map

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

Community reference for this object: Map (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
FindSecondContinent Map:FindSecondContinent(iRange: integer) → boolean
args: iRange — A Plot object (the scripts pass a variable named pPlot).
gameplay yes ↗ 0x16dd0 0x17240
FindWater Map:FindWater(iRange: integer, arg2?: boolean) → boolean
args: iRange — Plot index (named plotIndex / plotID in the scripts). (inferred)
gameplay yes ↗ 0x16e50 0x172c0
GetAdjacentPlot Map.GetAdjacentPlot(arg1?: number, arg2?: number, arg3?: number) → MapPlot
args: arg1 — Plot x coordinate (plot:GetX()).; arg2 — Plot y coordinate (plot:GetY()).; arg3 — A constant from the Lua table DirectionTypes.
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a1540 0x6a1ac0
GetAdjacentPlots Map.GetAdjacentPlots(arg1?: number, arg2?: number) → MapPlot
args: arg1 — Plot x coordinate (plot:GetX()).; arg2 — Plot y coordinate (plot:GetY()).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a1600 0x6a1b80
GetCityPlots Map.GetCityPlots() → MapCityPlots
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6a1770 0x6a1cf0
GetContinentCoastalPlots Map.GetContinentCoastalPlots(arg1?: number, arg2?: number) → number[] gameplay yes ↗ 0x17150 0x175c0
GetContinentPlots Map.GetContinentPlots(arg1?: number) → number[]
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a17a0 0x6a1d20
GetContinentPlotsAppeal UI state: Map.GetContinentPlotsAppeal() → table, table, table, table, table (or nothing)
gameplay state: Map.GetContinentPlotsAppeal() → table, table, table, table, table
✓ called in the game: 5 value(s) as documented
ui-cache, gameplay yes ↗ 0x6a1890 0x6a1e10
GetContinentPlotsLoyalty Map.GetContinentPlotsLoyalty() → number
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x7119b0 0x712220
GetContinentPlotsWaterAvailability UI state: Map.GetContinentPlotsWaterAvailability() → table, table, table, table (or nothing)
gameplay state: Map.GetContinentPlotsWaterAvailability() → table, table, table, table
✓ called in the game: 4 value(s) as documented
ui-cache, gameplay yes ↗ 0x6a1af0 0x6a2070
GetContinentsInUse Map.GetContinentsInUse() → number[]
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6a1d60 0x6a22e0
GetFeatureCount Map.GetFeatureCount(arg1: number/string) → number
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a1e50 0x6a23d0
GetGridSize Map.GetGridSize() → number, number
✓ called in the game: 2 value(s) as documented
ui-cache, gameplay yes ↗ 0x6a1eb0 0x6a2430
GetLandPlotCount Map.GetLandPlotCount() → number
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6a1f10 0x6a2490
GetLandResourceCount Map.GetLandResourceCount(arg1: number/string) → number
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a1f50 0x6a24d0
GetMapSize Map.GetMapSize() → number
✓ called in the game: 1 value(s) as documented
returns: Key of a row of the Maps table: the scripts look it up with GameInfo.Maps[result].
ui-cache, gameplay yes ↗ 0x6a1fb0 0x6a2530
GetMaxPlotDistance Map.GetMaxPlotDistance() → number
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6a1ff0 0x6a2570
GetNeighborPlots Map.GetNeighborPlots(arg1?: number, arg2?: number, arg3?: number) → table
args: arg1 — Plot x coordinate (plot:GetX()).; arg2 — Plot y coordinate (plot:GetY()).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a2030 0x6a25b0
GetPlot Map.GetPlot(arg1?: number, arg2?: number) → MapPlot (or nothing)
args: arg1 — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred); arg2 — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a2140 0x6a26c0
GetPlotByIndex Map.GetPlotByIndex(arg1?: number) → MapPlot (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a2210 0x6a2790
GetPlotCount Map.GetPlotCount() → number
✓ called in the game: 1 value(s) as documented
returns: A count or amount (the scripts name the result count / num / amount). (inferred)
ui-cache, gameplay yes ↗ 0x6a2290 0x6a2810
GetPlotDistance Map.GetPlotDistance(arg1?: number, arg2?: number, arg3?: number, arg4?: number) → number
args: arg3 — Plot x coordinate (plot:GetX()).; arg4 — Plot y coordinate (plot:GetY()).
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a22d0 0x6a2850
GetPlotIndex Map.GetPlotIndex(x: integer/Plot, y?: integer) → number (or nothing)
✓ exists at runtime (not called)
returns: Plot index: the scripts pass the result to Map.GetPlotByIndex.
ui-cache, gameplay yes ↗ 0x6a23e0 0x6a2960
GetPlotLocation Map.GetPlotLocation(x: integer/Plot, y?: integer) → number, number (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a2440 0x6a29c0
GetPlotXY Map.GetPlotXY(arg1?: number, arg2?: number, arg3?: number, arg4?: any[HksObject]) → MapPlot
args: arg1 — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred); arg2 — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a24d0 0x6a2a50
GetPlotXYWithRangeCheck Map.GetPlotXYWithRangeCheck(arg1?: number, arg2?: number, arg3?: number, arg4?: number, arg5?: number) → MapPlot
args: arg1 — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred); arg2 — A plot coordinate (named x / y / plotX / plotY in the scripts). (inferred)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a2640 0x6a2bc0
GetResourceCount Map.GetResourceCount(arg1: number/string) → number
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a2770 0x6a2cf0
GetRingPlots Map.GetRingPlots(arg1?: number, arg2?: number, arg3?: number) → table gameplay yes ↗ 0x183b0 0x18820
GetUnitsAt Map.GetUnitsAt(x: integer/Plot, y?: integer) → MapPlotUnitList (or nothing)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a27d0 0x6a2d50
GetVisibleContinentPlots Map.GetVisibleContinentPlots(arg1?: number) → number[] (or nothing)
✓ exists at runtime (not called)
ui-cache yes ↗ 0x6a2860 0x6a2de0
IsPlot UI state: Map.IsPlot(arg1?: number, arg2?: number) → boolean
gameplay state: Map.IsPlot(arg1?: any, arg2?: number) → boolean ⚠
args: arg1 — Plot index (named plotIndex / plotID in the scripts). (inferred)
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6a29c0 0x6a2f40
IsWrapX Map.IsWrapX() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6a2ac0 0x6a3040
IsWrapY Map.IsWrapY() → boolean
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6a2b00 0x6a3080