Defining Tribes¶
Each tribe is bootstrapped with the following scripts:
data/tribes/initialization/<tribe_name>/init.lua
: Provides basic information about a tribe to the game launching screens. The player won’t be able to select a tribe without it being defined in such a file.data/tribes/initialization/<tribe_name>/units.lua
: These scripts tell the engine which units belong to each tribe. They also define some global animated images for each tribe (flags, borders, roads).data/tribes/initialization/<tribe_name>/starting_conditions
: Contains a subdirectory with the game starting conditions available for a tribe. These scripts need to be listed indata/tribes/initialization/<tribe_name>/init.lua
in order for Widelands to find them.
The tribe objects are then defined by the following scripts:
data/tribes/<path>/init.lua
: This file defines the map objects to load from its path.data/tribes/<path>/register.lua
: This file has to list the names of all objects defined in the path’sinit.lua
file. Only tribe objects that are listed in these files will be registered for loading, and the names must match with the respectiveinit.lua
file. Attributes are also defined here.See Defining Units for further details.