Hacking the .dat file, no doubt. But if you're skilled enough to do that, then you're skilled enough to save yourself the effort of trying to mod one of the official games and instead make the scripts you want in Touhou Danmakufu.
Of course, this is assuming you want to "mod" and make your own patterns. If what you want to do is hack into the game to make the patterns easier/cheat, then allow me to simply tell you to cry some moar and go play easy modo, you elementary school child. ^_^
Butt-in by someone who has actually messed around with them. It takes a lot of tools and a lot of time to mod anything properly, and Touhou is no exception. If you really want to pursue it, then ask someone in detail who actually has experience in these kinds of things, instead of on Wikia.