Progression
constProgression:object
Defined in: server/api.d.ts:7316
The game’s skills, stats and perks, and the rules this server puts on how players move along them.
Type Declaration
Section titled “Type Declaration”blockedPerks
Section titled “blockedPerks”
readonlyblockedPerks:string[]
The perks this server blocks.
nativeXp
Section titled “nativeXp”
readonlynativeXp:boolean
Whether players’ own games may earn XP. See setNativeXp.
blockPerks()
Section titled “blockPerks()”blockPerks(
perks):void
Makes perks unobtainable: the perk screen’s learn is refused, the game’s own grants are turned down on every client, and a report carrying one is rejected. player.addPerk still works.
Parameters
Section titled “Parameters”string[]
Perk names or GUIDs.
Returns
Section titled “Returns”void
Nothing. Throws for an unknown perk.
findPerk()
Section titled “findPerk()”findPerk(
query):PerkInfo|null
Looks a perk up.
Parameters
Section titled “Parameters”string
A perk’s name, as the game’s perk tables spell it, or its GUID.
Returns
Section titled “Returns”PerkInfo | null
What the tables say about it, or null for a name they do not carry.
perks()
Section titled “perks()”perks(
filter?):PerkInfo[]
Lists the game’s perks: 945 of them, most of them hidden system perks. Progression.perks({ visibleOnly: true }) is the perk screen.
Parameters
Section titled “Parameters”filter?
Section titled “filter?”track keeps the perks one tree pays for – a track name, or main; visibleOnly keeps the perks the perk screen shows.
track?
Section titled “track?”string
visibleOnly?
Section titled “visibleOnly?”boolean
Returns
Section titled “Returns”PerkInfo[]
The perks, sorted by name.
setLevelCap()
Section titled “setLevelCap()”setLevelCap(
track,level):void
Stops a track at a level. Gains close to it are granted exactly what is left, so no multiplier carries the track past it. player.setLevel and player.addXp can still go beyond: the cap rules over what is earned.
Parameters
Section titled “Parameters”string
A track name, or * for every track.
number
The highest level XP from play may reach, at most the game’s own 30.
Returns
Section titled “Returns”void
Nothing.
setNativeXp()
Section titled “setNativeXp()”setNativeXp(
enabled):void
Switches off XP from play. Every gain the game produces is dropped on the player’s own client, and only player.addXp and player.setLevel move a track – for servers where progression comes from jobs, trainers or quests a resource runs.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
False to stop players’ own games from earning XP at all.
Returns
Section titled “Returns”void
Nothing.
setXpBudget()
Section titled “setXpBudget()”setXpBudget(
track,xpPerMinute):void
Limits how fast a track can be ground. The budget holds a minute’s worth and refills steadily, so a burst after a quiet spell goes through and a loop – two players sparring for sword XP, a lock picked over and over – runs dry. player.addXp is not limited.
Parameters
Section titled “Parameters”string
A track name, or * for every track.
xpPerMinute
Section titled “xpPerMinute”number
How much XP a player may earn on the track per minute, before multipliers. 0 is unlimited.
Returns
Section titled “Returns”void
Nothing.
setXpRate()
Section titled “setXpRate()”setXpRate(
track,rate):void
Scales the XP players earn by playing. Applied before the player’s own perk multipliers, which still work as they do in single player. player.addXp is not scaled.
Parameters
Section titled “Parameters”string
A track name, or * for every track.
number
What a gain is multiplied by before it is granted: 1 is the game’s own pace, 0.5 half, 0 none at all.
Returns
Section titled “Returns”void
Nothing.
tracks()
Section titled “tracks()”tracks():
TrackInfo[]
Every skill and stat a player levels: the fifteen skills the character sheet shows, then strength, agility, vitality, speech and prestige.
Returns
Section titled “Returns”The tracks, in that order.
unblockPerks()
Section titled “unblockPerks()”unblockPerks(
perks):void
Lifts blockPerks.
Parameters
Section titled “Parameters”string[]
Perk names or GUIDs.
Returns
Section titled “Returns”void
Nothing. Throws for an unknown perk.
xpForLevel()
Section titled “xpForLevel()”xpForLevel(
track,level):number
The total XP a track costs from level 0 to level, on the game’s own curve: each level costs base + diff * level, with base and diff from the game’s RPG tables.
Parameters
Section titled “Parameters”string
A track name.
number
The level to reach.
Returns
Section titled “Returns”number
The XP. Throws for a track name the tables do not carry.