2012-01-30 19:27:49 +02:00
|
|
|
#include "charactercreation.hpp"
|
|
|
|
|
2022-06-04 15:26:36 +02:00
|
|
|
#include <MyGUI_ITexture.h>
|
|
|
|
|
2018-08-14 23:05:43 +04:00
|
|
|
#include <components/debug/debuglog.hpp>
|
2016-01-06 12:46:06 +01:00
|
|
|
#include <components/fallback/fallback.hpp>
|
2023-07-19 17:21:17 +04:00
|
|
|
#include <components/misc/resourcehelpers.hpp>
|
2019-08-12 00:22:02 +12:00
|
|
|
#include <components/misc/rng.hpp>
|
2016-01-06 12:46:06 +01:00
|
|
|
|
2012-04-23 15:27:03 +02:00
|
|
|
#include "../mwbase/environment.hpp"
|
2012-08-11 17:30:55 +02:00
|
|
|
#include "../mwbase/mechanicsmanager.hpp"
|
2015-01-10 01:00:52 +01:00
|
|
|
#include "../mwbase/soundmanager.hpp"
|
|
|
|
#include "../mwbase/windowmanager.hpp"
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
|
2015-08-21 21:12:39 +12:00
|
|
|
#include "../mwmechanics/actorutil.hpp"
|
2023-07-28 15:23:53 +02:00
|
|
|
#include "../mwmechanics/creaturestats.hpp"
|
2015-01-10 01:00:52 +01:00
|
|
|
|
2013-07-21 11:00:36 +02:00
|
|
|
#include "../mwworld/class.hpp"
|
2014-12-19 11:26:54 +01:00
|
|
|
#include "../mwworld/esmstore.hpp"
|
2017-04-14 23:21:20 +04:00
|
|
|
#include "../mwworld/player.hpp"
|
2012-04-23 15:27:03 +02:00
|
|
|
|
2015-01-10 01:00:52 +01:00
|
|
|
#include "birth.hpp"
|
|
|
|
#include "class.hpp"
|
|
|
|
#include "inventorywindow.hpp"
|
|
|
|
#include "race.hpp"
|
|
|
|
#include "review.hpp"
|
|
|
|
#include "textinput.hpp"
|
|
|
|
|
2012-02-03 11:24:28 +01:00
|
|
|
namespace
|
|
|
|
{
|
2019-08-12 00:22:02 +12:00
|
|
|
struct Response
|
|
|
|
{
|
|
|
|
const std::string mText;
|
|
|
|
const ESM::Class::Specialization mSpecialization;
|
|
|
|
};
|
|
|
|
|
2012-02-03 11:24:28 +01:00
|
|
|
struct Step
|
|
|
|
{
|
2013-03-10 15:15:33 +01:00
|
|
|
const std::string mText;
|
2019-08-12 00:22:02 +12:00
|
|
|
const Response mResponses[3];
|
2024-02-22 23:44:12 +01:00
|
|
|
const VFS::Path::Normalized mSound;
|
2012-02-03 11:24:28 +01:00
|
|
|
};
|
|
|
|
|
2019-01-22 10:08:48 +04:00
|
|
|
Step sGenerateClassSteps(int number)
|
|
|
|
{
|
2013-03-10 15:03:48 +01:00
|
|
|
number++;
|
2012-08-12 10:50:03 +02:00
|
|
|
|
2022-08-28 17:20:49 +02:00
|
|
|
std::string question{ Fallback::Map::getString("Question_" + MyGUI::utility::toString(number) + "_Question") };
|
|
|
|
std::string answer0{ Fallback::Map::getString("Question_" + MyGUI::utility::toString(number) + "_AnswerOne") };
|
|
|
|
std::string answer1{ Fallback::Map::getString("Question_" + MyGUI::utility::toString(number) + "_AnswerTwo") };
|
|
|
|
std::string answer2{ Fallback::Map::getString(
|
|
|
|
"Question_" + MyGUI::utility::toString(number) + "_AnswerThree") };
|
2019-08-12 00:22:02 +12:00
|
|
|
std::string sound = "vo\\misc\\chargen qa" + MyGUI::utility::toString(number) + ".wav";
|
|
|
|
|
2023-07-29 11:44:39 +04:00
|
|
|
Response r0 = { std::move(answer0), ESM::Class::Combat };
|
|
|
|
Response r1 = { std::move(answer1), ESM::Class::Magic };
|
|
|
|
Response r2 = { std::move(answer2), ESM::Class::Stealth };
|
2019-08-12 00:22:02 +12:00
|
|
|
|
|
|
|
// randomize order in which responses are displayed
|
|
|
|
int order = Misc::Rng::rollDice(6);
|
|
|
|
|
|
|
|
switch (order)
|
|
|
|
{
|
|
|
|
case 0:
|
2024-01-24 20:39:04 +04:00
|
|
|
return { std::move(question), { std::move(r0), std::move(r1), std::move(r2) }, std::move(sound) };
|
2019-08-12 00:22:02 +12:00
|
|
|
case 1:
|
2024-01-24 20:39:04 +04:00
|
|
|
return { std::move(question), { std::move(r0), std::move(r2), std::move(r1) }, std::move(sound) };
|
2019-08-12 00:22:02 +12:00
|
|
|
case 2:
|
2024-01-24 20:39:04 +04:00
|
|
|
return { std::move(question), { std::move(r1), std::move(r0), std::move(r2) }, std::move(sound) };
|
2019-08-12 00:22:02 +12:00
|
|
|
case 3:
|
2024-01-24 20:39:04 +04:00
|
|
|
return { std::move(question), { std::move(r1), std::move(r2), std::move(r0) }, std::move(sound) };
|
2019-08-12 00:22:02 +12:00
|
|
|
case 4:
|
2024-01-24 20:39:04 +04:00
|
|
|
return { std::move(question), { std::move(r2), std::move(r0), std::move(r1) }, std::move(sound) };
|
2019-08-12 00:22:02 +12:00
|
|
|
default:
|
2024-01-24 20:39:04 +04:00
|
|
|
return { std::move(question), { std::move(r2), std::move(r1), std::move(r0) }, std::move(sound) };
|
2019-08-12 00:22:02 +12:00
|
|
|
}
|
|
|
|
}
|
2012-02-03 11:24:28 +01:00
|
|
|
}
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
namespace MWGui
|
2012-01-30 19:27:49 +02:00
|
|
|
{
|
|
|
|
|
2016-08-16 22:47:45 +02:00
|
|
|
CharacterCreation::CharacterCreation(osg::Group* parent, Resource::ResourceSystem* resourceSystem)
|
|
|
|
: mParent(parent)
|
2015-05-20 02:18:20 +02:00
|
|
|
, mResourceSystem(resourceSystem)
|
2013-04-17 18:56:48 -04:00
|
|
|
, mGenerateClassStep(0)
|
2012-05-28 10:50:00 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
mCreationStage = CSE_NotStarted;
|
2019-08-12 00:22:02 +12:00
|
|
|
mGenerateClassResponses[0] = ESM::Class::Combat;
|
|
|
|
mGenerateClassResponses[1] = ESM::Class::Magic;
|
|
|
|
mGenerateClassResponses[2] = ESM::Class::Stealth;
|
2013-07-31 18:46:32 +02:00
|
|
|
mGenerateClassSpecializations[0] = 0;
|
|
|
|
mGenerateClassSpecializations[1] = 0;
|
|
|
|
mGenerateClassSpecializations[2] = 0;
|
2020-05-26 16:45:08 +04:00
|
|
|
|
|
|
|
// Setup player stats
|
2023-05-27 21:54:13 +02:00
|
|
|
const auto& store = MWBase::Environment::get().getWorld()->getStore();
|
|
|
|
for (const ESM::Attribute& attribute : store.get<ESM::Attribute>())
|
|
|
|
mPlayerAttributes.emplace(attribute.mId, MWMechanics::AttributeValue());
|
2020-05-26 16:45:08 +04:00
|
|
|
|
2023-05-27 21:54:13 +02:00
|
|
|
for (const auto& skill : store.get<ESM::Skill>())
|
2023-06-06 12:35:01 +02:00
|
|
|
mPlayerSkillValues.emplace(skill.mId, MWMechanics::SkillValue());
|
2012-05-28 10:50:00 +02:00
|
|
|
}
|
|
|
|
|
2023-08-03 20:21:44 +02:00
|
|
|
void CharacterCreation::setAttribute(ESM::RefId id, const MWMechanics::AttributeValue& value)
|
2012-05-28 10:50:00 +02:00
|
|
|
{
|
2023-06-18 19:10:29 +02:00
|
|
|
mPlayerAttributes[id] = value;
|
|
|
|
if (mReviewDialog)
|
|
|
|
mReviewDialog->setAttribute(id, value);
|
2012-05-28 10:50:00 +02:00
|
|
|
}
|
|
|
|
|
2022-10-02 23:16:43 +02:00
|
|
|
void CharacterCreation::setValue(std::string_view id, const MWMechanics::DynamicStat<float>& value)
|
2012-01-30 19:27:49 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mReviewDialog)
|
|
|
|
{
|
2022-10-02 23:16:43 +02:00
|
|
|
if (id == "HBar")
|
2012-01-30 21:53:17 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
mReviewDialog->setHealth(value);
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
2022-10-02 23:16:43 +02:00
|
|
|
else if (id == "MBar")
|
2012-01-30 21:53:17 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
mReviewDialog->setMagicka(value);
|
|
|
|
}
|
2022-10-02 23:16:43 +02:00
|
|
|
else if (id == "FBar")
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
|
|
|
mReviewDialog->setFatigue(value);
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
|
|
|
}
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2023-06-06 12:35:01 +02:00
|
|
|
void CharacterCreation::setValue(ESM::RefId id, const MWMechanics::SkillValue& value)
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
2023-06-06 12:35:01 +02:00
|
|
|
mPlayerSkillValues[id] = value;
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mReviewDialog)
|
2023-06-06 12:35:01 +02:00
|
|
|
mReviewDialog->setSkillValue(id, value);
|
2012-01-30 19:27:49 +02:00
|
|
|
}
|
2012-02-03 11:24:28 +01:00
|
|
|
|
2023-06-06 19:17:03 +02:00
|
|
|
void CharacterCreation::configureSkills(const std::vector<ESM::RefId>& major, const std::vector<ESM::RefId>& minor)
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
|
|
|
if (mReviewDialog)
|
|
|
|
mReviewDialog->configureSkills(major, minor);
|
2020-05-26 16:45:08 +04:00
|
|
|
|
|
|
|
mPlayerMajorSkills = major;
|
|
|
|
mPlayerMinorSkills = minor;
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2012-02-03 11:24:28 +01:00
|
|
|
|
2016-11-18 17:59:05 +01:00
|
|
|
void CharacterCreation::onFrame(float duration)
|
|
|
|
{
|
|
|
|
if (mReviewDialog)
|
|
|
|
mReviewDialog->onFrame(duration);
|
|
|
|
}
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::spawnDialog(const char id)
|
|
|
|
{
|
2015-07-13 18:40:05 +02:00
|
|
|
try
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
2015-07-13 18:40:05 +02:00
|
|
|
switch (id)
|
|
|
|
{
|
|
|
|
case GM_Name:
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mNameDialog));
|
|
|
|
mNameDialog = std::make_unique<TextInputDialog>();
|
2015-07-13 18:40:05 +02:00
|
|
|
mNameDialog->setTextLabel(
|
|
|
|
MWBase::Environment::get().getWindowManager()->getGameSettingString("sName", "Name"));
|
|
|
|
mNameDialog->setTextInput(mPlayerName);
|
|
|
|
mNameDialog->setNextButtonShow(mCreationStage >= CSE_NameChosen);
|
|
|
|
mNameDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onNameDialogDone);
|
|
|
|
mNameDialog->setVisible(true);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GM_Race:
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mRaceDialog));
|
|
|
|
mRaceDialog = std::make_unique<RaceDialog>(mParent, mResourceSystem);
|
2015-07-13 18:40:05 +02:00
|
|
|
mRaceDialog->setNextButtonShow(mCreationStage >= CSE_RaceChosen);
|
|
|
|
mRaceDialog->setRaceId(mPlayerRaceId);
|
|
|
|
mRaceDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogDone);
|
|
|
|
mRaceDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogBack);
|
|
|
|
mRaceDialog->setVisible(true);
|
|
|
|
if (mCreationStage < CSE_NameChosen)
|
|
|
|
mCreationStage = CSE_NameChosen;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GM_Class:
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mClassChoiceDialog));
|
|
|
|
mClassChoiceDialog = std::make_unique<ClassChoiceDialog>();
|
2015-07-13 18:40:05 +02:00
|
|
|
mClassChoiceDialog->eventButtonSelected
|
|
|
|
+= MyGUI::newDelegate(this, &CharacterCreation::onClassChoice);
|
|
|
|
mClassChoiceDialog->setVisible(true);
|
|
|
|
if (mCreationStage < CSE_RaceChosen)
|
|
|
|
mCreationStage = CSE_RaceChosen;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GM_ClassPick:
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mPickClassDialog));
|
|
|
|
mPickClassDialog = std::make_unique<PickClassDialog>();
|
2015-07-13 18:40:05 +02:00
|
|
|
mPickClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
2016-03-21 11:51:34 +01:00
|
|
|
mPickClassDialog->setClassId(mPlayerClass.mId);
|
2015-07-13 18:40:05 +02:00
|
|
|
mPickClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogDone);
|
|
|
|
mPickClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogBack);
|
|
|
|
mPickClassDialog->setVisible(true);
|
|
|
|
if (mCreationStage < CSE_RaceChosen)
|
|
|
|
mCreationStage = CSE_RaceChosen;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GM_Birth:
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mBirthSignDialog));
|
|
|
|
mBirthSignDialog = std::make_unique<BirthDialog>();
|
2015-07-13 18:40:05 +02:00
|
|
|
mBirthSignDialog->setNextButtonShow(mCreationStage >= CSE_BirthSignChosen);
|
|
|
|
mBirthSignDialog->setBirthId(mPlayerBirthSignId);
|
|
|
|
mBirthSignDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogDone);
|
|
|
|
mBirthSignDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogBack);
|
|
|
|
mBirthSignDialog->setVisible(true);
|
|
|
|
if (mCreationStage < CSE_ClassChosen)
|
|
|
|
mCreationStage = CSE_ClassChosen;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GM_ClassCreate:
|
2022-07-20 22:13:33 +02:00
|
|
|
if (mCreateClassDialog == nullptr)
|
2015-07-13 18:40:05 +02:00
|
|
|
{
|
2022-07-20 22:13:33 +02:00
|
|
|
mCreateClassDialog = std::make_unique<CreateClassDialog>();
|
2015-07-13 18:40:05 +02:00
|
|
|
mCreateClassDialog->eventDone
|
|
|
|
+= MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
|
|
|
|
mCreateClassDialog->eventBack
|
|
|
|
+= MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogBack);
|
|
|
|
}
|
|
|
|
mCreateClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
|
|
|
mCreateClassDialog->setVisible(true);
|
|
|
|
if (mCreationStage < CSE_RaceChosen)
|
|
|
|
mCreationStage = CSE_RaceChosen;
|
|
|
|
break;
|
|
|
|
case GM_ClassGenerate:
|
|
|
|
mGenerateClassStep = 0;
|
2023-02-17 19:20:29 +01:00
|
|
|
mGenerateClass = ESM::RefId();
|
2015-07-13 18:40:05 +02:00
|
|
|
mGenerateClassSpecializations[0] = 0;
|
|
|
|
mGenerateClassSpecializations[1] = 0;
|
|
|
|
mGenerateClassSpecializations[2] = 0;
|
|
|
|
showClassQuestionDialog();
|
|
|
|
if (mCreationStage < CSE_RaceChosen)
|
|
|
|
mCreationStage = CSE_RaceChosen;
|
|
|
|
break;
|
|
|
|
case GM_Review:
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mReviewDialog));
|
|
|
|
mReviewDialog = std::make_unique<ReviewDialog>();
|
2017-04-14 23:21:20 +04:00
|
|
|
|
|
|
|
MWBase::World* world = MWBase::Environment::get().getWorld();
|
|
|
|
|
|
|
|
const ESM::NPC* playerNpc = world->getPlayerPtr().get<ESM::NPC>()->mBase;
|
|
|
|
|
2023-07-24 23:36:24 +02:00
|
|
|
const MWWorld::Player& player = world->getPlayer();
|
2017-04-14 23:21:20 +04:00
|
|
|
|
|
|
|
const ESM::Class* playerClass = world->getStore().get<ESM::Class>().find(playerNpc->mClass);
|
|
|
|
|
|
|
|
mReviewDialog->setPlayerName(playerNpc->mName);
|
|
|
|
mReviewDialog->setRace(playerNpc->mRace);
|
|
|
|
mReviewDialog->setClass(*playerClass);
|
|
|
|
mReviewDialog->setBirthSign(player.getBirthSign());
|
2015-07-13 18:40:05 +02:00
|
|
|
|
2020-05-26 16:45:08 +04:00
|
|
|
MWWorld::Ptr playerPtr = MWMechanics::getPlayer();
|
|
|
|
const MWMechanics::CreatureStats& stats = playerPtr.getClass().getCreatureStats(playerPtr);
|
2015-07-13 18:40:05 +02:00
|
|
|
|
2020-05-26 16:45:08 +04:00
|
|
|
mReviewDialog->setHealth(stats.getHealth());
|
|
|
|
mReviewDialog->setMagicka(stats.getMagicka());
|
|
|
|
mReviewDialog->setFatigue(stats.getFatigue());
|
|
|
|
for (auto& attributePair : mPlayerAttributes)
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
2023-08-03 20:21:44 +02:00
|
|
|
mReviewDialog->setAttribute(attributePair.first, attributePair.second);
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2023-06-06 12:35:01 +02:00
|
|
|
for (const auto& [skill, value] : mPlayerSkillValues)
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
2023-06-06 12:35:01 +02:00
|
|
|
mReviewDialog->setSkillValue(skill, value);
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2020-05-26 16:45:08 +04:00
|
|
|
mReviewDialog->configureSkills(mPlayerMajorSkills, mPlayerMinorSkills);
|
2015-07-13 18:40:05 +02:00
|
|
|
|
|
|
|
mReviewDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onReviewDialogDone);
|
|
|
|
mReviewDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onReviewDialogBack);
|
|
|
|
mReviewDialog->eventActivateDialog
|
|
|
|
+= MyGUI::newDelegate(this, &CharacterCreation::onReviewActivateDialog);
|
|
|
|
mReviewDialog->setVisible(true);
|
|
|
|
if (mCreationStage < CSE_BirthSignChosen)
|
|
|
|
mCreationStage = CSE_BirthSignChosen;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (std::exception& e)
|
|
|
|
{
|
2018-08-14 23:05:43 +04:00
|
|
|
Log(Debug::Error) << "Error: Failed to create chargen window: " << e.what();
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
|
|
|
}
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::onReviewDialogDone(WindowBase* parWindow)
|
2012-01-30 19:27:49 +02:00
|
|
|
{
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mReviewDialog));
|
2013-04-10 14:46:21 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
2012-01-30 19:27:49 +02:00
|
|
|
}
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::onReviewDialogBack()
|
2012-01-30 19:27:49 +02:00
|
|
|
{
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mReviewDialog));
|
2013-11-05 19:39:43 -06:00
|
|
|
mCreationStage = CSE_ReviewBack;
|
2013-04-17 18:56:48 -04:00
|
|
|
|
2013-11-05 19:39:43 -06:00
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
2013-04-17 18:56:48 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
|
2012-01-30 19:27:49 +02:00
|
|
|
}
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::onReviewActivateDialog(int parDialog)
|
|
|
|
{
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mReviewDialog));
|
2013-04-17 18:56:48 -04:00
|
|
|
mCreationStage = CSE_ReviewNext;
|
2012-01-30 19:27:49 +02:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
2012-01-30 19:27:49 +02:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
switch (parDialog)
|
|
|
|
{
|
|
|
|
case ReviewDialog::NAME_DIALOG:
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Name);
|
|
|
|
break;
|
|
|
|
case ReviewDialog::RACE_DIALOG:
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Race);
|
|
|
|
break;
|
|
|
|
case ReviewDialog::CLASS_DIALOG:
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
|
|
|
break;
|
|
|
|
case ReviewDialog::BIRTHSIGN_DIALOG:
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
|
|
|
|
};
|
|
|
|
}
|
2012-05-23 12:23:35 +02:00
|
|
|
|
2015-07-31 20:55:31 +02:00
|
|
|
void CharacterCreation::selectPickedClass()
|
2012-01-30 19:27:49 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mPickClassDialog)
|
|
|
|
{
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
const ESM::RefId& classId = mPickClassDialog->getClassId();
|
2013-04-17 18:56:48 -04:00
|
|
|
if (!classId.empty())
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(classId);
|
2012-01-30 19:27:49 +02:00
|
|
|
|
2024-01-07 19:10:09 +04:00
|
|
|
const ESM::Class* pickedClass = MWBase::Environment::get().getESMStore()->get<ESM::Class>().find(classId);
|
|
|
|
if (pickedClass)
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
2024-01-07 19:10:09 +04:00
|
|
|
mPlayerClass = *pickedClass;
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mPickClassDialog));
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2015-07-31 20:55:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CharacterCreation::onPickClassDialogDone(WindowBase* parWindow)
|
|
|
|
{
|
|
|
|
selectPickedClass();
|
2013-11-05 19:38:45 -06:00
|
|
|
|
2015-03-12 00:43:28 +01:00
|
|
|
handleDialogDone(CSE_ClassChosen, GM_Birth);
|
2012-01-30 19:27:49 +02:00
|
|
|
}
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::onPickClassDialogBack()
|
2012-05-23 12:23:35 +02:00
|
|
|
{
|
2015-07-31 20:55:31 +02:00
|
|
|
selectPickedClass();
|
2013-04-17 18:56:48 -04:00
|
|
|
|
2013-04-10 14:46:21 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
2013-04-17 18:56:48 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
2012-05-23 12:23:35 +02:00
|
|
|
}
|
2013-04-17 18:56:48 -04:00
|
|
|
|
|
|
|
void CharacterCreation::onClassChoice(int _index)
|
2012-01-30 19:27:49 +02:00
|
|
|
{
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mClassChoiceDialog));
|
2013-04-17 18:56:48 -04:00
|
|
|
|
2013-04-10 14:46:21 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
2012-01-30 19:27:49 +02:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
switch (_index)
|
|
|
|
{
|
|
|
|
case ClassChoiceDialog::Class_Generate:
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassGenerate);
|
|
|
|
break;
|
|
|
|
case ClassChoiceDialog::Class_Pick:
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassPick);
|
|
|
|
break;
|
|
|
|
case ClassChoiceDialog::Class_Create:
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassCreate);
|
|
|
|
break;
|
|
|
|
case ClassChoiceDialog::Class_Back:
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Race);
|
|
|
|
break;
|
|
|
|
};
|
|
|
|
}
|
2012-01-30 19:27:49 +02:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::onNameDialogDone(WindowBase* parWindow)
|
2012-01-30 19:27:49 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mNameDialog)
|
|
|
|
{
|
|
|
|
mPlayerName = mNameDialog->getTextInput();
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->setPlayerName(mPlayerName);
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mNameDialog));
|
2012-11-10 11:41:12 +04:00
|
|
|
}
|
|
|
|
|
2015-03-12 00:43:28 +01:00
|
|
|
handleDialogDone(CSE_NameChosen, GM_Race);
|
2012-01-30 19:27:49 +02:00
|
|
|
}
|
|
|
|
|
2015-07-31 20:55:31 +02:00
|
|
|
void CharacterCreation::selectRace()
|
2012-05-23 12:23:35 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mRaceDialog)
|
|
|
|
{
|
|
|
|
const ESM::NPC& data = mRaceDialog->getResult();
|
|
|
|
mPlayerRaceId = data.mRace;
|
|
|
|
if (!mPlayerRaceId.empty())
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->setPlayerRace(
|
|
|
|
data.mRace, data.isMale(), data.mHead, data.mHair);
|
|
|
|
}
|
2015-07-31 20:55:31 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->getInventoryWindow()->rebuildAvatar();
|
|
|
|
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mRaceDialog));
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2015-07-31 20:55:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CharacterCreation::onRaceDialogBack()
|
|
|
|
{
|
|
|
|
selectRace();
|
|
|
|
|
2013-04-10 14:46:21 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
2013-04-17 18:56:48 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Name);
|
2012-01-30 19:27:49 +02:00
|
|
|
}
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
|
2012-01-30 21:53:17 +02:00
|
|
|
{
|
2015-07-31 20:55:31 +02:00
|
|
|
selectRace();
|
2013-11-05 19:38:45 -06:00
|
|
|
|
2015-03-12 00:43:28 +01:00
|
|
|
handleDialogDone(CSE_RaceChosen, GM_Class);
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
|
|
|
|
2015-07-31 20:55:31 +02:00
|
|
|
void CharacterCreation::selectBirthSign()
|
2012-05-23 12:23:35 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mBirthSignDialog)
|
|
|
|
{
|
|
|
|
mPlayerBirthSignId = mBirthSignDialog->getBirthId();
|
|
|
|
if (!mPlayerBirthSignId.empty())
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->setPlayerBirthsign(mPlayerBirthSignId);
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mBirthSignDialog));
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2015-07-31 20:55:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CharacterCreation::onBirthSignDialogDone(WindowBase* parWindow)
|
|
|
|
{
|
|
|
|
selectBirthSign();
|
2013-11-05 19:38:45 -06:00
|
|
|
|
2015-03-12 00:43:28 +01:00
|
|
|
handleDialogDone(CSE_BirthSignChosen, GM_Review);
|
2012-05-23 12:23:35 +02:00
|
|
|
}
|
2013-04-17 18:56:48 -04:00
|
|
|
|
|
|
|
void CharacterCreation::onBirthSignDialogBack()
|
2012-01-30 21:53:17 +02:00
|
|
|
{
|
2015-07-31 20:55:31 +02:00
|
|
|
selectBirthSign();
|
2013-04-17 18:56:48 -04:00
|
|
|
|
2013-04-10 14:46:21 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
2013-04-17 18:56:48 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
|
|
|
|
2015-07-31 20:55:31 +02:00
|
|
|
void CharacterCreation::selectCreatedClass()
|
2012-01-30 21:53:17 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mCreateClassDialog)
|
|
|
|
{
|
2024-01-07 19:10:09 +04:00
|
|
|
ESM::Class createdClass;
|
|
|
|
createdClass.mName = mCreateClassDialog->getName();
|
|
|
|
createdClass.mDescription = mCreateClassDialog->getDescription();
|
|
|
|
createdClass.mData.mSpecialization = mCreateClassDialog->getSpecializationId();
|
|
|
|
createdClass.mData.mIsPlayable = 0x1;
|
|
|
|
createdClass.mRecordFlags = 0;
|
2013-04-17 18:56:48 -04:00
|
|
|
|
2023-08-03 20:21:44 +02:00
|
|
|
std::vector<ESM::RefId> attributes = mCreateClassDialog->getFavoriteAttributes();
|
2024-01-07 19:10:09 +04:00
|
|
|
assert(attributes.size() >= createdClass.mData.mAttribute.size());
|
|
|
|
for (size_t i = 0; i < createdClass.mData.mAttribute.size(); ++i)
|
|
|
|
createdClass.mData.mAttribute[i] = ESM::Attribute::refIdToIndex(attributes[i]);
|
2013-04-17 18:56:48 -04:00
|
|
|
|
2023-06-06 17:24:22 +02:00
|
|
|
std::vector<ESM::RefId> majorSkills = mCreateClassDialog->getMajorSkills();
|
|
|
|
std::vector<ESM::RefId> minorSkills = mCreateClassDialog->getMinorSkills();
|
2024-01-07 19:10:09 +04:00
|
|
|
assert(majorSkills.size() >= createdClass.mData.mSkills.size());
|
|
|
|
assert(minorSkills.size() >= createdClass.mData.mSkills.size());
|
|
|
|
for (size_t i = 0; i < createdClass.mData.mSkills.size(); ++i)
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
2024-01-07 19:10:09 +04:00
|
|
|
createdClass.mData.mSkills[i][1] = ESM::Skill::refIdToIndex(majorSkills[i]);
|
|
|
|
createdClass.mData.mSkills[i][0] = ESM::Skill::refIdToIndex(minorSkills[i]);
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2024-01-07 19:10:09 +04:00
|
|
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(createdClass);
|
|
|
|
mPlayerClass = std::move(createdClass);
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2015-07-31 20:55:31 +02:00
|
|
|
// Do not delete dialog, so that choices are remembered in case we want to go back and adjust them later
|
2014-04-28 09:12:03 +02:00
|
|
|
mCreateClassDialog->setVisible(false);
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
2015-07-31 20:55:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
|
|
|
|
{
|
|
|
|
selectCreatedClass();
|
2013-11-05 19:38:45 -06:00
|
|
|
|
2015-03-12 00:43:28 +01:00
|
|
|
handleDialogDone(CSE_ClassChosen, GM_Birth);
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::onCreateClassDialogBack()
|
|
|
|
{
|
2015-07-31 20:55:31 +02:00
|
|
|
// not done in MW, but we do it for consistency with the other dialogs
|
|
|
|
selectCreatedClass();
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2013-04-10 14:46:21 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
2013-04-17 18:56:48 -04:00
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::onClassQuestionChosen(int _index)
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getSoundManager()->stopSay();
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mGenerateClassQuestionDialog));
|
2012-05-01 20:30:31 -07:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
if (_index < 0 || _index >= 3)
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
|
|
|
return;
|
|
|
|
}
|
2012-08-12 16:07:04 +02:00
|
|
|
|
2019-08-12 00:22:02 +12:00
|
|
|
ESM::Class::Specialization specialization = mGenerateClassResponses[_index];
|
|
|
|
if (specialization == ESM::Class::Combat)
|
2013-04-17 18:56:48 -04:00
|
|
|
++mGenerateClassSpecializations[0];
|
|
|
|
else if (specialization == ESM::Class::Magic)
|
2019-08-12 00:22:02 +12:00
|
|
|
++mGenerateClassSpecializations[1];
|
|
|
|
else if (specialization == ESM::Class::Stealth)
|
2013-04-17 18:56:48 -04:00
|
|
|
++mGenerateClassSpecializations[2];
|
|
|
|
++mGenerateClassStep;
|
|
|
|
showClassQuestionDialog();
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
void CharacterCreation::showClassQuestionDialog()
|
2012-01-30 21:53:17 +02:00
|
|
|
{
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mGenerateClassStep == 10)
|
|
|
|
{
|
2019-08-12 00:22:02 +12:00
|
|
|
unsigned combat = mGenerateClassSpecializations[0];
|
|
|
|
unsigned magic = mGenerateClassSpecializations[1];
|
|
|
|
unsigned stealth = mGenerateClassSpecializations[2];
|
2022-10-13 23:14:00 +02:00
|
|
|
std::string_view className;
|
2019-08-12 00:22:02 +12:00
|
|
|
if (combat > 7)
|
2012-01-30 21:53:17 +02:00
|
|
|
{
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Warrior";
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
2019-08-12 00:22:02 +12:00
|
|
|
else if (magic > 7)
|
2012-01-30 21:53:17 +02:00
|
|
|
{
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Mage";
|
2019-08-12 00:22:02 +12:00
|
|
|
}
|
|
|
|
else if (stealth > 7)
|
|
|
|
{
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Thief";
|
2019-08-12 00:22:02 +12:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
switch (combat)
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
2019-08-12 00:22:02 +12:00
|
|
|
case 4:
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Rogue";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
if (stealth == 3)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Scout";
|
2019-08-12 00:22:02 +12:00
|
|
|
else
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Archer";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
if (stealth == 1)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Barbarian";
|
2019-08-12 00:22:02 +12:00
|
|
|
else if (stealth == 3)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Crusader";
|
2019-08-12 00:22:02 +12:00
|
|
|
else
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Knight";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 7:
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Warrior";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
switch (magic)
|
|
|
|
{
|
|
|
|
case 4:
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Spellsword";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 5:
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Witchhunter";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
if (combat == 2)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Sorcerer";
|
2019-08-12 00:22:02 +12:00
|
|
|
else if (combat == 3)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Healer";
|
2019-08-12 00:22:02 +12:00
|
|
|
else
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Battlemage";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 7:
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Mage";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
switch (stealth)
|
|
|
|
{
|
|
|
|
case 3:
|
|
|
|
if (magic == 3)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Bard"; // unreachable
|
2019-08-12 00:22:02 +12:00
|
|
|
else
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Warrior";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
if (magic == 3)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Monk";
|
2019-08-12 00:22:02 +12:00
|
|
|
else
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Pilgrim";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
if (magic == 1)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Agent";
|
2019-08-12 00:22:02 +12:00
|
|
|
else if (magic == 3)
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Assassin";
|
2019-08-12 00:22:02 +12:00
|
|
|
else
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Acrobat";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
case 7:
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Thief";
|
2019-08-12 00:22:02 +12:00
|
|
|
break;
|
|
|
|
default:
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
className = "Warrior";
|
2019-08-12 00:22:02 +12:00
|
|
|
}
|
|
|
|
}
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2012-01-30 21:53:17 +02:00
|
|
|
}
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
mGenerateClass = ESM::RefId::stringRefId(className);
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mGenerateClassResultDialog));
|
2012-08-12 16:07:04 +02:00
|
|
|
|
2022-07-20 22:13:33 +02:00
|
|
|
mGenerateClassResultDialog = std::make_unique<GenerateClassResultDialog>();
|
2013-04-17 18:56:48 -04:00
|
|
|
mGenerateClassResultDialog->setClassId(mGenerateClass);
|
|
|
|
mGenerateClassResultDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassBack);
|
|
|
|
mGenerateClassResultDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassDone);
|
|
|
|
mGenerateClassResultDialog->setVisible(true);
|
|
|
|
return;
|
|
|
|
}
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
if (mGenerateClassStep > 10)
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
|
|
|
return;
|
|
|
|
}
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mGenerateClassQuestionDialog));
|
2012-08-12 16:07:04 +02:00
|
|
|
|
2022-07-20 22:13:33 +02:00
|
|
|
mGenerateClassQuestionDialog = std::make_unique<InfoBoxDialog>();
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2019-08-12 00:22:02 +12:00
|
|
|
Step step = sGenerateClassSteps(mGenerateClassStep);
|
|
|
|
mGenerateClassResponses[0] = step.mResponses[0].mSpecialization;
|
|
|
|
mGenerateClassResponses[1] = step.mResponses[1].mSpecialization;
|
|
|
|
mGenerateClassResponses[2] = step.mResponses[2].mSpecialization;
|
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
InfoBoxDialog::ButtonList buttons;
|
2019-08-12 00:22:02 +12:00
|
|
|
mGenerateClassQuestionDialog->setText(step.mText);
|
|
|
|
buttons.push_back(step.mResponses[0].mText);
|
|
|
|
buttons.push_back(step.mResponses[1].mText);
|
|
|
|
buttons.push_back(step.mResponses[2].mText);
|
2013-04-17 18:56:48 -04:00
|
|
|
mGenerateClassQuestionDialog->setButtons(buttons);
|
|
|
|
mGenerateClassQuestionDialog->eventButtonSelected
|
|
|
|
+= MyGUI::newDelegate(this, &CharacterCreation::onClassQuestionChosen);
|
|
|
|
mGenerateClassQuestionDialog->setVisible(true);
|
2012-05-01 20:30:31 -07:00
|
|
|
|
2023-07-19 17:21:17 +04:00
|
|
|
MWBase::Environment::get().getSoundManager()->say(Misc::ResourceHelpers::correctSoundPath(step.mSound));
|
2013-04-17 18:56:48 -04:00
|
|
|
}
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2015-07-31 20:55:31 +02:00
|
|
|
void CharacterCreation::selectGeneratedClass()
|
2013-04-17 18:56:48 -04:00
|
|
|
{
|
2022-07-20 22:13:33 +02:00
|
|
|
MWBase::Environment::get().getWindowManager()->removeDialog(std::move(mGenerateClassResultDialog));
|
2012-08-12 16:07:04 +02:00
|
|
|
|
2013-04-17 18:56:48 -04:00
|
|
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
2012-11-06 00:34:11 +04:00
|
|
|
|
2024-01-07 19:10:09 +04:00
|
|
|
const ESM::Class* generatedClass
|
|
|
|
= MWBase::Environment::get().getESMStore()->get<ESM::Class>().find(mGenerateClass);
|
2012-11-06 00:34:11 +04:00
|
|
|
|
2024-01-07 19:10:09 +04:00
|
|
|
mPlayerClass = *generatedClass;
|
2015-07-31 20:55:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CharacterCreation::onGenerateClassBack()
|
|
|
|
{
|
|
|
|
selectGeneratedClass();
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
|
|
|
|
{
|
|
|
|
selectGeneratedClass();
|
2013-11-05 19:38:45 -06:00
|
|
|
|
2015-03-12 00:43:28 +01:00
|
|
|
handleDialogDone(CSE_ClassChosen, GM_Birth);
|
2012-05-23 12:23:35 +02:00
|
|
|
}
|
2013-04-17 18:56:48 -04:00
|
|
|
|
2022-07-20 22:13:33 +02:00
|
|
|
CharacterCreation::~CharacterCreation() = default;
|
2012-01-30 21:53:17 +02:00
|
|
|
|
2015-03-12 00:43:28 +01:00
|
|
|
void CharacterCreation::handleDialogDone(CSE currentStage, int nextMode)
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
|
|
|
if (mCreationStage == CSE_ReviewNext)
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
|
|
|
|
}
|
|
|
|
else if (mCreationStage >= currentStage)
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode((GuiMode)nextMode);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
mCreationStage = currentStage;
|
|
|
|
}
|
|
|
|
}
|
2012-01-30 19:27:49 +02:00
|
|
|
}
|