Documentation
Docs/en/reference/text-format/proto-text.md
Prototype Text
Generated reference. Do not edit directly. Update
BuildTools/TextFormatInterface.json, then runpython BuildTools/docs_text_format.py --write.
| Index | Syntax | Languages | Prototype text | Runtime | Validation | Canonical JSON | Guide |
Prototype-localized text is authored inside any valid prototype section:
[ProtoItem]
$Name = LaserRifle
$Text engl Name = Laser rifle
$Text engl Desc Short = Compact description
$Text russ Name = Localized name
The complete key is the generated pack, prototype id, optional Key2, and optional Key3. Omitting the language selects the first configured BakeLanguages entry.
Generated packs
Items, Critters, Maps, Locations, Protos
| Stable ID | Rule | Requirement | Why | Source |
|---|---|---|---|---|
text-format.proto.syntax |
Prototype text key | Prototype text uses $Text [Language] [Key2] [Key3] = Value and accepts at most four key tokens including $Text. | The prototype id becomes Key1 and the optional trailing tokens become Key2 and Key3. | Source/Tools/ProtoTextBaker.cpp |
text-format.proto.default-language |
Omitted language | When the language token is omitted, a $Text field belongs to the first Baking.BakeLanguages entry. | The same ordered base-language contract is shared with raw text packs. | Source/Tools/ProtoTextBaker.cpp |
text-format.proto.escape-decoding |
Escaped value decoding | Prototype $Text values pass through StringEscaping::DecodeString before entering the text pack. | Sequences such as \n become actual newline characters in the baked value. | Source/Tools/ProtoTextBaker.cpp, Source/Tests/Test_ProtoTextBaker.cpp |
text-format.proto.inheritance |
Inherited text | Parent $Text fields are merged recursively before the child fields. | A child inherits missing exact text keys while its own exact key assignment replaces the inherited value. | Source/Tools/ProtoTextBaker.cpp |
text-format.proto.pack-routing |
Generated pack routing | Item, Critter, Map, and Location prototypes route to Items, Critters, Maps, and Locations; other non-exported HasProtos entity or fixed types route to Protos. | These five names are the reusable Engine-generated prototype text-pack set. | Source/Tools/ProtoTextBaker.cpp |
text-format.proto.complete-output-set |
Complete output set | ProtoTextBaker creates all five generated packs for every configured language, including empty packs. | The binary output shape is deterministic across projects and language sets. | Source/Tools/ProtoTextBaker.cpp |
text-format.proto.intersections |
Cross-type intersections | Two prototype sources may not emit the same complete key into one generated pack and language. | Intersections are counted as errors and abort prototype text baking. | Source/Tools/ProtoTextBaker.cpp |
text-format.proto.unsupported-language |
Unsupported prototype language | A $Text language absent from Baking.BakeLanguages is warned and omitted. | Prototype-localized text follows the configured output-language set. | Source/Tools/ProtoTextBaker.cpp |