npm package: @stephenpoole/deadbydaylight
Description: A complete Dead by Daylight dataset.
Author: stephenpoole
Latest version: 6.1.0

# deadbydaylight

[![npm version](https://badge.fury.io/js/%40stephenpoole%2Fdeadbydaylight.svg)](https://badge.fury.io/js/%40stephenpoole%2Fdeadbydaylight)
[![Known Vulnerabilities](https://snyk.io/test/github/stephenpoole/deadbydaylight/badge.svg)](https://snyk.io/test/github/stephenpoole/deadbydaylight)
[![Build Status](https://travis-ci.com/stephenpoole/deadbydaylight.svg?branch=master)](https://travis-ci.com/stephenpoole/deadbydaylight)
[![codecov](https://codecov.io/gh/stephenpoole/deadbydaylight/branch/master/graph/badge.svg?token=lTWudhhmb0)](https://codecov.io/gh/stephenpoole/deadbydaylight)
![last commit](https://img.shields.io/github/last-commit/stephenpoole/deadbydaylight)
![issues](https://img.shields.io/github/issues/stephenpoole/deadbydaylight)

A complete Dead by Daylight dataset.

## Getting Started

Install `deadbydaylight` and save to your package.json in one easy step.

With npm:

```bash
npm install @stephenpoole/deadbydaylight
```

With yarn:

```bash
yarn add @stephenpoole/deadbydaylight
```

## Support

To support the development of this library, head over to [deadlight.gg](https://deadlight.gg) and click the Donate button. Any donations are greatly appreciated.

## Usage

In the browser globally

1. Insert the script tag in your html head:

```html
<script src="https://cdn.jsdelivr.net/npm/@stephenpoole/deadbydaylight/en/deadbydaylight.js"></script>
```

2. Instantiate and grab some data:

```javascript
const { Language, Killer } = DeadByDaylight;
const dbd = DeadByDaylight.Client();
const nurse = dbd.killer(Killer.Nurse);
console.log(nurse);
```

In the browser with webpack

1. Import `deadbydaylight` into your application:

```javascript
import Dbd, { Killer } from "@stephenpoole/deadbydaylight";
```

2. Instantiate and grab some data:

```javascript
const dbd = Dbd();
const nurse = dbd.killer(Killer.Nurse);
console.log(nurse);
```

## Documentation

You'll find the type documentation here:
[Documentation](https://stephenpoole.github.io/deadbydaylight/modules.html)

## Locales

Just like in-game, this library supports the following languages:

English (en)  
Spanish (es)  
German (de)  
French (fr)  
Italian (it)  
Japanese (jp)  
Korean (ko)  
Polish (pl)  
Russian (ru)  
Taiwanese (th)  
Turkish (tr)  
Simplified Chinese (zh)

To set the locale

In the browser globally:

```html
<script src="https://cdn.jsdelivr.net/npm/@stephenpoole/deadbydaylight/ko/deadbydaylight.js"></script>
```

In the browser with webpack:

```javascript
import Dbd from "@stephenpoole/deadbydaylight/ko";
```

&nbsp;

If your environment does not care about filesize, you can instead load all locales at once.

```html
<script src="https://cdn.jsdelivr.net/npm/@stephenpoole/deadbydaylight/all/deadbydaylight.js"></script>
```

or

```javascript
import Dbd from "@stephenpoole/deadbydaylight/all";
```

You can then specify the default locale when instantiating, or as a second parameter when calling any method.

```javascript
const { Language, Killer } = DeadByDaylight;
const dbd = DeadByDaylight.Client(Language.French);
const nurse = dbd.killer(Killer.Nurse);
console.log(nurse); // french

const doctor = dbd.killer(Killer.Doctor, Language.Korean);
console.log(nurse); // korean
```

## Data

### Killers

```javascript
{
        id: 1, (number, required)
        index: "SHAPE", (string, required)
        name: "The Shape", (string, required)
        difficulty: 2, (number, required, of type Difficulty)
        power: "EVIL_WITHIN", (string, required, of type powers[].index)
        story: "Some humans are simply bad seeds. Seeds infused with a distilled...", (string, required)
        description:
            "A haunting Killer, intent on monitoring survivors from a distance to feed his power, %bEvil Within%/b. The more he stalks, the stronger and faster he becomes.", (string, required)
        perks: [
            "SAVE_THE_BEST_FOR_LAST", (string, of type killerPerks[].index)
            ...
        ], (array, required, of length 3)
        addons: [
            "BOYFRIENDS_MEMO", (string, of type killerAddons[].index)
            ...
        ], (array, required)
        image: "http://hxt.nyc3.digitaloceanspaces.com/live/player/SH_charSelect_portrait.png" (string, required)
    }
```

### Survivors

```javascript
{
        id: 1, (number, required)
        index: "NEA_KARLSSON", (string, required)
        name: "Nea Karlsson", (string, required)
        difficulty: 1, (number, required, of type Difficulty)
        story: "Nea grew up in the small town of Hjo in Sweden. She had a...", (string, required)
        description:
            "An urban artist, able to easily escape and hide.", (string, required)
        perks: [
            "BALANCED_LANDING", (string, of type survivorPerks[].index)
            ...
        ], (array, required, of length 3)
        image: "http://hxt.nyc3.digitaloceanspaces.com/live/player/NK_charSelect_portrait.png" (string, required)
    }
```

### Powers

```javascript
{
    id: 1, (number, required)
    index: "EVIL_WITHIN", (string, required)
    name: "Evil Within", (string, required)
    owner: "SHAPE", (string, required, of type killers[].index or "NO_ONE")
    description:
        "The darkness inside feeds his determination to take the life of...", (string, required)
    flavor:
        "\"I met him, fifteen years ago; I was told there was nothing left...", (string, optional)
    ], (array, required, at least length 1)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/power/iconPowers_stalker1.png" (string, required)
}
```

### Items

```javascript
{
    id: 1, (number, required)
    index: "ENGINEERS_TOOLBOX", (string, required)
    name: "Mechanic's Toolbox", (string, required)
    description: "A metal box with specialised mechanics tools. Even without training...", (string, required)
    type: "TOOLBOX", (string, required, of type ItemType)
    rarity: 2, (number, required, of type Rarity)
    addons: [
        "BRAND_NEW_PART", (string, of type survivorAddons[].index)
        ...
    ], (array, required)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/item/iconItems_toolboxMechanics.png" (string, required)
}
```

### Perks

Killer Perks

```javascript
{
    id: 1, (number, required)
    index: "IRON_GRASP", (string, required)
    name: "Iron Grasp", (string, required)
    rarity: [
        1, (number)
        ...
    ], (array, required, of length 3)
    owner: "NO_ONE", (string, required, of type killers[].index or "NO_ONE")
    description:
        "Your powerful hold on the survivors causes escapes to be nearly impossible. Effects of survivor struggling are reduced by %s. Time to struggle out of your grasp is increased by %s.", (string, required)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/perk/iconPerks_ironGrasp.png", (string, required)
    flavor:
        "\"I met him, fifteen years ago; I was told there was nothing left...", (string, optional)
    tiers: [
        [
            "25%", (string or number)
            ...
        ], (array, of length count of {0} in description)
        ...
    ] (array, required, of length 3)
}
```

Survivor Perks

```javascript
{
    id: 1, (number, required)
    index: "SLIPPERY_MEAT", (string, required)
    name: "Slippery Meat", (string, required)
    rarity: [
        1, (number)
        ...
    ], (array, required, of length 3)
    owner: "NO_ONE", (string, required, of type survivors[].index or "NO_ONE")
    description:
        "You have developed an efficient way to get out of Bear Traps and Hooks. Grants up to %s extra escape attempts on the hook. The odds of freeing yourself from Bear Traps are increased by %s.", (string, required)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/perk/iconPerks_slipperyMeat.png", (string, required)
    flavor:
        "\"I met him, fifteen years ago; I was told there was nothing left...", (string, optional)
    tiers: [
        [
            "1%", (string or number)
            ...
        ], (array, of length count of {0} in description)
    ] (array, required, of length 3)
}
```

### Addons

Killer Addons

```javascript
{
    id: 1, (number, required)
    index: "VHS_PORN", (string, required)
    name: "VHS Porn", (string, required)
    owner: "CLOWN", (string, required, of type killers[].index)
    description: "An all time classic.", (string, required)
    rarity: 2, (number, required, of type Rarity)
    flavor: "\"I met him, fifteen years ago; I was told there was nothing left...", (string, optional)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/addon/iconAddon_toolboxMechanics.png" (string, required)
}
```

Survivor Addons

```javascript
{
    id: 1, (number, required)
    index: "CLEAN_RAG", (string, required)
    name: "Clean Rag", (string, required)
    type: "TOOLBOX", (string, required, of type items[].index)
    description: "A mundane rag. Suspiciously clean.", (string, required)
    rarity: 0, (number, required, of type Rarity)
    flavor: "\"I met him, fifteen years ago; I was told there was nothing left...", (string, optional)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/addon/iconAddon_cleanRag.png" (string, required)
}
```

### Offerings

Killer Offerings

```javascript
{
    id: 1, (number, required)
    index: "HOLLOW_SHELL", (string, required)
    name: "Hollow Shell", (string, required)
    rarity: 1, (number, required, of type Rarity)
    description: "Grants %b25%/b% extra Bloodpoints in all Categories.", (string, required)
    player: 1, (number, required, of type Player)
    flavor:
        "\"An unidentifiable cocoon which was breached by whatever was inside.\"", (string, optional)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/offering/iconFavors_hollowShell.png" (string, required)
}
```

Survivor Offerings

```javascript
{
    id: 1, (number, required)
    index: "PETRIFIED_OAK", (string, required)
    name: "Petrified Oak", (string, required)
    rarity: 3, (number, required, of type Rarity)
    description:
        "Calms The Entity and prevents %b1%/b Hook from appearing.", (string, required)
    player: 0, (number, required, of type Player)
    flavor: "\"A deteriorating piece of petrified wood.\"", (string, optional)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/offering/iconFavors_petrifiedOak.png" (string, required)
}
```

Shared Offerings

```javascript
{
    id: 1, (number, required)
    index: "BLOODY_PARTY_STREAMERS", (string, required)
    name: "Bloody Party Streamers", (string, required)
    rarity: 2, (number, required, of type Rarity)
    description:
        "Grants %b100%/b% bonus Bloodpoints in all Categories for all Players.", (string, required)
    player: 2, (number, required, of type Player)
    flavor:
        "\"A reminder of a bloody good time when people came together, but left screaming.\"",  (string, optional)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/offering/iconFavors_bloodyPartyStreamers.png" (string, required)
}
```

### Realms

```javascript
{
    id: 0, (number, required)
    index: "MACMILLAN_ESTATE", (string, required)
    name: "The MacMillan Estate", (string, required)
    owner: "TRAPPER", (string, required, of type killers[].index)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/map/iconMap_Ind_Mine.png" (string, required)
}
```

### Maps

```javascript
{
    id: 1, (number, required)
    index: "COAL_TOWER", (string, required)
    name: "Coal Tower", (string, required)
    realm: "MACMILLAN_ESTATE", (string, required, of type realms[].index)
    description:
        "Grants %b100%/b% bonus Bloodpoints in all Categories for all Players.", (string, required)
    image: "http://hxt.nyc3.digitaloceanspaces.com/live/map/iconMap_Ind_CoalTower.png" (string, required)
}
```

## License

MIT