The tribe object

From Scenario League Wiki
Jump to navigationJump to search

Back To TOTPP Functions

id (get)

tribe.id -> integer

Returns the id of the tribe.


name (get/set)

tribe.name -> string

Returns the name of the tribe (e.g. "Romans").


adjective (get/set)

tribe.adjective -> string

Returns the adjectival form of the tribe's name (e.g. "Roman").


leader (get)

tribe.leader -> leader

Returns the leader of the tribe.


isHuman (get)

tribe.isHuman -> boolean

Returns whether the tribe is a/the human player.


active (get)

tribe.active -> boolean

Returns whether the tribe is active, i.e. a human or AI player in the current game.


money (get/set)

tribe.money -> integer

Returns the amount of money/gold in the tribe's treasury.


numCities (get)

tribe.numCities -> integer

Returns the number of cities the tribe has.


numUnits (get)

tribe.numUnits -> integer

Returns the number of units the tribe has.


numTechs (get)

tribe.numTechs -> integer

Returns the number of techs the tribe has.


government (get/set)

tribe.government -> integer

Returns the government (0 - 6) of the tribe.


betrayals (get/set)

tribe.betrayals -> integer

Returns the number of times the tribe has betrayed another tribe.


patience (get/set)

tribe.patience -> integer

Returns the tribe's patience.


attitude (get/set)

tribe.attitude[otherTribe] -> integer

Returns the tribe's attitude to `otherTribe`.


reputation (get/set)

tribe.reputation[otherTribe] -> integer

Returns the tribe's reputation with `otherTribe`.


treaties (get/set)

tribe.treaties[otherTribe] -> integer

Returns the tribe's treaties with `otherTribe`.


researching (get/set)

tribe.researching -> tech

Returns the tech the tribe is currently researching.


researchProgress (get/set)

tribe.researchProgress -> integer

Returns the progress towards the current research (range between 0 and tribe.researchCost).


researchCost (get)

tribe.researchCost -> integer

Returns the research cost of the tribe.


futureTechs (get/set)

tribe.futureTechs -> integer

Returns the number of future techs the tribe has researched.


scienceRate (get)

tribe.scienceRate -> integer

Returns the science rate of the tribe.


taxRate (get)

tribe.taxRate -> integer

Returns the tax rate of the tribe.


spaceship (get)

tribe.spaceship -> spaceship

Returns the space ship object of the tribe.


enableTechGroup

tribe:enableTechGroup(techgroup, value)

Alias for `civ.enableTechGroup(tribe, techgroup, value)`.


giveTech

tribe:giveTech(tech)

Alias for `civ.giveTech(tribe, tech)`.


hasTech

tribe:hasTech(tech) -> boolean

Alias for `civ.hasTech(tribe, tech)`.


kill

tribe:kill()

Alias for `civ.killTribe(tribe)`.


takeTech

tribe:takeTech(tech, collapse=false)

Alias for `civ.takeTech(tribe, tech, collapse=false)`.