PrototypeBase: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(I guess :()
(→‎Optional properties: Added descriptions)
Line 26: Line 26:


{{Prototype_property|localised_name|[[Types/LocalisedString|LocalisedString]]|optional=true}}
{{Prototype_property|localised_name|[[Types/LocalisedString|LocalisedString]]|optional=true}}
Overwrites the name set in the [[Tutorial:Localisation#Localising_simple_strings|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.


{{Prototype_property|localised_description|[[Types/LocalisedString|LocalisedString]]|optional=true}}
{{Prototype_property|localised_description|[[Types/LocalisedString|LocalisedString]]|optional=true}}
Overwrites the description set in the [[Tutorial:Localisation#Localising_simple_strings|locale file]]. The description is usually shown in the tooltip of the prototype.

Revision as of 20:26, 27 July 2019

Template:Prototype parent The abstract base for all prototypes. All prototypes inherit from this prototype.

Template:Prototype TOC

Mandatory properties

Template:Prototype property 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.

Template:Prototype property 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

Template:Prototype property Used to order items in inventory, recipes and GUI's.

May not exceed a length of 200 characters.

Template:Prototype property 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.

Template:Prototype property Overwrites the description set in the locale file. The description is usually shown in the tooltip of the prototype.