From 7e858cdfc765d518c12d35431fc005e18cefed2e Mon Sep 17 00:00:00 2001 From: Tim Bazuin Date: Tue, 3 Mar 2020 00:57:20 +0100 Subject: [PATCH 1/2] removes skill cap for stats window" --- apps/openmw/mwgui/statswindow.cpp | 39 ++++++++++--------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index d3d487579..68b416ddb 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -244,33 +244,18 @@ namespace MWGui nameWidget->setSize(nameWidget->getWidth() - (widthAfter-widthBefore), nameWidget->getHeight()); } - if (value.getBase() < 100) - { - nameWidget->setUserString("Visible_SkillMaxed", "false"); - nameWidget->setUserString("UserData^Hidden_SkillMaxed", "true"); - nameWidget->setUserString("Visible_SkillProgressVBox", "true"); - nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false"); - - valueWidget->setUserString("Visible_SkillMaxed", "false"); - valueWidget->setUserString("UserData^Hidden_SkillMaxed", "true"); - valueWidget->setUserString("Visible_SkillProgressVBox", "true"); - valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false"); - - setSkillProgress(nameWidget, value.getProgress(), parSkill); - setSkillProgress(valueWidget, value.getProgress(), parSkill); - } - else - { - nameWidget->setUserString("Visible_SkillMaxed", "true"); - nameWidget->setUserString("UserData^Hidden_SkillMaxed", "false"); - nameWidget->setUserString("Visible_SkillProgressVBox", "false"); - nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "true"); - - valueWidget->setUserString("Visible_SkillMaxed", "true"); - valueWidget->setUserString("UserData^Hidden_SkillMaxed", "false"); - valueWidget->setUserString("Visible_SkillProgressVBox", "false"); - valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "true"); - } + nameWidget->setUserString("Visible_SkillMaxed", "false"); + nameWidget->setUserString("UserData^Hidden_SkillMaxed", "true"); + nameWidget->setUserString("Visible_SkillProgressVBox", "true"); + nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false"); + + valueWidget->setUserString("Visible_SkillMaxed", "false"); + valueWidget->setUserString("UserData^Hidden_SkillMaxed", "true"); + valueWidget->setUserString("Visible_SkillProgressVBox", "true"); + valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false"); + + setSkillProgress(nameWidget, value.getProgress(), parSkill); + setSkillProgress(valueWidget, value.getProgress(), parSkill); } } -- 2.38.5 From 27eca7b196ad6a9f76e1a98a7f4081b1c5abf3b1 Mon Sep 17 00:00:00 2001 From: Tim Bazuin Date: Tue, 3 Mar 2020 01:33:57 +0100 Subject: [PATCH 2/2] removed some hardcoded 100 skill caps --- apps/openmw/mwclass/npc.cpp | 9 ++++----- apps/openmw/mwmechanics/npcstats.cpp | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index bb5705980..169bc7784 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -133,9 +133,9 @@ namespace } modifierSum += add; } - creatureStats.setAttribute(attribute, std::min( - round_ieee_754(creatureStats.getAttribute(attribute).getBase() - + (level-1) * modifierSum), 100) ); + + creatureStats.setAttribute(attribute, + round_ieee_754(creatureStats.getAttribute(attribute).getBase() + (level-1) * modifierSum) ); } // initial health @@ -230,13 +230,12 @@ namespace } npcStats.getSkill(skillIndex).setBase( - std::min( round_ieee_754( npcStats.getSkill(skillIndex).getBase() + 5 + raceBonus + specBonus - +(int(level)-1) * (majorMultiplier + specMultiplier)), 100)); // Must gracefully handle level 0 + +(int(level)-1) * (majorMultiplier + specMultiplier))); // Must gracefully handle level 0 } int skills[ESM::Skill::Length]; diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp index e80a38552..6d07f0aaf 100644 --- a/apps/openmw/mwmechanics/npcstats.cpp +++ b/apps/openmw/mwmechanics/npcstats.cpp @@ -218,9 +218,6 @@ void MWMechanics::NpcStats::increaseSkill(int skillIndex, const ESM::Class &clas { int base = getSkill (skillIndex).getBase(); - if (base >= 100) - return; - base += 1; const MWWorld::Store &gmst = -- 2.38.5