Talk:Bill of Materials
From EVEDev
This page indicates that the quantity is calculated with CEIL(...stuff...). However, I have found that not to match with the in-game blueprint bill of materials. ROUND(...stuff...) matches the in-game blueprint bill of materials. I don't know which is correct though.
ROUND() is indeed more correct. However the entire waste computation on EveDev is lacking bits here and there - it does not take into account material types and several special cases. CCP's code must be pretty messy :) --Ana
[edit] Much more difficult
Hi,
i guess it seems to be much more difficult to calculate the Material Needs for producing stuff. CCP describes to calculate the Waste the following way:
(1.25 - 0.05 * Production Efficiency Skill Level) * (1 + (Base Waste Factor / (1 + Blueprint Mineral Efficiency Level)) * Base Minerals
This Formula is almost correct, but....
I recognized, that there are different Categories of Materials needed to produce the Items. For Example there are:
Material - Category 4 - (Isogen, Mexallon, Tritanium,...)
Ship - Category 6 - (Rifter, Megathron, Obelisk,...)
Module - Category 7 - (Armor Thermic Hardener I, Ion Blaster Cannon I,...)
Commodity - Category 17 - (Phenolic Composites, Ferrogel, Sylramic Fibres,...)
Also Tools - Group 332 - (R.A.M.- Ammunition Tech,...)
and much more.
So, if i started to calculate the Bill of Materials for Building one single Hammerhead II Drone I calculated for a BPC with ME -4:
Unit Grp Cat Amnt Raw Amnt BPC ------------------------------------------------------------------------- Hammerhead II BPC 176 9 1 1 <--- Not Wasted Hammerhead I 100 18 1 1 <--- Not Wasted R.A.M.- Robotics 332 17 1 1 <--- Not Wasted Particle Accelerator Unit 334 17 1 1 <--- Not Wasted Guidance System 280 17 2 2 <--- Not Wasted Robotics 280 17 2 2 <--- Not Wasted Morphite 18 4 2 3 <--- Wasted
If you Compare, only Morphite (Category 6) is wasted, not the Other Parts.
Another Calculation is the Production of Armor EM Hardener II (one single Piece) from a BPC with ME -4:
Unit Grp Cat Amnt Raw Amnt BPC ------------------------------------------------------------------------- Armor EM Hardener II BPC 348 9 1 1 Armor EM Hardener I 328 7 1 1 R.A.M.- Armor/Hull Tech 332 17 1 1 (Damage 10%) Sustained Shield Emitter 334 17 10 10 <--- Not Wasted Tungsten Carbide Armor Plate 334 17 5 5 <--- Not Wasted Morphite 18 4 5 8 <--- Wasted Nocxium 18 4 1 2 <--- Wasted Pyerite 18 4 18650 27975 <--- Wasted Tritanium 18 4 21869 32804 <--- Wasted
So it Seems only Materials are wasted. Poorly it isn't that easy.
Another Calculation with Tech II Ammunition shows a small difference. 1 Run Devastator Fury Cruise Missiles from a BPC with ME -4 needs:
Unit Grp Cat Amnt Raw Amnt BPC ------------------------------------------------------------------------- Devastator Fury Cruise Missiles BPC 166 9 1 1 <--- Not Wasted Phenolic Composites 429 4 39 59 <--- Wasted Nuclear Pulse Generator 334 17 9 14 <--- Wasted Rocket Fuel 280 17 86 129 <--- Wasted Megacyte 18 4 35 53 <--- Wasted Mexallon 18 4 300 450 <--- Wasted Morphite 18 4 10 15 <--- Wasted Nocxium 18 4 70 105 <--- Wasted Tritanium 18 4 20080 30120 <--- Wasted
What The Hell is going on. Waste on Cat 17 for T2 Ammo, but not for T2 Modules or Drones ? Hmm. Have to analyze a little more.
Another Calculation with Tech II Ships shows the same as the ammo. 1 Run Vagabond from a BPC with ME -2 needs:
Unit Grp Cat Amnt Raw Amnt BPC ------------------------------------------------------------------------- Vagabond BPC 106 9 1 1 <--- Not Wasted Stabber 26 6 1 1 <--- Not Wasted R.A.M.- Starship Tech 332 17 12 12 <--- Not Wasted Construction Blocks 280 17 100 140 <--- Wasted Deflection Shield Emitter 334 17 300 420 <--- Wasted Electrolytic Capacitor Unit 334 17 150 210 <--- Wasted Fernite Carbide Composite Armor Plate 334 17 300 420 <--- Wasted Ladar Sensor Cluster 334 17 250 350 <--- Wasted Nanomechanical Microprocessor 334 17 150 210 <--- Wasted Nuclear Reactor Unit 334 17 150 210 <--- Wasted Plasma Thruster 334 17 100 140 <--- Wasted Isogen 18 4 552 773 <--- Wasted Megacyte 18 4 19 27 <--- Wasted Morphite 18 4 100 140 <--- Wasted
So, the realization at this Time is, that Minerals always are wasted, Tools (Commodities - Group 332) never, Ships and BPC's also never, commodities sometimes (for Ships and Ammo). I couldn't find Other Credentials with different behaviour.
If there is anybody out there, who has the exact Rule, when, which credentials are wasted and when not, I would be pleased to get an answer.
reg. Takenhoe
[edit] Query Style
Please note that explicit use of joins in a SQL query will cripple your database's ability to optimize your query. Almost all the time you are better off doing the following style of query:
select a.typeName, b.icon, ceil(c.quantity * (1+d.wasteFactor / 100)) as quantity, c.damagePerJob from typeactivitymaterials as c, invtypes as a, invblueprinttypes as d, evegraphics b where a.typeid=c.requiredtypeid and c.typeid = d.blueprinttypeid and a.graphicid = b.graphicid and c.activityid=1 and c.typeid=788;
This will allow your database to optimize best to your local environment and produce the fastest result. I kid you not when I say you may experience speed ups of several orders of magnitude by doing this. I am not exaggerating in the least, I have seen this kind of thing cause a query to run 1000 times slower than if you just let the database optimize your query properly. There are times when this is not possible such as when issuing outer joins and not using Oracle syntax, and when the optimizer can't reasonably calculate a best join order deterministically because you are joining too many tables for it to cope with. These are RARE situations for the most part. If you are doing that many outer joins, you've got a problem with your database design.
...This is utter rubbish. SQL Server is perfectly capable of optimizing a query with explicit joins in it.
[edit] Query for Raw-Materials
Takte the 200mm railgun I Blueprint. It has the typeID = 12345
But if i look into invtypematerials - i find nothing for 12345
the 200mm's productTypeId is 12344. If i query THIS value, i get the correct values needed for manufacturing.
Maybe there should be a explanation on the productTypeID and the parentBlueprintTypeID (i even dont get the point about that....)
- Ninjaedit*:
Got it: 200mm Railgun I Bluepprint produces 200mm Railgun I which requires.... 12345 produces 12344 which requires....

