User Tools

Site Tools

Urban Games

modding:constructiontypes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
modding:constructiontypes [2020/06/15 15:57]
yoshi [Terminal Groups]
modding:constructiontypes [2020/07/14 10:43]
yoshi [Industry Properties]
Line 28: Line 28:
 ===== Stations ===== ===== Stations =====
 Stations are the constructions where people and cargo items can board and leave vehicles. Like the [[modding:resourcetypes:mdl#transport_network_provider|transport network provider]] in single meshes, constructions can have streets and tracks too. Therefore there are three blocks in the result: Stations are the constructions where people and cargo items can board and leave vehicles. Like the [[modding:resourcetypes:mdl#transport_network_provider|transport network provider]] in single meshes, constructions can have streets and tracks too. Therefore there are three blocks in the result:
-  * ''result.edgeLists'' as described in the [[modding:constructions#edge_lists|construction basics]].+  * ''result.edgeLists'' as described in the [[modding:constructionbasics#edge_lists|construction basics]].
   * ''result.runways'' that are similar to the ones in the transport network provider but on edges from the ''edgeLists'' instead of the model lanes.   * ''result.runways'' that are similar to the ones in the transport network provider but on edges from the ''edgeLists'' instead of the model lanes.
   * ''result.terminalGroups'' that combines terminals from one or more models with the vehicle edges from the ''edgeLists''.   * ''result.terminalGroups'' that combines terminals from one or more models with the vehicle edges from the ''edgeLists''.
Line 149: Line 149:
 The other block, ''placementParams'' is used for the automated distribution of industries over the map. The properties are used to contrain the distribution on dependance of previously built industries. There are: The other block, ''placementParams'' is used for the automated distribution of industries over the map. The properties are used to contrain the distribution on dependance of previously built industries. There are:
   * ''buildOrder'' is the order in which the industries are generated. Usually industries without inputs have low values and are built first.   * ''buildOrder'' is the order in which the industries are generated. Usually industries without inputs have low values and are built first.
-  * ''initWeight'' is the start weight of the industry distribution. With larger values, the industry is not very sensible to the other distance weights below.+  * ''initWeight'' is used to define the quantity ratio relative to the other industries.
   * ''tags'' is a list of string keys that are assigned to this industry.   * ''tags'' is a list of string keys that are assigned to this industry.
   * ''distanceWeights'' is a list of tag keys with assigned weights. If another industry has a tag with negative assigned weight, it is unlikely that the current industry is placed near it. With positive weights, it's more likely that they pull the new industry near them.   * ''distanceWeights'' is a list of tag keys with assigned weights. If another industry has a tag with negative assigned weight, it is unlikely that the current industry is placed near it. With positive weights, it's more likely that they pull the new industry near them.
Line 155: Line 155:
 ==== UpdateFn Parameters ==== ==== UpdateFn Parameters ====
 The available parameters for industries are: The available parameters for industries are:
-  * ''paramX'' and ''paramY'' are from the keyboard controls. See the [[modding:constructions#models|basics]] to find out more about them.+  * ''paramX'' and ''paramY'' are from the keyboard controls. See the [[modding:constructionbasics#models|basics]] to find out more about them.
   * ''seed'' is a number that can be used for randomization purposes. It increases whenever a construction is set.   * ''seed'' is a number that can be used for randomization purposes. It increases whenever a construction is set.
   * ''state'' is a data struct containing several cached informations about assets and tracks.   * ''state'' is a data struct containing several cached informations about assets and tracks.
Line 253: Line 253:
 ==== UpdateFn Parameters ==== ==== UpdateFn Parameters ====
 The available parameters for assets are: The available parameters for assets are:
-  * ''paramX'' and ''paramY'' are from the keyboard controls. See the [[modding:constructions#models|basics]] to find out more about them.+  * ''paramX'' and ''paramY'' are from the keyboard controls. See the [[modding:constructionbasics#models|basics]] to find out more about them.
   * ''seed'' is a number that can be used for randomization purposes. It increases whenever a construction is set.   * ''seed'' is a number that can be used for randomization purposes. It increases whenever a construction is set.
   * ''state'' is a data struct containing several cached informations about assets and tracks.   * ''state'' is a data struct containing several cached informations about assets and tracks.
Line 300: Line 300:
  
 ==== UpdateFn Return Properties ==== ==== UpdateFn Return Properties ====
-The returned data struct of town buildings should have the following properties that are described in the [[:modding:constructions|construction basics]]:+The returned data struct of town buildings should have the following properties that are described in the [[modding:constructionbasics|construction basics]]:
   * ''bulldozeCost''   * ''bulldozeCost''
   * ''cost''   * ''cost''
Line 357: Line 357:
  
 Their ''upgradeFn'' has only a small set of parameters: Their ''upgradeFn'' has only a small set of parameters:
-  * ''paramX'' and ''paramY'' are from the keyboard controls. See the [[modding:constructions#models|basics]] to find out more about them.+  * ''paramX'' and ''paramY'' are from the keyboard controls. See the [[modding:constructionbasics#models|basics]] to find out more about them.
   * ''seed'' is a number that can be used for randomization purposes. It increases whenever a construction is set.   * ''seed'' is a number that can be used for randomization purposes. It increases whenever a construction is set.
   * ''state'' is a data struct containing several cached informations about assets and tracks.   * ''state'' is a data struct containing several cached informations about assets and tracks.
Line 409: Line 409:
 \\ \\
  
-<div page_prev>[[:modding:constructions|Construction Basics]]</div>+<div page_prev>[[modding:constructionbasics|Construction Basics]]</div>
 <div page_next>[[modding:modularconstructions|Modular Constructions]]</div> <div page_next>[[modding:modularconstructions|Modular Constructions]]</div>
modding/constructiontypes.txt · Last modified: 2023/02/04 14:32 by yoshi