From c7ac06b960147d278009f7eac4582391cb930ccb Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 17 Apr 2019 17:13:25 +0300 Subject: [PATCH 1/4] Always account for every follower travelling --- apps/launcher/advancedpage.cpp | 2 -- apps/openmw/mwgui/travelwindow.cpp | 7 ++----- files/settings-default.cfg | 3 --- files/ui/advancedpage.ui | 10 ---------- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index 7b852075f..f098dcaa2 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -74,7 +74,6 @@ bool Launcher::AdvancedPage::loadSettings() loadSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game"); loadSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game"); loadSettingBool(rebalanceSoulGemValuesCheckBox, "rebalance soul gem values", "Game"); - loadSettingBool(chargeForEveryFollowerCheckBox, "charge for every follower travelling", "Game"); loadSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game"); loadSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game"); int unarmedFactorsStrengthIndex = mEngineSettings.getInt("strength influences hand to hand", "Game"); @@ -135,7 +134,6 @@ void Launcher::AdvancedPage::saveSettings() saveSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game"); saveSettingBool(rebalanceSoulGemValuesCheckBox, "rebalance soul gem values", "Game"); saveSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game"); - saveSettingBool(chargeForEveryFollowerCheckBox, "charge for every follower travelling", "Game"); saveSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game"); saveSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game"); int unarmedFactorsStrengthIndex = unarmedFactorsStrengthComboBox->currentIndex(); diff --git a/apps/openmw/mwgui/travelwindow.cpp b/apps/openmw/mwgui/travelwindow.cpp index 0ce864556..81cd76089 100644 --- a/apps/openmw/mwgui/travelwindow.cpp +++ b/apps/openmw/mwgui/travelwindow.cpp @@ -71,11 +71,8 @@ namespace MWGui std::set followers; MWWorld::ActionTeleport::getFollowersToTeleport(player, followers); - // Apply followers cost, in vanilla one follower travels for free - if (Settings::Manager::getBool("charge for every follower travelling", "Game")) - price *= 1 + static_cast(followers.size()); - else - price *= std::max(1, static_cast(followers.size())); + // Apply followers cost, unlike vanilla the first follower doesn't travel for free + price *= 1 + static_cast(followers.size()); int lineHeight = MWBase::Environment::get().getWindowManager()->getFontHeight() + 2; diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 311f8b42f..71260c37b 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -225,9 +225,6 @@ classic reflected absorb spells behavior = true # Show duration of magic effect and lights in the spells window. show effect duration = false -# Account for the first follower in fast travel cost calculations. -charge for every follower travelling = false - # Prevent merchants from equipping items that are sold to them. prevent merchant equipping = false diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 0ca65b996..4aaffe936 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -56,16 +56,6 @@ - - - - <html><head/><body><p>Account for the first follower in fast travel cost calculations.</p></body></html> - - - Charge for every follower travelling - - - From 34ea9ea8134d1145087a6039d021bce69b7cfff2 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 17 Apr 2019 17:51:18 +0300 Subject: [PATCH 2/4] Add an option to restore MCP-like movement behavior --- apps/launcher/advancedpage.cpp | 2 ++ apps/openmw/mwmechanics/character.cpp | 2 +- files/settings-default.cfg | 3 +++ files/ui/advancedpage.ui | 10 ++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index f098dcaa2..a8ff9a0ed 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -81,6 +81,7 @@ bool Launcher::AdvancedPage::loadSettings() unarmedFactorsStrengthComboBox->setCurrentIndex(unarmedFactorsStrengthIndex); loadSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); + loadSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); // Input Settings loadSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input"); @@ -141,6 +142,7 @@ void Launcher::AdvancedPage::saveSettings() mEngineSettings.setInt("strength influences hand to hand", "Game", unarmedFactorsStrengthIndex); saveSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); + saveSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); // Input Settings saveSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input"); diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index c8a99174b..8a6101cd5 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2372,7 +2372,7 @@ void CharacterController::update(float duration, bool animationOnly) moved.x() *= scale; moved.y() *= scale; - if(mPtr.getClass().isNpc()) + if (mPtr.getClass().isNpc() && !Settings::Manager::getBool("normalise race speed", "Game")) { const ESM::NPC* npc = mPtr.get()->mBase; const ESM::Race* race = world->getStore().get().find(npc->mRace); diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 71260c37b..217f11d13 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -261,6 +261,9 @@ only appropriate ammunition bypasses resistance = false # Use casting animations for magic items, just as for spells use magic item animations = false +# Don't use race weight in NPC movement speed calculations +normalise race speed = false + [General] # Anisotropy reduces distortion in textures at low angles (e.g. 0 to 16). diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 4aaffe936..f7575cd2b 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -159,6 +159,16 @@ + + + + <html><head/><body><p>Don't use race weight in NPC movement speed calculations.</p></body></html> + + + Normalise race speed + + + From 5e9bd743a5e875f0cb4270a869a8d5adac389b2c Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 17 Apr 2019 18:06:56 +0300 Subject: [PATCH 3/4] Document some gameplay settings --- .../reference/modding/settings/game.rst | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/source/reference/modding/settings/game.rst b/docs/source/reference/modding/settings/game.rst index 639770122..4e397e9c9 100644 --- a/docs/source/reference/modding/settings/game.rst +++ b/docs/source/reference/modding/settings/game.rst @@ -238,3 +238,34 @@ An enchanted bow with chitin arrows will no longer be enough for the purpose, wh This was previously the default engine behavior that diverged from Morrowind design. This setting can be toggled in Advanced tab of the launcher. + +strength influences hand to hand +-------------------------------- + +:Type: integer +:Range: 0, 1, 2 +:Default: 0 + +This setting controls the behavior of factoring of Strength attribute into hand-to-hand damage, which is using the formula +Morrowind Code Patch uses for its equivalent feature: damage is multiplied by its value divided by 40. + +0: Strength attribute is ignored +1: Strength attribute is factored in damage from any actor +2: Strength attribute is factored in damage from any actor except werewolves + +This setting can be controlled in Advanced tab of the launcher. + +normalise race speed +-------------------- + +:Type: boolean +:Range: True/False +:Default: False + +By default race weight is factored into horizontal movement speed like in Morrowind. +For example, an NPC which has 1.2 race weight is faster than an NPC with the exact same stats and weight 1.0 by a factor of 120%. +If this setting is true, race weight is ignored in the calculations which allows for a movement behavior +equivalent to the one introduced by the equivalent Morrowind Code Patch feature. +This makes the movement speed behavior more fair between different races. + +This setting can be controlled in Advanced tab of the launcher. From 8abe92fe41412f8bf1bab872ff33856b24d16657 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 24 Apr 2019 16:22:56 +0300 Subject: [PATCH 4/4] Don't recover normalise speed setting every frame --- apps/openmw/mwmechanics/character.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 8a6101cd5..9f92f8890 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2372,7 +2372,8 @@ void CharacterController::update(float duration, bool animationOnly) moved.x() *= scale; moved.y() *= scale; - if (mPtr.getClass().isNpc() && !Settings::Manager::getBool("normalise race speed", "Game")) + static const bool normalizeSpeed = Settings::Manager::getBool("normalise race speed", "Game"); + if (mPtr.getClass().isNpc() && !normalizeSpeed) { const ESM::NPC* npc = mPtr.get()->mBase; const ESM::Race* race = world->getStore().get().find(npc->mRace);