This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
modding:constructiontypes [2020/08/01 12:12] yoshi [UpdateFn Return Properties] |
modding:constructiontypes [2023/02/04 14:32] (current) yoshi [UpdateFn Return Properties] |
||
---|---|---|---|
Line 69: | Line 69: | ||
}, | }, | ||
... | ... | ||
- | }, | + | } |
</ | </ | ||
| | ||
Line 118: | Line 118: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | ==== Events ==== | ||
+ | Depots support some [[modding: | ||
+ | * '' | ||
+ | * '' | ||
===== Industries ===== | ===== Industries ===== | ||
Industries are used for cargo production, conversion and consumption. Their '' | Industries are used for cargo production, conversion and consumption. Their '' | ||
Line 170: | Line 174: | ||
* '' | * '' | ||
- | It is recommended to support these additional parameters to allow mission or game scripts to adjust the production and consumption of industries. The '' | + | It is recommended to support these additional parameters to allow mission or game scripts to adjust the production and consumption of industries. The '' |
==== UpdateFn Return Properties ==== | ==== UpdateFn Return Properties ==== | ||
Line 189: | Line 193: | ||
-- Specify the necessary cargo types and which edges are used for stock piling | -- Specify the necessary cargo types and which edges are used for stock piling | ||
result.stocks = { | result.stocks = { | ||
- | { cargoType = " | + | { cargoType = " |
{ cargoType = " | { cargoType = " | ||
}, | }, | ||
Line 224: | Line 228: | ||
result.rule = { input = { { 2, 2 } }, output = { STEEL = 1 }, capacity = 200 } | result.rule = { input = { { 2, 2 } }, output = { STEEL = 1 }, capacity = 200 } | ||
</ | </ | ||
+ | ==== Events ==== | ||
+ | Industries support some [[modding: | ||
+ | * '' | ||
+ | * '' | ||
===== Assets ===== | ===== Assets ===== | ||
Assets are generic constructions that are mainly used for decorative purposes. They may contain functional elements like edges though. | Assets are generic constructions that are mainly used for decorative purposes. They may contain functional elements like edges though. | ||
Line 239: | Line 247: | ||
autoRemovable = false, | autoRemovable = false, | ||
categories = { " | categories = { " | ||
+ | snapping = { | ||
+ | rail = true, | ||
+ | road = true, | ||
+ | water = false | ||
+ | }, | ||
... | ... | ||
</ | </ | ||
Line 250: | Line 263: | ||
To provide additional filter possibilities, | To provide additional filter possibilities, | ||
+ | To allow snapping along tracks, streets or the water surface, the appropriate flags can be set to true in the '' | ||
==== UpdateFn Parameters ==== | ==== UpdateFn Parameters ==== | ||
The available parameters for assets are: | The available parameters for assets are: | ||
Line 312: | Line 325: | ||
The '' | The '' | ||
<code lua> | <code lua> | ||
- | | + | result.personCapacity = { |
- | capacity = 2, | + | capacity = 2, |
- | type = " | + | type = " |
- | }, | + | }, |
</ | </ | ||
It contains two properties: | It contains two properties: | ||
Line 324: | Line 337: | ||
Buildings may request cargo items. Therefore they have '' | Buildings may request cargo items. Therefore they have '' | ||
<code lua> | <code lua> | ||
- | stocks = { | + | result.stocks = { |
{ | { | ||
cargoType = " | cargoType = " | ||
Line 333: | Line 346: | ||
... | ... | ||
}, | }, | ||
- | rule = { | + | result.rule = { |
capacity = 1, | capacity = 1, | ||
consumptionFactor = 1.2, | consumptionFactor = 1.2, | ||
Line 346: | Line 359: | ||
The scaffolding is shown while the building is constructed. To define its outline, there is a '' | The scaffolding is shown while the building is constructed. To define its outline, there is a '' | ||
<code lua> | <code lua> | ||
- | scaffold = { | + | result.scaffold = { |
buildingFace = { { { 7.68415, 4.89475, 0 }, { 7.67744, 15.68718, 0 }, { 0.80814, 15.69474, 0 }, ... } }, | buildingFace = { { { 7.68415, 4.89475, 0 }, { 7.67744, 15.68718, 0 }, { 0.80814, 15.69474, 0 }, ... } }, | ||
height = -1 | height = -1 | ||
Line 353: | Line 366: | ||
The '' | The '' | ||
- | ===== Street Constructions ===== | + | |
+ | ==== Events ==== | ||
+ | Town buildings support some [[modding: | ||
+ | * '' | ||
+ | ===== Street | ||
Street constructions can be used to provide street templates like larger intersections or roundabouts. To provide additional filter possibilities, | Street constructions can be used to provide street templates like larger intersections or roundabouts. To provide additional filter possibilities, | ||
Line 364: | Line 381: | ||
The constructions may either use models or not. See below for information about pure street and track construction templates. | The constructions may either use models or not. See below for information about pure street and track construction templates. | ||
+ | |||
+ | Track constructions work similar but for railway. They appear in the track construction tab in the rail menu. Without mods, this tab is not visible. | ||
+ | |||
+ | <div download 100%> | ||
+ | A track construction example is available for {{: | ||
+ | </ | ||
+ | |||
==== Build free streets and tracks ==== | ==== Build free streets and tracks ==== |