Nickname Generator 5.2.2
Gamer-style nickname generation for C++23
Loading...
Searching...
No Matches
dasmig::nickname_request Struct Reference

Per-call choices for nickname generation. More...

#include <nicknamegen.hpp>

Public Attributes

std::wstring name {}
 Full name to optionally derive the nickname from.
 
std::vector< std::string > tags {}
 Themes the nickname may be drawn from, as plain strings.
 
nickname_style style {nickname_style::gaming}
 The kind of nickname: a gaming handle (the default) or a username.
 
std::optional< int > birth_year {}
 Birth year, for the digits of a username.
 

Detailed Description

Per-call choices for nickname generation.

Word lists are loaded on nng; deterministic calls take a separate seed.

Definition at line 51 of file nicknamegen.hpp.

Member Data Documentation

◆ birth_year

std::optional<int> dasmig::nickname_request::birth_year {}

Birth year, for the digits of a username.

With a year from 1900 to 2100, the digits of a username are often the year, as two or four digits ("john.smith92", "jsmith1992"). Without it they are a made-up year, a small or lucky number, or a pattern. Ignored by the gaming style.

Definition at line 91 of file nicknamegen.hpp.

◆ name

std::wstring dasmig::nickname_request::name {}

Full name to optionally derive the nickname from.

Empty (or only spaces) selects from the loaded word lists. With a name, one in four nicknames is derived from it; without word lists, the name is always used.

Definition at line 58 of file nicknamegen.hpp.

◆ style

nickname_style dasmig::nickname_request::style {nickname_style::gaming}

The kind of nickname: a gaming handle (the default) or a username.

A gaming handle may be decorated, leetified and cased freely. A username is lowercase ASCII letters and digits, at most 24 characters, with . or _ between parts: from a name it is the name in a common shape ("john.smith", "jsmith", "smith_john", "johns92"), always derived from the name; without a name it is one or two words from the lists ("swiftfox", "quiet_otter"), with digits about half the time. Accents are folded to ASCII ("jose" for "José") and characters that have no ASCII form are dropped; a name with no letters left is treated as no name. A username sometimes gets a prefix ("real", "the", "its") or a suffix ("official", "hq", "irl"), about one in thirteen.

Definition at line 83 of file nicknamegen.hpp.

◆ tags

std::vector<std::string> dasmig::nickname_request::tags {}

Themes the nickname may be drawn from, as plain strings.

Typically the tags of a character's traits and job ("combat", "leadership", "manual", ...), as trait-generator and occupation-generator give them; no dependency on either. A tag that has a tag_<tag>.words list is a theme, and with at least one theme one nickname in three is a word of a theme (a theme chosen uniformly, then a word), unless the name takes the nickname first. Tags without a list are ignored. The default is no themes.

Definition at line 69 of file nicknamegen.hpp.


The documentation for this struct was generated from the following file: