Open main menu

Documentation/Engine/Units/cargo data

< Documentation‎ | Engine‎ | Units
Revision as of 00:14, 22 June 2017 by Smarty (talk | contribs) (Created page with "The '''cargo_data''' unit class is used to define the logistical, semantic, and economic properties of a cargo. Units of this type are usually defined in '''/def/cargo/<car...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)

The cargo_data unit class is used to define the logistical, semantic, and economic properties of a cargo. Units of this type are usually defined in /def/cargo/<cargo_name>.sii and included in /def/cargo.<mod_name>.sii and therefore must not use the SiiNunit magic mark.

Attributes

Name Type Default Value Description
name string The name of the cargo for ui display. Supports @@localization@@.
price_coef float 1.0 Defines how much to multiply the base revenue per kilometer (usually $15/km) for the cargo. For example, price_coef: 2.0 yields $30/km.
fragility float Defines how sensitive to damage the cargo is.
valuable bool false When true, the player will require the Valuable Cargo skill to take the cargo and will receive related skill bonuses to XP and income.
adr_class uint Assigns an ADR/Hazardous Materials classification to the cargo. The player will require the corresponding skill to take the cargo.
minimum_distance float 0 The minimum distance in kilometers (km) for which a job may be generated using this cargo.
maximum_distance float The maximum distance in kilometers (km) for which a job may be generated using this cargo.
prob_coef float 1.0 The relative probability of spawning a job with this cargo.
group array<token> Each member marks the cargo as belonging to a predefined group for cargo sorting. Valid values are:
  • machinery
  • adr
  • containers
  • refrigerated
  • liquid
  • fragile
  • construction
  • bulk

Typically, the fragile category is reserved for cargoes with a fragility of 0.7 or higher.

Related Units

  • cargo_def (used to mark a cargo as produced or accepted by a company)
  • trailer_def (used to assign a trailer configuration to a cargo and set related mass properties)