Difference between revisions of "NML:Badgetable"

From GRFSpecs
Jump to navigationJump to search
(Add: Specs for badgetable, as separate site.)
 
(Add since to badgetable.)
Line 1: Line 1:
 
{{NMLNavBlocksyntax}}
 
{{NMLNavBlocksyntax}}
  +
  +
Since {{ottdp|15|no|ottdrev=8f14894}}
   
 
Badgetable is a set of string entries separated by comma. It allows to use <code style="color:darkgreen">badges</code> property of common items.
 
Badgetable is a set of string entries separated by comma. It allows to use <code style="color:darkgreen">badges</code> property of common items.

Revision as of 23:49, 2 January 2026

Block Syntax

Since Supported by OpenTTD 15 (8f14894)15 Not supported by TTDPatch

Badgetable is a set of string entries separated by comma. It allows to use badges property of common items.

badgetable {
   "ENTRY" [, "ENTRY"]*
}

Each ENTRY consist of labels separated with slash. Last label is considered to identify the badge, others refer to classes that the badge belongs to. Note: Currently badges allow only for one level of nesting.

 badgetable {
     "flag",
     "flag/GB",
     "flag/US",
     "power",
     "power/steam",
     "power/diesel",
     "power/electric",
 }

A badge listed in a badgetable will automatically be created if it is not otherwise provided. However, it will not appear in the UI then (It still can be viewed in the NewGRF debug window).