dao::chargen
Declared in dao/CharGen.h.
Classes
| Class | |
|---|---|
| Choice | A choice the screen offers. |
| Voice | A voice the screen offers the hero’s race and gender. |
Enumerations
Exit
enum class Exit : std::int32_t
How the screen is ended, as its exit points number them.
| Value | |
|---|---|
Quick = 1 |
the appearance page’s Quick Play: the game spends the points |
Full = 2 |
the last page’s Play, every point spent |
Refusal
enum class Refusal : std::uint8_t
Why a choice was not made, or None if it was.
| Value | |
|---|---|
None |
|
NoScreen |
the creation screen is not up |
NotOffered |
the screen offers no such choice |
Disabled |
the screen greys it out now: a class before a race, a background the race and class cannot take, |
BadName |
a finish before a background |
PointsLeft |
a full finish with attribute, skill, talent or spell points unspent |
Functions
Backgrounds()
std::vector<Choice> Backgrounds()
Classes()
std::vector<Choice> Classes()
Finish()
Refusal Finish(Exit exit, std::optional<std::int32_t> difficulty=std::nullopt)
Ends the screen as its Play buttons do: the voice for a quick finish, the name, the difficulty, then the screen closed, whose movie then sends the end the origin starts from.
The origin starts once the screen has closed, a frame or more later.
| Parameter | |
|---|---|
difficulty |
a row of the difficulty picker, from 0 (Casual); none keeps the game’s |
Genders()
std::vector<Choice> Genders()
Returns the screen’s genders, races, classes and backgrounds, in its order.
Hero()
std::optional<ObjectId> Hero()
Returns the hero the creation screen makes.
Call it, and the rest, on the game thread.
Returns nullopt unless the creation screen is up
Races()
std::vector<Choice> Races()
SelectBackground()
Refusal SelectBackground(std::int32_t background)
SelectClass()
Refusal SelectClass(std::int32_t characterClass)
SelectGender()
Refusal SelectGender(std::int32_t gender)
Make a choice as the screen’s buttons do.
A race clears the class and background chosen, and a class the background, as the screen does.
SelectRace()
Refusal SelectRace(std::int32_t race)
SelectVoice()
Refusal SelectVoice(const std::wstring &soundSet)
SetName()
Refusal SetName(const std::wstring &name)
Names the hero, as the appearance page’s name field does.
Without one, a finish gives the hero the name the field starts with, the origin’s default.
Voices()
std::vector<Voice> Voices()
Returns the voices the screen offers the hero’s race and gender, its default first.
Variables
kDwarf
constexpr std::int32_t kDwarf = 1
kElf
constexpr std::int32_t kElf = 2
kFemale
constexpr std::int32_t kFemale = 2
kHuman
constexpr std::int32_t kHuman = 3
kMage
constexpr std::int32_t kMage = 2
kMale
constexpr std::int32_t kMale = 1
The scripts’ numbers for the screen’s choices.
kRogue
constexpr std::int32_t kRogue = 3
kWarrior
constexpr std::int32_t kWarrior = 1