Songs and the player
Song
| Field | Type | |
|---|---|---|
id | string | |
name | string | |
composer | string | |
illustrator | string | |
charts | table<Difficulty, { constant: number, charter: string, cover: boolean }> | cover: the level has its own illustration |
cover | Difficulty? | the level whose illustration stands for the song, when each level has its own |
Record
| Field | Type | |
|---|---|---|
id | string | |
difficulty | Difficulty | |
score | integer | |
accuracy | number | |
fc | boolean |
songs()
Every song of the game.
print(#songs()) --> 329 for _, s in ipairs(songs()) do if s.charts.AT then print(s.name, s.charts.AT.constant) end end
Returns Song[]
song(id)
A song of the game, nil for none.
local s = song("Glaciaxion.SunsetRay.0") print(s.name, s.composer, s.charts.IN.constant) --> Glaciaxion SunsetRay 12.6
| Parameter | Type | |
|---|---|---|
id | string | "Glaciaxion.SunsetRay.0" |
Returns Song?
phigrospp.unlocked(id, difficulty)
Whether the player can play a chart of the game: they have it unlocked.
print(phigrospp.unlocked("Glaciaxion.SunsetRay.0", "IN")) --> true
| Parameter | Type | |
|---|---|---|
id | string | |
difficulty | Difficulty |
Returns boolean
phigrospp.play(id, difficulty, mods?, seed?)
Starts a chart of the game from any screen as its song list does, with these modifiers (none when left out) instead of the player's picks.
button("Play a random IN", function() local list = songs() local s = list[math.random(#list)] if phigrospp.unlocked(s.id, "IN") then phigrospp.play(s.id, "IN") end end)
| Parameter | Type | |
|---|---|---|
id | string | |
difficulty | Difficulty | |
mods? | integer | |
seed? | integer |
rks()
The player's RKS, 0 until the game computes it.
print(rks()) --> 11.32875919342
Returns number
language()
"english"...
print(language()) --> english
Returns string
phigrospp.tag()
The player's "name#0042" on phigros.tools, nil without a profile.
print(phigrospp.tag()) --> ggmolly#4141
Returns string?
records()
Every chart the player has a record on, read from the save.
local r = records()[1] print(r.id, r.difficulty, r.score, r.accuracy, r.fc) --> Glaciaxion.SunsetRay.0 EZ 1000000 100.0 true
Returns Record[]
appearance()
The avatar and background the player picked, "" for the game's.
local look = appearance() print(look.avatar, look.background) --> ClassMemories.AntistarfeatCtymax.0
Returns { avatar: string, background: string }
grade(score, fc)
The game's letter for a score: "φ", "V", "S"... "F".
print(grade(996761, true)) --> V print(grade(935000, false)) --> S print(grade(1000000, true)) --> φ
| Parameter | Type | |
|---|---|---|
score | integer | |
fc | boolean |
Returns string