World & Progression

Licenses

Every purchasable license and its level progression, permit point costs, and unlock descriptions.


Types

License

interface License {
  id: string
  name: string
  img: string
  requirements: string
  levels: LicenseLevel[]
}
FieldTypeDescription
idstringStable identifier
namestringDisplay name
imgstringPath to the license's icon, relative to images/
requirementsstringWhat the license requires to obtain
levelsLicenseLevel[]Every level of the license

LicenseLevel

interface LicenseLevel {
  level: number
  skillLevel: number
  permitPointCost: number
  description: string
}
FieldTypeDescription
levelnumberLevel number
skillLevelnumberSkill level required to reach this level
permitPointCostnumberPermit points required to purchase
descriptionstringWhat this level unlocks

Factory

import { licenses } from 'dinkum-data'

licenses() // all 25 licenses
licenses(source) // wrap a pre-filtered array

Methods

.totalPermitPoints()

Total permit points required across every level of every license in the current result set.

licenses().totalPermitPoints()

Sorts

MethodSignatureDefaultDescription
sortByLevelCountsortByLevelCount(order?: 'asc' | 'desc')'desc'Sort by number of levels, most levels first.

Terminal methods

MethodReturnsDescription
.get()License[]All results
.first()License | undefinedFirst result
.find(id)License | undefinedFind by id
.findByName(name)License | undefinedCase-insensitive exact name match
.search(query)License[]Case-insensitive partial name match
.count()numberNumber of results

Examples

import { licenses } from 'dinkum-data'

// Total permit points needed to max out every license in the game
licenses().totalPermitPoints()

// The license with the most levels
licenses().sortByLevelCount().first()

// Look up by name
licenses().findByName('Mining Licence')

Next steps

  • See Milestones for another permit-point-earning system
  • Browse Skills for the skill levels some license levels require
  • Read core concepts for the shared query builder pattern
Previous
NPCs