- Return to Touhou Danmakufu: Functions
- Return to Touhou Danmakufu: Common Functions
Common Data Functions
Functions to manage the common data. The common data can be shared beyond scripts.
SetCommonData
Set the value to the common data.
2 Parameters
1) name of the common data
2) value
GetCommonData
Get the value from the common data.
1 Parameter
1) name of the common data
Return value
value
("NoData", if the common data doesn't exist)
GetCommonDataDefault
Get the value from the common data. If the common data doesn't exist, the default value (2nd argument) is returned.
2 Parameters
1) name of the common data
2) default value
Return value
value
ClearCommonData
Delete all the common data.
DeleteCommonData
Delete the common data.
1 Parameter
1) name of the common data
SaveCommonData
Save all the common data to file ".\xxx_save.dat".
LoadCommonData
Load all the common data from file ".\xxx_save.dat".
Debug Functions
Functions for debugging. These functions cannot be used on fullscreen mode. These functions should be removed before the script is released.
CreateDebugWindow
Show the debug window. The debug window shows various debug information.
OutputDebugString
Output user-defined debug information to the debug window. This function is ignored when the debug window is not shown.
3 Parameters
1) line number (about 0 ~ 10?)
2) output string
3) output value
Miscellaneous Functions
DeleteAllEnemyWithoutBoss
Deletes all enemies, with the exception of the current boss.
SetPlayerInvincibility
Make player's character invincible for the frames. The invincibility is not cumulative. If player already has invincibility for x more frames, and this function is called with argument y, then the player will have invincibility for Max(x,y) more frames, where Max(x,y) is the larger of x and y. However, if this function is called with argument 0, it cancels any existing invincibility.
1 Parameter
1) frames
ExtendPlayer
Extend the player's lives. Negative values are allowed. This function cannot be run in @Initialize
1 Parameter
1) extra player's lives
SuperNaturalBorder
Spread out the supernatural border for the frames.
1 Parameter
1) frames
ShootDownPlayer
Kills the player.
SetEffectLayer
Sets the layer for certain graphic effects. Currently only works with Concentration01 and Concentration02
1 Parameter
1) The layer to set it to
0 - background
1 -
2 - enemy
3 - player (the default layer)
4 - item
5 - bullet
6 - conversation event graphics
7 -
8 - border (when using this, redrawing the border can become very expensive)
CollectItems
Collect all the items.
AddScore
Add score.
1 Parameter
1) score
AddPoint
Add points.
1 Parameter
1) number of point items
AddGraze
Add times of grazing.
1 Parameter
1) times of grazing
AddBomb
Add bombs.
1 Parameter
1) bombs
SetLifeZeroToAllEnemy
Sets all enemies' life values to zero.
SetAllowedContinueCount
Set the allowed times to continue.
1 Parameter
1) continue count
SetRateScoreSystemEnable
Determines whether or not to use the Rate scoring system (which is enabled by default).
1 Parameter
1) true to enable the Rate system, false to disable it.
SetDefaultStatudVisible
Determines whether or not the regular status information (score, point items, lives, etc.) are shown
1 Parameter
1) true to show the information, false to hide it.
SetNormPoint
Set the norm points. If a negative value is set, the norm is not displayed.
1 Parameter
1) norm
ForbidShot
Forbid to shoot.
1 Parameter
1) true : forbid
false: allow
ForbidBomb
Forbid to bomb.
1 Parameter
1) true : forbid
false: allow
Slow
Slows everything down.
1 Parameter
1) 0 is normal speed, 1 is 1/2 speed, 2 is 1/3 speed, ...
SaveSnapShot
Saves a snapshot of the given area to a file.
5 Parameters
1) The file name to save to
2) Left-most x value
3) Upper-most y value
4) Right-most x value
5) Lowest y value
AddArchiveFile
Add the archive file to the searching list. This list is used on searching images or sounds.
1 Parameter
1) path of the archive (string)
RaiseError
Show error dialog and abort the script.
2 Parameters
1) body text (string)
2) caption (string)
assert
Assert that the condition is true. If not, an error is caused.
2 Parameters
1) condition
2) text (string)
GetVersion
Get the version of Touhou Danmakufu.
Return value
version (string)
- Return to Touhou Danmakufu: Functions
- Return to Touhou Danmakufu: Common Functions