FOnline Engine
Current master GitHub
Documentation Docs/en/reference/prototype-format/syntax.md

Prototype File Syntax

Generated reference. Do not edit directly. Update BuildTools/PrototypeFormatInterface.json or the owning engine metadata, then run python BuildTools/docs_prototype_format.py --write.

Index Syntax Properties Validation Canonical JSON Authoring guide

Baking.ProtoFileExtensions selects input files. Engine defaults: fopro. An embedding project may add extensions without changing how sections are parsed.

Each pack emits <pack>.fopro-bin-<side> for server, client, mapper. Every top-level [ProtoMap] anchor contributes a Map prototype; nested map-placement sections are skipped.

Section forms

Stable ID Syntax Resolution Meaning
prototype-format.section.proto-entity [Proto<Type>] Entity metadata type <Type> with HasProtos Declares a prototype for a built-in or project-authored entity type whose metadata enables prototypes.
prototype-format.section.fixed-type [<FixedType>] A metadata type declared with ///@ FixedType Declares a prototype-like fixed value defined by embedding-project metadata.
prototype-format.section.fomap-proto-map [ProtoMap] Map Each top-level ProtoMap anchor declares a Map prototype. Nested $Name/Item and $Name/Critter placement sections are skipped by ProtoBaker and consumed by MapBaker.

Control directives

Stable ID Syntax Default Meaning
prototype-format.directive.name $Name = <PrototypeId> source file name without its extension Sets the prototype identity within its resolved type. The identity is migration-resolved before duplicate detection.
prototype-format.directive.parent $Parent = <ParentId> [<ParentId> ...] no parents Lists same-type parent prototypes separated by spaces. Parents are merged left to right and the child is applied last.

Minimal example

[ProtoItem]
$Name = BaseItem

[ProtoItem]
$Name = DerivedItem
$Parent = BaseItem

The section selects the type. The extension and directory do not. Values use the shared configuration parser, including # comments, a trailing backslash preceded by space or tab for continuation, and key += value append syntax.

Start typing to search.