Invented in LY 363 by a pirate and spirit-talker named Leonardo, huo yao is a mixture of potassium nitrate, charcoal, and sulfur. It was originally used as a propellant for cannons, a type of weapon also invented by Leonardo. In the years since then, other weapons have been devised which also use huo yao in one way or another, such as explosive devices like petards, which might sometimes be used in conjunction with catapults. However, in 912, toward the end of the Chaos War, a quite different use was found for huo yao: still serving as a propellant, but now for fireworks, which are meant to entertain rather than destroy.
According to Leonardo, it occurred to him one day that it would be advantageous to have some sort of long distance weapon to fire at enemy ships without having to board them and fight hand to hand (or rather, sword to sword). In trying to imagine what sort of force might be used to hurtle a suitable projectile such a distance, his subword sense provided him with the words "huo yao" and "cannon." (The subword "gunpowder" also occurred to him as a synonym for huo yao, which led him to contemplate the word "gun." Cannons could be considered guns, but somehow he felt like it would be more appropriate to reserve that term more specifically for handheld weapons, which he didn't believe could be made so early in the Land's development of minismithery. Therefore, he figured it would make little sense to use the word "gunpowder" for the substance he hoped to create, and went instead with the first term he had thought of.) And so he called upon a spirit to tell him if such a thing might be done, and the spirit "pointed him in the right directions," in Leonardo's words, though it was up to Leonardo himself to discover exactly what substances to use and how to mix them. He never revealed the name of the spirit who helped guide his creation of huo yao, though centuries later, some people would wonder if it might be the same one who inspired Vanya Petard's actions in the Laser Plot.
The invention of huo yao and cannons led to the passing of the Limitation of Handheld Weaponry law in Ship in 364, and several other coastal villages over the next few years. The law was officially adopted by the entire world in 899.