Difference between revisions of "Documentation/Engine/Units/cargo data"
< Documentation | Engine | Units
Jump to navigation
Jump to search
(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...") |
(Added wikilink for @include preproc directive) |
||
Line 1: | Line 1: | ||
− | 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. | + | 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 [[Documentation/Engine/Units#Includes|included]] in '''/def/cargo.<mod_name>.sii''' and therefore '''must not''' use the SiiNunit magic mark. |
== Attributes == | == Attributes == |
Revision as of 17:53, 21 January 2018
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:
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)