Difference between revisions of "Action0/Industries"

From GRFSpecs
Jump to navigationJump to search
m (moved Action0Industries to Action0/Industries: use subpages)
m (Add version icons)
Line 9: Line 9:
 
!Property !!Version !![[GRFActionsDetailed|Size]] !! Description
 
!Property !!Version !![[GRFActionsDetailed|Size]] !! Description
 
|-
 
|-
|08||(a)||B||Substitute industry type
+
|08||{{ottd}}{{ttdp|2.0}} (a)||B||Substitute industry type
 
|-
 
|-
|09||(a)||B||Industry type override
+
|09||{{ottd}}{{ttdp|2.0}} (a)||B||Industry type override
 
|-
 
|-
|0A||(a)||V||Set industry layout(s)
+
|0A||{{ottd}}{{ttdp|2.0}} (a)||V||Set industry layout(s)
 
|-
 
|-
|0B||(a)||B||Industry production flags
+
|0B||{{ottd}}{{ttdp|2.0}} (a)||B||Industry production flags
 
|-
 
|-
|0C||(a)||W||Industry closure message
+
|0C||{{ottd}}{{ttdp|2.0}} (a)||W||Industry closure message
 
|-
 
|-
|0D||(a)||W||Production increase message
+
|0D||{{ottd}}{{ttdp|2.0}} (a)||W||Production increase message
 
|-
 
|-
|0E||(a)||W||Production decrease message
+
|0E||{{ottd}}{{ttdp|2.0}} (a)||W||Production decrease message
 
|-
 
|-
|0F||(a)||B||Fund cost multiplier
+
|0F||{{ottd}}{{ttdp|2.0}} (a)||B||Fund cost multiplier
 
|-
 
|-
|10||(a)||W||Production cargo types
+
|10||{{ottd}}{{ttdp|2.0}} (a)||W||Production cargo types
 
|-
 
|-
|11||(a)||D||Acceptance cargo types
+
|11||{{ottd}}{{ttdp|2.0}} (a)||D||Acceptance cargo types
 
|-
 
|-
|12,13||(a)||B||Production multipliers
+
|12,13||{{ottd}}{{ttdp|2.0}} (a)||B||Production multipliers
 
|-
 
|-
|14||(a)||B||Minimal amount of cargo distributed
+
|14||{{ottd}}{{ttdp|2.0}} (a)||B||Minimal amount of cargo distributed
 
|-
 
|-
|15||(a)||V||Random sound effects
+
|15||{{ottd}}{{ttdp|2.0}} (a)||V||Random sound effects
 
|-
 
|-
|16||(a)||3*B||Conflicting industry types
+
|16||{{ottd}}{{ttdp|2.0}} (a)||3*B||Conflicting industry types
 
|-
 
|-
|17||(a)||B||Probability in random game
+
|17||{{ottd}}{{ttdp|2.0}} (a)||B||Probability in random game
 
|-
 
|-
|18||(a)||B||Probability during gameplay
+
|18||{{ottd}}{{ttdp|2.0}} (a)||B||Probability during gameplay
 
|-
 
|-
|19||(a)||B||Map color
+
|19||{{ottd}}{{ttdp|2.0}} (a)||B||Map color
 
|-
 
|-
|1A||(a)||D||Special industry flags to define special behavior
+
|1A||{{ottd}}{{ttdp|2.0}} (a)||D||Special industry flags to define special behavior
 
|-
 
|-
|1B||(a)||W||New industry text ID
+
|1B||{{ottd}}{{ttdp|2.0}} (a)||W||New industry text ID
 
|-
 
|-
|1C,1D,1E||(a)||D||Input cargo multipliers for the three input cargo types
+
|1C,1D,1E||{{ottd}}{{ttdp|2.0}} (a)||D||Input cargo multipliers for the three input cargo types
 
|-
 
|-
|1F||(b)||W||Industry name
+
|1F||{{ottd}}{{ttdp|2.0}} (b)||W||Industry name
 
|-
 
|-
|20||(b)||D||Prospecting success chance
+
|20||{{ottd}}{{ttdp|2.0}} (b)||D||Prospecting success chance
 
|-
 
|-
|21,22||(b)||B||Callback flags
+
|21,22||{{ottd}}{{ttdp|2.0}} (b)||B||Callback flags
 
|-
 
|-
|23||(c)||D||Destruction cost multiplier
+
|23||{{ottd}}{{ttdp|2.0}} (c)||D||Destruction cost multiplier
 
|-
 
|-
|24||(d)||W||Default text for nearby station
+
|24||{{ottd}}{{ttdp|2.6}} (d)||W||Default text for nearby station
 
|}
 
|}
   
Line 219: Line 219:
   
 
{| |-
 
{| |-
!Bit!!Value!!Meaning
+
!Bit!!Value!!Version!!Meaning
 
|-
 
|-
|0||1||The industry periodically plants fields around itself (temperate and arctic farms)
+
|0||1||{{ottd}}{{ttdp|2.0}}||The industry periodically plants fields around itself (temperate and arctic farms)
 
|-
 
|-
|1||2||The industry cuts trees around itself and produces its first output cargo from them (lumber mill)
+
|1||2||{{ottd}}{{ttdp|2.0}}||The industry cuts trees around itself and produces its first output cargo from them (lumber mill)
 
|-
 
|-
|2||4||The industry is built on water (oil rig)
+
|2||4||{{ottd}}{{ttdp|2.0}}||The industry is built on water (oil rig)
 
|-
 
|-
|3||8||The industry can only be built in towns (i.e. it has to replace houses) with population larger than 1200 (temperate bank)
+
|3||8||{{ottd}}{{ttdp|2.0}}||The industry can only be built in towns (i.e. it has to replace houses) with population larger than 1200 (temperate bank)
 
|-
 
|-
|4||10||The industry can only be built in towns (i.e. it has to replace houses) (arctic and tropic banks, water tower)
+
|4||10||{{ottd}}{{ttdp|2.0}}||The industry can only be built in towns (i.e. it has to replace houses) (arctic and tropic banks, water tower)
 
|-
 
|-
|5||20||The industry is always built near towns (i.e. near town sign; additionally the industry is allowed to replace houses) (toy shop)
+
|5||20||{{ottd}}{{ttdp|2.0}}||The industry is always built near towns (i.e. near town sign; additionally the industry is allowed to replace houses) (toy shop)
 
|-
 
|-
|6||40||Fields are planted around the industry when it's built (all farms)
+
|6||40||{{ottd}}{{ttdp|2.0}}||Fields are planted around the industry when it's built (all farms)
 
|-
 
|-
|7||80||The industry cannot increase its production on the temperate climate (oil wells)
+
|7||80||{{ottd}}{{ttdp|2.0}}||The industry cannot increase its production on the temperate climate (oil wells)
 
|-
 
|-
|8||100||The industry is built only before 1950 (oil wells)
+
|8||100||{{ottd}}{{ttdp|2.0}}||The industry is built only before 1950 (oil wells)
 
|-
 
|-
|9||200||The industry is built only after 1960 (oil rig)
+
|9||200||{{ottd}}{{ttdp|2.0}}||The industry is built only after 1960 (oil rig)
 
|-
 
|-
|10||400||AI players will attempt to establish air and ship routes going to this industry (oil rig)
+
|10||400||{{ottd}}{{ttdp|2.0}}||AI players will attempt to establish air and ship routes going to this industry (oil rig)
 
|-
 
|-
|11||800||The industry can be exploded by a military airplane (oil refinery)
+
|11||800||{{ottd}}{{ttdp|2.0}}||The industry can be exploded by a military airplane (oil refinery)
 
|-
 
|-
|12||1000||The industry can be exploded by a military helicopter (factory)
+
|12||1000||{{ottd}}{{ttdp|2.0}}||The industry can be exploded by a military helicopter (factory)
 
|-
 
|-
|13||2000||The industry can cause a subsidence (coal mine)
+
|13||2000||{{ottd}}{{ttdp|2.0}}||The industry can cause a subsidence (coal mine)
 
|-
 
|-
|14||4000||Automatic production multiplier handing (No industry has this bit set by default.)
+
|14||4000||{{ottd}}{{ttdp|2.0}}||Automatic production multiplier handing (No industry has this bit set by default.)
 
|-
 
|-
|15||8000||The production callback needs random bits in var. 10 (No industry has this bit set by default.)
+
|15||8000||{{ottd}}{{ttdp|2.0}}||The production callback needs random bits in var. 10 (No industry has this bit set by default.)
 
|-
 
|-
|16||10000||(since r1925) Do not force one instance of this type to appear during initial map generation (No industry has this bit set by default.)
+
|16||10000||{{ottd}}{{ttdp|2.6}} (a)||Do not force one instance of this type to appear during initial map generation (No industry has this bit set by default.)
 
|-
 
|-
|17||20000||(since r1925) Allow closing down the last instance of this type (No industry has this bit set by default.)
+
|17||20000||{{ottd}}{{ttdp|2.6}} (a)||Allow closing down the last instance of this type (No industry has this bit set by default.)
 
|}
 
|}
  +
  +
(a) since TTDPatch r1925
   
 
If bit 14 is set, variables 40..42 will be divided by industry.prodmultiplier (variable 93), and the resulting instructions will be multiplied by the same amount before applying them. If you set this bit, please use small amounts in your instructions, since industry.prodmultiplier is 16 for default production, and can get as high as 128.
 
If bit 14 is set, variables 40..42 will be divided by industry.prodmultiplier (variable 93), and the resulting instructions will be multiplied by the same amount before applying them. If you set this bit, please use small amounts in your instructions, since industry.prodmultiplier is 16 for default production, and can get as high as 128.
Line 287: Line 289:
   
 
{| |-
 
{| |-
!Bit!!Value!!Var. 0C!!Callback
+
!Bit!!Value!!Var. 0C!!Version!!Callback
 
|-
 
|-
|0||1||22||Determine whether the industry can be built
+
|0||1||22||{{ottd}}{{ttdp|2.0}}||Determine whether the industry can be built
 
|-
 
|-
|1||2||00||Call the [[Action2Industries|production callback]] when cargo arrives at the industry
+
|1||2||00||{{ottd}}{{ttdp|2.0}}||Call the [[Action2Industries|production callback]] when cargo arrives at the industry
 
|-
 
|-
|2||4||00||Call the [[Action2Industries|production callback]] every 256 ticks
+
|2||4||00||{{ottd}}{{ttdp|2.0}}||Call the [[Action2Industries|production callback]] every 256 ticks
 
|-
 
|-
|3||8||28||Determine whether the industry can be built on given spot
+
|3||8||28||{{ottd}}{{ttdp|2.0}}||Determine whether the industry can be built on given spot
 
|-
 
|-
|4||10||29||Control random production changes
+
|4||10||29||{{ottd}}{{ttdp|2.0}}||Control random production changes
 
|-
 
|-
|5||20||35||Monthly random production change
+
|5||20||35||{{ottd}}{{ttdp|2.0}}||Monthly random production change
 
|-
 
|-
|6||40||37||Cargo sub-type display
+
|6||40||37||{{ottd}}{{ttdp|2.0}}||Cargo sub-type display
 
|-
 
|-
|7||80||38||(from TTDPatch 2.0.1 a72 and above) Additional text in industry fund window
+
|7||80||38||{{ottd}}{{ttdp|2.0}}||Additional text in industry fund window
 
|}
 
|}
   
Line 313: Line 315:
   
 
{| |-
 
{| |-
!Bit!!Value!!Var. 0C!!Callback
+
!Bit!!Value!!Var. 0C!!Version!!Callback
 
|-
 
|-
|0||1||3A||(from TTDPatch 2.0.1 a72 and above) Show additional text in industry window
+
|0||1||3A||{{ottd}}{{ttdp|2.0}}||Show additional text in industry window
 
|-
 
|-
|1||2||3B||(from TTDPatch 2.0.1 a73 and above) Control special industry effects
+
|1||2||3B||{{ottd}}{{ttdp|2.0}}||Control special industry effects
 
|-
 
|-
|2||4||3D||(from TTDPatch 2.5 beta 4 and above) Opt out of accepting cargo
+
|2||4||3D||{{ottd}}{{ttdp|2.5}}||Opt out of accepting cargo
 
|-
 
|-
|3||8||14A||(from TTDPatch 2.6 r1712 and above) Decide industry color
+
|3||8||14A||{{ottd}}{{ttdp|2.6}}||Decide industry color
 
|-
 
|-
|4||10||14B||(from TTDPatch 2.6 r1718 and above) Decide input cargo types
+
|4||10||14B||{{ottd}}{{ttdp|2.6}}||Decide input cargo types
 
|-
 
|-
|5||20||14C||(from TTDPatch 2.6 r1718 and above) Decide output cargo types
+
|5||20||14C||{{ottd}}{{ttdp|2.6}}||Decide output cargo types
 
|}
 
|}
   

Revision as of 03:02, 23 July 2011

Introduction

Industries work similarly to town buildings as well, except that the maximum number of possible industries is 37 in TTDPatch and 64 in OpenTTD. The non-overridden original types count towards this limit. Industries don't have a climate mask; you should simply not define an industry if it would be for the wrong climate.

Defining industries follows the same schema as houses do: to start using an ID, you first need to define it by setting property 8 for it. If you try to reference an ID (either via action0 or via action3) that isn't defined, your request is ignored, but not reported as an error, either. This means that if you want to conditionally define an ID, all you need to do is skipping the action0 that sets property8, and everything else gets skipped automatically.

Properties

Property Version Size Description
08 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Substitute industry type
09 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Industry type override
0A Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) V Set industry layout(s)
0B Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Industry production flags
0C Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) W Industry closure message
0D Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) W Production increase message
0E Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) W Production decrease message
0F Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Fund cost multiplier
10 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) W Production cargo types
11 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) D Acceptance cargo types
12,13 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Production multipliers
14 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Minimal amount of cargo distributed
15 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) V Random sound effects
16 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) 3*B Conflicting industry types
17 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Probability in random game
18 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Probability during gameplay
19 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) B Map color
1A Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) D Special industry flags to define special behavior
1B Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) W New industry text ID
1C,1D,1E Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (a) D Input cargo multipliers for the three input cargo types
1F Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (b) W Industry name
20 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (b) D Prospecting success chance
21,22 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (b) B Callback flags
23 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 (c) D Destruction cost multiplier
24 Supported by OpenTTD ????Supported by TTDPatch 2.62.6 (d) W Default text for nearby station

(a) Available since TTDPatch 2.0.1 alpha 45

(b) Available since TTDPatch 2.0.1 alpha 49

(c) Available since TTDPatch 2.0.1 alpha 73

(d) Available since TTDPatch 2.6 alpha 0 r1782

Description

Substitute industry type (08)

Substitute industry type. The first assignment of this property copies all properties of the old type to this new type. Unlike for houses, the substitute type won't replace this new type if the definition becomes unavailable. List of valid types: IndustryTypes

There's a special use of this property beginning from alpha 70: if you set it to FFh, you can disable an original industry. In this case, the ID used must be the number of industry you want to disable. Disable requests are ignored for industries not present on the current climate and industries already overridden.

Industry type override (09)

Industry type override. The overridden industry type won't be built in new random games. If the GRF file becomes active after the game was started, industries of the overridden new type won't be replaced by the new type. List of valid types: IndustryTypes

By overriding an old type, you're saying "my type is a substitute for that old type". When GRFs ask information about the old type you've overridden (via industry variable 67, for example), they will get information about your type instead. If you want to replace an old industry type with something completely different, use the "disable" function of property 08 (see above), then define the new industry type without using property 09. A rule of thumb: if your industry accepts or produces different cargoes than the original one, it should not override the original one.

For example, if you want to replace the old coal mine with something that changes its coal production more dynamically, use property 09 to override industry 00. This way, other industries that want to be far from coal mines will stay far from your industry type too. If, however, you want to replace the coal mine with a potash mine, do not use property 09. This will ensure that other industries don't consider your type as a coal mine.

Please note, however, that only one new industry can override an old type. If two new types want to override the same old type, the first one wins, and the second is added normally, ignoring its property 09.

Set industry layout(s) (0A)

Format of industry layout tables:

Size Variable Meaning
B numlayouts The total number of layouts following
D size The size of the whole definition, excluding numlayouts and size
V layouts numlayout layouts, see format below

Format of an industry layout:

As a special case, if the first byte of a new industry layout is FEh, then only two bytes follow: the industry number and the layout number. The specified layout of the specified old industry type will be added to the layout list of the current industry. The following applies only if the first byte wasn't FEh

Size Variable Meaning
B xoffs
B yoffs Offsets counted from the northernmost tile of the industry, specifying the position of the current tile. Both are taken as signed integers, but cannot go negative except the special case mentioned below.
B oldtile An old tile type to be put on the given tile
--or--
0xFE,W newtile The ID of an already defined industry tile, padded with 0 to create a word value. This tile type will be placed on the given tile.
--or--
0xFF The given tile is checked for clearance, but nothing will be placed on it. Useful to ensure some free space around your industry. This is the only case where xoffs and yoffs can be negative. If xoffs is negative, yoffs must be one lower than the wanted value.

The layout consists of a list of the above tile definitions, terminated by two bytes: 0,80h

Industry production flags (0B)

Bit Value Meaning Effect on nearby stations (a) Effect if CB 29 is disabled
0 1 extractive industry (e.g. coal mine) suffix 'Mines' if some non-liquid, non-passenger, non-mail cargo is produced Standard primary-industry production change
1 2 organic industry (e.g. forest) suffix 'Forest' or 'Woods' if wood is produced Standard primary-industry production change
2 4 processing industry (e.g. steel mill) none Standard processing-industry closing-behaviour

Setting this property to 0 means no production changes and no closing, like e.g. the power station.

(a) Behaviour of OpenTTD. TTDPatch behaviour is different.

Industry messages (0C..0E), new industry text ID (1B)

The text associated with these textID will be shown if the industry announces closedown, if the industry increases production, if the industry decreases production or when the industry is generated during the game.

For the generation message, by default, all industries have "New xxx is being constructed near yyy", except forests, that have "New Forest is being planted near yyy".

Production cargo types (10)

Two climate-dependent cargo numbers representing the cargo types the industry can produce. Unused slots can be filled with FFh. List of valid types: CargoTypes

Acceptance cargo types (11)

Three climate-dependent cargo numbers representing the cargo types the industry can accept, plus a fourth filler byte which is always ignored. Unused slots can be filled with FFh. List of valid types: CargoTypes

These cargo types will only be really accepted if the according acceptance of the industry tiles adds up to 8/8 or more.

From GRF version 7 and above, the meaning of the above two properties will change: instead of climate-dependent cargo slot numbers, you have to give climate-independent cargo IDs. If your GRF has a cargo translation table, then this ID is the index in that table; otherwise, it's the cargo bit. Cargoes not currently present will be changed to FFh. Please note that TTD stops processing these lists at the first FFh value, so specifying absent cargoes isn't always safe.

Production multipliers (12, 13)

If nonzero, the industry periodically (every 256 ticks, that is 8 or 9 times in a month) produces the given amount from the according cargo type. The properties specify the amount produced at default production level, they are scaled equally on production changes.

Minimal amount of cargo distributed (14)

The produced cargo will be distributed to stations only after it exceeds this amount.

Random sound effects (15)

The data starts with a byte defining the number of available effects, then one byte per effect. TTD periodically picks one of the available effects randomly, and plays it.

Conflicting industry types (16)

3 bytes define 3 types that won't appear in the vicinity of this industry. If a byte has bit 7 set, the bottom 6 bits are the ID of a new type already defined in the current GRF file. If bit 7 is clear, the bottom 6 bits specify an old industry type. FFh can be used to fill unused entries. You shouldn't modify property 9 after the type has been referenced by a property 16. List of valid types: IndustryTypes

Probability in random game (17), Probability during gameplay (18)

Old types have probabilities between 0 and 10. If the random game probability value is nonzero, at least one instance of this type is guaranteed to appear on the map.

These probabilities are "relative probabilities". That is, if you set the probability of industry A to twice the probability of industry B, industry A will appear about twice as often as B. Increasing the probabilities of all industries on the other hand changes nothing. The appearance probabilities have no influence on how many industries are placed in total.

Map colour (19)

The value must be a color index from the DOS pallette. The following values are used by default industries:

Number Colour Example
01 Black Coal mine
0A Gray Steel mill
0F White Bank
25 Dark beige Water supply
27 Light beige Rubber plantation
30 Pink Farm
37 Brown Food processing plant
56 Green Forest
98 Blue Oil wells/oil rig
AE Purple Factory
B8 Red Power station
BF Yellow Oil refinery
C2 Orange Saw mill
D0 Light green Water tower

Special industry flags to define special behavior (1A)

Bit Value Version Meaning
0 1 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry periodically plants fields around itself (temperate and arctic farms)
1 2 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry cuts trees around itself and produces its first output cargo from them (lumber mill)
2 4 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry is built on water (oil rig)
3 8 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry can only be built in towns (i.e. it has to replace houses) with population larger than 1200 (temperate bank)
4 10 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry can only be built in towns (i.e. it has to replace houses) (arctic and tropic banks, water tower)
5 20 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry is always built near towns (i.e. near town sign; additionally the industry is allowed to replace houses) (toy shop)
6 40 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Fields are planted around the industry when it's built (all farms)
7 80 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry cannot increase its production on the temperate climate (oil wells)
8 100 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry is built only before 1950 (oil wells)
9 200 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry is built only after 1960 (oil rig)
10 400 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 AI players will attempt to establish air and ship routes going to this industry (oil rig)
11 800 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry can be exploded by a military airplane (oil refinery)
12 1000 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry can be exploded by a military helicopter (factory)
13 2000 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The industry can cause a subsidence (coal mine)
14 4000 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Automatic production multiplier handing (No industry has this bit set by default.)
15 8000 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 The production callback needs random bits in var. 10 (No industry has this bit set by default.)
16 10000 Supported by OpenTTD ????Supported by TTDPatch 2.62.6 (a) Do not force one instance of this type to appear during initial map generation (No industry has this bit set by default.)
17 20000 Supported by OpenTTD ????Supported by TTDPatch 2.62.6 (a) Allow closing down the last instance of this type (No industry has this bit set by default.)

(a) since TTDPatch r1925

If bit 14 is set, variables 40..42 will be divided by industry.prodmultiplier (variable 93), and the resulting instructions will be multiplied by the same amount before applying them. If you set this bit, please use small amounts in your instructions, since industry.prodmultiplier is 16 for default production, and can get as high as 128.

By default, TTDPatch tries to ensure that cargo chains don't get broken. To achieve this, TTDPatch always generates at least one instance from every available industry type during random map generation, and prevents the last instance from closing down even when the production change callback says it should. If your industry type isn't essential for gameplay, or you want to handle this situation yourself, you can set bits 16 and/or 17 to turn off the default TTDPatch behavior.

If you supply a lot of industry types but also want to support OpenTTD's small map sizes you should set bit 16 for the less important industry types which can be ommitted (there will likely not be enough space for an industry of every type).

Input cargo multipliers for the three input cargo types (1C..1E)

If the first (low) word of the property is M1 and the second (high) word is M2, and X units of the corresponding cargo is delivered to the industry, the output amounts are calculated this way:

output_type1 = X*M1/256

output_type2 = X*M2/256

The default value for old industry types is 0100h,0000h , so every unit of input cargo produces one unit of output cargo of the first type. Exceptions are temperate banks and oil rigs, that have the default value of 0000h,0000h ,so input cargo doesn't affect output.

Industry name (1F)

This is the text ID that will be attached to the town name when TTD texts refer to the industry.

Prospecting success chance (20)

This value is currently used only for extractive and organic industries (see property 0B for details). The higher this value is, the higher the chance that your industry can be built on a random place after prospecting. 0 means constant failure, while FFFFFFFFh means constant success.

Callback flags (21,22)

Property 21 can have the following bits set:

Bit Value Var. 0C Version Callback
0 1 22 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Determine whether the industry can be built
1 2 00 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Call the production callback when cargo arrives at the industry
2 4 00 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Call the production callback every 256 ticks
3 8 28 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Determine whether the industry can be built on given spot
4 10 29 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Control random production changes
5 20 35 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Monthly random production change
6 40 37 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Cargo sub-type display
7 80 38 Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Additional text in industry fund window

It should be noted that OpenTTD will use smooth economy (if enabled) changes if none of the production callbacks flags are set.

Otherwise, regular production changes will be used.

Property 22 can have the following bits set:

Bit Value Var. 0C Version Callback
0 1 3A Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Show additional text in industry window
1 2 3B Supported by OpenTTD ????Supported by TTDPatch 2.02.0 Control special industry effects
2 4 3D Supported by OpenTTD ????Supported by TTDPatch 2.52.5 Opt out of accepting cargo
3 8 14A Supported by OpenTTD ????Supported by TTDPatch 2.62.6 Decide industry color
4 10 14B Supported by OpenTTD ????Supported by TTDPatch 2.62.6 Decide input cargo types
5 20 14C Supported by OpenTTD ????Supported by TTDPatch 2.62.6 Decide output cargo types

Destruction cost multiplier (23)

This value specifies the cost of removing the industry when the ctrl-dynamite function of morebuildoptions.removeindustry is enabled. This value is multiplied by the house removal cost multiplier to get the final cost. The default value is 1000 in TTDPatch, and 0 (zero) in OpenTTD.

Default name for nearby station (24)

If non-zero, this text ID specifies an additional name option for stations built near this industry, which will be used before any of the standard TTD names. The text should contain a \80, which will be the name of the nearby town.

If the newly built station cannot use the specified text (because that name has been used for another station in the same town) the default TTD naming system will be used, but without the names "\80 Oilfield" or "\80 Mines".

Setting this to zero disables "\80 Oilfield" and "\80 Mines" without adding any additional station name options.

Example