API and more

Constants

These do not change during play.

Name
Description

SCX

SCREEN_CENTER_X

SCY

SCREEN_CENTER_Y

SW

SCREEN_WIDTH

SH

SCREEN_HEIGHT

SL

SCREEN_LEFT

SR

SCREEN_RIGHT

ST

SCREEN_TOP

SB

SCREEN_BOTTOM

DW

Display width.

DH

Display height.

IH

Intended height (Check settings.ini).

SONG

Current Song object.

SONG_POS

Song Position object.

SONG_ROOT

Song root folder(/Songs/Pack/Song/)

SRC_ROOT

Source root folder (/Songs/Pack/Song/src).

__version

Template version.

Variables

These may vary between plays or change during play.

Name
Description

Style

Current Style from GameState.

Actors

Table containing all Actors (ex. Actors.P1 for Player 1).

Options

Table containing PlayerOptions for all players.

Charts

Table containing charts for song.

Profiles

Table containing profiles for machine and players.

States

Table containing PlayerState for all players.

Players

Table containing the shorthand player number for all players (ex. Players[1] = "P1"). The first index in the table is not guaranteed to be Player 1, but rather the first human player in numerical order.

Functions

These are functions that are callable in the Ichigo environment.

Name
Description

run "file.lua"

Run a file within /src.

include "file"

Include a file within /include.

setting(category, setting, default)

Get a setting from the specified category in settings.ini. If no value is found, writes default to the specified setting.

Hooks

These are user-defined functions that reside within main.lua or other scripts ran using the run function.

Name
Description

init()

Called after running main.lua.

ready()

Called after all Actors are created.

update(params)

Called on each frame. params include: - dt: time since last frame - beat: current beat - time: current time Only implement if necessary.

input(event)

Called on user input. Only implement if necessary. Anatomy of an event available here.

draw()

Called on every draw. Only implement if necessary.

Provided Libraries

These are libraries that come standard with the Ichigo template.

File
Name

std.lua

The Ichigo Standard library

class.lua

The Ichigo Class library

Provided Headers

These are headers that come standard with the Ichigo template.

Name
Description

gizmos

Allows simple creation of Actors using wrapper-like Gizmos.

Last updated

Was this helpful?