Home › Lua API › BarbarianTribes

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

BarbarianTribes

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

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
CreateSpecificTribe BarbarianTribes:CreateSpecificTribe(tribeType: integer[BarbarianNameTypes], plotIndex: integer) → number
args: tribeType — Value of the BarbarianNameTypes enum (a type index).
gameplay — 0x6c6250 0x6c6920
CreateTribeOfType BarbarianTribes:CreateTribeOfType(tribeType: integer[BarbarianTribeTypes], plotIndex: integer) → number
args: tribeType — Value of the BarbarianTribeTypes enum (a type index).; plotIndex — Plot index (named plotIndex / plotID in the scripts). (inferred)
gameplay — 0x6c62d0 0x6c69a0
CreateTribeUnits BarbarianTribes:CreateTribeUnits(tribe?: integer, tag?: string, number?: integer, plotIndex?: integer, range?: integer) → boolean
args: tribe — A count or amount (named count / num / amount in the scripts). (inferred); tag — A string.; number — A number.; plotIndex — Plot index (named plotIndex / plotID in the scripts). (inferred)
gameplay — 0x6c6350 —
StartOperationWithCityTarget BarbarianTribes:StartOperationWithCityTarget(tribe?: integer, operationName?: string, cityOwner?: integer[PlayerTypes], cityIdNum?: any) → boolean
args: tribe — A count or amount (named count / num / amount in the scripts). (inferred); operationName — A string.; cityOwner — Id of a player (as in Players[id]).; cityIdNum — Id of a city (city:GetID()).
gameplay — 0x6c6360 —