From 7885b8c75e4d127576e74248cb69c8330299bfe5 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Mon, 4 Nov 2019 20:34:06 +0300 Subject: [PATCH 1/3] Sheathing-related changes Add weapon and shield sheathing and use additional anim sources checkboxes into the Advanced tab of the launcher Remove outdated information from the documentation --- apps/launcher/advancedpage.cpp | 6 +++++ docs/source/reference/modding/extended.rst | 4 --- files/ui/advancedpage.ui | 30 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index fe3afc6a84..dc0866f74a 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -82,6 +82,9 @@ bool Launcher::AdvancedPage::loadSettings() loadSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); loadSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); + loadSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); + loadSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); + loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); // Input Settings loadSettingBool(grabCursorCheckBox, "grab cursor", "Input"); @@ -142,6 +145,9 @@ void Launcher::AdvancedPage::saveSettings() saveSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); saveSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); + saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); + saveSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); + saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); // Input Settings saveSettingBool(grabCursorCheckBox, "grab cursor", "Input"); diff --git a/docs/source/reference/modding/extended.rst b/docs/source/reference/modding/extended.rst index c17afcf792..bf2b2b74fc 100644 --- a/docs/source/reference/modding/extended.rst +++ b/docs/source/reference/modding/extended.rst @@ -197,10 +197,6 @@ The appearance and count of shown ammunition depends on type and count of equipp It is important to make sure the names of empty nodes start with ``"Bip01 "``, or the engine will optimize them out. -4. Shields - -Shield holstering is not supported at the moment since it conflicts with any mods which use pseudo-shields as held items (such as Animated Morrowind and Hold It). - An example of a mod which uses this feature is `Weapon Sheathing`_. diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 7421f7f78c..b22b2d9ea9 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -169,6 +169,36 @@ + + + + <html><head/><body><p>Render holstered weapons (with quivers and scabbards), requires modded assets</p></body></html> + + + Weapon sheathing + + + + + + + <html><head/><body><p>Render holstered shield, requires modded assets</p></body></html> + + + Shield sheathing + + + + + + + <html><head/><body><p>Load per-group KF-files and skeleton files from Animations folder</p></body></html> + + + Use additional animation sources + + + From 5eab913a9cbcdaf5141dc3e2c4c8dc2aa743ee9b Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Tue, 5 Nov 2019 19:51:57 +0300 Subject: [PATCH 2/3] Make additional anim sources dependency more obvious --- apps/launcher/advancedpage.cpp | 16 +++++++- apps/launcher/advancedpage.hpp | 1 + files/ui/advancedpage.ui | 67 ++++++++++++++++++++++++---------- 3 files changed, 62 insertions(+), 22 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index dc0866f74a..b5da49ed5e 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -82,9 +82,10 @@ bool Launcher::AdvancedPage::loadSettings() loadSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); loadSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); + connect(animSourcesCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotAnimSourcesToggled(bool))); + loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); loadSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); loadSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); - loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); // Input Settings loadSettingBool(grabCursorCheckBox, "grab cursor", "Input"); @@ -145,9 +146,14 @@ void Launcher::AdvancedPage::saveSettings() saveSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); saveSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); + if (animSourcesCheckBox->checkState()) + { + saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); + saveSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); + } + saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); saveSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); - saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); // Input Settings saveSettingBool(grabCursorCheckBox, "grab cursor", "Input"); @@ -190,3 +196,9 @@ void Launcher::AdvancedPage::slotLoadedCellsChanged(QStringList cellNames) { loadCellsForAutocomplete(cellNames); } + +void Launcher::AdvancedPage::slotAnimSourcesToggled(bool checked) +{ + weaponSheathingCheckBox->setEnabled(checked); + shieldSheathingCheckBox->setEnabled(checked); +} diff --git a/apps/launcher/advancedpage.hpp b/apps/launcher/advancedpage.hpp index 59de3d319b..3f5e5bfa7a 100644 --- a/apps/launcher/advancedpage.hpp +++ b/apps/launcher/advancedpage.hpp @@ -29,6 +29,7 @@ namespace Launcher private slots: void on_skipMenuCheckBox_stateChanged(int state); void on_runScriptAfterStartupBrowseButton_clicked(); + void slotAnimSourcesToggled(bool checked); private: Files::ConfigurationManager &mCfgMgr; diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index b22b2d9ea9..79a9e9f5dc 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -169,26 +169,6 @@ - - - - <html><head/><body><p>Render holstered weapons (with quivers and scabbards), requires modded assets</p></body></html> - - - Weapon sheathing - - - - - - - <html><head/><body><p>Render holstered shield, requires modded assets</p></body></html> - - - Shield sheathing - - - @@ -199,6 +179,53 @@ + + + + + 6 + + + 20 + + + 0 + + + 0 + + + 0 + + + + + false + + + <html><head/><body><p>Render holstered shield, requires modded assets.</p></body></html> + + + Shield sheathing + + + + + + + false + + + <html><head/><body><p>Render holstered weapons (with quivers and scabbards), requires modded assets.</p></body></html> + + + Weapon sheathing + + + + + + From 5a5bc0bef8baa3ec8b7aaa8b26a4c6a5bc470e8f Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Thu, 7 Nov 2019 17:16:54 +0300 Subject: [PATCH 3/3] Uncheck sheathing checkboxes automatically when appropriate Fix their order and bogus saveSettingBool calls --- apps/launcher/advancedpage.cpp | 17 ++++++++++------- files/ui/advancedpage.ui | 26 +++++++++++++------------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index b5da49ed5e..6f2811e665 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -84,8 +84,11 @@ bool Launcher::AdvancedPage::loadSettings() loadSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); connect(animSourcesCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotAnimSourcesToggled(bool))); loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); - loadSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); - loadSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); + if (animSourcesCheckBox->checkState()) + { + loadSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); + loadSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); + } // Input Settings loadSettingBool(grabCursorCheckBox, "grab cursor", "Input"); @@ -146,11 +149,6 @@ void Launcher::AdvancedPage::saveSettings() saveSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); saveSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); - if (animSourcesCheckBox->checkState()) - { - saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); - saveSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); - } saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game"); saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game"); saveSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game"); @@ -201,4 +199,9 @@ void Launcher::AdvancedPage::slotAnimSourcesToggled(bool checked) { weaponSheathingCheckBox->setEnabled(checked); shieldSheathingCheckBox->setEnabled(checked); + if (!checked) + { + weaponSheathingCheckBox->setCheckState(Qt::Unchecked); + shieldSheathingCheckBox->setCheckState(Qt::Unchecked); + } } diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 79a9e9f5dc..8748a6d0b0 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -197,19 +197,6 @@ 0 - - - - false - - - <html><head/><body><p>Render holstered shield, requires modded assets.</p></body></html> - - - Shield sheathing - - - @@ -223,6 +210,19 @@ + + + + false + + + <html><head/><body><p>Render holstered shield, requires modded assets.</p></body></html> + + + Shield sheathing + + +