Defining Tribes =============== Each tribe is bootstrapped with the following scripts: * ``data/tribes/initialization//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//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//starting_conditions``: Contains a subdirectory with the game starting conditions available for a tribe. These scripts need to be listed in ``data/tribes/initialization//init.lua`` in order for Widelands to find them. The tribe objects are then defined by the following scripts: * ``data/tribes//init.lua``: This file defines the map objects to load from its path. * ``data/tribes//register.lua``: This file has to list the names of all objects defined in the path's ``init.lua`` file. Only tribe objects that are listed in these files will be registered for loading, and the names must match with the respective ``init.lua`` file. Attributes are also defined here. * See :ref:`defining_tribe_units` for further details. .. toctree:: :maxdepth: 3 autogen_lua_tribes_defining_units.rst autogen_lua_tribes_defining_discovery.rst autogen_lua_tribes_defining_init.rst