-
-
Notifications
You must be signed in to change notification settings - Fork 133
/
newgrf-additions.html
1215 lines (1202 loc) · 94 KB
/
newgrf-additions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JGR's Patchpack - Additions to NewGRF Specifications</title>
<style type="text/css">
span.abuse { font-family: "Courier New", Courier, mono; background-color: rgb(255, 58, 31); }
span.option{ font-family: "Courier New", Courier, mono; background-color: rgb(255,255, 30); }
span.free { font-family: "Courier New", Courier, mono; background-color: rgb(30, 178, 54); }
span.used { font-family: "Courier New", Courier, mono; }
span.used_p{ font-family: "Courier New", Courier, mono; background-color: cyan; }
td.bits { white-space: nowrap; text-align: center; font-family: "Courier New", Courier, mono; }
td.caption { white-space: nowrap; text-align: left; }
td li { white-space: nowrap; text-align: left; }
th { white-space: nowrap; text-align: center; }
td, th { border: 1px solid #CCCCCC; padding: 0px 5px; }
table { border-collapse: collapse; empty-cells: show; }
</style>
</head>
<body>
<h2>Additions to NewGRF Specifications in JGR's Patchpack</h2>
<p>This document describes non-standard additions to the <a href="https://newgrf-specs.tt-wiki.net/wiki/Main_Page">Official OpenTTD NewGRF Specifications</a> which are present in this patchpack.
<p>These additions MAY also be present in other patchpacks. They MAY be removed or moved in future, if necessary.</p>
<p>A subset of the features listed below are also supported in a fork of NML, see the associated <a href="newgrf-additions-nml.html">NML document</a> for more details.</p>
<p>NewGRFs which use any of these features SHOULD use the <a href="#feature-test">feature testing</a> mechanism described below to check whether individual added features are supported.</p>
<br />
<h3 id="separate_features">Features with separate pages</h3>
<ul>
<li><a href="newgrf-roadstops.html">Road stops</a></li>
<li><a href="newgrf-newlandscape.html">New landscape (custom graphics)</a></li>
<li><a href="newgrf-town.html">Towns (the parent scope for stations, objects, etc.)</a></li>
</ul>
<br />
<h3 id="sections">Sections</h3>
<ul>
<li><a href="#feature-test">Action 14 - Feature Tests</a></li>
<li><a href="#property-mapping">Action 14 - Property Mapping for Action 0</a></li>
<li><a href="#a0stations">Action 0 - Stations</a></li>
<li><a href="#a0bridges">Action 0 - Bridges</a></li>
<li><a href="#a0railtypes">Action 0 - Railtypes</a></li>
<li><a href="#a0roadtypes">Action 0 - Roadtypes</a></li>
<li><a href="#a0globalsettings">Action 0 - Global Settings</a></li>
<li><a href="#a0signals">Action 0 - Signals (Feature 0E)</a></li>
<li><a href="#a0objects">Action 0 - Objects</a></li>
<li><a href="#variable-mapping">Action 14 - Variable Mapping for Variational Action 2</a></li>
<li><a href="#varaction2_additional_types">Variational Action 2 - Additional Types</a></li>
<li><a href="#varaction2_vehicles">Variational Action 2 - Vehicles</a></li>
<li><a href="#varaction2_station">Variational Action 2 - Stations</a></li>
<li><a href="#varaction2_house">Variational Action 2 - Houses</a></li>
<li><a href="#varaction2_railtypes">Variational Action 2 - Railtypes</a></li>
<li><a href="#varaction2_object">Variational Action 2 - Objects</a></li>
<li><a href="#varaction2_airporttiles">Variational Action 2 - Airport tiles</a></li>
<li><a href="#varaction2_signals">Variational Action 2 - Signals (Feature 0E)</a></li>
<li><a href="#callbacks_ships">Callbacks - Ships</a></li>
<li><a href="#a3objects">Action 3 - Objects</a></li>
<li><a href="#a3signals">Action 3 - Signals (Feature 0E)</a></li>
<li><a href="#action5">Action 14 - Type ID Mapping for Action 5</a></li>
<li><a href="#feature-id-mapping">Action 14 - Feature ID Mapping</a></li>
</ul>
<br />
<h3 id="feature-test">Action 14 - Feature Tests</h3>
<p>See <a href="https://newgrf-specs.tt-wiki.net/wiki/Action14">Action 14 Specification</a> for background information.</p>
<h4 id="FTST">Feature Test: C "FTST"</h4>
<p>Each FTST chunk (type C) describes an individual feature test.<br />
Sub-chunks within each FTST chunk may appear in any order, however each sub-chunk SHOULD only appear ONCE within an individual FTST chunk.</p>
<p>Feature tests can be safely used on implementations which do not implement the described feature test mechanism because unknown Action 14 blocks are ignored,
and the observable result (in global variable 0x9D) is equivalent to the case where all feature tests have failed, indicating that the feature is not present.</p>
<h4 id="FTST-NAME">Feature Name: C "FTST" -> T "NAME"</h4>
<p>Within an FTST chunk, the NAME text (type T) field contains the name of the feature to test for. The value of the language ID byte is ignored.<br />
If the named feature is not present, or if this field is omitted, the version is 0.<br />
If the named feature is present, the version number will be at least 1.</p>
<p>The feature testing mechanism itself has the feature name: <font face="monospace">feature_test</font>, this document describes version 1.</p>
<h4 id="FTST-MINV">Feature Minimum Version: C "FTST" -> B "MINV"</h4>
<p>Within an FTST chunk, the MINV binary (type B) field contains the minimum (inclusive) (≥) version to accept. This is a Word (2 bytes).<br />
The default value is 1.</p>
<h4 id="FTST-MAXV">Feature Maximum Version: C "FTST" -> B "MAXV"</h4>
<p>Within an FTST chunk, the MAXV binary (type B) field contains the maximum (inclusive) (≤) version to accept. This is a Word (2 bytes).<br />
The default value is 0xFFFF (no maximum).</p>
<h4 id="FTST-SETP">Feature Set Global Variable 0x9D Bit: C "FTST" -> B "SETP"</h4>
<p>Within an FTST chunk, the SETP binary (type B) field contains the bit number to set/clear in
<a href="https://newgrf-specs.tt-wiki.net/wiki/GlobalVariables">global variable</a> 0x9D (TTD Platform) to store the result of the test. This is 1 byte.<br />
If the test is successful, the bit is set (to 1), otherwise the bit is cleared (to 0).<br />
The bit number MUST be in the range: 4 ≤ bit number ≤ 31. These bits can be assumed to be 0 on implementations which do not support this feature test mechanism.<br />
Global variable 0x9D can then be tested by using a standard <a href="https://newgrf-specs.tt-wiki.net/wiki/Action7">Action 7 or 9</a>, or a standard <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2">Variational Action 2</a>.<br />
If this field is omitted, no bit is set or cleared, and the test is not observable (unless the SVAL chunk is used).
</p>
<h4 id="FTST-SVAL">Feature Set Global Variable 0x91 Success Test Value: C "FTST" -> B "SVAL"</h4>
<p>Within an FTST chunk, the SVAL binary (type B) field contains a 32 bit value which can be tested using the mechanism below. This is 4 bytes.<br />
If the test is successful, the value is added to a list of successful result values which can be checked using the mechanism below.<br />
If the test is unsuccessful, no action is taken.<br />
The value must be > 0, a value of 0 has no effect.</p>
<p>To check if the test succeeded (the value has been added to the list of successful result values), use <a href="https://newgrf-specs.tt-wiki.net/wiki/Action7">Action 7 or 9</a>.<br />
The parameter to test is global variable 0x91 (this always has a value of 0, equivalent to the case where the test has failed, if this feature test mechanism is not present).<br />
The condition-type to use is: 02 (\7=, equality) to jump if the value is in the list (the test succeeded), or 03 (\7!, inequality) to jump if the value is not in the list (the test did not succeed).<br />
The value in the Action 7 or 9 must match the value specified in this SVAL chunk.
</p>
<p>If this field is omitted, the test is not observable (unless the SETP chunk is used).</p>
<p>This chunk and the associated test mechanism requires the feature name: <font face="monospace">feature_test</font>, version 2.<br />
Using this chunk instead or as well as SETP allows observing the result of more than 28 feature tests.</p>
<br />
<h4 id="FTST-example">Example NFO:</h4>
<pre>
// Set bit 4 of global variable 0x9D if sample_feature_1 is present with a version of at least 4
// Set bit 5 of global variable 0x9D if sample_feature_2 is present with a version of at least 5 and at most 6
-1 * -1 14
"C" "FTST"
"T" "NAME" 00 "sample_feature_1" 00
"B" "MINV" \w2 \w4
"B" "SETP" \w1 04
00
"C" "FTST"
"T" "NAME" 00 "sample_feature_2" 00
"B" "MINV" \w2 \w5
"B" "MAXV" \w2 \w6
"B" "SETP" \w1 05
00
00
....
// Skip 1 sprite if bit 4 of global variable 0x9D is not set (indicating that sample_feature_1 with a version of at least 4 is NOT present)
-1 * -1 07 9D 01 \70 04 01
</pre>
<br />
<h3 id="property-mapping">Action 14 - Property Mapping for Action 0</h3>
<p>See <a href="https://newgrf-specs.tt-wiki.net/wiki/Action14">Action 14 Specification</a> and <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0">Action 0 Specification</a> for background information.</p>
<p>The property mapping mechanism has the feature name: <font face="monospace">property_mapping</font>, this document describes version 1.</p>
<p>Users of this mechanism SHOULD at minimum test for the presence of the feature above or test variable 8D, below.</p>
<h4 id="A0PM">Property Mapping: C "A0PM"</h4>
<p>Each A0PM chunk (type C) describes an individual property mapping.<br />
Sub-chunks within each A0PM chunk may appear in any order, however except where otherwise noted each sub-chunk SHOULD only appear ONCE within an individual A0PM chunk.</p>
<p>Property mapping can be safely used on implementations which do not implement the property mapping mechanism if Action 0 sprites which use mapped property IDs are skipped if one or more of:
<ul>
<li>The global variable 0x8D is checked to determine whether the property mapping operation was successful.</li>
<li>The feature name <font face="monospace">property_mapping</font> is checked for.</li>
</ul>
Unknown Action 14 blocks are ignored, and do not need to be skipped.</p>
<h4 id="A0PM-NAME">Property Name: C "A0PM" -> T "NAME"</h4>
<p>Within an A0PM chunk, the NAME text (type T) field contains the name of the property to map. The value of the language ID byte is ignored.</p>
<h4 id="A0PM-FEAT">Action 0 Feature ID: C "A0PM" -> B "FEAT"</h4>
<p>Within an A0PM chunk, the FEAT binary (type B) field contains the <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0#Feature">Action 0 feature ID</a>. This is 1 byte.</p>
<h4 id="A0PM-PROP">Property ID: C "A0PM" -> B "PROP"</h4>
<p>Within an A0PM chunk, the PROP binary (type B) field contains the property ID to allocate to the named property, this value can used in Action 0 sprites. This is 1 byte.<br />
It is possible to override existing properties, however this use is not recommended.</p>
<h4 id="A0PM-SETT">Success Indicator Global Variable 0x8D Bit: C "A0PM" -> B "SETT"</h4>
<p>Within an A0PM chunk, the SETT binary (type B) field contains the bit number to set/clear in
<a href="https://newgrf-specs.tt-wiki.net/wiki/GlobalVariables">global variable</a> 0x8D (TTD version) to store whether the mapping operation was successful. This is 1 byte.<br />
If the operation is successful, the bit is set (to 1), otherwise the bit is cleared (to 0).<br />
The bit number MUST be in the range: 4 ≤ bit number ≤ 31. These bits can be assumed to be 0 on implementations which do not support this property mapping mechanism.<br />
Global variable 0x8D can then be tested by using a standard <a href="https://newgrf-specs.tt-wiki.net/wiki/Action7">Action 7 or 9</a>, or a standard <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2">Variational Action 2</a>.<br />
If this field is omitted, no bit is set or cleared.
</p>
<h4 id="A0PM-SVAL">Success Indicator Global Variable 0x91 Test Value: C "A0PM" -> B "SVAL"</h4>
<p>This behaves identically to the <a href="#FTST-SVAL">C "FTST" -> B "SVAL"</a> case, above</p>
<p>This chunk and the associated test mechanism requires the feature name: <font face="monospace">property_mapping</font>, version 2.</p>
<h4 id="A0PM-FLBK">Fallback Mode: C "A0PM" -> B "FLBK"</h4>
<p>Within an A0PM chunk, the FLBK binary (type B) field contains the fallback mode. This is 1 byte.<br />
The fallback mode may take the following values:
<table>
<tr><th>Value</th><th>Behaviour</th></tr>
<tr><td>0</td><td>Attempts to map an unknown property name are ignored. Use of the mapped property in an Action 0 is ignored. This is the default.</td></tr>
<tr><td>1</td><td>Attempts to map an unknown property name are ignored. Use of the mapped property in an Action 0 is an error.</td></tr>
<tr><td>2</td><td>Attempting to map an unknown property name is an error.</td></tr>
</table>
Attempts to set a fallback mode other than those listed above are silently ignored. More fallback modes MAY be added in future versions of this mechanism.<br />
This chunk MAY be specified more than once, in which case the last specified valid value is used.<br />
Note that even when using fallback mode 0, above, if the property mapping feature is not present, then use of the mapped property ID in an Action 0 is an error.
</p>
<h4 id="A0PM-format">Format of remapped properties</h4>
All properties which are mapped by this mechanism have the format:
<table>
<tr><th>Size</th><th>Name</th><th>Meaning</th></tr>
<tr><td>B*</td><td>num</td><td>Size of the data in bytes</td></tr>
<tr><td>V</td><td>data</td><td>Property data</td></tr>
</table>
Note that num is an extended byte, see <a href="https://newgrf-specs.tt-wiki.net/wiki/GRFActionsDetailed">GRFActionsDetailed</a>.<br />
If the size of the data provided is not valid for the given property, the attempt to set the property MAY be ignored or partially applied.<br />
Note that each use of the mapped property ID is followed by Num-info iterations of the size and data pair above. See: <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0">Action 0 Specification</a>.
<h4 id="A0PM-example">Example NFO:</h4>
<pre>
// Map station property "sample_station_property" to property id 0xF8, and set bit 4 of global variable 0x8D if successful
-1 * -1 14
"C" "A0PM"
"T" "NAME" 00 "sample_station_property" 00
"B" "FEAT" \w1 04
"B" "PROP" \w1 F8
"B" "SETT" \w1 4
00
00
....
// Skip 1 sprite if bit 4 of global variable 0x8D is not set (indicating that station property sample_station_property is NOT present)
-1 * -1 07 8D 01 \70 04 01
// Set sample_station_property for station ID 10 to 2 byte value: AB CD
-1 * -1 00 04 01 01 10 F8 02 AB CD
</pre>
<br />
<h3 id="a0stations"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Stations">Action 0 - Stations</a></h3>
<h4 id="station_min_bridge_height"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Stations#Minimum_bridge_height_.281B.29">Minimum bridge height (1B, or mappable property: station_min_bridge_height)</a></h4>
<p>This property allows building bridges over stations.<br />
The bridge height property defines minimum clearances required for a bridge for each of the station layouts (or 0 to not allow any bridge). Values are given in height level units (1 level == 8px).<br />
</p>
<p>Fixed length of 8 values:<br />
Each height value is 1 byte, the number of values (one for each station layout) is 8, the total property length is 8 bytes.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_station_prop1B</font>, version 1</p>
<p>Variable length:<br />
Each height value is 1 byte, the number of values (one for each station layout) is variable, the total property length is variable.<br />
The mappable property must be used, not variable 1B. The number of values is determined from the length.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_station_min_bridge_height</font>, version 1</p>
<h4 id="station_disallowed_bridge_pillars">Disallowed bridge pillars (mappable property: station_disallowed_bridge_pillars)</h4>
<p>This property describes which bridge pillars are not allowed on the station tile.<br />
It consists of N pillar flags, for each of the N station layouts.<br />
Each set of flags is 1 byte.<br />
Each set of flags has the format described in the bridge_pillar_flags property section, below.
</p>
<p>Fixed length of 8 values:<br />
Each set of flags is 1 byte, the number of values (one for each station layout) is 8, the total property length is 8 bytes.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_station_disallowed_bridge_pillars</font>, version 1</p>
<p>Variable length:<br />
Each set of flags is 1 byte, the number of values (one for each station layout) is variable, the total property length is variable.<br />
The number of values is determined from the length.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_station_disallowed_bridge_pillars</font>, version 2</p>
<br />
The 8 station layouts are described below.
<table>
<tr><th>Station layout</th><th>Axis</th><th>Default Appearance</th></tr>
<tr><td>0</td><td>X</td><td>plain platform</td></tr>
<tr><td>1</td><td>Y</td><td>plain platform</td></tr>
<tr><td>2</td><td>X</td><td>platform with building</td></tr>
<tr><td>3</td><td>Y</td><td>platform with building</td></tr>
<tr><td>4</td><td>X</td><td>platform with roof, left side</td></tr>
<tr><td>5</td><td>Y</td><td>platform with roof, left side</td></tr>
<tr><td>6</td><td>X</td><td>platform with roof, right side</td></tr>
<tr><td>7</td><td>Y</td><td>platform with roof, right side</td></tr>
</table>
<br />
<h3 id="a0bridges"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Bridges">Action 0 - Bridges</a></h3>
<h4 id="bridge_menu_icon">Menu icons (14, or mappable property: bridge_menu_icon)</h4>
<p>This property sets the GUI menu icon for bridge type, this is displayed when constructing a bridge<br />
This has the format:
<table>
<tr><th>Size</th><th>Field</th><th>Description</th></tr>
<tr><td>W</td><td>Sprite</td><td>Sprite ID</td></tr>
<tr><td>W</td><td>Recolour</td><td>Recolour sprite/value</td></tr>
</table>
The total property length is 4 bytes.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_bridge_prop14</font>, version 1</p>
<h4 id="bridge_pillar_flags">Bridge pillars (mappable property: bridge_pillar_flags)</h4>
<p>This property describes the pillars present for each bridge sprite table.<br />
It consists of 6 pairs of pillar flags, for bridge sprite tables 0 - 5.<br />
Each pair consists of: X direction flags, Y direction flags<br />
Each set of flags is 1 byte, the total property length is 12 bytes.<br />
Each set of flags has the format:
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>Pillar is present in west corner</td></tr>
<tr><td>1</td><td>2</td><td>Pillar is present in south corner</td></tr>
<tr><td>2</td><td>4</td><td>Pillar is present in east corner</td></tr>
<tr><td>3</td><td>8</td><td>Pillar is present in north corner</td></tr>
<tr><td>4</td><td>10</td><td>Pillar is present along entire north-east edge</td></tr>
<tr><td>5</td><td>20</td><td>Pillar is present along entire south-east edge</td></tr>
<tr><td>6</td><td>40</td><td>Pillar is present along entire south-west edge</td></tr>
<tr><td>7</td><td>80</td><td>Pillar is present along entire north-west edge</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_bridge_pillar_flags</font>, version 1</p>
<h4 id="bridge_availability_flags">Bridge availability flags (mappable property: bridge_availability_flags)</h4>
<p>This property sets the availability flags for this bridge type.<br />
The property length is 1 byte. The format is:
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>Towns may not build this bridge type</td></tr>
<tr><td>1</td><td>2</td><td>Scripts (AI/GS) may not build this bridge type</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_bridge_availability_flags</font>, version 1</p>
<h4 id="more_bridge_types">More bridges (16 instead of 13)</h4>
<p>This is indicated by the feature name: <font face="monospace">more_bridge_types</font>, version 1</p>
<h3 id="a0railtypes"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Railtypes">Action 0 - Railtypes</a></h3>
<h4 id="railtype_enable_programmable_signals">Enable custom signal sprites for programmable pre-signals (mappable property: railtype_enable_programmable_signals)</h4>
<p>This enables <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a> for programmable pre-signals.<br />
Programmable pre-signals have the signal type value: 06.<br />
The property length is 1 byte. 0 is disabled (default). 1 is enabled.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_programmable_signals</font>, version 1</p>
<h4 id="railtype_enable_no_entry_signals">Enable custom signal sprites for no-entry signals (mappable property: railtype_enable_no_entry_signals)</h4>
<p>This enables <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a> for no-entry signals.<br />
No-entry signals have the signal type value: 07.<br />
The property length is 1 byte. 0 is disabled (default). 1 is enabled.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_no_entry_signals</font>, version 1</p>
<h4 id="railtype_enable_restricted_signals">Enable restricted signal flag for custom signal sprites (mappable property: railtype_enable_restricted_signals)</h4>
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
When enabled, bit 24 of variable 18 (extra callback info) is set if the signal is restricted (has a routing restriction program attached).<br />
When enabled, the "Show restricted electric signals using default graphics" client setting and signal post recolouring is not applied.<br />
This flag should only be set if the Action 2/3 actually returns a different sprite when bit 24 of variable 18 is set.<br />
The property length is 1 byte. 0 is disabled (default). 1 is enabled.
</p>
<p>See also: <a href="#railtype_signal_restriction_info">railtype_signal_restriction_info variable</a></p>
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_restricted_signals</font>, version 1</p>
<h4 id="railtype_enable_signal_recolour">Enable recolouring for custom signal sprites (mappable property: railtype_enable_signal_recolour)</h4>
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
When enabled, in addition to returning a sprite, register 0x100 may be set to the following:
<table>
<tr><th>Bits</th><th>Meaning</th></tr>
<tr><td>0 - 23</td><td>Recolour sprite to use. Set to 0 for no recolouring.</td></tr>
<tr><td>24 - 31</td><td>Reserved, set to zero. </td></tr>
</table></p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_recolour</font>, version 1</p>
<h4 id="railtype_extra_aspects">Set number of additional signal aspects (mappable property: railtype_extra_aspects)</h4>
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
The value is the number of additional signal aspects to use (e.g. 4-aspect signalling should use a value of 2).<br />
When set, the lowest byte of variable 0x18 (SS: signal state) may have the given number of additional values starting from 02:
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>00</td><td>Red signal</td></tr>
<tr><td>01</td><td>Green signal</td></tr>
<tr><td>02</td><td>1st extra aspect (e.g. yellow)</td></tr>
<tr><td>03</td><td>2nd extra aspect (e.g. double yellow)</td></tr>
<tr><td>...</td><td>Further extra aspects...</td></tr>
</table></p>
<p>The property length is 1 byte.<br />
The provided value is currently clamped to be within the range 0 - 6 (inclusive).</p>
<p>N.B. Realistic braking must be enabled for additional signal aspects to be used.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_extra_aspects</font>, version 1</p>
<h4 id="railtype_disable_realistic_braking">Disable use of realistic braking with this rail type (mappable property: railtype_disable_realistic_braking)</h4>
<p>When this property is set realistic braking is disabled for trains of this railtype even when realistic braking is otherwise in effect.<br />
The property length is 1 byte. 0 is realistic braking is not disabled for this railtype. 1 is disable realistic braking for this railtype.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_disable_realistic_braking</font>, version 1</p>
<br />
<h3 id="a0roadtypes"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Roadtypes">Action 0 - Roadtypes</a> and <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Tramtypes">Action 0 - Tramtypes</a></h3>
<h4 id="roadtype_extra_flags">Extra road/tram type flags (mappable property: roadtype_extra_flags)</h4>
<p>This property sets the extra flags for this road/tram type.<br />
The property length is 1 byte. The format is:
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>Scripts (AI/GS) may not build this road/tram type</td></tr>
<tr><td>1</td><td>2</td><td>Towns may not modify tiles of this road/tram type in any way whatsoever</td></tr>
<tr><td>2</td><td>4</td><td>Disallow tunnels for this road/tram type<br />
Support for this bit is indicated by the feature name: <font face="monospace">action0_roadtype_extra_flags</font>, version 2.</td></tr>
<tr><td>3</td><td>8</td><td>Disallow collisions with trains for vehicles of this road/tram type<br />
Support for this bit is indicated by the feature name: <font face="monospace">action0_roadtype_extra_flags</font>, version 2.</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_roadtype_extra_flags</font>, version 1</p>
<h4 id="roadtype_collision_mode">Road vehicle collision mode (mappable property: roadtype_collision_mode)</h4>
<p>This property sets the road vehicle collision mode for road vehicles of this road/tram type.<br />
The property length is 1 byte. The format is:
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>Normal: Normal road vehicle collision rules (this is the default)</td></tr>
<tr><td>1</td><td>None: Do not collide at all with other road vehicles</td></tr>
<tr><td>2</td><td>Elevated: Collide only with other elevated road vehicles</td></tr>
</table>
Unknown values are ignored. More values may be added in future.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_roadtype_collision_mode</font>, version 1</p>
<br />
<h3 id="a0globalsettings"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Global_Settings">Action 0 - Global Settings</a></h3>
<h4 id="global_extra_station_names">Extra station names (mappable property: global_extra_station_names)</h4>
<p>This adds extra station names for use when all the available station names for a given town have been used.<br />
The string should have the same format and use the same ID range as
<a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Industries#Default_name_for_nearby_station_.2824.29">industry - default name for nearby station</a>.<br />
The Action 0 ID field is ignored. This property always adds a new station name string instead of overwriting an existing one.<br />
The property length is 4 bytes. The format is:
<table>
<tr><th>Size</th><th>Field</th><th>Description</th></tr>
<tr><td>W</td><td>String ID</td><td>String to use for the station name</td></tr>
<tr><td>W</td><td>Flags</td><td>See table below</td></tr>
</table>
<br />
Flags field:
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>May be used for rail stations</td></tr>
<tr><td>1</td><td>2</td><td>May be used for road stations</td></tr>
<tr><td>2</td><td>4</td><td>May be used for airport stations</td></tr>
<tr><td>3</td><td>8</td><td>May be used for oil rig stations</td></tr>
<tr><td>4</td><td>10</td><td>May be used for dock stations</td></tr>
<tr><td>5</td><td>20</td><td>May be used for heliport stations</td></tr>
<tr><td>8</td><td>100</td><td>May only be used for stations near the town centre</td></tr>
<tr><td>9</td><td>200</td><td>May not be used for stations near the town centre</td></tr>
<tr><td>10</td><td>400</td><td>May only be used for stations near water</td></tr>
<tr><td>11</td><td>800</td><td>May not be used for stations near water</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_global_extra_station_names</font>, version 1</p>
<h4 id="global_extra_station_names_probability">Extra station names probability (mappable property: global_extra_station_names_probability)</h4>
<p>This sets the probability of using an extra station name even when the available default names have not been exhausted.<br />
The range is 0 - 255, where 0 is never (the default) and 255 is always.<br />
Some station names are always used first even when this is non-zero.<br />
The Action 0 ID field is ignored.<br />
The property length is 1 bytes.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_global_extra_station_names</font>, version 2</p>
<h4 id="global_lighthouse_generate_amount">Lighthouse object map generation amount (mappable property: global_lighthouse_generate_amount)</h4>
<p>This sets the map generation amount value for the lighthouse default object (0 is no generation, 255 is maximum).<br />
The Action 0 ID field is ignored. The property length is 1 byte.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_global_default_object_generate_amount</font>, version 1</p>
<h4 id="global_transmitter_generate_amount">Transmitter object map generation amount (mappable property: global_transmitter_generate_amount)</h4>
<p>This sets the map generation amount value for the transmitter default object (0 is no generation, 255 is maximum).<br />
The Action 0 ID field is ignored. The property length is 1 byte.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_global_default_object_generate_amount</font>, version 1</p>
<h4 id="global_allow_rocks_in_desert">Allow rocky tiles in desert zones (tropical climate) (mappable property: global_allow_rocks_in_desert)</h4>
<p>This sets whether rocky tiles are allowed to generate in and remain in desert zones (tropical climate).<br />
The Action 0 ID field is ignored. The property length is 1 byte. 0 is disabled (default). 1 is enabled.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_global_allow_rocks_in_desert</font>, version 1</p>
<br />
<h3 id="a0signals"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0">Action 0 - Signals (Feature 0E)</a></h3>
<p>Note that Action 0 feature 0E is not supported (does nothing) in standard OpenTTD.</p>
<p>This implementation of feature 0E is not the same as that in TTDPatch.</p>
<h4 id="signals_enable_programmable_signals">Enable custom signal sprites for programmable pre-signals (mappable property: signals_enable_programmable_signals)</h4>
<p>This enables <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for programmable pre-signals for this GRF.<br />
Programmable pre-signals have the signal type value: 06.<br />
The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_programmable_signals</font>, version 1</p>
<h4 id="signals_enable_no_entry_signals">Enable custom signal sprites for no-entry signals (mappable property: signals_enable_no_entry_signals)</h4>
<p>This enables <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for no-entry signals for this GRF.<br />
No-entry signals have the signal type value: 07.<br />
The property length is 1 byte. 0 is disabled (default). 1 is enabled.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_no_entry_signals</font>, version 1</p>
<h4 id="signals_enable_restricted_signals">Enable restricted signal flag for custom signal sprites (mappable property: signals_enable_restricted_signals)</h4>
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for this GRF.<br />
When enabled, bit 24 of variable 18 (extra callback info) is set if the signal is restricted (has a routing restriction program attached).<br />
When enabled, the "Show restricted electric signals using default graphics" client setting and signal post recolouring is not applied.<br />
This flag should only be set if the Action 2/3 actually returns a different sprite when bit 24 of variable 18 is set.<br />
The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>See also: <a href="#signals_signal_restriction_info">signals_signal_restriction_info variable</a></p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_restricted_signals</font>, version 1</p>
<h4 id="signals_enable_signal_recolour">Enable recolouring for custom signal sprites (mappable property: signals_enable_signal_recolour)</h4>
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for this GRF.<br />
When enabled, in addition to returning a sprite, register 0x100 may be set to the following:
<table>
<tr><th>Bits</th><th>Meaning</th></tr>
<tr><td>0 - 23</td><td>Recolour sprite to use. Set to 0 for no recolouring.</td></tr>
<tr><td>24 - 31</td><td>Reserved, set to zero. </td></tr>
</table></p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_recolour</font>, version 1</p>
<h4 id="signals_extra_aspects">Set number of additional signal aspects (mappable property: signals_extra_aspects)</h4>
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for this GRF.<br />
The value is the number of additional signal aspects to use (e.g. 4-aspect signalling should use a value of 2).<br />
When set, the lowest byte of variable 0x18 (SS: signal state) may have the given number of additional values starting from 02:
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>00</td><td>Red signal</td></tr>
<tr><td>01</td><td>Green signal</td></tr>
<tr><td>02</td><td>1st extra aspect (e.g. yellow)</td></tr>
<tr><td>03</td><td>2nd extra aspect (e.g. double yellow)</td></tr>
<tr><td>...</td><td>Further extra aspects...</td></tr>
</table></p>
<p>The property length is 1 byte.<br />
The provided value is currently clamped to be within the range 0 - 6 (inclusive).</p>
<p>N.B. Realistic braking must be enabled for additional signal aspects to be used.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_extra_aspects</font>, version 1</p>
<h4 id="signals_define_style">Define a custom signal style (mappable property: signals_define_style)</h4>
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for this GRF.<br />
This defines a new signal style. Signals using this style will only use this GRF, or the default graphics if no graphics are returned.</p>
<p>The total number of custom signal styles in a game is currently limited to 15.</p>
<p>The property length is 1 byte. This is the local ID of the style which is returned in the <a href="#signals_signal_style">signals_signal_style</a> variable.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_name">Set custom signal style name (mappable property: signals_style_name)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
This property should be set, as otherwise the style will not have a name.</p>
<p>The property length is 2 byte. This is a string ID.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_electric_enabled">Set custom signal style train electric signal types enabled (mappable property: signals_style_electric_enabled)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
This sets which electric signal types may be built using this signal style.</p>
<p>At least one of this property and <a href="#signals_style_semaphore_enabled">signals_style_semaphore_enabled</a> should be set to a non-zero value, as otherwise
no signal types will be enabled for this custom signal style.</p>
<p>The property length is 4 bytes:
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>Normal/block</td></tr>
<tr><td>1</td><td>2</td><td>Pre-signal entry</td></tr>
<tr><td>2</td><td>4</td><td>Pre-signal exit</td></tr>
<tr><td>3</td><td>8</td><td>Pre-signal combo</td></tr>
<tr><td>4</td><td>10</td><td>Two-way PBS</td></tr>
<tr><td>5</td><td>20</td><td>One-way PBS</td></tr>
<tr><td>6</td><td>40</td><td>Programmable pre-signal</td></tr>
<tr><td>7</td><td>80</td><td>No-entry</td></tr>
</table>
If the programmable pre-signal and/or no-entry bits are set, it is not necessary to also set <a href="#signals_enable_programmable_signals">signals_enable_programmable_signals</a>
or <a href="#signals_enable_no_entry_signals">signals_enable_no_entry_signals</a>.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_semaphore_enabled">Set custom signal style train semaphore signal types enabled (mappable property: signals_style_semaphore_enabled)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
This sets which semaphore signal types may be built using this signal style.</p>
<p>The property length is 4 bytes and has an identical format to <a href="#signals_style_electric_enabled">signals_style_electric_enabled</a>, above.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_no_aspect_increase">Set custom signal style no aspect increase mode (mappable property: signals_style_no_aspect_increase)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
When enabled, signals using this style do not increase the signal aspect with respect to the signals either side (i.e. the behaviour is like a banner repeater).</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_always_reserve_through">Set custom signal style always reserve through mode (mappable property: signals_style_always_reserve_through)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
When enabled, signals using this style have reserve through unconditionally enabled.</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_lookahead_extra_aspects">Set custom signal style train look-ahead extra aspects (mappable property: signals_style_lookahead_extra_aspects)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
This property only makes a difference when the "realistic train braking is aspect limited" game setting is enabled.<br />
This limits the signal aspect which the hypothetical train driver can "read" from the signal without affecting signal aspect propagation to other signals, or variable 0x18.<br />
Example values could include: 1 for traditional banner repeater signals.<br />
Shunt signals should use <a href="#signals_style_lookahead_single_signal_only#">signals_style_lookahead_single_signal_only</a> instead.</p>
<p>The property length is 1 byte. The value is clamped to be less than or equal to the value set in the <a href="#signals_extra_aspects">signals_extra_aspects</a> property.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>As a special case, a value of 255 (0xFF) disables the "realistic train braking is aspect limited" setting entirely for signals using this style.<br />
This should only be used for signal types which are intended to emulate in-cab signalling, instead of the "driver" visually reading a signal.<br />
This special case is indicated by the feature name <font face="monospace">action0_signals_style</font>, version 2.
</p>
<p>This property is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_lookahead_single_signal_only">Set custom signal style train look-ahead to single signal only mode (mappable property: signals_style_lookahead_single_signal_only)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
This property only makes a difference when the "realistic train braking is aspect limited" game setting is enabled, or when using a different signal
type which uses <a href="#signals_style_combined_normal_shunt">signals_style_combined_normal_shunt</a>.<br />
This is similar to <a href="#signals_style_lookahead_extra_aspects">signals_style_lookahead_extra_aspects</a> with a value of 0, except the lookahead always ends at the
next signal, even if that signal type sets <a href="#signals_style_no_aspect_increase">signals_style_no_aspect_increase</a>.<br />
If enabled, this property overrides <a href="#signals_style_lookahead_extra_aspects">signals_style_lookahead_extra_aspects</a>.<br />
This can be used for shunt signals.</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_combined_normal_shunt">Set custom signal style combined normal aspect and shunt signal mode (mappable property: signals_style_combined_normal_shunt)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
When enabled and displaying a shunt aspect, the signal state in the lowest byte of variable 0x18 (SS: signal state) will have the value: 0xFF.</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_opposite_side">Set custom signal style signal drawn on opposite side (mappable property: signals_style_opposite_side)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
When enabled, signals using this style are drawn on the opposite side of the track.</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_style_both_sides">Set custom signal style signal drawn on both sides (mappable property: signals_style_both_sides)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
When enabled, signals using this style are drawn on both sides of the track.<br />
Bit 9 of <a href="#signals_signal_context">signals_signal_context</a> is set when drawing the second signal on the opposite side.</p>
<p>If this and <a href="#signals_style_opposite_side">signals_style_opposite_side</a> are both set, the first signal is drawn on the opposite side
and the second signal is drawn on the usual side.</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 3</p>
<h4 id="signals_style_realistic_braking_only">Set custom signal style signal requires realistic braking (mappable property: signals_style_realistic_braking_only)</h4>
<p>This applies to the most recent custom signal style defined using the <a href="#signals_define_style">signals_define_style</a> property.<br />
When enabled, signals using this style may only be built when realistic braking is enabled.</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<h4 id="signals_no_default_style">Set whether custom signal sprites should not be used for the default signal style (mappable property: signals_no_default_style)</h4>
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for this GRF.<br />
When enabled, this GRF is not used for the default signal style, it is only used for custom signal styles defined with <a href="#signals_define_style">signals_define_style</a>.</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_style</font>, version 1</p>
<br />
<h3 id="a0objects"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Objects">Action 0 - Objects</a></h3>
<h4 id="object_use_land_ground">Object uses land ground sprite (mappable property: object_use_land_ground)</h4>
<p>This property sets whether to use the underlying ground as the object ground sprite, ignoring the ground sprite provided in the sprite layout.<br />
When enabled, the ground sprite will be bare ground, grass, snow, desert, etc. as if it were a clear ground tile.<br />
In edge foundation mode, or when foundations are disabled, the ground may be coast/shore when flooded.<br />
The property length is 1 byte. 0 is disabled (default). 1 is enabled.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_use_land_ground</font>, version 1</p>
<h4 id="object_edge_foundation_mode">Enable object edge foundation mode (mappable property: object_edge_foundation_mode)</h4>
<p>This property enables edge foundation mode for the object.<br />
This property is intended for objects which are positioned at the edge of a tile, and only require a level edge, not a completely level tile.<br />
Foundations will only be added as required to get a suitable level edge.<br />
The property length is 4 bytes, 1 byte per view. If the object has fewer than 4 views then some of the values provided in the property will not be used, and may be 0.<br />
The format of each byte is:
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning (for this view)</th></tr>
<tr><td>0 - 1</td><td></td><td>
Which tile edge to use:<br />
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>North-east edge</td></tr>
<tr><td>1</td><td>South-east edge</td></tr>
<tr><td>2</td><td>South-west edge</td></tr>
<tr><td>3</td><td>North-west edge</td></tr>
</table>
</td></tr>
<tr><td>2</td><td>4</td><td>Change z-position for the building sprite to the height of the edge</td></tr>
<tr><td>3</td><td>8</td><td>If the height of the edge is lower than the maximum height of the tile, build a foundation</td></tr>
<tr><td>4</td><td>10</td><td>Use inclined instead of a flat foundations where possible. (Slopes with one corner raised where the height of the edge is at the maximum height of the tile).<br />
Support for this bit is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 2.</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 1</p>
<h4 id="object_flood_resistant">Object is flood resistant (mappable property: object_flood_resistant)</h4>
<p>This property sets whether the object is flood resistant.<br />
Flood resistance is always enabled for objects which can be built on water.<br />
This property can be used to enable flood resistance without enabling the object to be built on water.<br />
The property length is 1 byte. 0 is disabled (default). 1 is enabled.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_flood_resistant</font>, version 1</p>
<h4 id="object_viewport_map_tile_type">Set tile type used for display in viewport map mode and the small-map window (mappable property: object_viewport_map_tile_type)</h4>
<p>This property sets how object tiles are displayed in viewport map mode and the small-map window.<br />
The property length is 1 byte.</p>
<table>
<tr><th>Value</th><th>Meaning</th><th>Notes</th></tr>
<tr><td>00</td><td>Default object</td><td></td></tr>
<tr><td>01</td><td>Clear/bare dirt</td><td>If object_use_land_ground is enabled, the underlying ground type will be used instead</td></tr>
<tr><td>02</td><td>Grass</td><td></td></tr>
<tr><td>03</td><td>Rough ground</td><td></td></tr>
<tr><td>04</td><td>Rocky ground</td><td></td></tr>
<tr><td>05</td><td>Farm fields</td><td>The specific type of field can be set using object_viewport_map_tile_subtype</td></tr>
<tr><td>06</td><td>Snow</td><td></td></tr>
<tr><td>07</td><td>Desert</td><td></td></tr>
<tr><td>08</td><td>Trees</td><td>The specific tree count and ground type/density can be set using object_viewport_map_tile_subtype</td></tr>
<tr><td>09</td><td>House</td><td></td></tr>
<tr><td>0A</td><td>Water</td><td></td></tr>
</table></p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_viewport_map_tile_type</font>, version 1</p>
<h4 id="object_viewport_map_tile_subtype">Set tile sub-type used for display in viewport map mode and the small-map window (mappable property: object_viewport_map_tile_subtype)</h4>
<p>This property can be used to further refine the type set in object_viewport_map_tile_type.<br />
The property length is 2 bytes.</p>
<p>Farm fields:
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0 - 2</td><td>0 - 7</td><td>
Which field type to use
</td></tr>
</table></p>
<p>Trees:
<table>
<tr><th>Bit</th><th>Meaning</th></tr>
<tr><td>0 - 3</td><td>
Tree ground type
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>Grass</td></tr>
<tr><td>1</td><td>Rough ground</td></tr>
<tr><td>2</td><td>Snow/desert</td></tr>
<tr><td>3</td><td>Shore</td></tr>
<tr><td>4</td><td>Rough snow</td></tr>
</table>
</td></tr>
<tr><td>4 - 7</td><td>
Tree ground density (clamped to: 0 - 3)
</td></tr>
<tr><td>8 - 11</td><td>
Number of trees on the tile (clamped to: 1 - 4)
</td></tr>
</table></p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_viewport_map_tile_type</font>, version 1</p>
<br />
<h3 id="variable-mapping">Action 14 - Variable Mapping for Variational Action 2</h3>
<p>See <a href="https://newgrf-specs.tt-wiki.net/wiki/Action14">Action 14 Specification</a> and <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2">Variational Action 2 Specification</a> for background information.</p>
<p>The variable mapping mechanism has the feature name: <font face="monospace">variable_mapping</font>, this document describes version 1 (and where indicated, version 2).</p>
<p>Unlike property mappings, it is not necessary to perform a feature test or check a mapping success variable before using a mapped variable.</p>
<p>Remapped variables are accessed by reading from variable 0x11 using a varadjust shift-num and and-mask which exactly matches that specified in the variable mapping.<br />
In the absence of any successful variable mapping, variable 0x11 has all bits set to 0 and attempting to read from it with any shift-num and and-mask value
results in a value of 0 without producing an error.</p>
<p>Reading a mapped variable on a version of OpenTTD which does not support this variable mapping mechanism or which does not support the requested variable, returns a value of 0.</p>
<p>If more than one variable mapping is made for the same combination of feature ID, shift-num and and-mask, it is implementation-defined which mapping is used.<br />
Each variable mapping SHOULD use a unique combination of feature ID, shift-num and and-mask.</p>
<p>From version 2 of the <font face="monospace">variable_mapping</font> feature name, variable remapping can also be used with variable 0x7B.<br />
In this case the parameter of variable 0x7B should be set to 0x11, and the shift and mask fields set the same way in the direct 0x11 variable case.<br />
The "VPRM" parameter field is ignored, and the parameter used is the accumulator of the previous adjust part in the usual way for variable 0x7B.</p>
<h4 id="A2VM">Variable Mapping: C "A2VM"</h4>
<p>Each A2VM chunk (type C) describes an individual variable mapping.<br />
Sub-chunks within each A2VM chunk may appear in any order, however each sub-chunk SHOULD only appear ONCE within an individual A2VM chunk.</p>
<p>Unknown Action 14 blocks are ignored, and do not need to be skipped.</p>
</p>
<h4 id="A2VM-NAME">Property Name: C "A2VM" -> T "NAME"</h4>
<p>Within an A2VM chunk, the NAME text (type T) field contains the name of the variable to map. The value of the language ID byte is ignored.</p>
<h4 id="A2VM-FEAT">Action 0 Feature ID: C "A2VM" -> B "FEAT"</h4>
<p>Within an A2VM chunk, the FEAT binary (type B) field contains the <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2#Feature">Variational Action 2 feature ID</a>. This is 1 byte.</p>
<p>In the case where a parent/related scope is used to access a different feature (e.g. the town feature as the parent scope for objects),
the feature ID used here is that associated with the scope where the variable is used.<br />
To map a town variable, the feature ID should be the result of mapping the "town" feature name using the <a href="#feature-id-mapping">feature mapping mechanism</a>,
this is not necessarily the feature ID used directly in the variational action 2.</p>
</p>
<h4 id="A2VM-RSFT">Shift to replace: C "A2VM" -> B "RSFT"</h4>
<p>Within an A2VM chunk, the RSFT binary (type B) field contains the Variational Action 2 varadjust shift-num value to look for. This is 1 byte.<br />
The shift-num value must be < 32 (0x20).<br />
If this is not specified, a value of 0 is assumed.</p>
<h4 id="A2VM-RMSK">Mask to replace: C "A2VM" -> B "RMSK"</h4>
<p>Within an A2VM chunk, the RMSK binary (type B) field contains the Variational Action 2 varadjust and-mask value to look for. This is 4 bytes.<br />
When using byte or word sized variational action 2s, the and-mask is zero-extended to 32 bits before comparing with this value.<br />
If this is not specified, a value of 0 is assumed.</p>
<h4 id="A2VM-VSFT">Replacement shift: C "A2VM" -> B "VSFT"</h4>
<p>Within an A2VM chunk, the VSFT binary (type B) field contains the replacement Variational Action 2 varadjust shift-num value to use on the mapped variable. This is 1 byte.<br />
The shift-num value must be < 32 (0x20).<br />
If this is not specified, a value of 0 is assumed.</p>
<h4 id="A2VM-VMSK">Replacement mask: C "A2VM" -> B "VMSK"</h4>
<p>Within an A2VM chunk, the RMSK binary (type B) field contains the replacement Variational Action 2 varadjust and-mask value to use on the mapped variable. This is 4 bytes.<br />
If this is not specified, a value of 0 is assumed.</p>
<h4 id="A2VM-SETT">Success Indicator Global Variable 0x8D Bit: C "A2VM" -> B "SETT"</h4>
<p>This behaves identically to the <a href="#A0PM-SETT">C "A0PM" -> B "SETT"</a> case, above</p>
<h4 id="A2VM-SVAL">Success Indicator Global Variable 0x91 Test Value: C "A2VM" -> B "SVAL"</h4>
<p>This behaves identically to the <a href="#FTST-SVAL">C "FTST" -> B "SVAL"</a> case, above</p>
<p>This chunk and the associated test mechanism requires the feature name: <font face="monospace">variable_mapping</font>, version 3.</p>
<h4 id="A2VM-VPRM">Replacement parameter: C "A2VM" -> B "VPRM"</h4>
<p>Within an A2VM chunk, the VPRM binary (type B) field contains the Variational Action 2 parameter value (as in 60+X variables) to use on the mapped variable. This is 4 bytes.<br />
If this is not specified, a value of 0 is assumed.<br />
Support for this field is indicated by the feature name <font face="monospace">variable_mapping</font>, version 2.</p>
<h4 id="A2VM-example">Example NFO:</h4>
<pre>
// Map station variable "sample_station_variable" with a shift-num of 4 and an and-mask of 0xFF, to reads of variable 0x11 with a shift-num of 1 and an and-mask of 0x2, and set bit 4 of global variable 0x8D if successful
-1 * -1 14
"C" "A2VM"
"T" "NAME" 00 "sample_station_variable" 00
"B" "FEAT" \w1 04
"B" "RSFT" \w1 1
"B" "RMSK" \w4 \dx00000002
"B" "VSFT" \w1 4
"B" "VMSK" \w4 \dx000000FF
"B" "SETT" \w1 4
00
00
....
-1 * 15 02 04 03 81 // Action2, Feature 04 (stations), action2ID 03, 1-byte variable
11 01 02 // variable 11 (remapping variable or 0), shift 01, mask 0x02 (these exactly match the remapping above)
// This is remapped to ‐‐> sample_station_variable with a shift of 04 and a mask of 0xFF
01 // check one range
02 00 00 04 // range 00 - 04: link to action2ID 02
01 00 // default: link to action2ID 01
</pre>
<br />
<h3 id="varaction2_additional_types">Variational Action 2 - Additional Types</h3>
<p>Additional variational action 2 types are indicated by the feature name: <font face="monospace">more_varaction2_types</font>, this document describes version 1.<br />
This feature name must be tested for to enable this feature.</p>
<p>See the <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2#Type">Variational Action 2 Specification (types)</a> for background information.</p>
<p>This feature adds the type value 87, for additional variation action 2 modes/scopes. (This is used instead of the standard values: 81, 82, 85, 86, 89 or 8A).<br />
An additional byte follows to specify which sub-type.</p>
<p>
<pre><Sprite-number> * <Length> 02 <feature> <set-id> 87 <sub-type> ...</pre>
The following sub-types are defined:
<table>
<tr><th>Sub-type</th><th>Meaning</th></tr>
<tr><td>00</td><td>Callback failure group</td></tr>
<tr><td>01</td><td>Relative scope for vehicles (same syntax as <a href="https://newgrf-specs.tt-wiki.net/wiki/RandomAction2#80.2F83.2F84">random action 2 type 84</a>)</td></tr>
<tr><td>02</td><td>Relative scope for vehicles (longer syntax)</td></tr>
</table>
<p>If an unknown sub-type is used, or if subsequent sub-type bytes are invalid, a callback failure group is created, the same as sub-type 00.</p>
<h4 id="varaction2_additional_type_00">Sub-type 00: Callback failure</h4>
<pre><Sprite-number> * <Length> 02 <feature> <set-id> <b>87 00</b></pre>
This produces a callback failed result in all cases (appropriate whether or not variable 0C is currently 0).<br />
This can be used to avoiding needing to branch on variable 0C or create empty (feature-dependant) real sprite/sprite layout/industry production groups.
</p>
<h4 id="varaction2_additional_type_01">Sub-type 01: Relative scope for vehicles (random action 2 type 84 syntax)</h4>
<pre><Sprite-number> * <Length> 02 <feature> <set-id> <b>87 01 <count></b> <variable> <varadjust> [<operator> <variable> <varadjust>]... <nvar> (<set-id> <low-range> <high-range>){n} <default></pre>
<p>This sub-type is only valid for vehicles.</p>
<p>The vehicle which is accessed can be any in the vehicle consist. The <font face="monospace">count</font> byte selects which, this has the same syntax and functionality
as the <a href="https://newgrf-specs.tt-wiki.net/wiki/RandomAction2#count"><font face="monospace">count</font> byte in random action 2 type 84</a>.</p>
<p>Note: The count byte mode where temporary variable 0x100 is used should be used with caution.</p>
<h4 id="varaction2_additional_type_02">Sub-type 02: Relative scope for vehicles (longer syntax)</h4>
<pre><Sprite-number> * <Length> 02 <feature> <set-id> <b>87 02 <mode> <offset></b> <variable> <varadjust> [<operator> <variable> <varadjust>]... <nvar> (<set-id> <low-range> <high-range>){n} <default></pre>
<p>This sub-type is only valid for vehicles.</p>
<p>The vehicle which is accessed can be any in the vehicle consist. The <font face="monospace">mode</font> and <font face="monospace">offset</font> bytes select which.</p>
<p>The <font face="monospace">mode</font> byte has the following syntax:
<table>
<tr><th>Bits</th><th>Meaning</th></tr>
<tr><td>0 - 1</td><td>
Selection mode:<br/>
These values are the same as bits 6 - 7 of the <a href="https://newgrf-specs.tt-wiki.net/wiki/RandomAction2#count"><font face="monospace">count</font> byte in random action 2 type 84</a>.
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>Count back (away from the engine), starting at this vehicle</td></tr>
<tr><td>1</td><td>Count forward (toward the engine), starting at this vehicle</td></tr>
<tr><td>2</td><td>Count back, starting at the engine</td></tr>
<tr><td>3</td><td>Count back, starting at the first vehicle in this chain of vehicles with the same ID, as for vehicle variable 41</td></tr>
</table>
</td></tr>
<tr><td>7</td><td>If set, use variable 0x100 for the offset. The offset byte must be 0.</td></tr>
</table>
The remaining bits are reserved for future used and must be set to 0.
</p>
<p>The <font face="monospace">offset</font> byte specifies how far to count from the starting vehicle. A value of 0 is not special.<br />
Bit 7 of the <font face="monospace">mode</font> byte must be set to use temporary variable 0x100 instead.</p>
<p>Note: Using temporary variable 0x100 as the offset should be used with caution.</p>
<br />
<h3 id="varaction2_vehicles"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Vehicles">Variational Action 2 - Vehicles</a></h3>
<h4 id="varaction2_vehicles_var61">Query variable of n-th vehicle in chain (61)</h4>
<p>This variable is also enabled for ships if indicated by the feature name: <font face="monospace">multi_part_ships</font>, version 2.</p>
<br />
<h3 id="varaction2_station"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Stations">Variational Action 2 - Stations</a></h3>
<h4 id="varaction2_station_var42">Track type in purchase list (42)</h4>
<p>This is indicated by the feature name: <font face="monospace">varaction2_station_var42</font>, version 1</p>
<h4 id="station_station_info_nearby_tiles_v2">Station info of nearby tiles v2 (mappable variable: station_station_info_nearby_tiles_v2)</h4>
<p>This has a similar value to <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Stations#Station_info_of_nearby_tiles_.2868.29">68/Station info of nearby tiles</a>.<br />
<table>
<tr><th>Bits</th><th>Meaning</th></tr>
<tr><td>0 - 15</td><td>If the tile is defined in the current GRF, this is the setID used in the definition. Otherwise, the content is undefined. </td></tr>
<tr><td>16 - 17</td><td>
0 - The tile uses original TTD graphics<br />
1 - The tile is defined in the current GRF<br />
2 - The tile is defined in another GRF
</td></tr>
<tr><td>18</td><td>Set if the selected tile belongs to the current station, clear otherwise</td></tr>
<tr><td>19</td><td>Clear if the selected tile is parallel with the current one, set if perpendicular to it </td></tr>
<tr><td>20 - 21</td><td>
0 - plain platform<br />
1 - platform with building<br />
2 - platform with roof, left side<br />
3 - platform with roof, right side
</td></tr>
</table>
<br />
The remaining bits are reserved for future use and should be masked.<br />
This requires <font face="monospace">varaction2_station_station_nearby_info_v2</font>, version 1.
</p>
<br />
<h3 id="varaction2_house"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses">Variational Action 2 - Houses</a></h3>
<h4 id="house_same_id_town_count">Building count: same ID, current town (mappable variable: house_same_id_town_count)</h4>
<p>This is the same as bits 0 - 7 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Building_counts_.2844.29">44/Building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_same_id_map_count">Building count: same ID, whole map (mappable variable: house_same_id_map_count)</h4>
<p>This is the same as bits 8 - 15 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Building_counts_.2844.29">44/Building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_same_class_town_count">Building count: same class, current town (mappable variable: house_same_class_town_count)</h4>
<p>This is the same as bits 16 - 23 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Building_counts_.2844.29">44/Building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_same_class_map_count">Building count: same class, total (mappable variable: house_same_class_map_count)</h4>
<p>This is the same as bits 24 - 31 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Building_counts_.2844.29">44/Building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_other_old_id_town_count">Building count: other old ID, total (mappable variable: house_other_old_id_town_count)</h4>
<p>This is the same as bits 0 - 7 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Other_building_counts_.2860.2C_61.29">60/Other building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_other_old_id_map_count">Building count: other old ID, total (mappable variable: house_other_old_id_map_count)</h4>
<p>This is the same as bits 8 - 15 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Other_building_counts_.2860.2C_61.29">60/Other building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_other_id_town_count">Building count: other new ID, current town (mappable variable: house_other_id_town_count)</h4>
<p>This is the same as bits 0 - 7 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Other_building_counts_.2860.2C_61.29">61/Other building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_other_id_map_count">Building count: other new ID, whole map (mappable variable: house_other_id_map_count)</h4>
<p>This is the same as bits 8 - 15 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Other_building_counts_.2860.2C_61.29">61/Other building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_other_class_town_count">Building count: other new class, current town (mappable variable: house_other_class_town_count)</h4>
<p>This is the same as bits 16 - 23 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Other_building_counts_.2860.2C_61.29">61/Other building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<h4 id="house_other_class_map_count">Building count: other new class, total (mappable variable: house_other_class_map_count)</h4>
<p>This is the same as bits 24 - 31 of <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Houses#Other_building_counts_.2860.2C_61.29">61/Other building counts</a>, except not clamped to a maximum of 0xFF.<br />
This requires <font face="monospace">varaction2_house_uncapped_building_counts</font>, version 1.
</p>
<br />
<h3 id="varaction2_railtypes"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Railtypes">Variational Action 2 - Railtypes</a></h3>
<h4 id="railtype_signal_restriction_info">Signal routing restriction information (mappable variable: railtype_signal_restriction_info)</h4>
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>This signal has a routing restriction program attached</td></tr>
<tr><td>1</td><td>2</td><td>Reserve through is unconditionally set in the routing restriction program</td></tr>
<tr><td>2</td><td>4</td><td>The routing restriction program may allow trains to reverse behind this signal</td></tr>
</table>
</p>
<p>See also: <a href="#railtype_enable_restricted_signals">railtype_enable_restricted_signals property</a></p>
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_restricted_signals</font>, version 2</p>
<h4 id="railtype_signal_context">Signal context (mappable variable: railtype_signal_context)</h4>
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
<table>
<tr><th>Bit</th><th>Meaning</th></tr>
<tr><td>0 - 7</td><td>
Context:
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>GUI</td></tr>
<tr><td>1</td><td>Plain rail track</td></tr>
<tr><td>2</td><td>Tunnel/bridge entrance</td></tr>
<tr><td>3</td><td>Tunnel/bridge exit</td></tr>
<tr><td>4</td><td>Bridge middle</td></tr>
</table>
</td></tr>
<tr><td>8</td><td>Tunnel tile</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">varaction2_railtype_signal_context</font>, version 1</p>
<h4 id="railtype_signal_side">Signal side (mappable variable: railtype_signal_side)</h4>
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
<table>
<tr><th>Bit</th><th>Meaning</th></tr>
<tr><td>0</td><td>
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>Signals are on the left</td></tr>
<tr><td>1</td><td>Signals are on the right</td></tr>
</table>
</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">varaction2_railtype_signal_side</font>, version 1</p>
<h4 id="railtype_signal_vertical_clearance">Vertical clearance (mappable variable: railtype_signal_vertical_clearance)</h4>
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
<table>
<tr><th>Bit</th><th>Meaning</th></tr>
<tr><td>0 - 7</td><td>
Pixels of vertical clearance between the signal and any bridge above.<br />
If there is no bridge above, the value is 0xFF.
</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">varaction2_railtype_signal_vertical_clearance</font>, version 1</p>
<h4 id="railtype_adjacent_crossing">Adjacent level crossing information (mappable variable: railtype_adjacent_crossing)</h4>
<p>
<table>
<tr><th>Bit</th><th>Meaning</th></tr>
<tr><td>0</td><td>This level crossing tile is part of a continuous adjacent crossing with the tile to the south (SW or SE)</td></tr>
<tr><td>1</td><td>This level crossing tile is part of a continuous adjacent crossing with the tile to the north (NW or NE)</td></tr>
</table>
The value is 0 for non level crossing tiles.
</p>
<p>This is indicated by the feature name: <font face="monospace">varaction2_railtype_adjacent_crossing</font>, version 1</p>
<br />
<h3 id="varaction2_object"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Objects">Variational Action 2 - Objects</a></h3>
<h4 id="object_foundation_tile_slope">Tile slope after foundation applied (mappable variable: object_foundation_tile_slope)</h4>
<p>This has the same format as bits 8-12 of object variable 41.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 2</p>
<h4 id="object_foundation_change_tile_slope">Tile slope after foundation applied xor underlying tile slope (mappable variable: object_foundation_change_tile_slope)</h4>
<p>This has the same format as bits 8-12 of object variable 41, but has bits set only where the foundation slope differs from the underlying tile slope.<br />
If this variable is non-zero a foundation is present.<br />
This is useful for xoring with bits 8-12 of variable 41, because if this variable is unavailable then the result is still the underlying tile slope.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 2</p>
<br />
<h3 id="varaction2_airporttiles"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Airport_Tiles">Variational Action 2 - Airport Tiles</a></h3>
<h4 id="airporttiles_airport_id">Airport ID (mappable variable: airporttiles_airport_id)</h4>
<p>This is the local GRF ID of the airport type.</p>
<p>This is indicated by the feature name: <font face="monospace">varaction2_airporttiles_airport_info</font>, version 1</p>
<h4 id="airporttiles_airport_layout">Airport layout number (mappable variable: airporttiles_airport_layout)</h4>
<p>This is the airport layout number (as defined in <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Airports#Set_airportlayout.28s.29_.280A.29">airport property 0A</a>).</p>
<p>This is indicated by the feature name: <font face="monospace">varaction2_airporttiles_airport_info</font>, version 1</p>
<br />
<h3 id="varaction2_signals"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2">Variational Action 2 - Signals (Feature 0E)</a></h3>
<h4 id="signals_signal_restriction_info">Signal routing restriction information (mappable variable: signals_signal_restriction_info)</h4>
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a>.<br />
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>This signal has a routing restriction program attached</td></tr>
<tr><td>1</td><td>2</td><td>Reserve through is unconditionally set in the routing restriction program</td></tr>
<tr><td>2</td><td>4</td><td>The routing restriction program may allow trains to reverse behind this signal</td></tr>
</table>
</p>
<p>See also: <a href="#signals_enable_restricted_signals">signals_enable_restricted_signals property</a></p>
<p>This is indicated by the feature name: <font face="monospace">action0_signals_restricted_signals</font>, version 2</p>
<h4 id="signals_signal_context">Signal context (mappable variable: signals_signal_context)</h4>
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a>.<br />
<table>
<tr><th>Bit</th><th>Meaning</th></tr>
<tr><td>0 - 7</td><td>
Context:
<table>
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>GUI</td></tr>
<tr><td>1</td><td>Plain rail track</td></tr>
<tr><td>2</td><td>Tunnel/bridge entrance</td></tr>
<tr><td>3</td><td>Tunnel/bridge exit</td></tr>