Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add white phosphorus and related recipes #74599

Merged
merged 7 commits into from
Jun 20, 2024

Conversation

Rocket-F-1024
Copy link
Contributor

Summary

Content "Add white phosphorus and related recipes"

Purpose of change

Regarding adding recipes for extracting phosphorus from bones, I've covered this in a previous issue.(#73298)
In addition, the weight of red phosphorus is greatly underestimated based on the code's description of its density.

Describe the solution

Add white phosphorus.
Add recipes that use bones to extract white phosphorus.
Add recipes for using white phosphorus to make smoke bombs and red phosphorus.
Fixed the weight of red phosphorus.
Removed the previous recipe for making red phosphorus using matches due to the much higher weight of red phosphorus making it too costly (about 300+ matchboxes needed).

Describe alternatives you've considered

Maybe keep the recipe for making red phosphorus using matchboxes - it's not unfeasible after all, it just requires a lot of ingredients.

Testing

Go into the game, check the recipe and item, and all is well.

Additional context

None,

Add a recipe for making smoke bombs using white phosphorus
Modify the recipe for red phosphorus and add a recipe for producing white phosphorus
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Spawn Creatures, items, vehicles, locations appearing on map astyled astyled PR, label is assigned by github actions labels Jun 16, 2024
data/json/recipes/recipe_medsandchemicals.json Outdated Show resolved Hide resolved
data/json/recipes/recipe_medsandchemicals.json Outdated Show resolved Hide resolved
data/json/recipes/weapon/explosive.json Outdated Show resolved Hide resolved
Rocket-F-1024 and others added 3 commits June 17, 2024 00:46
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions and removed json-styled JSON lint passed, label assigned by github actions labels Jun 16, 2024
@kevingranade
Copy link
Member

Please link the sources you say you consulted to determine this is viable.

@Rocket-F-1024
Copy link
Contributor Author

Rocket-F-1024 commented Jun 17, 2024

Please link the sources you say you consulted to determine this is viable.

The theory of the reaction comes from the phosphorus wiki page (https://en.wikipedia.org/wiki/Phosphorus), which also mentions that for a while in history, bone ashes were the main raw material for producing phosphorus.
2Ca3(PO4)2+6SiO2+10C=6CaSiO3+P4+10CO

@Rocket-F-1024
Copy link
Contributor Author

Well, so is this PR accepted or rejected?

@Maleclypse
Copy link
Member

Well, so is this PR accepted or rejected?

Not a chemistry major here so I'm having some difficulty translating
"bone ashes were the main raw material for producing phosphorus.
2Ca3(PO4)2+6SiO2+10C=6CaSiO3+P4+10CO"

into the ratios you used in the recipe. Can you provide a little more detail that helps me understand?

@Rocket-F-1024
Copy link
Contributor Author

Rocket-F-1024 commented Jun 20, 2024

Well, so is this PR accepted or rejected?

Not a chemistry major here so I'm having some difficulty translating "bone ashes were the main raw material for producing phosphorus. 2Ca3(PO4)2+6SiO2+10C=6CaSiO3+P4+10CO"

into the ratios you used in the recipe. Can you provide a little more detail that helps me understand?

The chemical formulas above are a bit rough, so I will write them in a more standardized format below for a better explanation:
2Ca₃(PO₄)₂+6SiO₂+10C = 6CaSiO₃+P₄+10CO
This chemical formula means that the reaction of 10 moles of calcium phosphate(Ca₃(PO₄)₂), 6 moles of silica(SiO₂), and 10 moles of carbon(C) produces 6 moles of calcium silicate(CaSiO₃), 1 mole of white phosphorus(P₄), and 10 moles of carbon monoxide(CO).

A mole is a unit of amount of substance. If you say that a substance is one mole, it means that the substance contains one Avogadro's constant of particles (equal to about 6.02 x 10²³), including molecules, atoms, etc. A 10 mole of carbon, for example, means that the carbon contains 10 times Avogadro's constant of carbon atoms. For example, a 10-mole portion of carbon means that the carbon contains 10 times Avogadro's constant of carbon atoms, and a 6-mole portion of silica means that the silica contains 6 times Avogadro's constant of silica "molecules" (in fact, silica does not contain individual silica molecules, but atomic crystals, but for convenience they are treated as molecules here). it is treated as a molecule here)

We already know the amounts of the different substances needed for the reaction, the next step is to find the masses of the different substances needed. In order to find this mass, we need to know the relative atomic mass or relative molecular mass of the different substances, that is, how much a mole of these substances weighs. For example, if we want to calculate the relative molecular mass of calcium phosphate (Ca₃(PO₄)₂), then we need to first look up the relative molecular masses of the calcium atom (Ca), the phosphorus atom (P), and the oxygen atom (O), which are approximately 40, 31, and 16, respectively, so the relative molecular mass of calcium phosphate would be 40 * 3 + 31 * 2 + 16 * 4 * 2=310, that is, one mole of calcium phosphate is about 310g, and so on, to find out the relative atomic mass or relative molecular mass of the other substances, and then into the chemical formula to find their mass.

The final calculation is that we need about 37g of calcium phosphate, 22g of silicon dioxide, and 7g of carbon, which will ultimately produce 7.5g of white phosphorus (with the other components omitted), whereas the bone meal is about 60-70% calcium phosphate, and the sand is about 90% or more silicon dioxide, and then, based on the mass of each of the items in the game, we ultimately arrive at the fact that we need about 1 bone meal, 3 sand, and 7 carbon to produce 1 white phosphorus

@Maleclypse Maleclypse merged commit f1b4459 into CleverRaven:master Jun 20, 2024
19 of 24 checks passed
@toweroglass
Copy link

This actually appears to have removed the recipe to make red phosphorus from matchbooks that was implemented on the 12th... making red phosphorous from matches was already removed.

@kevingranade
Copy link
Member

Also from the wikipedia page you linked:

Bone ash was the major source of phosphorus until the 1840s. The method started by roasting bones, then employed the use of [fire clay](https://en.wikipedia.org/wiki/Fire_clay) [retorts](https://en.wikipedia.org/wiki/Retorts) encased in a very hot brick furnace to distill out the highly toxic elemental phosphorus product.[[54]](https://en.wikipedia.org/wiki/Phosphorus#cite_note-54) Alternately, precipitated phosphates could be made from ground-up bones that had been de-greased and treated with strong acids. White phosphorus could then be made by heating the precipitated phosphates, mixed with ground coal or [charcoal](https://en.wikipedia.org/wiki/Charcoal) in an iron pot, and distilling off phosphorus vapour in a [retort](https://en.wikipedia.org/wiki/Retort).[[55]](https://en.wikipedia.org/wiki/Phosphorus#cite_note-threlfall-v-55) [Carbon monoxide](https://en.wikipedia.org/wiki/Carbon_monoxide) and other flammable gases produced during the reduction process were burnt off in a [flare stack](https://en.wikipedia.org/wiki/Gas_flare).

So basically I'll be pulling the recipe, it needs to be MUCH more involved.

kevingranade added a commit that referenced this pull request Jul 12, 2024
It's possible to do but is much more involved than this recipe makes it
Maleclypse added a commit that referenced this pull request Jul 13, 2024
Remove the white phosphorous recipe added in #74599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [JSON] Changes (can be) made in JSON Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants