Bill of Materials

From EVEDev
Jump to: navigation, search

A blueprint's bill of materials is a list of all the item types required to manufacture from or do research on that blueprint. Manufacturing materials are split into two tables -- invTypeMaterials and ramTypeRequirements. The former is keyed by a blueprint's productTypeID, because it doubles as recycling information, and the latter is keyed by blueprintTypeID. Research, copying, inventing, and reverse engineering materials are all in ramTypeRequirements.

Contents


Manufacturing

Broadly, to get the materials to construct something, you need to take the product's invTypeMaterials, subtract recycled materials' invTypeMaterials, and add extra materials or skills listed in ramTypeRequirements.

Raw Materials Only

For items which have no extra materials or skill requirements, such as the Civilian Shield Booster I (productTypeID 10039, blueprintTypeID 10040), you need only query invTypeMaterials:

SELECT t.typeName, m.quantity
FROM invTypeMaterials AS m
 INNER JOIN invTypes AS t
  ON m.materialTypeID = t.typeID
WHERE m.typeID = 10039; -- Civilian Shield Booster I

UNIQ2ec105a91cdefcda-sql-00000001-QINU

You still need to add waste to this -- see Equations.

Raw Plus Skills

Most blueprints require one or more skills (such as Industry I) for manufacturing. You can get the raw materials with the previous query, and then add the skills with the following query (using Capital Crystalline Carbonide Armor Plates as example, productTypeID=29041, blueprintTypeID=29042):

-- Base materials
SELECT t.typeName, m.quantity
FROM invTypeMaterials AS m
 INNER JOIN invTypes AS t
  ON m.materialTypeID = t.typeID
WHERE m.typeID = 29041; -- Capital Crystalline Carbonide Armor Plate
 
-- Extra materials
SELECT t.typeName, r.quantity, r.damagePerJob
FROM ramTypeRequirements AS r
 INNER JOIN invTypes AS t
  ON r.requiredTypeID = t.typeID
WHERE r.typeID = 29042 -- Capital Crystalline Carbonide Armor Plate Blueprint
 AND r.activityID = 1; -- Manufacturing

Base materials UNIQ2ec105a91cdefcda-sql-00000003-QINU Extra materials UNIQ2ec105a91cdefcda-sql-00000004-QINU

You'll need to add the waste to the base materials, and you probably want to convert the quantity to Roman numerals for the skill level -- 'Mechanical Engineering IV', for example, looks a bit more natural than 'Mechanical Engineering 4' or 'Mechanical Engineering * 4'.

Extra Plus Skills

Some blueprints, such as the hybrid construction components' (used to build tech 3 subsystems and strategic cruisers), only have extra materials and skills, but no raw materials. Using Electromechanical Interface Nexus (productTypeID=30466, blueprintTypeID=30467):

-- Extra materials + skills
SELECT t.typeName, r.quantity, r.damagePerJob
FROM ramTypeRequirements AS r
 INNER JOIN invTypes AS t
  ON r.requiredTypeID = t.typeID
WHERE r.typeID = 30467 -- Electromechanical Interface Nexus Blueprint
 AND r.activityID = 1; -- Manufacturing

UNIQ2ec105a91cdefcda-sql-00000006-QINU

As these are extra materials instead of raw materials, you do not need to add material level waste -- which means that the material level required to build without waste from such blueprints is 0.

Skills are mixed in with the extra materials; to separate them, you can check their category via invGroups: categoryID 16 is for skills.

-- Extra materials
SELECT t.typeName, r.quantity, r.damagePerJob
FROM ramTypeRequirements AS r
 INNER JOIN invTypes AS t
  ON r.requiredTypeID = t.typeID
 INNER JOIN invGroups AS g
  ON t.groupID = g.groupID
WHERE r.typeID = 30467 -- Electromechanical Interface Nexus Blueprint
 AND r.activityID = 1 -- Manufacturing
 AND g.categoryID != 16; -- Skill
 
-- Skills
SELECT t.typeName, r.quantity, r.damagePerJob
FROM ramTypeRequirements AS r
 INNER JOIN invTypes AS t
  ON r.requiredTypeID = t.typeID
 INNER JOIN invGroups AS g
  ON t.groupID = g.groupID
WHERE r.typeID = 30467 -- Electromechanical Interface Nexus Blueprint
 AND r.activityID = 1 -- Manufacturing
 AND g.categoryID = 16; -- Skill

Extra Materials UNIQ2ec105a91cdefcda-sql-00000008-QINU Skills UNIQ2ec105a91cdefcda-sql-00000009-QINU

Raw And Extra

Some of the tech 1 blueprints, such as bombs, have both raw and extra materials (example quote screenshot). To get the correct total material requirements, you need to get the reprocessing amounts, add waste as appropriate, and then add the extra materials.

-- Base materials
SELECT t.typeName, m.quantity
FROM invTypeMaterials AS m
 INNER JOIN invTypes AS t
  ON m.materialTypeID = t.typeID
WHERE m.typeID = 27912; -- Concussion Bomb
 
-- Extra materials and skills
SELECT t.typeName, r.quantity, r.damagePerJob
FROM ramTypeRequirements AS r
 INNER JOIN invTypes AS t
  ON r.requiredTypeID = t.typeID
WHERE r.typeID = 27913 -- Concussion Bomb Blueprint
 AND r.activityID = 1; -- Manufacturing

Base materials UNIQ2ec105a91cdefcda-sql-0000000B-QINU Extra materials and skills UNIQ2ec105a91cdefcda-sql-0000000C-QINU

Extra Recycled Materials

So far, none of the examples have included any materials that are recycled. Most of the tech 2 blueprints require their tech 1 version as input. Recycled materials' materials need to be subtracted from the product's materials. Let's look at the results of reprocessing an Improved Cloaking Device II (typeID 11577):

-- Reprocessing results
SELECT t.typeName, m.quantity
FROM invTypeMaterials AS m
 INNER JOIN invTypes AS t
  ON m.materialTypeID = t.typeID
WHERE m.typeID = 11577; -- Improved Cloaking Device II

UNIQ2ec105a91cdefcda-sql-0000000E-QINU

However, the actual bill of materials differs: Improved Cloaking Device II quote. Let's look at the reprocessing results of its tech 1 requirement, Prototype Cloaking Device I (typeID 11370):

-- Reprocessing results
SELECT t.typeName, m.quantity
FROM invTypeMaterials AS m
 INNER JOIN invTypes AS t
  ON m.materialTypeID = t.typeID
WHERE m.typeID = 11370; -- Prototype Cloaking Device I

UNIQ2ec105a91cdefcda-sql-00000010-QINU

They are nearly an exact match. The only difference is 10 Morphite, which is the pre-waste amount of the only base material needed to build an ICD2. As for the extra materials:

-- Extra materials and skills
SELECT t.typeName, r.quantity, r.damagePerJob, recycle
FROM ramTypeRequirements AS r
 INNER JOIN invTypes AS t
  ON r.requiredTypeID = t.typeID
WHERE r.typeID = 12104 -- Improved Cloaking Device II Blueprint
 AND r.activityID = 1; -- Manufacturing

UNIQ2ec105a91cdefcda-sql-00000012-QINU

Researching and Copying

Researching material productivity, researching time productivity, and copying are all fairly similar, and the query to get their skill and material requirements are almost identical. For the Prototype Cloaking Device I Blueprint (typeID 13000):

SELECT a.activityName, t.typeName, r.quantity, r.damagePerJob
FROM ramTypeRequirements AS r
 INNER JOIN invTypes AS t
  ON r.requiredTypeID = t.typeID
 INNER JOIN ramActivities AS a
  ON r.activityID = a.activityID
WHERE r.activityID IN (3, 4, 5) -- time, material research, copying
 AND r.typeID = 13000 -- Prototype Cloaking Device I Blueprint
ORDER BY a.activityName, t.typeName;

UNIQ2ec105a91cdefcda-sql-00000014-QINU

Personal tools