PrototypeBase: Difference between revisions
(Migrated prototype doc to separate website) Tag: Reverted |
Tag: Rollback |
||
Line 1: | Line 1: | ||
{{Prototype parent}} | |||
The abstract base for prototypes. PrototypeBase defines the common features of prototypes, such as localization and order. | The abstract base for prototypes. PrototypeBase defines the common features of prototypes, such as localization and order. | ||
Revision as of 09:05, 16 August 2023
Prototype definitions » PrototypeBase
The abstract base for prototypes. PrototypeBase defines the common features of prototypes, such as localization and order.
PrototypeBase — abstract | ||
name | :: | string |
type | :: | string |
localised_description | :: | LocalisedString (optional) |
localised_name | :: | LocalisedString (optional) |
order | :: | Order (optional) |
Mandatory properties
type
Type: string
Specification of the type of the prototype.
For a list of all available types and their properties, see prototype definitions. For a list of all types used in vanilla, see data.raw.
name
Type: string
Unique textual identification of the prototype.
For a list of all names used in vanilla, see data.raw.
May not contain .
, may not exceed a length of 200 characters.
Optional properties
order
Type: Order
Default: ""
Used to order prototypes in inventory, recipes and GUI's.
May not exceed a length of 200 characters.
localised_name
Type: LocalisedString
Overwrites the name set in the locale file. Can be used to easily set a procedurally-generated name because the LocalisedString format allows to insert parameters into the name directly from the Lua script.
localised_description
Type: LocalisedString
Overwrites the description set in the locale file. The description is usually shown in the tooltip of the prototype.