Home › Lua API › Barbarians

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

Barbarians

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

Community reference for this object: Barbarians (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
GetTribeBribeTurnsRemaining Barbarians:GetTribeBribeTurnsRemaining(arg1: integer, arg2: integer[PlayerTypes]) → number
args: arg2 — Id of a player (as in Players[id]).
ui-cache — 0x685fa0 0x686580
GetTribeCampLocation Barbarians:GetTribeCampLocation(iIndex?: number) → number, number ui-cache — 0x686020 0x686600
GetTribeConversionDisabledHelp Barbarians:GetTribeConversionDisabledHelp(iIndex?: number) ui-cache — 0x6860c0 0x6866a0
GetTribeConversionPercent Barbarians:GetTribeConversionPercent(arg1: integer) → number ui-cache — 0x6861a0 0x686780
GetTribeConversionPoints Barbarians:GetTribeConversionPoints(arg1: integer) → number ui-cache — 0x686210 0x6867f0
GetTribeConversionPointsRequired Barbarians:GetTribeConversionPointsRequired(arg1: integer) → number ui-cache — 0x686280 0x686860
GetTribeInciteCost Barbarians:GetTribeInciteCost(arg1?: integer, arg2?: integer[PlayerTypes], arg3?: integer[PlayerTypes]) → integer
args: arg2 — Id of a player (as in Players[id]).; arg3 — Id of a player (as in Players[id]).
ui-cache — 0x6862f0 —
GetTribeInciteSourcePlayer Barbarians:GetTribeInciteSourcePlayer(arg1: integer) → number ui-cache — 0x686300 0x6868e0
GetTribeInciteTargetPlayer Barbarians:GetTribeInciteTargetPlayer(arg1: integer) → number ui-cache — 0x686370 0x686950
GetTribeInciteTargets Barbarians:GetTribeInciteTargets(iIndex?: number, eForPlayerType?: number) → number[]
args: eForPlayerType — Id of a player (the scripts name the argument playerID / owner). (inferred)
ui-cache — 0x6863e0 0x6869c0
GetTribeIndexAtLocation Barbarians:GetTribeIndexAtLocation(arg1: integer, arg2: integer) → number
returns: The scripts pass the result to Barbarians.GetTribeNameType. (inferred)
ui-cache yes ↗ 0x686560 0x686b40
GetTribeNameType Barbarians:GetTribeNameType(arg1: integer) → number
returns: Key of a row of the BarbarianTribeNames table: the scripts look it up with GameInfo.BarbarianTribeNames[result].
ui-cache yes ↗ 0x6865e0 0x686bc0
GetTribeRansomUnit Barbarians:GetTribeRansomUnit(iIndex?: number, ePlayerType?: number) ui-cache — 0x686650 0x686c30
GetTribeType Barbarians:GetTribeType(tribe: integer) → number (BarbarianNameTypes)
returns: Value of the BarbarianNameTypes enum (a type index).
ui-cache yes ↗ 0x686700 0x686ce0
IsClanExcludeUnitType Barbarians:IsClanExcludeUnitType(arg1: integer[UnitTypes]) → boolean
args: arg1 — Index of a row of the Units table (the value of GameInfo.Units[...].Index).
ui-cache — 0x686770 0x686d50