-
Notifications
You must be signed in to change notification settings - Fork 14
Leaderboard Functions
leaderboard(title, description, start, cancel, submit, value, format="VALUE", lower_is_better=false, id=0, set=0)
Defines a leaderboard. title and description must be strings.
start, cancel, and submit are trigger expressions similar to the achievement's trigger parameter.
value is a memory accessor, arithmetic expression, or a function that evaluates to a memory accessor or arithmetic expression. Multiple values may be defined by encasing them in a max_of(a, b, ...) function.
format is one of the following:
-
VALUE- number (default) -
SECS- the value is a number of seconds that should be formatted asMM:SS -
FRAMES- the value is divided by 60 and displayed asMM:SS -
POINTS- the value should be displayed as a zero-padded six digit number -
MILLISECS- the value is a number of hundredths of a second and will be displayed asMM:SS.FF -
MINUTES- the value is a number of minutes that should be formatted asHHhMM -
SECS_AS_MINS- the value is a number of seconds that should be formatted asHHhMM -
FLOAT1...FLOAT6- the value is formatted to N digits after the decimal (FLOAT1 = 1 digit after the decimal, FLOAT3 = 3 digits after the decimal, etc). -
FIXED1...FIXED3- the value is formatted with a decimal point N spaces from the end (FIXED1 = 1 digit after the decimal). -
TENS,HUNDREDS,THOUSANDS- the value is padded with additional 0s after the end of the value.
if lower_is_better is true, lower scores will be ranked higher in the leaderboard.
if id is provided when calling the leaderboard function, the script will generate a local leaderboard definition that the toolkit will merge into the existing leaderboard instead of putting as a separate local leaderboard.
set specifies the unique identifier of the achievement set the leaderboard should be partitioned into.