<tribename>.lua

This file contains all the units for a tribe.

new_tribe{table}

This function adds all units to a tribe.

Parameters

table – This table contains all the data that the game engine will add to the tribe. It contains the following entries:

name: A string containing the internal name of the tribe.

animations: Global animations. Contains subtables for frontier and flag. Each animation needs the parameters pictures (table of filenames) and hotspot (2 integer coordinates), and may also define fps (integer frames per second).

animation_directory: The location of the animation png files.

bridges: Contains animations for normal_e, normal_se, normal_sw, busy_e, busy_se and busy_sw.

bridge_height: The height in pixels of each bridge at it’s summit at 1x scale.

roads: The file paths for the tribe’s road textures in 3 subtables busy, normal and waterway.

resource_indicators: The names for the resource indicators. This table contains a subtable for each resource name plus a subtable named “” for no resources. Each subtable is an array, in which the index of each entry is the highest amount of resources the indicator may indicate.

wares_order: This defines all the wares that this tribe uses and their display order in the user interface. Each subtable defines a column in the user interface.

workers_order: This defines all the workers that this tribe uses and their display order in the user interface. Each subtable defines a column in the user interface.

immovables: This defines all the immovables that this tribe uses.

buildings: This defines all the buildings that this tribe uses and their display order in the user interface.

ship_names: A list of strings with ship names presented to the user - be creative :)

builder: The internal name of the tribe’s builder. This unit needs to be defined in the workers_order table too.

carrier: The internal name of the tribe’s carrier. This unit needs to be defined in the workers_order table too.

carrier2: The internal name of the tribe’s beast of burden. This unit needs to be defined in the workers_order table too.

geologist: The internal name of the tribe’s geologist. This unit needs to be defined in the workers_order table too.

soldier: The internal name of the tribe’s soldier. This unit needs to be defined in the workers_order table too.

ship: The internal name of the tribe’s ship.

ferry: The internal name of the tribe’s ferry.

port: The internal name of the tribe’s port building. This unit needs to be defined in the buildings table too.

toolbar: Optional. Replace the default toolbar images with these custom images. Example:

toolbar = {
   left_corner = dirname .. "images/atlanteans/toolbar_left_corner.png",
   left = dirname .. "images/atlanteans/toolbar_left.png", -- Will be tiled
   center = dirname .. "images/atlanteans/toolbar_center.png",
   right = dirname .. "images/atlanteans/toolbar_right.png", -- Will be tiled
   right_corner = dirname .. "images/atlanteans/toolbar_right_corner.png"
}