OpenTaiko Documentation

Written for Version 0.6.0.0

English (United States) | English (United Kingdom) | français | 日本語 | русский | 中文(中国内地)

Introduction

Welcome to the OpenTaiko documentation page! Everything you see here is a work in progress, as we are still documenting the massive amount of info related to this game.

General

-

Gameplay

-

Charting

OpenTaiko uses the TJA format for charting songs. They can be opened with any text editor, or with a visual editor such as PeepoDrumKit. Below is a list of note types used.

Note Types

There are many notes supported by OpenTaiko. Some are commonly used in every chart, while others appear less often. Some may also be exclusive to other modes or have different behaviours.

Taiko Notes

Listed here are common note types used in Taiko mode.

ID Name Description
0 Empty

Empty space

Essential in spacing apart notes, as well as assisting in creating complex patterns.

1 Don Red note
2 Ka Blue note
3 Don (Large) Large red note
4 Ka (Large) Large blue note
5 Start of Drumroll

Drumroll

Marks the beginning of a drumroll. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

6 Start of Drumroll (Large)

Large drumroll

Marks the beginning of a drumroll. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

7 Start of Balloon

Balloon

Marks the beginning of a balloon. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

Similar to the drumroll but must be hit a certain amount within a time limit to be cleared. Balloon value is specified by the BALLOON tag.

8 End of long note Marks the end of any long note.
9 Start of Kusudama

Large balloon

Marks the beginning of a kusudama. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

Similar to the drumroll but must be hit a certain amount within a time limit to be cleared. Kusudama value is specified by the BALLOON tag.

A Don (Large - Both)

Large red note

Displays connected hands when playing a chart in multiplayer and the note appear aligned together.

B Ka (Large - Both)

Large blue note

Displays connected hands when playing a chart in multiplayer and the note appear aligned together.

Konga Notes

Listed here are common note types used in Konga mode.

Many of them are already used in Taiko mode, but a few are exclusively used in this game mode.

ID Name Description
0 Empty

Empty space

Essential in spacing apart notes, as well as assisting in creating complex patterns.

1 Right Right note
2 Left Left note
3 Double Double note
4 Clap Clap note
5 Start of Right Drumroll

Right drumroll

Marks the beginning of a drumroll. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

6 Start of Double Drumroll

Double drumroll

Marks the beginning of a drumroll. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

7 Start of Balloon

Balloon

Marks the beginning of a balloon. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

Similar to the drumroll but must be hit a certain amount within a time limit to be cleared. Balloon value is specified by the BALLOON tag.

8 End of long note Marks the end of any long note.
9 Start of Kusudama

Large balloon

Marks the beginning of a kusudama. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

Similar to the drumroll but must be hit a certain amount within a time limit to be cleared. Kusudama value is specified by the BALLOON tag.

Konga Only Notes
I Start of Left Drumroll

Left drumroll

Marks the beginning of a drumroll. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

Becomes a small drumroll in Taiko Mode.

H Start of Clap Drumroll

Clap drumroll

Marks the beginning of a drumroll. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

Becomes a large drumroll in Taiko Mode.

Miscellaneous Notes

Listed here are miscellaneous notes used in all modes.

These note types are not regularly used in normal charts. You'll typically only find them in gimmick charts.

ID Name Description
C Bomb

Bomb note

A note that players should actively avoid hitting. Breaks combo and drastically drops gauge if hit.

F Adlib

Invisible note

Appears invisible by default and is not required to be hit. If hit, a special hit sound plays.

G Kadon

Purple note

Requires the player to hit both don and ka. In Konga Mode, this appears as a Double note.

D Start of Fuse Roll

Bomb balloon

Marks the beginning of a drumroll. Use 0 to increase the length of the drumroll, and 8 to end the drumroll.

Behaves similarly to Balloon but must be broken in time. If the user fails, it will behave like a Bomb note, breaking combo and damaging his current gauge.

Skinning & Customisation

In addition to OpenTaiko's default skins, users are able to create their own skins.

Lua Scripting

OpenTaiko's Lua API allows creators to further customize their skin beyond just replacing textures and sounds, allowing for more dynamic visuals without the need to modify the game's source code. While most menus can have Lua scripts, most scripts are only suited for animating backgrounds at this time. The capabilities of the Lua API are still a work in progress and will expand in the future.

Read-only variables are also provided by OpenTaiko, allowing the creator to change the behaviour of their script based on what is happening at that moment.

Some examples of what can be done with Lua include:

Calling Functions

Calling Functions are commands that you send to OpenTaiko to execute a function.

Most of these functions are related to drawing and manipulating textures that your script imports and does not modify the game itself.

Function Input Type(s) Description
Console Drawing
func:DrawText(x, y, text); number, number, string Draws text using the skin's Console Font. (/Graphics/Console_Font.png)
func:DrawNum(x, y, num); number, number, number Draws a number using the skin's Console Font. (/Graphics/Console_Font.png)
Image Drawing
func:AddGraph(filepath); string Load an image file to be used for your script. This is mandatory for drawing functions to work on your image.
func:DrawGraph(x, y, filepath); number, number, string Draw a given image at a position.
func:DrawGraphCenter(x, y, filepath); number, number, string Draw a given image at a position, centred at the given coordinates.
func:DrawRectGraph(x, y, rect_x, rect_y, rect_width, rect_height, filepath); number, number, number, number, number, number, string

Draw a given image at a position.

A rectangle is used to specify what portion of the image you want to draw.

If a rectangle goes outside the bounds of the given image, it will loop back to continue drawing. This method can be used to repeat textures.

func:DrawGraphRectCenter(x, y, rect_x, rect_y, rect_width, rect_height, filepath); number, number, number, number, number, number, string

Draw a given image at a position, centred at the given coordinates.

A rectangle is used to specify what portion of the image you want to draw.

If a rectangle goes outside the bounds of the given image, it will loop back to continue drawing. This method can be used to repeat textures.

Image Manipulation
func:SetScale(x_scale, y_scale, filepath) number, number, string Set the scale of your image. 1.0 is the default value.
func:SetRotation(rotation, filepath) number, string Set the rotation of your image. Value is typically between 0 and 360.
func:SetOpacity(opacity, filepath) number, string Set the opacity of a given image. Value must be between 0 and 255.
func:SetColor(r, g, b, filepath) number, number, number, string Use a Multiply filter to recolour your image. All values must be between 0.0 and 1.0.
func:SetBlendMode(mode, filepath) string, string

Specify how an image should blend into the background.

Blend modes available are: "Normal", "Add", "Multi" (Multiply), "Sub" (Subtract), "Screen"

Image Information
func:GetTextureWidth(filepath) string Get the width of the loaded texture. Returns -1 if the texture is null.
func:GetTextureHeight(filepath) string Get the height of the loaded texture. Returns -1 if the texture is null.

Receiving Functions

Receiving Functions are commands that OpenTaiko sends to your script.

Some of these functions are called every frame, while others are only called when necessary. Some can also be called multiple times, mainly per player.

Function Input Type(s) Description
General
function init() - Called once when the script is first loaded. This is used to initialize data, including images.
function update() -

Called once every frame. Used to calculate and update values. Temporarily stops being called if the game is paused.

This is always called before draw().

function draw() - Called once every frame. Used to manipulate and draw images.
In-Game Only
function clearIn(player) integer

Called once when a player has reached the clear range. The player value is the player ID that has entered the clear range.

The player ID starts at 0 and ends at 4.

0 for 1P, 1 for 2P, 2 for 3P, etc.

function clearOut(player) integer Called once when a player has dropped from the clear range. The player value is the player ID that has dropped from the clear range.
In-Game Only (Kusudama)
function kusuIn() - Called once when a Kusudama sequence has started.
function kusuBroke() - Called once when a Kusudama was successfully cleared.
function kusuMiss() - Called once when a Kusudama has failed to clear before the sequence has ended.
In-Game Only (Ending)
function update(player) integer

Called every frame. Used to calculate and update values. Unlike the original function, this is called for each player ID qualified to run this script.

Can run multiple times in a single frame.

function draw(player) integer

Called every frame. Used to manipulate and draw images. Unlike the original function, this is called for each player ID qualified to run this script.

Can run multiple times in a single frame.

function playEndAnime(player) integer

Called once when a course is finished. The player value is the player ID qualified to run this script.

Can run multiple times in a single frame.

Results Only
function skipAnime() - Called once when any player skips the Results Screen animation.
Song Select Only
function playAnime() -

Called when a player on the difficulty select screen swaps between Extreme and Extra difficulty.

Animation duration is specified in the Skin Config files.

Variables

OpenTaiko gives variables with read-only values to get details about what's happening at that moment.

Some details include information about what state a player is in, while others may provide detail about the game mode status or certain application parameters.

Because these variables are already reserved, you cannot create your own variables with the same names as the ones listed below.

Variable Name Type Description
Application Information
fps integer

Gets the framerate of the application.

deltaTime decimal

Gets the amount of time that has passed since the last frame was drawn.

Non-integral, valued in seconds (i.e. 0.0166666...)

lang string

Gets the current selected language as a short string format.

(i.e. "en", "ja", "fr", etc.)

Player Information
playerCount integer Gets the current number of active players.
p1IsBlue boolean

Gets a Boolean stating if Player 1 is blue. (via selecting Right in the title menu)

1P only; Returns false if not blue, or if there are 2 or more players.

characterRarities string[]

Gets each player's Character rarity.

Possible rarities: "Poor"/"Common"/"Uncommon"/"Rare"/"Epic"/"Legendary"/"Mythical"

puchicharaRarities string[]

Gets each player's Puchichara rarity.

Possible rarities: "Poor"/"Common"/"Uncommon"/"Rare"/"Epic"/"Legendary"/"Mythical"

Player Information (In-Game)
bpm decimal[]

Gets a list of numbers for each player that tells what BPM their chart is currently on.

Can be different for each player.

gauge decimal[] Gets a list of numbers between 0-100 for each player that tells where the player is on the soul gauge.
isClear boolean[] Gets a list of Booleans for each player that tells if each player is clearing their course.
gogo boolean[] Gets a list of Booleans for each player that tells if Go-Go Time is currently active.
Gameplay Information
timeStamp decimal

Gets the amount of time in seconds that have passed since the chart has begun, beginning at the first measure.

Can be negative if the chart hasn't started yet.

Tower Information
towerNightNum decimal

Gets a number starting at 0 and going up to (but not always ending at) 1, which changes depending on how far the player has progressed through a Tower.

The source code determining towerNightNum's value is Math.Min(CurrentMeasure / Math.Max(140, MaxFloorCount / 2), 1);

AI Battle Information
battleState integer

Gets a number related to the current state of the active AI Battle, valued between -9 and 9. Default is 0.

Zero or higher number means the player is winning. Negative number means the AI is winning.

battleWin boolean

Gets a Boolean stating if the player is winning (or has won) against the AI in AI Battle.

Can also be used in the Results Screen menu.

Frequently Asked Questions

Q: Why?

A: idk