Site Logo

Sparen's Danmakufu ph3 Tutorials Lesson 1 - Introduction, Downloading Danmakufu

First thing's first - at the start of each lesson, I will be including a video of someone's Danmakufu work in ph3. Sometimes it may be related to the content of the lesson, but sometimes it may not be. These videos are meant to show the possibilities Danmakufu has to offer. I will also have checkpoints and other things that you may find helpful, such as videos describing certain phenomena and resources for Danmakufu and Computer Programming in general.

Part 1: What is Danmakufu

Touhou Danmakufu is a program for Windows (you can run it on MacOSX and Linux distros using Wine, but it may not work the way you want to) that allows people that are usually referred to as 'danmakufu scripters' to create danmaku patterns similar to those in the Touhou Project games and other shooters. It provides a multitude of built-in functions for you to use, and although it is very limited in terms of what it can be used for in that it was designed to handle Touhou-esque shooters, it is nevertheless possible to make Danmakufu do what you want within those surprisingly flexible limits. HRtP style games (Highly Responsive to Prayers - the first Touhou game) and things such as Visual Novels are very much possible with the existing Danmakufu framework.

For all of these tutorials, please note the following:

let str = "This is code in Danmakufu.";

You write scripts in Danmakufu by typing code into plain text files. You may want to use .dnh extensions on your files for text highlighting services described later on in this lesson and for a variety of other purposes.

Part 2: What is this Tutorial?

This tutorial aims to cover everything from the very basics to moderately advanced concepts in both Danmakufu and Computer Science, and will have resources in regards to graphical editing and Audacity. I highly suggest doing these tutorials in a relative order - within a unit, do each lesson one at a time, and make sure that you understand the topics covered in a previous lesson before moving on to the next. In the end, the one who will learn this language is you, and this tutorial is simply one of the many resources meant to assist you in learning basic Danmakufu Ph3.

But wait! Haven't I already made Danmakufu Tutorials before? Like at this website?

The answer is yes. However, those tutorials are relatively poor quality and are for Danmakufu 0.12m.

For this tutorial, I assume that you know what Touhou is and what Bombs/Continues/Replays/etc are. If you do not know these things, you may want to visit this page on the aforementioned 0.12m tutorials site. Please note that there are significant differences between 0.12m and ph3, and that ph3 does not baby you by doing all of the background stuff for you - you need to do it yourself in ph3, but at the same time, it is far less limiting and, as stated earlier, you can do nearly anything (within reason) using ph3.

Please note that on the left menubar, there are two links of great importance. One is a link to the Danmakufu Wiki - please bookmark this, as it is exceptionally helpful. The other is a direct link to the English Documentation which, although incomplete in some areas, should be immensely useful.

Part 3: What Other Resources can I Use?

This is one of a plethora of resources you can use to learn Danmakufu. Please note that 0.12m and ph3 are quite different, so take caution when using 0.12m code, as it may not port directly into ph3. Please visit this thread in order to read on ZUN's fan creation guide and how to use AppLocale (for those who want to run 0.12m and versions of ph3 before ph3[.1 pre2])

Also note the Sublime Text package for syntax highlighting. Drake and I have been working on this for a while, and this is one of the reasons to use the .dnh format - Sublime Text will recognize this extension if you have installed the package, and will automatically suggest functions, provide partial documentation, and more. Sublime's free trial lasts forever (as far as I know), so please do use it. Directions are provided in this thread. For other software recommendations, see Danmakufu Software Recommendations.

Of course, the Danmakufu Wiki not only has functions and the like - it also contains links to other tutorials and guides, which I will refer to and link to very often in this tutorial, as my style may not always be the most helpful for some learners. You should be able to find this on your own - if you can't, you'll eventually find it. (the same logic applies to errors - you need to be able to find them on your own sometimes, and you will usually facepalm/facedesk/facecomputer (please don't do this), or do something else when you realize how stupid the error was).

A final note is about Bulletforge. This is a site where you can upload your scripts for the entire world to see. Just be aware of a few things:

  • Plagiarism is not tolerated. Do not use code without permission and citation unless the creator of such code has given explicit permission.
  • Before uploading to Bulletforge, have someone else test your script and make sure it works, especially if you're submitting something for a contest.
  • Download awesome scripts - the code may be a mess, but if you can understand how someone's code works, then that will give you a better understanding of how to make your own patterns. However, do not use their code, as that is plagiarism and often results in problems when that code does not work the way you want it to. Rule of thumb is to not use code you do not understand.
  • Play those awesome scripts you have downloaded and give feedback!

For more information on Bulletforge, check out this page.

Part 4: How do I Download Danmakufu?

The official download link for Touhou Danmakufu ph3 is located here. For future reference, you can also click "Download Ph3" on the Danmakufu Wiki's Main Page, which will bring you to this site.

Of course, everything is in Japanese, but don't let that confuse you. Click the link for the most recent version, which should be in the upper left. The right column is the changelog.

Download for Touhou Danmakufu ph3

Once you have done this, Danmakufu will begin downloading.

Please note: Once downloaded, you should label the version of Danmakufu you have - if there is an update, you may have to download a new version of Danmakufu, and stating the version in the name of the directory makes it easier to tell if you have the latest version.

Part 5: How do I Install Scripts?

In order to install scripts, you must first do the following:

  • Check if the script comes prepackaged with Danmakufu. If so, run the executable it comes with.
  • Otherwise, check if the script is for 0.12m or ph3. Scripts will not work in the other version.
  • If ph3, note which version it is optimized for. This should be either in the Bulletforge Description, somewhere obvious, or in a ReadMe file. Note that not all scripters state which version of ph3 their script is for - simply run it in the latest version if this is the case.
  • If it is for a newer version, update. If for an older version, you should be able to run it just fine with your newer version of ph3, with a few exceptions (Experiment 354 is the best example of these exceptions - they will not run in ph3 [.1] so you must download ph3 [.0], better known as ph3 [.0 pre23]. This will allow you to run the script.

For scripts not packaged with danmakufu, place non-player scripts directly in the script folder in your main Danmakufu directory. In 0.12m, place player scripts into the player directory - in ph3, the player directory is located inside your script directory.

Part 6: How do I Update Danmakufu?

To update Danmakufu ph3, download the newest version, and then do the following:

  1. Open the 'script' directories of the old and new versions.
  2. Move all non-default files (default folders are 'sample', 'default_system', and 'ExRumia'. The 'player' directory also contains default files) to the new version's 'script' directory.
  3. Now enter the player directories of both versions. Do the same as you did with the script directory. The 'default_player' is the default folder here.

I suggest not copying the default folders of the old version into the new version simply because the new version may have new stuff that you are better off not overwriting, such was when shaders were introduced and suddenly the new sample folder had a number of new files.

Quiz: Can you run ph3 scripts in 0.12m?

A. Yes
B. No