=Updated as more information was added to the comments=
You need skills + bpc + datacores + decryptors + invention slot.
Run the numbers, for instance.
Onyx requires:
Moa BPC ~ 100k
Caldari Starship Engineering x 8 ~ 1M6
Mechanical Engineering x 8 ~ 3M2
I'm assuming all the required skills are at level 4 for these calculations.
And lets say you're using Tuning instructions which will raise your chance of success a bit, and get ME to an acceptable level ~ 8M
Total materials required ~13Million
Calculate how likely it is that invention will work Chruker Invention Calculator.
Divide material cost by chance as a fraction 13M/.3318, so thats a cost of 39Million to produce the T2 Ship BPC.
Without the decryptor its still ~16M for a single run with ME -4 PE -4
which to my mind isn't worth doing as you can buy the ship for less than the materials cost on the markets if you try manufacturing with lousy ME.
The other thing to consider is opportunity lost, even if you source some/all the materials yourself how much could you have made just by selling the necessary raw materials and doing something more profitable with your time instead?