phigros.tools

Cosmetics

Cosmetics take files next to the mod's file. They change how the chart looks, never what it tells the player (Skins and hit sounds).

chapter(def)

A chapter of new songs (Custom charts): { code =, title =, cover =, songs = {...} }, or one described by a manifest at a url, signed by the key: { url =, key = }.

chapter{
  code = "MyPack", title = "My pack", cover = "cover.jpg",
  songs = {
    { folder = "song", title = "Song", artist = "Composer", illustrator = "Cover artist",
      levels = { IN = { difficulty = 13.8, charter = "Me" } } },
  },
}
chapter{ url = "https://example.com/mypack/index.json", key = "<hex ed25519 public key>" }
ParameterType
deftable

hitsound(kind, file)

Any sound Android plays, for tap (also holds), drag or flick.

hitsound("tap", "tap.ogg")
hitsound("flick", "flick.wav")
ParameterType
kind"tap"|"drag"|"flick"
filestring

skin.note(kind, source)

A note's picture, scaled to fit inside the game's note (a hold's body is as wide and stretched over the hold), or the Sprite itself, made from the game's. tap_multi... is for notes hit together.

skin.note("tap", "tap.png")
skin.note("tap_multi", "tap-gold.png")
skin.note("drag", function(game) return image("drag.png") end)
ParameterType
kind"tap"|"drag"|"flick"|"hold_head"|"hold"|"hold_tail"|"tap_multi"|"drag_multi"|"flick_multi"|"hold_head_multi"|"hold_multi"|"hold_tail_multi"
sourcestring|fun(game: Unity): Unity

skin.stretch(texture, y, height, rows)

A texture of rows rows from the height rows over row y of another, for a hold's body as high as the game's.

local body = skin.stretch(phigrospp.texture(phigrospp.read(phigrospp.dir() .. "hold.png")), 40, 8, 512)
ParameterType
textureUnity
yinteger
heightinteger
rowsinteger

Returns Texture2D

skin.effect(file, options)

The hit effect: frames from the top left, each scale times as wide as the game's, tinted, with or without the game's sparks.

skin.effect("hit.png", { columns = 8, rows = 4, seconds = 0.5, scale = 1, perfect = "#ffec9f", good = "#b4e1ff", sparks = false })
ParameterType
filestring
options{ columns: integer, rows: integer, seconds: number, scale?: number, perfect?: string, good?: string, sparks?: boolean }

skin.line(colours)

Judge line colours, the chart keeps its alpha.

skin.line({ ap = "#ffd27f", fc = "#7fd4ff", normal = "#ffffff" })
ParameterType
colours{ ap?: string, fc?: string, normal?: string }