Ships

Each tribe can have one ship that is used to explore the seas and transport wares between ports.

Ships are defined in data/tribes/ships/<tribe_name>/init.lua.

new_ship_type(table)

This function adds the definition of a ship to the engine.

Parameters

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

msgctxt: The context that Gettext will use to disambiguate the translations for strings in this table.

name: A string containing the internal name of this ship.

descname: The translatable display name. Use pgettext with the msgctxt above to fetch the string.

capacity: An int defining how many wares or workers this ship can transport

vision_range: How far the ship can see.

animations: A table containing all animations for this ship. Ships have an “idle”, a “sinking” and a directional “sail” animation.