This robust framework simplifies the process of generating detailed RPG characters. It covers everything from rolling dice and assigning stats to specifying character races, classes, alignments, and attributes suitable for both player characters (PCs) and non-player characters (NPCs).
- Overview
- Dice Rolling Mechanism
- Character Stats
- Sex and Gender Attributes
- Race Attributes and Preferences
- Class System
- Alignment System
- Planned Enhancements
- Contribution Guidelines
- Credits
- Author
The RPG Character Generation Framework provides a modular and flexible system for rapidly creating diverse characters. It draws inspiration and content from classic RPG sources, particularly the Wilderlands of High Fantasy setting.
The roll.cpp module handles dice mechanics, essential to RPG gameplay.
- Validation: Prevents invalid dice configurations.
- Fairness: Uses unbiased randomization (
std::random_deviceandstd::uniform_int_distribution).
#include "roll.h"
int main() {
int result = roll(DiceQty(3), DiceSides(6));
std::cout << "Result of rolling 3d6: " << result << std::endl;
result = roll(DiceQty(0), DiceSides(1)); // Error handling demonstration
std::cout << "Corrected roll result: " << result << std::endl;
return 0;
}stats.cpp defines the character attributes essential for gameplay mechanics, including strength, dexterity, constitution, intelligence, wisdom, and charisma.
- Random generation adhering to classic RPG rules
- Easily readable character summaries
#include "stats.h"
int main() {
Stats characterStats = rolledStats();
std::cout << characterStats;
return 0;
}sex.cpp provides gender-specific character details, including randomized names and optional attribute adjustments.
- Gender-based randomized naming
- Configurable attribute modifiers
#include "sex.h"
int main() {
Sex randomSex = Sex::rollRandomName();
std::cout << randomSex;
return 0;
}races.cpp outlines diverse races from the Wilderlands campaign, each with distinct attributes, bonuses, and class preferences.
- Predefined racial attributes and bonuses
- Extensive Wilderlands lore integration
#include "races.h"
int main() {
const Race& elf = getElf();
std::cout << "Race: " << elf.getName() << std::endl;
return 0;
}Classes defined in cls.cpp specify character professions, minimum required attributes, and hit dice.
- Alchemist, Amazon, Assassin, Barbarian, Bard, Cleric, Druid, Fighter, Illusionist, Knight, Magic User, Monk, Paladin, Ranger, Sage, Samurai, Thief, Valkyrie, Viking, Witch, and many others.
#include "cls.h"
int main() {
const Cls& ranger = getRanger();
std::cout << "Class: " << ranger.getName() << std::endl;
return 0;
}The alignment.cpp module allows for flexible character alignments, essential for role-playing depth.
- Alignment enum for easy use
- Randomized alignment assignment
#include "alignment.hpp"
int main() {
Alignment alignment = rollRandomAlignment();
std::cout << "Random Alignment assigned." << std::endl;
return 0;
}- Comprehensive spell point system
- Advanced leveling mechanics
- Expanded combat features
- Detailed Player class for full integration
- Improved unit test coverage
Contributions are welcomed! Please follow these guidelines:
- Clearly document your changes
- Include tests when possible
- Maintain code readability and consistency
- Judges Guild Wilderlands of High Fantasy: Inspiration for races and classes
- Judges Guild Book of Names: Source for character naming conventions