Template:Lua global function parameters/doc

From Noita Wiki
Jump to navigation Jump to search

About the Template

This template is used to define a range of variables providing infomation of the parameters of a lua global function using Extension:Variables. These variables are used in Template:Lua global function signature and Template:Lua global function parameters description. All variables except the function_name are optional.

Variables Definations

Paramater input Variable name defined Meaning
function_name lgf_name function name of the lua global function
param_name_1 lgf_paramn1 Name of the 1st parameter
param_name_2 lgf_paramn2 Name of the 2nd parameter
param_name_3 lgf_paramn3 Name of the 3rd parameter
param_name_4 lgf_paramn4 Name of the 4th parameter
param_name_5 lgf_paramn5 Name of the 5th parameter
param_name_6 lgf_paramn6 Name of the 6th parameter
param_name_7 lgf_paramn7 Name of the 7th parameter
param_name_8 lgf_paramn8 Name of the 8th parameter
param_name_9 lgf_paramn9 Name of the 9th parameter
param_name_10 lgf_paramn0 Name of the 10st parameter
param_type_1 lgf_paramt1 Type of the 1st parameter
param_type_2 lgf_paramt2 Type of the 2nd parameter
param_type_3 lgf_paramt3 Type of the 3rd parameter
param_type_4 lgf_paramt4 Type of the 4th parameter
param_type_5 lgf_paramt5 Type of the 5th parameter
param_type_6 lgf_paramt6 Type of the 6th parameter
param_type_7 lgf_paramt7 Type of the 7th parameter
param_type_8 lgf_paramt8 Type of the 8th parameter
param_type_9 lgf_paramt9 Type of the 9th parameter
param_type_10 lgf_paramt10 Type of the 10th parameter
param_default_1 lgf_paramd1 Default value of the 1st parameter
param_default_2 lgf_paramd2 Default value of the 2nd parameter
param_default_3 lgf_paramd3 Default value of the 3rd parameter
param_default_4 lgf_paramd4 Default value of the 4th parameter
param_default_5 lgf_paramd5 Default value of the 5th parameter
param_default_6 lgf_paramd6 Default value of the 6th parameter
param_default_7 lgf_paramd7 Default value of the 7th parameter
param_default_8 lgf_paramd8 Default value of the 8th parameter
param_default_9 lgf_paramd9 Default value of the 9th parameter
param_default_10 lgf_paramd10 Default value of the 10th parameter

Those variables has a variation that have a suffix of _styled featuring monokai style.

Usage

{{Lua global function parameters
| function_name =
| param_name_1 =
| param_name_2 =
| param_name_3 =
| param_name_4 =
| param_name_5 =
| param_name_6 =
| param_name_7 =
| param_name_8 =
| param_name_9 =
| param_name_10 =
| param_type_1 =
| param_type_2 =
| param_type_3 =
| param_type_4 =
| param_type_5 =
| param_type_6 =
| param_type_7 =
| param_type_8 =
| param_type_9 =
| param_type_10 =
| param_default_1 =
| param_default_2 =
| param_default_3 =
| param_default_4 =
| param_default_5 =
| param_default_6 =
| param_default_7 =
| param_default_8 =
| param_default_9 =
| param_default_10 =
}}

Example

Function:

PhysicsAddBodyImage( entity_id, image_file, material, offset_x = 0, offset_y = 0, bool centered = false, bool is_circle = false, material_image_file = )

Template Usage:

{{Lua global function parameters
| function_name = PhysicsAddBodyImage
| param_name_1 = entity_id
| param_name_2 = image_file
| param_name_3 = material
| param_name_4 = offset_x
| param_name_5 = offset_y
| param_name_6 = centered
| param_name_7 = is_circle
| param_name_8 = material_image_file
| param_type_4 = number
| param_type_5 = number
| param_type_6 = bool
| param_type_7 = bool
| param_default_4 = 0
| param_default_5 = 0
| param_default_6 = false
| param_default_7 = false
}}