mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-26 02:38:04 +00:00
Merge branch 'keep_calm_and_get_hit' into 'master'
Add option to restore non-MCP Calm spell behaviour Closes #7063 See merge request OpenMW/openmw!2522
This commit is contained in:
commit
eabb230de2
@ -91,6 +91,7 @@ bool Launcher::AdvancedPage::loadSettings()
|
|||||||
loadSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
loadSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||||
loadSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
loadSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||||
loadSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
|
loadSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
|
||||||
|
loadSettingBool(classicCalmSpellsCheckBox, "classic calm spells behavior", "Game");
|
||||||
loadSettingBool(
|
loadSettingBool(
|
||||||
requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
|
requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
|
||||||
loadSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
|
loadSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
|
||||||
@ -258,6 +259,7 @@ void Launcher::AdvancedPage::saveSettings()
|
|||||||
saveSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
saveSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
|
||||||
saveSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
saveSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
|
||||||
saveSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
|
saveSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
|
||||||
|
saveSettingBool(classicCalmSpellsCheckBox, "classic calm spells behavior", "Game");
|
||||||
saveSettingBool(
|
saveSettingBool(
|
||||||
requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
|
requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
|
||||||
saveSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
|
saveSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
|
||||||
|
@ -184,7 +184,7 @@ namespace MWMechanics
|
|||||||
{
|
{
|
||||||
if (mIterating)
|
if (mIterating)
|
||||||
return;
|
return;
|
||||||
const auto& creatureStats = ptr.getClass().getCreatureStats(ptr);
|
auto& creatureStats = ptr.getClass().getCreatureStats(ptr);
|
||||||
assert(&creatureStats.getActiveSpells() == this);
|
assert(&creatureStats.getActiveSpells() == this);
|
||||||
IterationGuard guard{ *this };
|
IterationGuard guard{ *this };
|
||||||
// Erase no longer active spells and effects
|
// Erase no longer active spells and effects
|
||||||
@ -369,6 +369,15 @@ namespace MWMechanics
|
|||||||
}
|
}
|
||||||
++spellIt;
|
++spellIt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const bool keepCalm = Settings::Manager::getBool("classic calm spells behavior", "Game");
|
||||||
|
if (keepCalm)
|
||||||
|
{
|
||||||
|
ESM::MagicEffect::Effects effect
|
||||||
|
= ptr.getClass().isNpc() ? ESM::MagicEffect::CalmHumanoid : ESM::MagicEffect::CalmCreature;
|
||||||
|
if (creatureStats.getMagicEffects().get(effect).getMagnitude() > 0.f)
|
||||||
|
creatureStats.getAiSequence().stopCombat();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActiveSpells::addToSpells(const MWWorld::Ptr& ptr, const ActiveSpellParams& spell)
|
void ActiveSpells::addToSpells(const MWWorld::Ptr& ptr, const ActiveSpellParams& spell)
|
||||||
|
@ -125,6 +125,20 @@ This is how Morrowind behaves.
|
|||||||
|
|
||||||
This setting can be toggled in Advanced tab of the launcher.
|
This setting can be toggled in Advanced tab of the launcher.
|
||||||
|
|
||||||
|
classic calm spells behavior
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
:Type: boolean
|
||||||
|
:Range: True/False
|
||||||
|
:Default: True
|
||||||
|
|
||||||
|
If this setting is true, Calm spells will take their target out of combat every frame.
|
||||||
|
This means that a Calm spell of any magnitude will always take actors out of combat for the entirety of its duration.
|
||||||
|
This is how Morrowind behaves without the Morrowind Code Patch. If this setting is off,
|
||||||
|
Calm spells will only take their target out of combat once. Allowing them to re-engage if the spell was not sufficiently strong.
|
||||||
|
|
||||||
|
This setting can be toggled in Advanced tab of the launcher.
|
||||||
|
|
||||||
use magic item animations
|
use magic item animations
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
@ -263,6 +263,9 @@ actors processing range = 7168
|
|||||||
# Make reflected Absorb spells have no practical effect, like in Morrowind.
|
# Make reflected Absorb spells have no practical effect, like in Morrowind.
|
||||||
classic reflected absorb spells behavior = true
|
classic reflected absorb spells behavior = true
|
||||||
|
|
||||||
|
# Make Calm spells stop combat on every frame
|
||||||
|
classic calm spells behavior = true
|
||||||
|
|
||||||
# Show duration of magic effect and lights in the spells window.
|
# Show duration of magic effect and lights in the spells window.
|
||||||
show effect duration = false
|
show effect duration = false
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QCheckBox" name="avoidCollisionsCheckBox">
|
<widget class="QCheckBox" name="avoidCollisionsCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>If enabled NPCs apply evasion maneuver to avoid collisions with others.</p></body></html></string>
|
<string><html><head/><body><p>If enabled NPCs apply evasion maneuver to avoid collisions with others.</p></body></html></string>
|
||||||
@ -83,6 +83,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QCheckBox" name="stealingFromKnockedOutCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Make stealing items from NPCs that were knocked down possible during combat.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Always allow stealing from knocked out actors</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QCheckBox" name="normaliseRaceSpeedCheckBox">
|
<widget class="QCheckBox" name="normaliseRaceSpeedCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@ -143,18 +153,18 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QCheckBox" name="classicCalmSpellsCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Stops combat with NPCs affected by Calm spells every frame -- like in Morrowind without the MCP.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Classic Calm spells behavior</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="stealingFromKnockedOutCheckBox">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Make stealing items from NPCs that were knocked down possible during combat.</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Always allow stealing from knocked out actors</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="allowNPCToFollowOverWaterSurfaceCheckBox">
|
<widget class="QCheckBox" name="allowNPCToFollowOverWaterSurfaceCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user