PHPackages                             buildwars/gw-skilldata - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. buildwars/gw-skilldata

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

buildwars/gw-skilldata
======================

Guild Wars skill data

1.1.0(2mo ago)324MITPHPPHP ^8.1CI passing

Since Jun 13Pushed 1w ago1 watchersCompare

[ Source](https://github.com/build-wars/gw-skilldata)[ Packagist](https://packagist.org/packages/buildwars/gw-skilldata)[ Docs](https://github.com/build-wars/gw-skilldata)[ Fund](https://ko-fi.com/codemasher)[ RSS](/packages/buildwars-gw-skilldata/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (3)Dependencies (14)Versions (3)Used By (0)

build-wars/gw-skilldata
=======================

[](#build-warsgw-skilldata)

[Guild Wars](https://www.guildwars.com/) skill data and skill descriptions for use with template decoders, e.g. in BBCode, Wikis etc.

[![PHP Version Support](https://camo.githubusercontent.com/684f00a7e35d79169abd451e046cea767ebd90cac482208e528213ed46ed8cee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6275696c64776172732f67772d736b696c6c646174613f6c6f676f3d70687026636f6c6f723d383839324246266c6f676f436f6c6f723d636363)](https://www.php.net/supported-versions.php)[![Packagist version](https://camo.githubusercontent.com/8f8736a16b70ae0b964acbacac44b288072c8ec029b7d07169bea051b192f1a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6275696c64776172732f67772d736b696c6c646174612e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d636363)](https://packagist.org/packages/buildwars/gw-skilldata)[![NPM version](https://camo.githubusercontent.com/aebffe196f7176463e7ceec7814ad1b7fee55b53b141218988d98a92ec36581c/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f406275696c64776172732f67772d736b696c6c646174613f6c6f676f3d6e706d266c6f676f436f6c6f723d636363)](https://www.npmjs.com/package/@buildwars/gw-skilldata)[![License](https://camo.githubusercontent.com/b73e8fb90b54653ddedabbc4528030627631058a3a239e5d8ab47e4ba3dbcc03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6275696c642d776172732f67772d736b696c6c64617461)](https://github.com/build-wars/gw-skilldata/blob/main/LICENSE)[![Continuous Integration](https://camo.githubusercontent.com/a8707bb788f983551badaac5a1e9523c3dcd2efce55fbe4d259a64febfff1aca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6275696c642d776172732f67772d736b696c6c646174612f63692e796d6c3f6272616e63683d6d61696e266c6f676f3d676974687562266c6f676f436f6c6f723d636363)](https://github.com/build-wars/gw-skilldata/actions/workflows/ci.yml?query=branch%3Amain)[![Coverage](https://camo.githubusercontent.com/00e0f96d9909425b4d6e6440aa6d186b7847c20a44d0e9372464b67eeea2f689/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6275696c642d776172732f67772d736b696c6c646174612e7376673f6c6f676f3d636f6465636f76266c6f676f436f6c6f723d636363)](https://codecov.io/github/build-wars/gw-skilldata)[![Packagist downloads](https://camo.githubusercontent.com/a22671eed813f609970750f1e9b4badc1f28c4b1dfc7c9fd1860b0e2cc79153e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6275696c64776172732f67772d736b696c6c646174612e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d636363)](https://packagist.org/packages/buildwars/gw-skilldata/stats)

Overview
========

[](#overview)

Features
--------

[](#features)

- Guild Wars skill data
    - Skill descriptions for English and German
    - Skill databases for [paw·ned²](https://redeemer.biz/guild-wars/projekte/pawned2/)
- Toolset to add other translations (hopefully maybe)

Most of the release files are built on each push and hosted on GitHub pages:

Requirements
------------

[](#requirements)

- PHP 8.1+

alternatively:

- Javascript
    - node.js &gt;= 24
    - a web browser

Documentation
=============

[](#documentation)

PHP: Installation with [composer](https://getcomposer.org)
----------------------------------------------------------

[](#php-installation-with-composer)

### Terminal

[](#terminal)

```
composer require buildwars/gw-skilldata

```

### composer.json

[](#composerjson)

```
{
	"require": {
		"php": "^8.1",
		"buildwars/gw-skilldata": "^2.0"
	}
}
```

Note: check the [releases](https://github.com/buildwars/gw-skilldata/releases) for valid versions.

JS: Installation with [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
----------------------------------------------------------------------------------------------

[](#js-installation-with-npm)

### Terminal

[](#terminal-1)

```
npm install @buildwars/gw-skilldata

```

### package.json

[](#packagejson)

```
{
	"dependencies": {
		"@buildwars/gw-skilldata": "^2.0"
	}
}
```

### Direct include

[](#direct-include)

You can also directly include the library in your HTML:

```
>

		// import the script
		import * as skilldata from 'https://build-wars.github.io/gw-skilldata/js/gw-skilldata-es6.js';
		// alternative via unpkg
		// import * as skilldata from 'https://unpkg.com/@buildwars/gw-skilldata@2.0.0/dist/gw-skilldata-es6.js';

		// do stuff

```

Please note that the include from GitHub pages represents the development version, which is built on each push to the main branch. Use NPM or unpkg instead for stable versions.

Quickstart
----------

[](#quickstart)

### PHP

[](#php)

```
use Buildwars\GWSkillData\SkillDataAwareInterface;
use Buildwars\GWSkillData\SkillDataAwareTrait;
use Buildwars\GWSkillData\SkillDataInterface;
use Buildwars\GWSkillData\SkillLangEnglish;

class MyClass implements SkillDataAwareInterface{
	use SkillDataAwareTrait;

	protected SkillDataInterface $skillDataEnglish;

	public function __construct(string $lang){
		// set the language and initialize $this->skillData
		$this->setSkillDataLanguage($lang);

		// alternatively, you can simply invoke one of the skill language instances
		$this->skillDataEnglish = new SkillLangEnglish;
	}

	public function getSkill(int $skillID, bool $pvp):mixed{
		// $this->skillData is now available
		$data = $this->skillData->get($skillID, $pvp);

		// do stuff with the $data array
		var_dump($data->id);
	}

}
```

### JavaScript ☕

[](#javascript-coffee)

JavaScript doesn't have traits, so you will need to implement that part by yourself:

```
class MyClass{

	#languages = {
		de: SkillLangGerman,
		en: SkillLangEnglish,
	};

	#skillData;

	constructor(lang){
		this.setSkillDataLanguage(lang);
	}

	setSkillDataLanguage(lang){

		if(!this.#languages[lang]){
			throw new Error('invalid language');
		}

		this.#skillData = new this.#languages[lang]();

		return this;
	}

	getSkill(skillID, pvp){
		// this.skillData is now available
		let data = this.#skillData.get(skillID, pvp);

		// do stuff with the data array
		console.log(data.id);
	}

}
```

### Return

[](#return)

A call `SkillDataInterface::get(979, false)` (PHP) or `SkillDataAbstract.get(979, false)` (JS) returns a `Skill` instance that looks similar to the following:

```
Skill{
	id          = 979
	campaign    = new Campaign(Campaign::NIGHTFALL)
	profession  = new Profession(Profession::MESMER)
	attribute   = new Attribute(Attribute::DOMINATION_MAGIC)
	type        = new Type(Type::HEX_SPELL)
	is_elite    = false
	is_rp       = false
	is_pvp      = false
	pvp_split   = true
	split_id    = 3191
	upkeep      = 0
	energy      = 10
	activation  = 2
	recharge    = 12
	adrenaline  = 0
	sacrifice   = 0
	overcast    = 0
	name        = 'Mistrust'
	description = 'For 6 seconds, the next spell that target foe casts on one of your allies fails and deals 10...100 damage to that foe and all nearby foes.'
	concise     = '(6 seconds.) The next spell that target foe casts on one of your allies fails and deals 10...100 damage to target and nearby foes.'
}

```

### PvP skill redirect

[](#pvp-skill-redirect)

When the `$pvp` parameter is set to `true`, `SkillDataInterface::get(979, true)` will redirect to the PvP version of the given skill if available, and vice versa it will redirect a given PvP skill ID to the PvE version when `$pvp` is set to `false`:

```
Skill{
	id          = 3191
	.
	.
	is_pvp      = true
	pvp_split   = true
	split_id    = 979
	.
	.
	name        = 'Mistrust (PvP)'
	description = 'For 6 seconds, the next spell that target foe casts on one of your allies fails and deals 10...75 damage to that foe and all nearby foes.'
	concise     = '(6 seconds.) The next spell that target foe casts on one of your allies fails and deals 10...75 damage to target and nearby foes.'
}

```

### HTML tags in descriptions

[](#html-tags-in-descriptions)

The skill descriptions may contain the custom HTML tags `...` and `` that you can either replace or use to style, for example:

```
No effect unless hexed foe attacks.

Each attack that hits deals +13...30 Holy damage
```

API
---

[](#api)

(The API is similar for the JavaScript version)

### `SkillDataInterface`

[](#skilldatainterface)

The `SkillDataInterface` describes the methods available in its inheritors (`SkillLangEnglish`, `SkillLangGerman`, \[...\]).

MethodReturnDescription`get(int $id, bool $pvp = false)``Skill`Returns the data for the given skill ID, including descriptions for the current language`getAll(array $IDs, bool $pvp = false)``Skill[]`Returns an array with the skill data for each of the given skill IDs`getByCampaign(Campaign|int $campaign, bool $pvp = false)``Skill[]`Returns all skills for the given campaign ID`getByProfession(Profession|int $profession, bool $pvp = false)``Skill[]`Returns all skills for the given profession ID`getByAttribute(Attribute|int $attribute, bool $pvp = false)``Skill[]`Returns all skills for the given attribute ID`getByType(Type|int $type, bool $pvp = false)``Skill[]`Returns all skills for the given skill type ID`getByTypeWithSubtypes(Type|int $type, bool $pvp = false)``Skill[]`Returns all skills for the given skill type ID and its subtypes (if any)`getElite(bool $pvp = false)``Skill[]`Returns all elite skills`getRoleplay()``Skill[]`Returns all roleplay skills`getIDs(bool $pvp = false)``int[]`Returns a list of all skill IDs, either Pve or PvP### `Skill`

[](#skill)

The `Skill` object holds all [skill](https://wiki.guildwars.com/wiki/Skill) data for the given skill ID and language. The names for the public (readonly) properties can be found in the constants `SkillDataInterface::KEYS_DESC` and `SkillDataInterface::KEYS_DATA` (PHP), or in `Skill.KEYS_DESC` and `Skill.KEYS_DATA` (JS). Some of the properties hold instances of the objects described below. This class is not meant to be invoked as standalone, but as return value for the `SkillDataInterface` methods.

MethodReturnDescription`toArray()``mixed[]`Returns a pure array representation (key-value object in JS) of the `Skill` instance`getFieldName(string $field, Lang|string $lang = Lang::EN)``string`Returns the display name for the given field (PHP only)### `Lang`

[](#lang)

The `Lang` object holds the language information used for translatable strings. An instance of this object can be used as paramter in various methods.

MethodReturnDescription`getName()``string`Returns the readable name of the given language ID### `DataObjectAbstract`

[](#dataobjectabstract)

The `DataObjectAbstract` class is the abstract parent of the classes listed below.

MethodReturnDescription`getName()``string`Returns the readable name of the given ID`is(int $id)``bool`Checks whether the object ID is equal to the given ID`in(array $ids)``bool`Checks whether the object ID is in the given array of IDs#### `Attribute`

[](#attribute)

The `Attribute` class encapsulates all skill [attribute](https://wiki.guildwars.com/wiki/Attribute) related static data.

MethodReturnDescription`setLevel(int $level)``self`Sets the attribute level`addLevel(int $level)``self`Adds the given amount to the current attribute level`getLevel()``int`Returns the current attribute level`getProfession()``Profession`Returns the profession for the current attribute`getProfessionID()``int`Returns the profession ID for the current attribute`getMaxValue()``int`Returns the internal max value for the current attribute`getByProfession(Profession|int $profession)``int[]`Returns all attributes for the given profession`isPrimary()``bool`Checks whether the current attribute is a primary attribute`clamp(int|null $level = null)``int`Clamps the given value to the internal max value for the current attribute`getProgressionFunction()``Closure`Returns the progression function for the given title rank or attribute`getProgressionValue(int|string $val0, int|string $val15, int|null $level = null)``int`Calculates the value for the given val0-val15 progression for the given attribute and level`getProgressionTable(int $val0, int $val15, int|null $max = null)``int[]`Creates a progression table for the values 0 to attribute-max of the given val0 and val15#### `Campaign`

[](#campaign)

The `Campaign` class encapsulates all [campaign](https://wiki.guildwars.com/wiki/Campaign) related static data.

MethodReturnDescription`getContinentName(Lang| string|null $lang = null)``string`Returns the readable name of the continent for the given campaign ID#### `Profession`

[](#profession)

The `Profession` class encapsulates all [profession](https://wiki.guildwars.com/wiki/Profession) related static data.

MethodReturnDescription`getAbbr(Lang|string|null $lang = null)``string`Returns the short name for the fiven profession ID`getPrimaryAttribute(int $level = 0)``Attribute`Returns the primary attribute of the current profession`getPrimaryAttributeID()``int`Returns the primary attribute ID of the current profession`getAttributes()``int[]`Returns all attributes for the current profession#### `Type`

[](#type)

The `Type` class encapsulates all [skill type](https://wiki.guildwars.com/wiki/Skill_type) related static data.

MethodReturnDescription`withSubtypes()``int[]`Returns the IDs for the given skill type including all of its subtypesDisclaimer
----------

[](#disclaimer)

Use at your own risk!

### Licensing

[](#licensing)

- Data from the [Guild Wars Wiki (GWW)](https://wiki.guildwars.com/wiki/Guild_Wars_Wiki:Copyrights) is available under the [GNU Free Documentation License](http://www.gnu.org/copyleft/fdl.html).
- Data from [GuildWiki](https://www.guildwiki.de/wiki/GuildWiki:Lizenzhinweise) is available under [Creative Commons CC BY-NC-SA 2.5](https://creativecommons.org/licenses/by-nc-sa/2.5/deed.de)

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance93

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~725 days

Total

2

Last Release

69d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/592497?v=4)[smiley](/maintainers/codemasher)[@codemasher](https://github.com/codemasher)

---

Top Contributors

[![codemasher](https://avatars.githubusercontent.com/u/592497?v=4)](https://github.com/codemasher "codemasher (149 commits)")

---

Tags

guildwarsjavascript-libraryphp-libraryphp8guild wars

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/buildwars-gw-skilldata/health.svg)

```
[![Health](https://phpackages.com/badges/buildwars-gw-skilldata/health.svg)](https://phpackages.com/packages/buildwars-gw-skilldata)
```

###  Alternatives

[sheadawson/silverstripe-linkable

A couple of handy form fields and objects for managing external and internal links on DataObjects

38318.5k24](/packages/sheadawson-silverstripe-linkable)[l91/iso-3166-2

PHP Lib for ISO 3166-2

15175.3k1](/packages/l91-iso-3166-2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
