Download the PHP package buildwars/gw-skilldata without Composer
On this page you can find all versions of the php package buildwars/gw-skilldata. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download buildwars/gw-skilldata
More information about buildwars/gw-skilldata
Files in buildwars/gw-skilldata
Package gw-skilldata
Short Description Guild Wars skill data
License MIT
Homepage https://github.com/build-wars/gw-skilldata
Informations about the package gw-skilldata
build-wars/gw-skilldata
Guild Wars skill data and skill descriptions for use with template decoders, e.g. in BBCode, Wikis etc.
Overview
Features
- Guild Wars skill data
- Skill descriptions for English and German
- Toolset to add other translations (hopefully maybe)
Requirements
- PHP 8.1+
alternatively:
- Javascript
- node.js >= 24
- a web browser
Documentation
PHP: Installation with composer
Terminal
composer.json
Note: check the releases for valid versions.
JS: Installation with npm
Terminal
package.json
Quickstart
PHP
The returned skill data array from SkillDataInterface::get(979) looks similar to the following:
JavaScript :coffee:
JavaScript doesn't have traits, so you will need to implement that part by yourself:
which outputs:
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):
HTML tags in descriptions
The skill descriptions may contain the custom HTML tags <gray>...</gray> and <sic/> that you can either replace or use to style, for example:
API
SkillDataInterface
(The API is similar for the JavaScript version)
| Method | Description |
|---|---|
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 |
getByTypeWithSubtypes(int $type, bool $pvp = false) |
Returns all skills for the given skill type ID and its subtypes (if any) |
getElite(bool $pvp = false) |
Returns all elite skills |
getRoleplay() |
Returns all roleplay skills |
Files hosted on GH-Pages
Library
The Library includes several helper methods for handling and combining the data from the different sources (see above).
JSON Skilldata
- Common skilldata: skilldata.json
- Skill descriptions (German): skilldesc-de.json
- Skill descriptions (English): skilldesc-en.json
- Combined data including all languages: skilldata-combined.json
- Data for individual skills can be fetched via:
https://build-wars.github.io/gw-skilldata/json/skills/[SKILL_ID].json
JSON Schemas
Disclaimer
Use at your own risk!
Licensing
- Data from the Guild Wars Wiki (GWW) is available under the GNU Free Documentation License.
- Data from GuildWiki is available under Creative Commons CC BY-NC-SA 2.5
All versions of gw-skilldata with dependencies
ext-mbstring Version *