Module:Recipe/SN: Difference between revisions

From Subnautica Wiki
(Testing new recipe data module)
 
(updating to use Spawn IDs as identifiers to link items together, and standardizing the property names)
Line 1: Line 1:
return {
return {
["Standard O₂ Tank"] = {
["tank"] = {
machine = "Fabricator",
name = "Standard O₂ Tank",
machine = "fabricator",
items = {
["Titanium"] = 3
recipe = {
["titanium"] = 3
}
}
},
},
["High Capacity O₂ Tank"] = {
["doubletank"] = {
machine = "Fabricator",
name = "High Capacity O₂ Tank",
machine = "fabricator",
items = {
recipe = {
["Standard O₂ Tank"] = 1,
["Glass"] = 2,
["tank"] = 1,
["Titanium"] = 4,
["glass"] = 2,
["Silver Ore"] = 1
["titanium"] = 4,
["silver"] = 1
}
}
},
},
["Radiation Suit"] = {
["radiationsuit"] = {
machine = "Fabricator",
name = "Radiation Suit",
machine = "fabricator",
items = {
["Fiber Mesh"] = 2,
recipe = {
["Lead"] = 2
["fibermesh"] = 2,
["lead"] = 2
},
},
products = {"Radiation Gloves", "Radiation Helmet"}
additional = {"Radiation Gloves", "Radiation Helmet"}
}
}
}
}

Revision as of 17:35, 21 October 2021

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", "prawn arm"
			file = "Item Name"		-- if the transparent icon is not at "Item Name Icon.png"
		},
		image = "File Name.png",	-- the direct file name if a transparent icon does not exist
		machine = "spawnID",		-- the machine the item is crafted or obtained through
		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
	},

return {
	["tank"] = {
		name = "Standard O₂ Tank",
		machine = "fabricator",
		recipe = {
			["titanium"] = 3
		}
	},
	["doubletank"] = {
		name = "High Capacity O₂ Tank",
		machine = "fabricator",
		recipe = {
			["tank"] = 1,
			["glass"] = 2,
			["titanium"] = 4,
			["silver"] = 1
		}
	},
	["radiationsuit"] = {
		name = "Radiation Suit",
		machine = "fabricator",
		recipe = {
			["fibermesh"] = 2,
			["lead"] = 2
		},
		additional = {"Radiation Gloves", "Radiation Helmet"}
	}
}