Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Global objectServer APIGenerated

Progression

const Progression: 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.

readonly blockedPerks: string[]

The perks this server blocks.

readonly nativeXp: boolean

Whether players’ own games may earn XP. See setNativeXp.

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.

string[]

Perk names or GUIDs.

void

Nothing. Throws for an unknown perk.

findPerk(query): PerkInfo | null

Looks a perk up.

string

A perk’s name, as the game’s perk tables spell it, or its GUID.

PerkInfo | null

What the tables say about it, or null for a name they do not carry.

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.

track keeps the perks one tree pays for – a track name, or main; visibleOnly keeps the perks the perk screen shows.

string

boolean

PerkInfo[]

The perks, sorted by name.

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.

string

A track name, or * for every track.

number

The highest level XP from play may reach, at most the game’s own 30.

void

Nothing.

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.

boolean

False to stop players’ own games from earning XP at all.

void

Nothing.

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.

string

A track name, or * for every track.

number

How much XP a player may earn on the track per minute, before multipliers. 0 is unlimited.

void

Nothing.

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.

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.

void

Nothing.

tracks(): TrackInfo[]

Every skill and stat a player levels: the fifteen skills the character sheet shows, then strength, agility, vitality, speech and prestige.

TrackInfo[]

The tracks, in that order.

unblockPerks(perks): void

Lifts blockPerks.

string[]

Perk names or GUIDs.

void

Nothing. Throws for an unknown perk.

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.

string

A track name.

number

The level to reach.

number

The XP. Throws for a track name the tables do not carry.