Open main menu

Changes

Documentation/Engine/Units/cargo data

2,085 bytes added, 00:14, 22 June 2017
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..."
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/&lt;cargo_name&gt;.sii''' and included in '''/def/cargo.&lt;mod_name&gt;.sii''' and therefore '''must not''' use the SiiNunit magic mark.

== Attributes ==
{|class="wikitable"
!Name
![[Documentation/Engine/Units#Attribute_types|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, <code>price_coef: 2.0</code> 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
|&infin;
|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&lt;token&gt;
|
|Each member marks the cargo as belonging to a predefined group for cargo sorting. Valid values are:
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
*machinery
*adr
*containers
*refrigerated
*liquid
*fragile
*construction
*bulk
</div>
Typically, the ''fragile'' category is reserved for cargoes with a '''fragility''' of 0.7 or higher.
|}

== Related Units ==
*[[Documentation/Engine/Units/cargo_def|cargo_def]] (used to mark a cargo as produced or accepted by a company)
*[[Documentation/Engine/Units/trailer_def|trailer_def]] (used to assign a trailer configuration to a cargo and set related mass properties)
309
edits