PHPackages                             andreazorzi/rpg-faker-provider - 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. andreazorzi/rpg-faker-provider

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

andreazorzi/rpg-faker-provider
==============================

A PHP Faker provider that generates random RPG characters based on Dungeons &amp; Dragons 5th Edition.

1.0.2(8mo ago)06MITPHP

Since Sep 10Pushed 8mo agoCompare

[ Source](https://github.com/andreazorzi/rpg-faker-provider)[ Packagist](https://packagist.org/packages/andreazorzi/rpg-faker-provider)[ Docs](https://github.com/andreazorzi/rpg-faker-provider)[ RSS](/packages/andreazorzi-rpg-faker-provider/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

RPG Faker Provider
==================

[](#rpg-faker-provider)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f46b8cb4e61174abc7e9e96bb84afb7bb379b9a8ae573e0a96d5a8257089e833/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e647265617a6f727a692f7270672d66616b65722d70726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andreazorzi/rpg-faker-provider)[![Total Downloads](https://camo.githubusercontent.com/ebfb57e116a86b15ffc097302bcea84a41c8987f9c3652efb8ba4c58b72c0cbb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e647265617a6f727a692f7270672d66616b65722d70726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andreazorzi/rpg-faker-provider)

A PHP Faker provider that generates random RPG characters based on Dungeons &amp; Dragons 5th Edition.

Installation
------------

[](#installation)

```
composer require andreazorzi/rpg-faker-provider
```

Usage
-----

[](#usage)

### Basic Setup

[](#basic-setup)

```
use FakerRpg\Provider\RpgProvider;

$faker = Factory::create();
$faker->addProvider(new RpgProvider($faker));

// Generate a complete character
$character = $faker->character();
```

### Localization Support

[](#localization-support)

```
// Create provider with specific locale
$faker->addProvider(new RpgProvider($faker, 'it_IT'));
```

Available Methods
-----------------

[](#available-methods)

### Character Generation

[](#character-generation)

```
character($race = null, $gender = null, $class = null, $abilities_method = 'default')
```

Generates a complete D&amp;D 5e character with all attributes.

```
// Random character
$character = $faker->character();

// Specific race, gender and class
$character = $faker->character('elf', 'male', 'wizard');

// With rolled abilities
$character = $faker->character(abilities_method: 'roll');
```

#### Return

[](#return)

```
[
    'name' => 'Elaria Moonwhisper',
    'race_key' => 'elf',
    'race' => 'Elf',
    'class_key' => 'wizard',
    'class' => 'Wizard',
    'background_key' => 'sage',
    'background' => 'Sage',
    'level' => 5,
    'abilities' => [
        'cha' => 12,
        'con' => 14,
        'dex' => 15,
        'int' => 16,
        'str' => 8,
        'wis' => 13
    ],
    'proficiencies' => [
        'abilities' => ['int', 'wis'],
        'skills' => ['arcana', 'history', 'insight', 'investigation']
    ],
    'alignment' => 'chaotic_good',
    'age' => 127,
    'size' => 5.4,
    'speed' => 30.0,
    'coins' => [
        'cp' => 50,
        'sp' => 100,
        'ep' => 0,
        'gp' => 150,
        'pp' => 0
    ]
]
```

### Names

[](#names)

#### Full name

[](#full-name)

Generates a full character name.

```
characterName($race = null, $gender = null)
```

```
$name = $faker->characterName();           // "Thorin Ironforge"
$name = $faker->characterName('dwarf');    // "Balin Stonebeard"
$name = $faker->characterName('elf', 'female'); // "Althaea Siannodel"
```

#### First name

[](#first-name)

Generates only the first name.

```
characterFirstName($race = null, $gender = null)
```

```
$firstName = $faker->characterFirstName('human'); // "Marcus"
```

#### Last name

[](#last-name)

Generates only the last name.

```
characterLastName($race = null, $gender = null)
```

```
$lastName = $faker->characterLastName('halfling'); // "Goodbarrel"
```

### Race

[](#race)

`characterRace($race = null)` / `characterRaceKey()`

```
$race = $faker->characterRace();     // "Human"
$raceKey = $faker->characterRaceKey(); // "human"
```

### Class

[](#class)

`characterClass($class = null)` / `characterClassKey()`

```
$class = $faker->characterClass();     // "Fighter"
$classKey = $faker->characterClassKey(); // "fighter"
```

### Background

[](#background)

`characterBackground($background = null)` / `characterBackgroundKey()`

```
$background = $faker->characterBackground();     // "Acolyte"
$backgroundKey = $faker->characterBackgroundKey(); // "acolyte"
```

### Attributes

[](#attributes)

#### Level

[](#level)

`characterLevel($min = 1, $max = 20)`

```
$level = $faker->characterLevel();      // Random 1-20
$level = $faker->characterLevel(5, 10); // Random 5-10
```

#### Abilities

[](#abilities)

`characterAbilities($method = 'default')`

```
// Standard array (15, 14, 13, 12, 10, 8) shuffled
$abilities = $faker->characterAbilities('default');

// Rolled stats (4d6 drop lowest)
$abilities = $faker->characterAbilities('roll');
```

#### Proficiencies

[](#proficiencies)

`characterProficiencies()`

```
$proficiencies = $faker->characterProficiencies();
// Returns: ['abilities' => ['str', 'con'], 'skills' => ['athletics', 'intimidation', ...]]
```

#### Alignment

[](#alignment)

`characterAlignment()`

```
$alignment = $faker->characterAlignment(); // "lawful_good"
```

### Physical Attributes

[](#physical-attributes)

#### Age

[](#age)

`characterAge($race = null)`

```
$age = $faker->characterAge();       // Random age appropriate for any race
$age = $faker->characterAge('elf');  // Random age appropriate for elves
```

#### Size

[](#size)

Returns size. `characterSize($race = null)`

```
$size = $faker->characterSize();        // gargantuan
$size = $faker->characterSize('dwarf'); // medium
```

#### Height

[](#height)

Returns height in meters. `characterHeight($race = null)`

```
$height = $faker->characterHeight();
$height = $faker->characterHeight('dwarf');
```

#### Weight

[](#weight)

Returns weight in kilos. `characterWeight($race = null, $height = null)`

```
$height = $faker->characterHeight();
$height = $faker->characterHeight('human', 1.8);
```

#### Eyes

[](#eyes)

Returns character eyes colors.

```
$eyes = $faker->characterEyes();     // "Yellow"
$eyesKey = $faker->characterEyesKey(); // "yellow"
```

#### Skin Color

[](#skin-color)

Returns character skin color. `characterSkinColor($race = null, $color = null)``characterSkinColorKey($race = null)`

```
$eyes = $faker->characterSkinColor('dragonborn'); // "Gold"
$eyesKey = $faker->characterSkinColorKey(); // "pale"
```

#### Hair

[](#hair)

Returns character hair style and color. `characterHair($style = null, $color = null)``characterHairKey()`

```
$eyes = $faker->characterHair();     // "Long Blond"
$eyesKey = $faker->characterHairKey(); // "long-blonde"
```

#### Speed

[](#speed)

Returns movement speed in meters. `characterSpeed($race = null)`

```
$speed = $faker->characterSpeed();         // 9.0
$speed = $faker->characterSpeed('dwarf');  // 7.5
```

### Equipment

[](#equipment)

#### Coins

[](#coins)

`characterCoins()`

```
$coins = $faker->characterCoins();
// Returns: ['cp' => 50, 'sp' => 100, 'ep' => 0, 'gp' => 150, 'pp' => 0]
```

Character Race Support
----------------------

[](#character-race-support)

The provider supports all core D&amp;D 5e races including:

- Human
- Elf (with subtypes)
- Dwarf
- Halfling
- Dragonborn
- Gnome
- Half-Elf
- Half-Orc
- Tiefling Note: Half-elf names are randomly selected from either elf or human name lists.

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

[](#requirements)

- PHP 7.4+
- FakerPHP/Faker

License
-------

[](#license)

MIT License

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance60

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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 ~23 days

Total

3

Last Release

250d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15615862?v=4)[Andrea Zorzi](/maintainers/andreazorzi)[@andreazorzi](https://github.com/andreazorzi)

---

Top Contributors

[![andreazorzi](https://avatars.githubusercontent.com/u/15615862?v=4)](https://github.com/andreazorzi "andreazorzi (34 commits)")

---

Tags

phpfakerdndAndrea Zorzirpgfaker-phpdnd-5edungeons-and-dragonsdungeons-and-dragons-5th-editionrpg-fakerrpg-faker-providerrpg-characterrpg-character-generatordnd-character

### Embed Badge

![Health badge](/badges/andreazorzi-rpg-faker-provider/health.svg)

```
[![Health](https://phpackages.com/badges/andreazorzi-rpg-faker-provider/health.svg)](https://phpackages.com/packages/andreazorzi-rpg-faker-provider)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k69](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49617.1k](/packages/blackfire-player)[smknstd/fakerphp-picsum-images

Alternative image provider for fakerphp using picsum.photos

45257.7k8](/packages/smknstd-fakerphp-picsum-images)[directorytree/dummy

439.9k](/packages/directorytree-dummy)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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