Site Logo

Sparen's Danmakufu ph3 Tutorials Lesson 2 - Running and Using Danmakufu

Another video to feast your eyes on, this time Arby26's Mima! #FREEMIMA

Part 1: How do I Open Danmakufu?

We will begin this lesson with notes on how to run Danmakufu. For ph3 (after [.1 pre2]), just double click the executable (th_dnh.exe). For versions of Danmakufu before ph3 [.1 pre2], you needed to use Japanese Locale to open Danmakufu or it wouldn't work correctly (0.12m would crash, ph3 would not load any of the scripts). However, there are plenty of resources for that on Rika and Nitori's Garage Experiments (RaNGE), so I won't cover that.

If you use Wine on Mac or Linux to run Windows programs, use the following:

LANG="ja_JP" wine th_dnh.exe

This will run it under Japanese Locale (the equivalent of using AppLocale on Windows)

In Danmakufu's folder is also a DnhViewer.exe. This is sort of like the main exe except that some debug keys (such as I for invincibility) are available. I personally never use this, but it's up to you whether or not you wish to use it. There is also a config.exe for configuration options. The main usage of this is to activate the Log Window, although that will be discussed in a much later tutorial.

Part 2: How do I Navigate through Danmakufu's Menus?

Danmakufu opens with its title stating the version of Danmakufu being run. There are 7 options in ph3 and a FPS meter in the bottom right - this FPS meter is very important, so please take note of it when scripting. It's not a big deal in the Danmakufu menus, but in-game, it is an important measure of how efficiently your script runs.

The options on Danmakufu's Main Menu are as follows:

  • All: Displays every executable file Danmakufu can find in the 'script' directory - this is rarely a good option to click, and can actually stack overflow if you have a lot of scripts and not much RAM.
  • Single: Displays every single Danmakufu can find in the 'script' directory
  • Plural: Displays every plural Danmakufu can find in the 'script' directory
  • Stage: Displays every stage Danmakufu can find in the 'script' directory
  • Package: Displays every package Danmakufu can find in the 'script' directory
  • Directory: Enters the script directory via Danmakufu, and allows you to navigate around. You should be using this option.
  • Quit: Quit Danmakufu

In Danmakufu's menus, use Z to select and X to cancel. Use the arrow keys to navigate.

Regardless of the option (except for Quit), you will be taken to a new menu listing your scripts. In the bottom half will be the relative path from inside the script directory to the executable file (in red), the type of file (in purple), text (will be covered in a later tutorial), and perhaps an image (also covered in a later tutorial). Hit Z to select. You will be given options to play and to run replays if you have them. Replays are stored in the 'replay' directory inside a script folder.

If in Directory, there will be a path to the directory you are currently in on the top, and you select a directory (marked red) to enter it. Note that only scripts recognized by Danmakufu will show up as blue executables.

After selecting 'Play' you will be brought to a player selection scene. Select your player and you're off!

Note that if you add a file to a script folder, Danmakufu will load it once you reenter the directory. However, if you remove a player script after loading Danmakufu, the option for that player script will still be there, and it will bring up an error when selected (tested ph3 [.1 pre4a]). As a result, you must quit and restart Danmakufu in order to refresh the list of players.

Part 3: How do I Play Scripts in Danmakufu?

In Danmakufu, like standard Touhou, you can shoot, bomb, focus, and pause, among other things. However, ph3 allows scripters to add custom virtual keys, and there are two user-defined keys, C and V. The most commonly used keys are as follows:

  • Z: Press this to shoot (if enabled), select
  • X: Press this to bomb (if enabled), cancel
  • Shift: Press this to focus
  • Ctrl: Press this to fast forward - helpful in testing and in replays
  • Esc: Press this to pause

Note that in user-made menus such as those in packages, it is possible for a scripter to assign completely different keys to select/cancel and the like. However, the standards are Z for select and X for cancel.

Quiz: Running Danmakufu

Remilia wants to play a Danmakufu script. However, she only knows the name of the directory - "MeowMeowVampire," and she has at least 60 folders in her 'script' directory. Which option should she choose to find the script she wants?

A. All
B. Quit
C. Directory

Sources and External Resources

[5] Touhou Danmakufu ph3 Tutorial - Using Wine to Run Touhou Games (Sparen)
-->My video tutorial on how to use Wine to run Touhou Danmakufu on MacOSX