Docs · tally

tally

5 tally commands, generated from the engine's own registry — signatures, parameters and a worked example each. A does something command acts on the game; a needs x() one answers a confident wrong answer when its client hooks are missing.

bump does something returns int
bump(name: string) -> int

Adds one to a named counter and answers the new total. The counter starts at zero.

ParameterTypeWhat it does
namerequired string the counter to raise
Example
let logs = bump("logs")  print(logs)
bumpBy does something returns int
bumpBy(name: string, amount: int) -> int

Adds an amount to a named counter and answers the new total.

ParameterTypeWhat it does
namerequired string the counter to raise
amountrequired int how much to add; may be negative to subtract
Example
let coins = bumpBy("coins", 250)  print(coins)
clearTally does something
clearTally(name: string)

Resets a named counter back to zero.

ParameterTypeWhat it does
namerequired string the counter to reset
Example
clearTally("logs")
setTally does something
setTally(name: string, value: int)

Sets a named counter to a value outright, rather than adding to it.

ParameterTypeWhat it does
namerequired string the counter to set
valuerequired int the value to set it to
Example
setTally("logs", 0)
tally returns int
tally(name: string) -> int

The current value of a named counter, or zero when it has never been bumped.

ParameterTypeWhat it does
namerequired string the counter to read
Example
print("logs so far", tally("logs"))