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. buildwars/gw-skilldata

ActiveLibrary

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

Guild Wars skill data

1.0.0(1y ago)08MITPHPPHP ^8.1

Since Jun 13Pushed 1y 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 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)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
- Toolset to add other translations (hopefully maybe)

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

[](#requirements)

- PHP 8.1+

Quickstart
----------

[](#quickstart)

### PHP

[](#php)

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

class MyClass implements SkillDataAwareInterface{
	use SkillDataAwareTrait

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

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

		// do stuff with the $data array
		// the available array keys are in $this->skillData->keys
	}
}
```

The returned skill data array from `SkillDataInterface::get(979)` looks as follows:

```
$data = [
	'id'              => 979,
	'campaign'        => 3,
	'profession'      => 5,
	'attribute'       => 2,
	'type'            => 24,
	'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.',
	'campaign_name'   => 'Nightfall',
	'profession_name' => 'Mesmer',
	'profession_abbr' => 'Me',
	'attribute_name'  => 'Domination Magic',
	'type_name'       => 'Hex Spell',
];
```

### 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){
		// this.skillData is now available
		let data = this.skillData.get(skillID);

		// do stuff with the data array
	}

}
```

which outputs:

```
let data = {
	id: 979,
	campaign: 3,
	profession: 5,
	attribute: 2,
	type: 24,
	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.',
	campaign_name: 'Nightfall',
	profession_name: 'Mesmer',
	profession_abbr: 'Me',
	attribute_name: 'Domination Magic',
	type_name: 'Hex Spell'
}
```

### 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, `pvp_split` and `split_id`):

```
$data = [
	'id'              => 3191,
	'campaign'        => 3,
	'profession'      => 5,
	'attribute'       => 2,
	'type'            => 24,
	'is_elite'        => false,
	'is_rp'           => false,
	'is_pvp'          => true,
	'pvp_split'       => false,
	'split_id'        => 0,
	'upkeep'          => 0,
	'energy'          => 10,
	'activation'      => 2,
	'recharge'        => 12,
	'adrenaline'      => 0,
	'sacrifice'       => 0,
	'overcast'        => 0,
	'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.',
	'campaign_name'   => 'Nightfall',
	'profession_name' => 'Mesmer',
	'profession_abbr' => 'Me',
	'attribute_name'  => 'Domination Magic',
	'type_name'       => 'Hex Spell',
];
```

### 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)

### `SkillDataInterface`

[](#skilldatainterface)

(The API is similar for the JavaScript version)

MethodDescription`get(int $id, bool $pvp = false)`Returns the data for the given skill ID, including descriptions for the current language`getAll(array $IDs, bool $pvp = false)`Returns an array with the skill data for each of the given skill IDs`getByCampaign(int $campaign, bool $pvp = false)`Returns all skills for the given campaign ID`getByProfession(int $profession, bool $pvp = false)`Returns all skills for the given profession ID`getByAttribute(int $attribute, bool $pvp = false)`Returns all skills for the given attribute ID`getByType(int $type, bool $pvp = false)`Returns all skills for the given skill type ID`getElite(bool $pvp = false)`Returns all elite skills`getRoleplay()`Returns all roleplay skillsDisclaimer
----------

[](#disclaimer)

Use at your own risk!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

703d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ada3d048807a11e536645fb87da881170b18f34c0c61fa09e34807c5d79e0b89?d=identicon)[codemasher](/maintainers/codemasher)

---

Top Contributors

[![codemasher](https://avatars.githubusercontent.com/u/592497?v=4)](https://github.com/codemasher "codemasher (25 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)
```

PHPackages © 2026

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