Module:Recipe/SN/doc: Difference between revisions

From Subnautica Wiki
(Created page with "This module contains all recipe information for every item in ''Subnautica''. This data is used in Module:Recipe to output recipes on pages. Each in-game item is represented by an Lua table object. The syntax for each object is below. All parameters are optional '''except''' <code>name</code>. <syntaxhighlight lang="lua"> ["spawnID"] = { name = "Item Name", -- the in-game name of the item energy = #, -- the amount of energy the item adds to the Bioreactor...")
 
(lining up notes a little better)
Line 4: Line 4:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
["spawnID"] = {
["spawnID"] = {
name = "Item Name", -- the in-game name of the item
name = "Item Name", -- the in-game name of the item
energy = #, -- the amount of energy the item adds to the Bioreactor
energy = #, -- the amount of energy the item adds to the Bioreactor
nuclear = #, -- the amount of energy the item adds to the Nuclear Reactor
nuclear = #, -- the amount of energy the item adds to the Nuclear Reactor
icon = {
icon = {
size = "1x1", -- "1x1", "1x2", "2x2", "3x3", "3x2", "2x3", "4x4"
size = "1x1", -- "1x1", "1x2", "2x2", "3x3", "3x2", "2x3", "4x4"
bg = "default" -- "default", "aquatic plant", "land plant"
bg = "default" -- "default", "aquatic plant", "land plant"
},
},
image = "File Name.png",-- the direct file name if a transparent icon does not exist
image = "File Name.png", -- the direct file name if a transparent icon does not exist
recipe = {
recipe = {
{ "spawnID", # },
{ "spawnID", # },
{ "spawnID", # }
{ "spawnID", # }
},
},
original = "spawnID", -- if the item is made as part of a different item's recipe
original = "spawnID", -- if the item is made as part of a different item's recipe
additional = { -- if the item's recipe also makes other items
additional = { -- if the item's recipe also makes other items
{ "spawnID", # },
{ "spawnID", # },
{ "spawnID", # }
{ "spawnID", # }
},
},
quantity = # -- if more than one of the item is made at the same time
quantity = # -- if more than one of the item is made at the same time
},
},
</syntaxhighlight>
</syntaxhighlight>

Revision as of 07:14, 25 June 2022

This module contains all recipe information for every item in Subnautica. This data is used in Module:Recipe to output recipes on pages.

Each in-game item is represented by an Lua table object. The syntax for each object is below. All parameters are optional except name.

	["spawnID"] = {
		name = "Item Name",			-- the in-game name of the item
		energy = #,					-- the amount of energy the item adds to the Bioreactor
		nuclear = #,				-- the amount of energy the item adds to the Nuclear Reactor
		icon = {
			size = "1x1",			-- "1x1", "1x2", "2x2", "3x3", "3x2", "2x3", "4x4"
			bg = "default"			-- "default", "aquatic plant", "land plant"
		},
		image = "File Name.png",	-- the direct file name if a transparent icon does not exist
		recipe = {
			{ "spawnID", # },
			{ "spawnID", # }
		},
		original = "spawnID",		-- if the item is made as part of a different item's recipe
		additional = {				-- if the item's recipe also makes other items
			{ "spawnID", # },
			{ "spawnID", # }
		},
		quantity = #		 		-- if more than one of the item is made at the same time
	},