diff --git a/GavrantFixes_210510.esp b/GavrantFixes_210510.esp new file mode 100644 index 00000000..5acb1dff Binary files /dev/null and b/GavrantFixes_210510.esp differ diff --git a/Gavrant_playerhousing_seperate_nif4_placebales.esp b/Gavrant_playerhousing_seperate_nif4_placebales.esp new file mode 100644 index 00000000..1f087a56 Binary files /dev/null and b/Gavrant_playerhousing_seperate_nif4_placebales.esp differ diff --git a/TrollRace AI fix.esp b/TrollRace AI fix.esp new file mode 100644 index 00000000..5517e597 Binary files /dev/null and b/TrollRace AI fix.esp differ diff --git a/gavrant player housing overhaul.esp b/gavrant player housing overhaul.esp new file mode 100644 index 00000000..d6741924 Binary files /dev/null and b/gavrant player housing overhaul.esp differ diff --git a/meshes/actors/mammoth/character assets/skeleton_triceratops.nif b/meshes/actors/mammoth/character assets/skeleton_triceratops.nif new file mode 100644 index 00000000..749dbea3 --- /dev/null +++ b/meshes/actors/mammoth/character assets/skeleton_triceratops.nif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9c772d16b6c88539dd529da93f5ce15a402ad7dea3f03d2d4f3eb556a8e8b9a +size 22753 diff --git a/meshes/clutter/bones/deerskullhornsstatic.nif b/meshes/clutter/bones/deerskullhornsstatic.nif new file mode 100644 index 00000000..c2be82e2 --- /dev/null +++ b/meshes/clutter/bones/deerskullhornsstatic.nif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71cbb24a6d2960723460c4a5252542a821acb1d3a0f70c2c34874ddf12a41317 +size 21126 diff --git a/meshes/clutter/candles/candlehornchandelier02.nif b/meshes/clutter/candles/candlehornchandelier02.nif index fde67402..8dc9b99d 100644 --- a/meshes/clutter/candles/candlehornchandelier02.nif +++ b/meshes/clutter/candles/candlehornchandelier02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f7a4299b8668c38db5c15fe8e8e73c4e062e6152141a3fa8d876feecef9d7cf -size 204715 +oid sha256:51c59f9bca26934c82e9c6e77a6cd645b44c3d5b5ff7b474432c2a9d0d21af57 +size 110553 diff --git a/meshes/clutter/candles/candlehornfloor01.nif b/meshes/clutter/candles/candlehornfloor01.nif new file mode 100644 index 00000000..66a577b2 --- /dev/null +++ b/meshes/clutter/candles/candlehornfloor01.nif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d067451bb3b5770a6cc4ed4a6a81a5fb1aec4a0a1e7ee45c7c4a04b818a625d0 +size 70451 diff --git a/meshes/clutter/candles/candlehorntable01.nif b/meshes/clutter/candles/candlehorntable01.nif index 2517c49e..c207b4db 100644 --- a/meshes/clutter/candles/candlehorntable01.nif +++ b/meshes/clutter/candles/candlehorntable01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0400b1539f93bd92b4d57427baefff0020d9dccd6966d3c72f96845af4fcbd60 +oid sha256:8e1c1e1945280266118e7428a833fc01a1e7bec1ee468c43ec4e73cdea8e33b7 size 22598 diff --git a/meshes/clutter/common/commoncrate01.nif b/meshes/clutter/common/commoncrate01.nif index 721e28fa..47c9cf45 100644 --- a/meshes/clutter/common/commoncrate01.nif +++ b/meshes/clutter/common/commoncrate01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f33afa0983e7160d06c6fdd34ea970a4e15dc4e9d6f3b5059045855d3e09fcc +oid sha256:0c49e03f150498acc893e6a7f7bd46a45695dc2f3b2a21243f6bb42790c31266 size 29179 diff --git a/meshes/clutter/common/commoncrate02.nif b/meshes/clutter/common/commoncrate02.nif index cb229593..e2e953a8 100644 --- a/meshes/clutter/common/commoncrate02.nif +++ b/meshes/clutter/common/commoncrate02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3712f2bcf8d03f1bf138bedd3837c8e82eab930cd72a964f2d76564348d3446d +oid sha256:b3396a288d3ea2503943759ca68d0531a500e560e18c0027d4ea4dd2b4efba52 size 29336 diff --git a/meshes/clutter/glazedcandlesstatic02.nif b/meshes/clutter/glazedcandlesstatic02.nif index 7e5c8600..72b34638 100644 --- a/meshes/clutter/glazedcandlesstatic02.nif +++ b/meshes/clutter/glazedcandlesstatic02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62362d2e5b14ca342cc415354c41103ac980cc1a3089e8d1d53ac67fe49e77d5 +oid sha256:415b81560a38a59f53d5b60f7c2af4116751e140aded49b78ec71f71d0dc103d size 38537 diff --git a/meshes/clutter/ruins/ruinsfloorcandlelampmidon.nif b/meshes/clutter/ruins/ruinsfloorcandlelampmidon.nif index 755c378b..ddafe995 100644 --- a/meshes/clutter/ruins/ruinsfloorcandlelampmidon.nif +++ b/meshes/clutter/ruins/ruinsfloorcandlelampmidon.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8594d77f5bd1de888a16889702df76f32380998e3b523b114e1bca1d99d3218 -size 45703 +oid sha256:e3b4faa6e7463467775df4925857ce1adaab42f582628143214b80c4bcae56cd +size 45749 diff --git a/meshes/clutter/ruins/ruinsfloorcandlelampsmon.nif b/meshes/clutter/ruins/ruinsfloorcandlelampsmon.nif index b1f5d07a..64c6ff87 100644 --- a/meshes/clutter/ruins/ruinsfloorcandlelampsmon.nif +++ b/meshes/clutter/ruins/ruinsfloorcandlelampsmon.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab3a5c2d9818157930879309502a0f84f566f1ac96594ccf6c31ad6ccc4c5d25 -size 43438 +oid sha256:cf974a15ca13097d4c52b290a9f67543b56ef432d2c7f089b594fa4b20d68d63 +size 43484 diff --git a/meshes/clutter/shrines/shrinebase.nif b/meshes/clutter/shrines/shrinebase.nif index a4510dd4..b2b571d3 100644 --- a/meshes/clutter/shrines/shrinebase.nif +++ b/meshes/clutter/shrines/shrinebase.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:898dcdbeb40f988d288e840e77f200faad4a6bc4fba9faba3a0b9243c5285fff -size 68708 +oid sha256:43efa6c573e55fcb0a526d47b15d23261d58c90398bddaedf44a7560cee9f1ab +size 68754 diff --git a/meshes/enderal/architecture/undercity/gramophone.nif b/meshes/enderal/architecture/undercity/gramophone.nif index 71554c38..a612e364 100644 --- a/meshes/enderal/architecture/undercity/gramophone.nif +++ b/meshes/enderal/architecture/undercity/gramophone.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d73fca940cc7703a7dfc8eb9417b7167f3b33b4fd88dae72605782abbebaf2bc -size 90471 +oid sha256:0e7f5a6066a0c2e52785ea9dfebfcecb638e340fba7a01e23e7e386999c3f83d +size 81790 diff --git a/meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif b/meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif index 78ab4750..b87b8195 100644 --- a/meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif +++ b/meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce333c3daf8dc33657b2f11b26df456e702f4d38235160527d497259ad958c44 +oid sha256:9ac2b32767a1357a2be371ca3a55537f664ec33c62c06b310dffeeaab3b94b72 size 231444 diff --git a/meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif b/meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif index 908d4c6f..72bb7e86 100644 --- a/meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif +++ b/meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35c81d8296ba8f0c70a6b112659dc1209468dcd2f2556971349879559ed02e55 +oid sha256:fd85e65f15ae31618b6f9236217a6a53336035f37d1c95b0eac1d71249d0fcdc size 69533 diff --git a/meshes/enderal/forgottenstories/phasmalist/phasmalistworkstation_placeable.nif b/meshes/enderal/forgottenstories/phasmalist/phasmalistworkstation_placeable.nif new file mode 100644 index 00000000..06a58a6b --- /dev/null +++ b/meshes/enderal/forgottenstories/phasmalist/phasmalistworkstation_placeable.nif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc95f4df8df708a43f4d6ca9b7acd2a36e7019a37df0f009006cd18250bd508f +size 358465 diff --git a/meshes/enderal/playerhousing/animaltrophies/mountedantlers.nif b/meshes/enderal/playerhousing/animaltrophies/mountedantlers.nif index 120b58b7..0bbf8c74 100644 --- a/meshes/enderal/playerhousing/animaltrophies/mountedantlers.nif +++ b/meshes/enderal/playerhousing/animaltrophies/mountedantlers.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ab0e91d5a6f297e064bbdf1cc52afe06bc8eba8bfb32cf8c613b68c9254ba80 -size 39314 +oid sha256:f83ea781b74a47140b4262bb377907d571e0a0eeb126b04e985b311cd3647389 +size 47592 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedbear01.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedbear01.nif index 93dc63cc..a0dd67f9 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedbear01.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedbear01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d24ed9fd23085d4e95be56dd2b16f6d6d394b515d16d0c1aff7f44c0ab1fbadd -size 58397 +oid sha256:e1499edfd3cf480c7841750000a5cc7b8c6485d555aff72aa27f362cf656b190 +size 64571 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedelkfemale02.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedelkfemale02.nif index dfd7869d..fa81d438 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedelkfemale02.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedelkfemale02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:820095123be6ae566421883af770791cafd1f8a053ae3c2685bb4f32b68dde17 -size 49644 +oid sha256:37441eb2814c4583a9ba05bf16d19c3cdb8d35eb0d63d54623da8d04d473a969 +size 52146 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedelkmale02.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedelkmale02.nif index 6121821b..1c7bd1ee 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedelkmale02.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedelkmale02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0efd2b363482bd54faee2ee1cd82c1970cdf6ed472cb1d095ba7e55ebacb145 -size 83835 +oid sha256:b9411b627eaf4d9c37c5785a64a04283a49e4cd1e836d4768075d4024582b308 +size 85559 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedgoat01.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedgoat01.nif index 65e1c597..629c0981 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedgoat01.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedgoat01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c0a670fca4e807cf909afc546b7fb89cfb191d45f95ea9ef468fe56023f7411a -size 81804 +oid sha256:64248c2afaa5a0d52e360a928decde6067650e72c16e65468ecf6153c686f497 +size 84821 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedhorker01.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedhorker01.nif index 2c244c0a..202394b2 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedhorker01.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedhorker01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f40adde6738c17cd6a1d71dfb5618d1e725dc5e58678a44c4d081d3c4c9d02d -size 59561 +oid sha256:fbd846eec39806a6d844d244719ca676c4544e6aedb2759246868a47d22596cd +size 62253 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedmudcrab01.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedmudcrab01.nif index 81905298..4a66fcce 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedmudcrab01.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedmudcrab01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed04287dadc71bd0cec077de1e49a434c6937b2b3232aae811891c9637d50ac3 -size 112623 +oid sha256:91e1443f888916c65a0f2f6f1a69f95447ad304cf271d1f80bc2d118a19ea7af +size 118702 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedsabrecat01.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedsabrecat01.nif index 953c3baf..55b502b6 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedsabrecat01.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedsabrecat01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4eb1d8df14a066d70d0036edbe63cc218c3074218a9b9fd87fbfddfc650ddf0 -size 95871 +oid sha256:2f1fab5d9df9e5ede6c77bbc70707a3b272dde2e87920efde7ff61acea4d51f2 +size 98389 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedskeever01.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedskeever01.nif index b58e8ef2..b7c6ce72 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedskeever01.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedskeever01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ecbc70f2b6fc5ca7d67afe7fbf0dd1a1a1049916c4278ebe122f56417e1938a4 -size 72279 +oid sha256:cc7612d1125a560b1c274c5684970b276954086d16ec439ff8b1e36b819b1bf6 +size 76673 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedslaughterfish01.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedslaughterfish01.nif index e5af12ae..a351ccd4 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedslaughterfish01.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedslaughterfish01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42efdb9dac6d5f6b999c129359f100970a189f208fc219af98250c90af3b4616 -size 85082 +oid sha256:d28156b5337655d7c9b57ed12a5ec4ac3300ff65a3ff41c1c60bab0f77c518ab +size 92228 diff --git a/meshes/enderal/playerhousing/animaltrophies/wallmountedwolf01.nif b/meshes/enderal/playerhousing/animaltrophies/wallmountedwolf01.nif index 5ad66adb..4decd82f 100644 --- a/meshes/enderal/playerhousing/animaltrophies/wallmountedwolf01.nif +++ b/meshes/enderal/playerhousing/animaltrophies/wallmountedwolf01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dcc7e401ce674500e455602f6d99c2ded737a31354614d0cc0a73093faac7ff2 -size 69797 +oid sha256:1de80376e4157ded4275e7d2ba75fc20fd4d526f63d7dcdfcf351f37ec95eff6 +size 74135 diff --git a/meshes/enderal/playerhousing/ceramic/ruinspot01.nif b/meshes/enderal/playerhousing/ceramic/ruinspot01.nif index 83340351..6b9d5822 100644 --- a/meshes/enderal/playerhousing/ceramic/ruinspot01.nif +++ b/meshes/enderal/playerhousing/ceramic/ruinspot01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7983a91e3a54c41134b272a267dccffc9ca0445d07d4f6b19f6b6a049bea4685 -size 23671 +oid sha256:79587c9f0580ac9789292c536bd2606d46ade01249e56dc39cd389e019ad5aef +size 23717 diff --git a/meshes/enderal/playerhousing/ceramic/ruinspot02.nif b/meshes/enderal/playerhousing/ceramic/ruinspot02.nif index 05a9e798..35732929 100644 --- a/meshes/enderal/playerhousing/ceramic/ruinspot02.nif +++ b/meshes/enderal/playerhousing/ceramic/ruinspot02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:74f3df04d68c60b9ea583dbd45d24592e1986eb37ec8b34caebf81e0e0d24be4 -size 23767 +oid sha256:9e4b4b1add71050c76de6a1238192c073ff3062902c3777d34fdd31e17785c60 +size 23813 diff --git a/meshes/enderal/playerhousing/ceramic/ruinspot03.nif b/meshes/enderal/playerhousing/ceramic/ruinspot03.nif index 242b5393..a2dc32ab 100644 --- a/meshes/enderal/playerhousing/ceramic/ruinspot03.nif +++ b/meshes/enderal/playerhousing/ceramic/ruinspot03.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d63fd80f710901f33c8b84c69369ec4c1cf32704b53b8e2545331c9f01253908 -size 26387 +oid sha256:18cf1e6b08528403ce0a0df52725085d8e7dbd67cef7c9c097b5bf9411412c37 +size 26433 diff --git a/meshes/enderal/playerhousing/ceramic/ruinspot04.nif b/meshes/enderal/playerhousing/ceramic/ruinspot04.nif index 42f2e69e..1eab0e2e 100644 --- a/meshes/enderal/playerhousing/ceramic/ruinspot04.nif +++ b/meshes/enderal/playerhousing/ceramic/ruinspot04.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:808882b402161584d4b90fcc7824c639e1513dcc48923331155d243c605d3aaf -size 26515 +oid sha256:4164a4992e6466f278862d0dd1569c4b5b4a46ed3c64fbf8e372212ff3818b69 +size 26561 diff --git a/meshes/enderal/playerhousing/ceramic/ruinspot05.nif b/meshes/enderal/playerhousing/ceramic/ruinspot05.nif index 43ca46e3..b055c8d6 100644 --- a/meshes/enderal/playerhousing/ceramic/ruinspot05.nif +++ b/meshes/enderal/playerhousing/ceramic/ruinspot05.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c066caeec397d17a96184b744bbd0fe798b928d926baa48a2c49b2e6903211c8 -size 34311 +oid sha256:b2d3a5107c0874ff01196a7d0389643e4473c0c955aea19d4cfc70e7e54d67e0 +size 34357 diff --git a/meshes/enderal/playerhousing/ceramic/ruinspot06.nif b/meshes/enderal/playerhousing/ceramic/ruinspot06.nif index 578bf81c..e0d31af3 100644 --- a/meshes/enderal/playerhousing/ceramic/ruinspot06.nif +++ b/meshes/enderal/playerhousing/ceramic/ruinspot06.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bad73835746e2ee3652ce7ca48af029baf5e29ce51bd080898aa129670b2e1fb -size 31863 +oid sha256:e7080dd6f54373a1f1c217996b34c7b6ab51a08e2dc21534368a564de1c083b0 +size 31909 diff --git a/meshes/enderal/playerhousing/furniture/gramophone_placeable.nif b/meshes/enderal/playerhousing/furniture/gramophone_placeable.nif new file mode 100644 index 00000000..22ea1820 --- /dev/null +++ b/meshes/enderal/playerhousing/furniture/gramophone_placeable.nif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:455a36e7f2bdd0e4914a9366741e258e0e1e47fc14dcce64963a5cb4ad7d7ec9 +size 81791 diff --git a/meshes/enderal/playerhousing/lights/glazedcandles01static.nif b/meshes/enderal/playerhousing/lights/glazedcandles01static.nif index dd887f26..76dc9a63 100644 --- a/meshes/enderal/playerhousing/lights/glazedcandles01static.nif +++ b/meshes/enderal/playerhousing/lights/glazedcandles01static.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e69d0423040a584f1f985fa3ce62dc5772fb3deec76ffe5c8d5cc555b04c894 +oid sha256:931bc467bdf5a8507cae9b9b237f109d3d873bf84ab6284831c04c54b0e77662 size 22735 diff --git a/meshes/enderal/playerhousing/lights/impwallsconcecandle01c.nif b/meshes/enderal/playerhousing/lights/impwallsconcecandle01c.nif index 2bac4126..6fc15f54 100644 --- a/meshes/enderal/playerhousing/lights/impwallsconcecandle01c.nif +++ b/meshes/enderal/playerhousing/lights/impwallsconcecandle01c.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5103a4eef463431257fa2a5c9550da782440550e32c60ff35631836a486521ff +oid sha256:67ab95873693c755c734090a86fbce429fb466903fe12f3a22fda76c66482c4e size 38740 diff --git a/meshes/enderal/playerhousing/lights/ruinscandlesconceon01.nif b/meshes/enderal/playerhousing/lights/ruinscandlesconceon01.nif index 7ddf17e8..39da23c9 100644 --- a/meshes/enderal/playerhousing/lights/ruinscandlesconceon01.nif +++ b/meshes/enderal/playerhousing/lights/ruinscandlesconceon01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f1ea68a65f7714ab233b0095cb6adac69f2bebe6fb65ba8edbfcd2d49b0ae86 +oid sha256:be5986875da55289a57fd5526bb35562b5bb14166ca3633016e427175337f241 size 55244 diff --git a/meshes/enderal/playerhousing/lights/silvercandlestick01.nif b/meshes/enderal/playerhousing/lights/silvercandlestick01.nif index ff0a1750..b199127b 100644 --- a/meshes/enderal/playerhousing/lights/silvercandlestick01.nif +++ b/meshes/enderal/playerhousing/lights/silvercandlestick01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eaf875993841a75402ef4de04b22c6e11ef90877517770fc4d1084f4603b2da3 -size 45264 +oid sha256:6c4d6a1225508e0dbe0f274ee4683a36eefebd6592b16835c00f715d2d1d503e +size 45310 diff --git a/meshes/enderal/playerhousing/lights/silvercandlestick02.nif b/meshes/enderal/playerhousing/lights/silvercandlestick02.nif index 48a7a3a8..7b16f451 100644 --- a/meshes/enderal/playerhousing/lights/silvercandlestick02.nif +++ b/meshes/enderal/playerhousing/lights/silvercandlestick02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d050b95a73ebb28058dc0484c62f7a3013a427797d21e59ad07417acba8f033 -size 114365 +oid sha256:402388b6823a2484fa6d13d10ddfac86e345f6b20cf76f1db40f89f43ebce966 +size 114411 diff --git a/meshes/enderal/playerhousing/miscellaneous/haybale01.nif b/meshes/enderal/playerhousing/miscellaneous/haybale01.nif index 2175f315..4e23b85c 100644 --- a/meshes/enderal/playerhousing/miscellaneous/haybale01.nif +++ b/meshes/enderal/playerhousing/miscellaneous/haybale01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33264c2351f19f50d1c32c357e67791062a4457faf2416a7d984ba467559b100 -size 34618 +oid sha256:34a638cff9f9ffc9f1363394da4e79ef596372b8d920ed014f8c9fc8f3a6454f +size 34475 diff --git a/meshes/enderal/playerhousing/miscellaneous/meadbarrel01.nif b/meshes/enderal/playerhousing/miscellaneous/meadbarrel01.nif index 24ab88b9..19cc6677 100644 --- a/meshes/enderal/playerhousing/miscellaneous/meadbarrel01.nif +++ b/meshes/enderal/playerhousing/miscellaneous/meadbarrel01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:623aa02438817305d058ef4e7539fdf0530ebc86e3cd3e8104971cf3bc6ece08 +oid sha256:f43e806716f71aca52df80df0fc52a393476e877fda8dd331f9ff29796e65763 size 20259 diff --git a/meshes/enderal/playerhousing/miscellaneous/nobledivider01.nif b/meshes/enderal/playerhousing/miscellaneous/nobledivider01.nif index 61c203f6..3182bbe0 100644 --- a/meshes/enderal/playerhousing/miscellaneous/nobledivider01.nif +++ b/meshes/enderal/playerhousing/miscellaneous/nobledivider01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c8e5c331a28a16609410143e4a157a42c92f5ab79fea5752cf33650bc6c1203 -size 50078 +oid sha256:c2b3580029fca6d473024b4956dcd6d9e8d618d90d3ff25d2415f72a564c621f +size 50094 diff --git a/meshes/enderal/playerhousing/miscellaneous/noblewallshelf01.nif b/meshes/enderal/playerhousing/miscellaneous/noblewallshelf01.nif index fa3e3415..f96241cd 100644 --- a/meshes/enderal/playerhousing/miscellaneous/noblewallshelf01.nif +++ b/meshes/enderal/playerhousing/miscellaneous/noblewallshelf01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f808aa716efe3b1acfc98e9cc4e5a96da594f8151a26ece385d1d00eec317c13 -size 11682 +oid sha256:8d52f351e9918a788b9a7ec557e802bc95f3603abc8dc98223255625f45153f7 +size 11720 diff --git a/meshes/enderal/playerhousing/miscellaneous/noblewallshelf02.nif b/meshes/enderal/playerhousing/miscellaneous/noblewallshelf02.nif index 13328cfb..1c8200e7 100644 --- a/meshes/enderal/playerhousing/miscellaneous/noblewallshelf02.nif +++ b/meshes/enderal/playerhousing/miscellaneous/noblewallshelf02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8b5150868fe979842fc367ff9a98bf2ae1033b8edf8d9093763fb216c995e9c -size 13575 +oid sha256:a672cbdd72ccf8317d484eb9578217221b42796698d0cd3463fc2a892105a395 +size 13595 diff --git a/meshes/enderal/playerhousing/plants/basketflowers.nif b/meshes/enderal/playerhousing/plants/basketflowers.nif index 82bf6741..bb8c8104 100644 --- a/meshes/enderal/playerhousing/plants/basketflowers.nif +++ b/meshes/enderal/playerhousing/plants/basketflowers.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:afbe296205122b6f36e6f3ebdf97ebf73b1cb5f68386864886097f40400faf89 -size 119683 +oid sha256:b40fc18aad49b802c077897087b677d9220c7c88b1d37003e23a59d550b590c9 +size 119729 diff --git a/meshes/enderal/playerhousing/plants/basketthistles.nif b/meshes/enderal/playerhousing/plants/basketthistles.nif index bb076200..0c343c9c 100644 --- a/meshes/enderal/playerhousing/plants/basketthistles.nif +++ b/meshes/enderal/playerhousing/plants/basketthistles.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d47577ae4510dd3c957add5564acd7cabeca5a7978bc576195c99817d6a73677 -size 142953 +oid sha256:606d414c474fcebd94da86a09dc53b193502888efa59b4f5234ef6d60f886397 +size 142999 diff --git a/meshes/enderal/playerhousing/plants/planter01deathbell.nif b/meshes/enderal/playerhousing/plants/planter01deathbell.nif index 34a2c48b..ad7b179e 100644 --- a/meshes/enderal/playerhousing/plants/planter01deathbell.nif +++ b/meshes/enderal/playerhousing/plants/planter01deathbell.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:050608bed7b9b379048adaaa27243c981dc39a90c4eeed6cecfd10b9db9b6dbb -size 70931 +oid sha256:0812033790bc68b78ce58e8e53eadd89e35ef33bf71bc85ff7167c1697964776 +size 70746 diff --git a/meshes/enderal/playerhousing/plants/planter01dragontongue.nif b/meshes/enderal/playerhousing/plants/planter01dragontongue.nif index d3dcc33d..46f360b7 100644 --- a/meshes/enderal/playerhousing/plants/planter01dragontongue.nif +++ b/meshes/enderal/playerhousing/plants/planter01dragontongue.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e024cc1d440939aac37160b7b2b8a88c1e053a06c19308dc32b4c78f1b9e6d1f -size 79253 +oid sha256:e03ef1e97e7b8685f0f73ac7c681a97276ca818f889e5507db9dc97c31a44d7a +size 79068 diff --git a/meshes/enderal/playerhousing/plants/planter01juniper.nif b/meshes/enderal/playerhousing/plants/planter01juniper.nif index b1601e43..ff2eadb0 100644 --- a/meshes/enderal/playerhousing/plants/planter01juniper.nif +++ b/meshes/enderal/playerhousing/plants/planter01juniper.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:201a143a9fb30c452f6e024621719b8ddea7a9623455c37f6678b934373d8fcd -size 81311 +oid sha256:2dc0a6f7d1c6b090279d076c88e926d158c3cabac5dda4d36fe5c29fb2c0fafd +size 81126 diff --git a/meshes/enderal/playerhousing/plants/planter01snowberries.nif b/meshes/enderal/playerhousing/plants/planter01snowberries.nif index b46dd82c..7d480e6d 100644 --- a/meshes/enderal/playerhousing/plants/planter01snowberries.nif +++ b/meshes/enderal/playerhousing/plants/planter01snowberries.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e540081ea2648b2a7f63d0724160e76923973016665f9735ece4502c9f4bac3 -size 148398 +oid sha256:14194be0a61c2d0f9371a5d9203fe2ff06bbc46e0492ff1338485b68f8992a24 +size 148213 diff --git a/meshes/enderal/playerhousing/plants/planter01vinemaple.nif b/meshes/enderal/playerhousing/plants/planter01vinemaple.nif index 80263a4f..0d7bbf28 100644 --- a/meshes/enderal/playerhousing/plants/planter01vinemaple.nif +++ b/meshes/enderal/playerhousing/plants/planter01vinemaple.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e4c4e7957c06a651b102154d3185d834b910534b9a553f5c18290fbfdd5ff6d -size 65556 +oid sha256:72555975422333d59db3f007a73d7634573544c2c4276306d68dfe3ae8c06082 +size 65371 diff --git a/meshes/enderal/playerhousing/plants/planter02nightshade.nif b/meshes/enderal/playerhousing/plants/planter02nightshade.nif index 3915e103..073dcb6e 100644 --- a/meshes/enderal/playerhousing/plants/planter02nightshade.nif +++ b/meshes/enderal/playerhousing/plants/planter02nightshade.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1901f5aa9ba6a6e91f8214cc18748ed7fc14a7707d1cfe13702378026b9699d5 -size 56662 +oid sha256:bf3cf308ed410ac030b0d39a21cf5423c0af7d54f4526bd93d322dd9fdc8d2c5 +size 56566 diff --git a/meshes/enderal/playerhousing/plants/planter03lavender.nif b/meshes/enderal/playerhousing/plants/planter03lavender.nif index bc7572ac..c252259b 100644 --- a/meshes/enderal/playerhousing/plants/planter03lavender.nif +++ b/meshes/enderal/playerhousing/plants/planter03lavender.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:892b71960b59c331999bf320319efe0e4c6523356dd723a8bc0095d59a06e1cd -size 145244 +oid sha256:7926bf1deb2e7d68168dd99f7edf8be17a8f165f36f56b9feb0a7c7f9bbfccf0 +size 145146 diff --git a/meshes/enderal/playerhousing/plants/planter04vinemaple.nif b/meshes/enderal/playerhousing/plants/planter04vinemaple.nif index ff9d334d..9567dd77 100644 --- a/meshes/enderal/playerhousing/plants/planter04vinemaple.nif +++ b/meshes/enderal/playerhousing/plants/planter04vinemaple.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d91569da84036f8284fcd0e0bd332553af6636671be58ede73a12a492044d92f -size 75934 +oid sha256:3ed8a88998aa2619e07097bbbb1d3c7c66463678d934833cb10442a912fd6f36 +size 75885 diff --git a/meshes/enderal/playerhousing/plants/planterkettleferns.nif b/meshes/enderal/playerhousing/plants/planterkettleferns.nif index fc8f8f22..82980139 100644 --- a/meshes/enderal/playerhousing/plants/planterkettleferns.nif +++ b/meshes/enderal/playerhousing/plants/planterkettleferns.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97548a8c28f050ceb9179ea052b4e4ee25771e46bcea490e7dd3697b43800aef -size 51352 +oid sha256:c305572146f337a4f081b32f016d6558e66841120056f52d2a55a2fc0ec3eaec +size 53814 diff --git a/meshes/enderal/playerhousing/plants/ruinsflowervase01.nif b/meshes/enderal/playerhousing/plants/ruinsflowervase01.nif index 7ab62904..f83afedd 100644 --- a/meshes/enderal/playerhousing/plants/ruinsflowervase01.nif +++ b/meshes/enderal/playerhousing/plants/ruinsflowervase01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e84784271ffff713998b1fec41e1852cb290149a8a1faec77d531dfb34e4c3a -size 100260 +oid sha256:9d916bca00d358ccb2fd51d3c6c0910fca88a557cd798a73105e0c1b434600d1 +size 101999 diff --git a/meshes/enderal/playerhousing/rugs/rug01.nif b/meshes/enderal/playerhousing/rugs/rug01.nif index 2810dc5a..a54f5d8e 100644 --- a/meshes/enderal/playerhousing/rugs/rug01.nif +++ b/meshes/enderal/playerhousing/rugs/rug01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a3972a0086c620214878654c36f8ed39b8153e05b527e4d4009af765754ac061 +oid sha256:6819891fd500cffc2ccb9fd80056bca661de7bae2dd2e272b712fa379c10895f size 1841 diff --git a/meshes/enderal/playerhousing/rugs/rug02.nif b/meshes/enderal/playerhousing/rugs/rug02.nif index d2f30820..25a490e6 100644 --- a/meshes/enderal/playerhousing/rugs/rug02.nif +++ b/meshes/enderal/playerhousing/rugs/rug02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de78c8cf9378d44cc74e1a589baaa927075fc0faa0e7f79396113adfa13400a9 +oid sha256:718115e13c856ecbc838f6c055e1aa8f8a3f0d38d2166f50bfd9a9461d7934d9 size 1965 diff --git a/meshes/enderal/playerhousing/rugs/rug03.nif b/meshes/enderal/playerhousing/rugs/rug03.nif index 769e0851..353629cb 100644 --- a/meshes/enderal/playerhousing/rugs/rug03.nif +++ b/meshes/enderal/playerhousing/rugs/rug03.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a77e3dedebc400c5036ffd2b532c88351d752fa8f281640fdf8859f3325d7cb +oid sha256:44ae42b15a6400a95e809566efde082b9f4573b96477fb5ec19049efadb29ddc size 4244 diff --git a/meshes/enderal/playerhousing/rugs/rug04.nif b/meshes/enderal/playerhousing/rugs/rug04.nif index a6707dff..7f9f06a7 100644 --- a/meshes/enderal/playerhousing/rugs/rug04.nif +++ b/meshes/enderal/playerhousing/rugs/rug04.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:acd0b05e17464d4e24d477bb9450c8ac84c1ff3e67119d330620f61cb1383441 +oid sha256:2df6a8dd6e168efadd404cbcbf4831428a1c237be12b42aad321193ac1b85c53 size 4571 diff --git a/meshes/enderal/playerhousing/rugs/rug05.nif b/meshes/enderal/playerhousing/rugs/rug05.nif index 2dc4b6d6..fc98d426 100644 --- a/meshes/enderal/playerhousing/rugs/rug05.nif +++ b/meshes/enderal/playerhousing/rugs/rug05.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10b09e913f6971bdc017a877aac1fc5a3e67faa7fe81eb3aa10362484e8733ce +oid sha256:7758681df056cedb26bddc52a8a7150499d32e5625cd3a3c57fc59eb946f7d04 size 5774 diff --git a/meshes/enderal/playerhousing/rugs/rug06.nif b/meshes/enderal/playerhousing/rugs/rug06.nif index 63497fc2..4de20ab6 100644 --- a/meshes/enderal/playerhousing/rugs/rug06.nif +++ b/meshes/enderal/playerhousing/rugs/rug06.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1536b97767ca17e556e93ec40adc6de7374bfcf5315937610188fb38d7cb144f +oid sha256:7edfd0c46a600e6321dbf1f1142ed6fd35a369a41133fb86919e527dd000bb37 size 4455 diff --git a/meshes/enderal/playerhousing/rugs/rug07.nif b/meshes/enderal/playerhousing/rugs/rug07.nif index 5816b93d..766312bd 100644 --- a/meshes/enderal/playerhousing/rugs/rug07.nif +++ b/meshes/enderal/playerhousing/rugs/rug07.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ab25d678d002f9faa25cf30c7c22c000bbdeac864568ece6fb6115c6d5b325e +oid sha256:b357d2a9c4fd93b19bfac18578e94c3a57098649de25a2508051bb151bb347cf size 5914 diff --git a/meshes/enderal/playerhousing/rugs/rug08.nif b/meshes/enderal/playerhousing/rugs/rug08.nif index 4d188856..a8ffad11 100644 --- a/meshes/enderal/playerhousing/rugs/rug08.nif +++ b/meshes/enderal/playerhousing/rugs/rug08.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93bea4cc857ef2ac4701e539ad3066e5fd9d140eb92eb85419aecc32b2f16f84 +oid sha256:7c2ec58e2d49404b90bdfd9930a1a483ca72e02a41ca12d02ec92c093c34edce size 2425 diff --git a/meshes/enderal/playerhousing/rugs/rug09.nif b/meshes/enderal/playerhousing/rugs/rug09.nif index 6fc3c1d8..9fd4d3c8 100644 --- a/meshes/enderal/playerhousing/rugs/rug09.nif +++ b/meshes/enderal/playerhousing/rugs/rug09.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8fec2acd8a078c519219717dd944472094cbb4bd7ba851e92077a227e21d7d69 +oid sha256:792f01b69f259c5ea8f50d5036af0a5a7b7b62c57659f1788d7d3614746717cf size 2889 diff --git a/meshes/enderal/playerhousing/rugs/rug10.nif b/meshes/enderal/playerhousing/rugs/rug10.nif index 90491730..4108bd5f 100644 --- a/meshes/enderal/playerhousing/rugs/rug10.nif +++ b/meshes/enderal/playerhousing/rugs/rug10.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6188ace1f76ccdddc920d6322dcc9724a407d363405ea0721f341ac24c877b40 +oid sha256:bf8894a10c355bbc023ffe4dcd7ed25683626c4f39f48dd3dce1dfbe13334927 size 2889 diff --git a/meshes/enderal/playerhousing/rugs/rug11.nif b/meshes/enderal/playerhousing/rugs/rug11.nif index 3bbb86d4..cbad3a82 100644 --- a/meshes/enderal/playerhousing/rugs/rug11.nif +++ b/meshes/enderal/playerhousing/rugs/rug11.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be07c76bf5128111d6f4d669d7c3dcabad8d2a82e2b0547eead8a206b0a82f89 +oid sha256:d8674b04eabdf31faf28a6162b48f80e03dda40919ac058be733ac93c7430875 size 5914 diff --git a/meshes/enderal/playerhousing/rugs/rug12.nif b/meshes/enderal/playerhousing/rugs/rug12.nif index 9bcda827..e9f9326f 100644 --- a/meshes/enderal/playerhousing/rugs/rug12.nif +++ b/meshes/enderal/playerhousing/rugs/rug12.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c6fa3289b2b3a404ec516f60e055f02f8d8823c174e00cd82f10c19bae4af93 +oid sha256:13c7782ec66a1a0165a48752f62acbe6aa67f9396b79513f7623baf3b97b0fb0 size 5978 diff --git a/meshes/enderal/playerhousing/rugs/rug13.nif b/meshes/enderal/playerhousing/rugs/rug13.nif index f2c911c2..95688719 100644 --- a/meshes/enderal/playerhousing/rugs/rug13.nif +++ b/meshes/enderal/playerhousing/rugs/rug13.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fdd302fe631f9d40402720b82c451eb012be8845602e766e81888cfcca26ec88 +oid sha256:154a69bf04e4d445ecbd94bef5591fa49284d9a29cf1a5b266b88f9a2d410312 size 1925 diff --git a/meshes/enderal/playerhousing/rugs/rug14.nif b/meshes/enderal/playerhousing/rugs/rug14.nif index d9c7e1e7..37724567 100644 --- a/meshes/enderal/playerhousing/rugs/rug14.nif +++ b/meshes/enderal/playerhousing/rugs/rug14.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2eea16bf2f52496812e9728d0505e96e6fbb3317f17bc53f04b40758d2207aff +oid sha256:5de176cc068bd288dfe3842f9af1aac5e518b9c3f1bd125fb2919459f979ad54 size 2757 diff --git a/meshes/enderal/playerhousing/rugs/rug15.nif b/meshes/enderal/playerhousing/rugs/rug15.nif index e29aca9d..5cb31ab3 100644 --- a/meshes/enderal/playerhousing/rugs/rug15.nif +++ b/meshes/enderal/playerhousing/rugs/rug15.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1f860e91a31af6269de176fb3bb1ed7998a56542f2ef3d028205062e5d97865 +oid sha256:f391ba6824b0b02f9b29d1257fded5f997a0aea72e21dd26f451ac9d992dd63f size 1925 diff --git a/meshes/enderal/playerhousing/rugs/ruground01.nif b/meshes/enderal/playerhousing/rugs/ruground01.nif index a9e1642b..a0cdee1c 100644 --- a/meshes/enderal/playerhousing/rugs/ruground01.nif +++ b/meshes/enderal/playerhousing/rugs/ruground01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e018ff3e389025499af8eca1537e6c512b3b19adb69f599d4c5e9e3e63483cf3 -size 4379 +oid sha256:ae7f6e2683e62a72282687c90ec76bd0f4cdee09ad08e1db210b1d73346c4298 +size 4672 diff --git a/meshes/enderal/playerhousing/rugs/ruground02.nif b/meshes/enderal/playerhousing/rugs/ruground02.nif index 47a0675b..5ebdce4f 100644 --- a/meshes/enderal/playerhousing/rugs/ruground02.nif +++ b/meshes/enderal/playerhousing/rugs/ruground02.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a72f84a4846b2642e0743f3964aade25f81e4359add4bfade597b78c145ef2e -size 4379 +oid sha256:c7b4cdfccfbc145d455fb67cb5fc9c02a3c7980fee5aa82a4323a2c5fcc6d413 +size 4672 diff --git a/meshes/enderal/playerhousing/rugs/ruground03.nif b/meshes/enderal/playerhousing/rugs/ruground03.nif index 691a5185..e65bcf07 100644 --- a/meshes/enderal/playerhousing/rugs/ruground03.nif +++ b/meshes/enderal/playerhousing/rugs/ruground03.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c88130465659726ae4da5e3e3e73a2377d88b2543c546e0ddca60c5e97f5e8a -size 4560 +oid sha256:662d507186b1daadea2f8c7b5aabe230f30c845672e637ee481d53f16e494c40 +size 4853 diff --git a/meshes/enderal/playerhousing/rugs/ruground04.nif b/meshes/enderal/playerhousing/rugs/ruground04.nif index 3684dfb9..02336ced 100644 --- a/meshes/enderal/playerhousing/rugs/ruground04.nif +++ b/meshes/enderal/playerhousing/rugs/ruground04.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0cc94ef9089f176962efe326bec58ef4eb44b5179107665e6c6dc84b5db6b718 -size 4372 +oid sha256:b281aa1e72b703585f9fcff415cbb1bbbc6468e2f1adb4bba999ffded01e10fd +size 4669 diff --git a/meshes/enderal/playerhousing/wallbasket/wallbasket01.nif b/meshes/enderal/playerhousing/wallbasket/wallbasket01.nif index 824f854f..ca571968 100644 --- a/meshes/enderal/playerhousing/wallbasket/wallbasket01.nif +++ b/meshes/enderal/playerhousing/wallbasket/wallbasket01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9f70d9d6dffa38c13dbeff623ac48770aeb867b8af36fb6734b254522459e64 -size 16611 +oid sha256:c0c0a8add7ed862036dc6fb318779c2f009ef45f798d7924241264bef3cb51db +size 16657 diff --git a/meshes/enderal/playerhousing/wallbasket/wallbasket03.nif b/meshes/enderal/playerhousing/wallbasket/wallbasket03.nif index 4727331a..23b35a64 100644 --- a/meshes/enderal/playerhousing/wallbasket/wallbasket03.nif +++ b/meshes/enderal/playerhousing/wallbasket/wallbasket03.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e05258e6c91771efb65d03c2c4f48deddc331727e6bb9cfc379d919663e1a6ab -size 18455 +oid sha256:f4e4183f39a49a03da31c1c8a0474277e48ed391d459047a6db03042d2f632b4 +size 18501 diff --git a/meshes/enderal/playerhousing/wallbasket/wallbasket04.nif b/meshes/enderal/playerhousing/wallbasket/wallbasket04.nif index f6fcefe9..fad58ab4 100644 --- a/meshes/enderal/playerhousing/wallbasket/wallbasket04.nif +++ b/meshes/enderal/playerhousing/wallbasket/wallbasket04.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7077e4d9e6b13f49c8cf56fc7f5e0ecd33afdbc467ab4b792ed235df59740d03 -size 16611 +oid sha256:68bf78763a9916b169814f0ab7fe2867eb6b10928815d6b852ee3ce1c245c338 +size 16657 diff --git a/meshes/enderal/playerhousing/wallbasket/wallbaskethex01.nif b/meshes/enderal/playerhousing/wallbasket/wallbaskethex01.nif index da38038d..d80d4dec 100644 --- a/meshes/enderal/playerhousing/wallbasket/wallbaskethex01.nif +++ b/meshes/enderal/playerhousing/wallbasket/wallbaskethex01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:768b08d1d60056391f5e31a321b074e095003563fec94df01401fc7f5c144781 -size 9353 +oid sha256:5297d46e73a75ebe1b59adf902918011ec5b00cad338dfae5ef8cb548a47751a +size 9399 diff --git a/meshes/enderal/playerhousing/wallbasket/wallbaskethex04.nif b/meshes/enderal/playerhousing/wallbasket/wallbaskethex04.nif index 67444142..157a58a5 100644 --- a/meshes/enderal/playerhousing/wallbasket/wallbaskethex04.nif +++ b/meshes/enderal/playerhousing/wallbasket/wallbaskethex04.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0958e8b9ded0fa60a102ba23b1107f11ca6ce22daa043964b890e13a9d30231a -size 10240 +oid sha256:b57d839a517654e465a16768d2c097297526a3fa00a26ad1c00b75e7180baf30 +size 10286 diff --git a/meshes/furniture/orcfurniture/orcshelf01.nif b/meshes/furniture/orcfurniture/orcshelf01.nif index 64f5d401..fa9f17b4 100644 --- a/meshes/furniture/orcfurniture/orcshelf01.nif +++ b/meshes/furniture/orcfurniture/orcshelf01.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32bfae2369bd740ef12ba9a69101a89cc7a868adbb204a0f7b0e6796205f6e08 +oid sha256:4cfc908ce41c7acdbbbff75d3e334f0cfe8d579e6fc79faa61dade0581c96c79 size 56366 diff --git a/scripts/_00e_apparitionfxscript.pex b/scripts/_00e_apparitionfxscript.pex index 17cdb784..0f1b1eb9 100644 Binary files a/scripts/_00e_apparitionfxscript.pex and b/scripts/_00e_apparitionfxscript.pex differ diff --git a/scripts/_00e_bedscript.pex b/scripts/_00e_bedscript.pex index 4695f0bf..0c25fc66 100644 Binary files a/scripts/_00e_bedscript.pex and b/scripts/_00e_bedscript.pex differ diff --git a/scripts/_00e_blockactivationforplayer.pex b/scripts/_00e_blockactivationforplayer.pex index b4e6d172..e5ad7ecc 100644 Binary files a/scripts/_00e_blockactivationforplayer.pex and b/scripts/_00e_blockactivationforplayer.pex differ diff --git a/scripts/_00e_bonespiritcontrolscript.pex b/scripts/_00e_bonespiritcontrolscript.pex index eb9a9c8a..890ea26f 100644 Binary files a/scripts/_00e_bonespiritcontrolscript.pex and b/scripts/_00e_bonespiritcontrolscript.pex differ diff --git a/scripts/_00e_class_openclassmenuscript.pex b/scripts/_00e_class_openclassmenuscript.pex index a8f5f6b8..c3584f50 100644 Binary files a/scripts/_00e_class_openclassmenuscript.pex and b/scripts/_00e_class_openclassmenuscript.pex differ diff --git a/scripts/_00e_class_perkscript.pex b/scripts/_00e_class_perkscript.pex index a23cb17b..347d0c56 100644 Binary files a/scripts/_00e_class_perkscript.pex and b/scripts/_00e_class_perkscript.pex differ diff --git a/scripts/_00e_cqc05_functions.pex b/scripts/_00e_cqc05_functions.pex index 17ebc3e5..23a4157e 100644 Binary files a/scripts/_00e_cqc05_functions.pex and b/scripts/_00e_cqc05_functions.pex differ diff --git a/scripts/_00e_cqj05_functions.pex b/scripts/_00e_cqj05_functions.pex index 13315724..ea354165 100644 Binary files a/scripts/_00e_cqj05_functions.pex and b/scripts/_00e_cqj05_functions.pex differ diff --git a/scripts/_00e_frozenmescript.pex b/scripts/_00e_frozenmescript.pex index d3f726d7..31f164eb 100644 Binary files a/scripts/_00e_frozenmescript.pex and b/scripts/_00e_frozenmescript.pex differ diff --git a/scripts/_00e_fs_affinity_absoulcallersc.pex b/scripts/_00e_fs_affinity_absoulcallersc.pex index 67fc4a42..d117de3d 100644 Binary files a/scripts/_00e_fs_affinity_absoulcallersc.pex and b/scripts/_00e_fs_affinity_absoulcallersc.pex differ diff --git a/scripts/_00e_fs_affinity_ghostblade_onattack.pex b/scripts/_00e_fs_affinity_ghostblade_onattack.pex index c5911457..961cb4da 100644 Binary files a/scripts/_00e_fs_affinity_ghostblade_onattack.pex and b/scripts/_00e_fs_affinity_ghostblade_onattack.pex differ diff --git a/scripts/_00e_fs_dreameatersc.pex b/scripts/_00e_fs_dreameatersc.pex index 6924925e..f282ba21 100644 Binary files a/scripts/_00e_fs_dreameatersc.pex and b/scripts/_00e_fs_dreameatersc.pex differ diff --git a/scripts/_00e_fs_nq07_dinnercontrolsc.pex b/scripts/_00e_fs_nq07_dinnercontrolsc.pex index 9ea0f0ed..8a632e85 100644 Binary files a/scripts/_00e_fs_nq07_dinnercontrolsc.pex and b/scripts/_00e_fs_nq07_dinnercontrolsc.pex differ diff --git a/scripts/_00e_fs_nqr05_perversionsc.pex b/scripts/_00e_fs_nqr05_perversionsc.pex index 07047472..8eb56d24 100644 Binary files a/scripts/_00e_fs_nqr05_perversionsc.pex and b/scripts/_00e_fs_nqr05_perversionsc.pex differ diff --git a/scripts/_00e_fs_psychosissc.pex b/scripts/_00e_fs_psychosissc.pex index f38656af..3071e696 100644 Binary files a/scripts/_00e_fs_psychosissc.pex and b/scripts/_00e_fs_psychosissc.pex differ diff --git a/scripts/_00e_fs_theriantrophist_allowtemptsc.pex b/scripts/_00e_fs_theriantrophist_allowtemptsc.pex index 72922c1c..727d0778 100644 Binary files a/scripts/_00e_fs_theriantrophist_allowtemptsc.pex and b/scripts/_00e_fs_theriantrophist_allowtemptsc.pex differ diff --git a/scripts/_00e_fs_voicedletterscript.pex b/scripts/_00e_fs_voicedletterscript.pex index 5a08415a..651ea395 100644 Binary files a/scripts/_00e_fs_voicedletterscript.pex and b/scripts/_00e_fs_voicedletterscript.pex differ diff --git a/scripts/_00e_gaboff_grammophonesc.pex b/scripts/_00e_gaboff_grammophonesc.pex index a23385ac..1160c5a9 100644 Binary files a/scripts/_00e_gaboff_grammophonesc.pex and b/scripts/_00e_gaboff_grammophonesc.pex differ diff --git a/scripts/_00e_game_playerhouse_boardsc.pex b/scripts/_00e_game_playerhouse_boardsc.pex index c82a91c5..adab6193 100644 Binary files a/scripts/_00e_game_playerhouse_boardsc.pex and b/scripts/_00e_game_playerhouse_boardsc.pex differ diff --git a/scripts/_00e_game_skillmenusc.pex b/scripts/_00e_game_skillmenusc.pex index a034d206..a3af012b 100644 Binary files a/scripts/_00e_game_skillmenusc.pex and b/scripts/_00e_game_skillmenusc.pex differ diff --git a/scripts/_00e_mq10a_functions.pex b/scripts/_00e_mq10a_functions.pex index 91f52c35..72351d8d 100644 Binary files a/scripts/_00e_mq10a_functions.pex and b/scripts/_00e_mq10a_functions.pex differ diff --git a/scripts/_00e_mq12c_functions.pex b/scripts/_00e_mq12c_functions.pex index ca66ea51..0ebd72ba 100644 Binary files a/scripts/_00e_mq12c_functions.pex and b/scripts/_00e_mq12c_functions.pex differ diff --git a/scripts/_00e_mq12c_harbirsiegesc.pex b/scripts/_00e_mq12c_harbirsiegesc.pex index 1dc2a47c..9efa2b95 100644 Binary files a/scripts/_00e_mq12c_harbirsiegesc.pex and b/scripts/_00e_mq12c_harbirsiegesc.pex differ diff --git a/scripts/_00e_mq13a_functions.pex b/scripts/_00e_mq13a_functions.pex index ac88641a..d3294e98 100644 Binary files a/scripts/_00e_mq13a_functions.pex and b/scripts/_00e_mq13a_functions.pex differ diff --git a/scripts/_00e_mq13a_grammophonesc.pex b/scripts/_00e_mq13a_grammophonesc.pex index cdc6e67c..b3e8e1bf 100644 Binary files a/scripts/_00e_mq13a_grammophonesc.pex and b/scripts/_00e_mq13a_grammophonesc.pex differ diff --git a/scripts/_00e_nq_g_07_functions.pex b/scripts/_00e_nq_g_07_functions.pex index 2de0e727..bc2099ec 100644 Binary files a/scripts/_00e_nq_g_07_functions.pex and b/scripts/_00e_nq_g_07_functions.pex differ diff --git a/scripts/_00e_perkblutrauschffaimedscript.pex b/scripts/_00e_perkblutrauschffaimedscript.pex new file mode 100644 index 00000000..51d9d797 Binary files /dev/null and b/scripts/_00e_perkblutrauschffaimedscript.pex differ diff --git a/scripts/_00e_phasmalist_newapparitionalias.pex b/scripts/_00e_phasmalist_newapparitionalias.pex index 1f143f1b..a96482f1 100644 Binary files a/scripts/_00e_phasmalist_newapparitionalias.pex and b/scripts/_00e_phasmalist_newapparitionalias.pex differ diff --git a/scripts/_00e_phasmalist_workbench.pex b/scripts/_00e_phasmalist_workbench.pex index 8659c619..5d0f0b62 100644 Binary files a/scripts/_00e_phasmalist_workbench.pex and b/scripts/_00e_phasmalist_workbench.pex differ diff --git a/scripts/_00e_placeablegrammophonplay.pex b/scripts/_00e_placeablegrammophonplay.pex index f4a59800..52825a0f 100644 Binary files a/scripts/_00e_placeablegrammophonplay.pex and b/scripts/_00e_placeablegrammophonplay.pex differ diff --git a/scripts/_00e_playerhousing_furniture.pex b/scripts/_00e_playerhousing_furniture.pex index 13a7434d..7c6430f6 100644 Binary files a/scripts/_00e_playerhousing_furniture.pex and b/scripts/_00e_playerhousing_furniture.pex differ diff --git a/scripts/_00e_playerhousing_furnitureitem.pex b/scripts/_00e_playerhousing_furnitureitem.pex index 4353001d..93298570 100644 Binary files a/scripts/_00e_playerhousing_furnitureitem.pex and b/scripts/_00e_playerhousing_furnitureitem.pex differ diff --git a/scripts/_00e_playerhousing_lightfurniture.pex b/scripts/_00e_playerhousing_lightfurniture.pex index a1f8bfe0..c8eee5b0 100644 Binary files a/scripts/_00e_playerhousing_lightfurniture.pex and b/scripts/_00e_playerhousing_lightfurniture.pex differ diff --git a/scripts/_00e_playerhousing_mannequincontrol.pex b/scripts/_00e_playerhousing_mannequincontrol.pex index f895a808..8729aeb1 100644 Binary files a/scripts/_00e_playerhousing_mannequincontrol.pex and b/scripts/_00e_playerhousing_mannequincontrol.pex differ diff --git a/scripts/_00e_playerhousingcurrentomanipulate.pex b/scripts/_00e_playerhousingcurrentomanipulate.pex index aaa5c14e..4592e6e3 100644 Binary files a/scripts/_00e_playerhousingcurrentomanipulate.pex and b/scripts/_00e_playerhousingcurrentomanipulate.pex differ diff --git a/scripts/_00e_playerhousingcurrentotranslation.pex b/scripts/_00e_playerhousingcurrentotranslation.pex index c5a11038..9ba38cb5 100644 Binary files a/scripts/_00e_playerhousingcurrentotranslation.pex and b/scripts/_00e_playerhousingcurrentotranslation.pex differ diff --git a/scripts/_00e_playerhousingmaster.pex b/scripts/_00e_playerhousingmaster.pex index 2a8fb146..982eebb3 100644 Binary files a/scripts/_00e_playerhousingmaster.pex and b/scripts/_00e_playerhousingmaster.pex differ diff --git a/scripts/_00e_playerhousingtutorial.pex b/scripts/_00e_playerhousingtutorial.pex index 155fd64c..2522d8b8 100644 Binary files a/scripts/_00e_playerhousingtutorial.pex and b/scripts/_00e_playerhousingtutorial.pex differ diff --git a/scripts/_00e_playersetupscript.pex b/scripts/_00e_playersetupscript.pex index 34777c10..38d7c9aa 100644 Binary files a/scripts/_00e_playersetupscript.pex and b/scripts/_00e_playersetupscript.pex differ diff --git a/scripts/_00e_questfunctions.pex b/scripts/_00e_questfunctions.pex index 585a8c67..bd821ba7 100644 Binary files a/scripts/_00e_questfunctions.pex and b/scripts/_00e_questfunctions.pex differ diff --git a/scripts/_00e_smokingpipescript.pex b/scripts/_00e_smokingpipescript.pex index a1fd0376..adddfc67 100644 Binary files a/scripts/_00e_smokingpipescript.pex and b/scripts/_00e_smokingpipescript.pex differ diff --git a/scripts/_00e_theriantrophist_blockcraftingsc.pex b/scripts/_00e_theriantrophist_blockcraftingsc.pex index 83293df2..5c1bcdfa 100644 Binary files a/scripts/_00e_theriantrophist_blockcraftingsc.pex and b/scripts/_00e_theriantrophist_blockcraftingsc.pex differ diff --git a/scripts/_00e_theriantrophist_wolfattributes.pex b/scripts/_00e_theriantrophist_wolfattributes.pex index 9bb812b3..666d2173 100644 Binary files a/scripts/_00e_theriantrophist_wolfattributes.pex and b/scripts/_00e_theriantrophist_wolfattributes.pex differ diff --git a/scripts/_00e_weathercontrolscriptsc.pex b/scripts/_00e_weathercontrolscriptsc.pex index 846d4ed2..8ff7626e 100644 Binary files a/scripts/_00e_weathercontrolscriptsc.pex and b/scripts/_00e_weathercontrolscriptsc.pex differ diff --git a/scripts/_60e_fs_mystical_thoughtimplosionsc.pex b/scripts/_60e_fs_mystical_thoughtimplosionsc.pex index 2a83d7d4..a8da67f5 100644 Binary files a/scripts/_60e_fs_mystical_thoughtimplosionsc.pex and b/scripts/_60e_fs_mystical_thoughtimplosionsc.pex differ diff --git a/scripts/_fs_phasmalist_controlquest.pex b/scripts/_fs_phasmalist_controlquest.pex index fd785beb..90158a3b 100644 Binary files a/scripts/_fs_phasmalist_controlquest.pex and b/scripts/_fs_phasmalist_controlquest.pex differ diff --git a/scripts/frostslowfix.pex b/scripts/frostslowfix.pex index 31054933..c3db84ba 100644 Binary files a/scripts/frostslowfix.pex and b/scripts/frostslowfix.pex differ diff --git a/scripts/fs_nq05_alchemyscript.pex b/scripts/fs_nq05_alchemyscript.pex index be676964..b7437595 100644 Binary files a/scripts/fs_nq05_alchemyscript.pex and b/scripts/fs_nq05_alchemyscript.pex differ diff --git a/scripts/fs_nq07_alchemyscript.pex b/scripts/fs_nq07_alchemyscript.pex index d9115b0a..783c2e2c 100644 Binary files a/scripts/fs_nq07_alchemyscript.pex and b/scripts/fs_nq07_alchemyscript.pex differ diff --git a/scripts/fxwitchlightattachscript.pex b/scripts/fxwitchlightattachscript.pex new file mode 100644 index 00000000..916ffe1c Binary files /dev/null and b/scripts/fxwitchlightattachscript.pex differ diff --git a/source/scripts/_00e_bedscript.psc b/source/scripts/_00e_bedscript.psc index f72789b3..49074464 100644 --- a/source/scripts/_00e_bedscript.psc +++ b/source/scripts/_00e_bedscript.psc @@ -1,23 +1,24 @@ Scriptname _00E_BedScript extends ObjectReference {Magically bypasses the whole waiting/resting-system thingy} +Quest Property MQ14 Auto +Message Property _00E_MQ14_CantRestNowMessage Auto +Actor Property PlayerREF Auto + +Bool bActivationBlocked = False Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False + bActivationBlocked = True - if (akActionRef == PlayerREF) - if !(MQ14.GetStage() >= 20) + If MQ14.GetStage() < 20 Game.SetInChargen(False, False, False) Self.Activate(PlayerREF, True) Game.SetInChargen(False, True, False) Else _00E_MQ14_CantRestNowMessage.Show() EndIf - endif + bActivationBlocked = False + EndIf EndEvent - -Actor Property PlayerREF Auto -Quest Property MQ14 Auto - -Message Property _00E_MQ14_CantRestNowMessage Auto - diff --git a/source/scripts/_00e_blockactivationforplayer.psc b/source/scripts/_00e_blockactivationforplayer.psc index ec555b49..e8d4b62c 100644 --- a/source/scripts/_00e_blockactivationforplayer.psc +++ b/source/scripts/_00e_blockactivationforplayer.psc @@ -9,7 +9,9 @@ EndEvent Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() && Self.IsActivationBlocked() - _00E_BlockedMessage.Show() + If _00E_BlockedMessage + _00E_BlockedMessage.Show() + EndIf Else Self.Activate(akActionRef, True) EndIf diff --git a/source/scripts/_00e_class_openclassmenuscript.psc b/source/scripts/_00e_class_openclassmenuscript.psc index 8ab50292..a6bff738 100644 --- a/source/scripts/_00e_class_openclassmenuscript.psc +++ b/source/scripts/_00e_class_openclassmenuscript.psc @@ -26,7 +26,7 @@ Event OnEffectStart(Actor TheTarget, Actor TheCaster) Else if !(PlayerREF.IsInLocation(_00E_ClassMenuLocation)) - If _00E_Meditate_Allowed.GetValueInt() == 0 + If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace || _00E_Meditate_Allowed.GetValueInt() == 0 _00E_Meditation_sCantMeditateNow.Show() bDoSettleDownWait = False ElseIf PlayerREF.IsInCombat() @@ -124,3 +124,5 @@ GlobalVariable Property _00E_Meditate_FirstPerson Auto GlobalVariable Property _00E_Meditate_Allowed Auto ReferenceAlias Property Player Auto + +Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto diff --git a/source/scripts/_00e_class_perkscript.psc b/source/scripts/_00e_class_perkscript.psc index a1c89423..3f652fee 100644 --- a/source/scripts/_00e_class_perkscript.psc +++ b/source/scripts/_00e_class_perkscript.psc @@ -6,103 +6,101 @@ Import Game ; EVENTS ;===================================================================================== -Event onActivate(ObjectReference akActionRef) +Event OnActivate(ObjectReference akActionRef) + If akActionRef != PlayerREF + Return + EndIf - int iButton + GoToState("DoNothing") - iButton = __Config_DisplayMessage.Show() + Int iButton = __Config_DisplayMessage.Show() + If __Config_MultipleLevelsConfirm - __Config_MultipleLevels=true + __Config_MultipleLevels = True EndIf - If (__Config_MultipleLevels) && !(__Config_MultipleLevelsTwoLevels) - If iButton < 3 - If (__Config_TeachesTalent) - TeachTalent() - Elseif !(__Config_TeachesTalent) + + If __Config_MultipleLevels + + If __Config_MultipleLevelsTwoLevels + If iButton < 2 TeachPerk() + FinalizeUnlock() + Return + EndIf + Else ; __Config_MultipleLevelsTwoLevels == False + If iButton < 3 + If __Config_TeachesTalent + TeachTalent() + Else + TeachPerk() + EndIf + FinalizeUnlock() + Return EndIf - TalentPoints.SetValue(TalentPoints.GetValueInt() - 1) - PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt()) - PlayVisuals() EndIf - ElseIf (__Config_MultipleLevels) && (__Config_MultipleLevelsTwoLevels) - If iButton < 2 - TeachPerk() - TalentPoints.SetValue(TalentPoints.GetValueInt() - 1) - PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt()) - PlayVisuals() - EndIf - - Elseif !__Config_MultipleLevels + Else ; __Config_MultipleLevels == False + If iButton == 0 - PlayerREF.AddPerk(__Config_PerkToTeach1) - If __Config_QuestToStart != None - __Config_QuestToStart.Start() - EndIf - If ( AdditionalPerk ) - PlayerREF.AddPerk(AdditionalPerk) - EndIf - If sendModEventOnUnlock - SendModEvent(modEventName) - Endif - - TalentPoints.SetValue(TalentPoints.GetValueInt() - 1) - PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt()) - PlayVisuals() + TeachFirstPerk() + FinalizeUnlock() + Return EndIf EndIf - + + GoToState("") EndEvent +State DoNothing + Event OnActivate(ObjectReference akActionRef) + ; Do nothing + EndEvent +EndState + ;===================================================================================== ; FUNCTIONS ;===================================================================================== Function TeachPerk() - - if !(PlayerREF.HasPerk(__Config_PerkToTeach1)) - PlayerREF.AddPerk(__Config_PerkToTeach1) - If __Config_QuestToStart != None - __Config_QuestToStart.start() - EndIf - if sendModEventOnUnlock - SendModEvent(modEventName) - Endif - if ( AdditionalPerk ) - PlayerREF.AddPerk(AdditionalPerk) - endif - elseif (PlayerREF.HasPerk(__Config_PerkToTeach1)) && !(PlayerREF.HasPerk(__Config_PerkToTeach2)) + If PlayerREF.HasPerk(__Config_PerkToTeach1) == False + TeachFirstPerk() + ElseIf PlayerREF.HasPerk(__Config_PerkToTeach2) == False PlayerREF.AddPerk(__Config_PerkToTeach2) - else + Else PlayerREF.AddPerk(__Config_PerkToTeach3) - endif + EndIf EndFunction Function TeachTalent() - - if !(Game.IsWordUnlocked(__Config_WordToTeach1)) + If Game.IsWordUnlocked(__Config_WordToTeach1) == False PlayerREF.AddShout(__Config_TalentToTeach) WordToTeach = __Config_WordToTeach1 - PlayerREF.AddPerk(__Config_PerkToTeach1) - If __Config_QuestToStart != None - __Config_QuestToStart.start() - EndIf - if sendModEventOnUnlock - SendModEvent(modEventName) - Endif - elseif (Game.IsWordUnlocked(__Config_WordToTeach1)) && !(Game.IsWordUnlocked(__Config_WordToTeach2)) + TeachFirstPerk(False) + ElseIf Game.IsWordUnlocked(__Config_WordToTeach2) == False WordToTeach = __Config_WordToTeach2 PlayerREF.AddPerk(__Config_PerkToTeach2) - else + Else WordToTeach = __Config_WordToTeach3 PlayerREF.AddPerk(__Config_PerkToTeach3) - endif + EndIf + Game.UnlockWord(WordToTeach) Game.TeachWord(WordToTeach) SetRecoveryTime(WordToTeach) +EndFunction +Function TeachFirstPerk(Bool bTeachAdditionalPerk = True) + PlayerREF.AddPerk(__Config_PerkToTeach1) + If __Config_QuestToStart + __Config_QuestToStart.Start() + EndIf + If AdditionalPerk && bTeachAdditionalPerk + PlayerREF.AddPerk(AdditionalPerk) + EndIf + If sendModEventOnUnlock + SendModEvent(modEventName) + EndIf EndFunction Function SetRecoveryTime(WordOfPower WordToTeach) @@ -116,56 +114,54 @@ Function SetRecoveryTime(WordOfPower WordToTeach) __Config_TalentToTeach.SetNthRecoveryTime(1, fRecoveryTime03) __Config_TalentToTeach.SetNthRecoveryTime(2, fRecoveryTime03) EndIf - EndFunction Function PlayVisuals() - ;Fix for ERB-1355, somehow _00E_TalentpointsRemaining was not filled in that save game on all perk activators If _00E_TalentpointsRemaining == None _00E_TalentpointsRemaining = Game.GetFormFromFile(0x000431FB, "Skyrim.esm") as Message EndIf - - _00E_TalentpointsRemaining.Show(TalentPoints.GetValueInt() as Int) + _00E_TalentpointsRemaining.Show(TalentPoints.GetValueInt()) ObjectReference MemoryPoint = Self.GetLinkedRef() + MAGConjureImpact.Play(PlayerREF) + MemoryPoint.PlayAnimation("PlayAnim02") - if( MemoryPoint.GetLinkedRef(TestLine) ) - MemoryPoint.GetLinkedRef(TestLine).PlayAnimation("Unlock") - endif - if( MemoryPoint.GetLinkedRef(__PerkLine01) ) - MemoryPoint.GetLinkedRef(__PerkLine01).PlayAnimation("Unlock") - endif - if( MemoryPoint.GetLinkedRef(__PerkLine02) ) - MemoryPoint.GetLinkedRef(__PerkLine02).PlayAnimation("Unlock") - endif - if( MemoryPoint.GetLinkedRef(__PerkLine03) ) - MemoryPoint.GetLinkedRef(__PerkLine03).PlayAnimation("Unlock") - endif - if( MemoryPoint.GetLinkedRef(__PerkLine04) ) - MemoryPoint.GetLinkedRef(__PerkLine04).PlayAnimation("Unlock") - endif - if( MemoryPoint.GetLinkedRef(__PerkLine05) ) - MemoryPoint.GetLinkedRef(__PerkLine05).PlayAnimation("Unlock") - endif - if( MemoryPoint.GetLinkedRef(__PerkLine06) ) - MemoryPoint.GetLinkedRef(__PerkLine06).PlayAnimation("Unlock") - endif - - Sound unlockSound = Game.GetForm(0x0003A1E7) as Sound + PlayUnlockAnimationOnLinkedRef(MemoryPoint, TestLine) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine01) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine02) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine03) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine04) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine05) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine06) + + GoToState("") ; Time to unlock OnActivate + Sound unlockSound = Game.GetFormFromFile(0x0003A1E7, "Skyrim.esm") as Sound unlockSound.Play(PlayerREF) - MAGDragonPowerAbsorbManEffect.Play(PlayerREF, 8 , MemoryPoint) + MAGDragonPowerAbsorbManEffect.Play(PlayerREF, 8, MemoryPoint) _00E_UnlockClassIMOD.Apply() Utility.Wait(0.1) - _00E_Class_MemoryAbsorbFXS.Play(playerREF) + _00E_Class_MemoryAbsorbFXS.Play(PlayerREF) Utility.Wait(3) - _00E_Class_MemoryAbsorbFXS.Stop(playerREF) + _00E_Class_MemoryAbsorbFXS.Stop(PlayerREF) Utility.Wait(2) MAGDragonPowerAbsorbManEffect.Stop(PlayerREF) +EndFunction + +Function PlayUnlockAnimationOnLinkedRef(ObjectReference MemoryPoint, Keyword linkedKwd) + ObjectReference ref = MemoryPoint.GetLinkedRef(linkedKwd) + If ref + ref.PlayAnimation("Unlock") + EndIf +EndFunction +Function FinalizeUnlock() + TalentPoints.Mod(-1) + PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt()) + PlayVisuals() EndFunction diff --git a/source/scripts/_00e_cqc05_functions.psc b/source/scripts/_00e_cqc05_functions.psc index 927a713b..23c3dba3 100644 --- a/source/scripts/_00e_cqc05_functions.psc +++ b/source/scripts/_00e_cqc05_functions.psc @@ -126,13 +126,12 @@ EndFunction Function PlayKiss() + ; Solves "torch in body" problem while kissing _00E_MC_CaliaREF.UnEquipItem(Torch01, True) - ;Solves "torch in body" problem while kissing _FS_TheriantrophistControlQuest.TransformBackIfTransformed() - if Player.GetRace() == HighElfRace - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(1.0) - endif + If Player.GetRace() == HighElfRace + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) + EndIf Int iHand = 0 if PlayerREF.GetEquippedItemType(iHand) == 11 @@ -180,11 +179,11 @@ Function FadeOut() CQC05_SC02_DoorREF.BlockActivation(True) CaliaRomance.SetValueInt(1) - PlayerREF.SetScale(1.0) FadeToBlackIMOD.Apply() Utility.Wait(2) FadeToBlackHoldIMOD.ApplyCrossFade(1) Utility.Wait(1) + PlayerREF.SetScale(1.0) ; TODO, Gavrant, 2021-06-21: probably delete it. There is another revert of the scale later, in FadeBack. _00E_MC_CaliaREF.SetUnconscious(False) PlayerREF.SetUnconscious(False) diff --git a/source/scripts/_00e_cqj05_functions.psc b/source/scripts/_00e_cqj05_functions.psc index b0b2157f..a598bfd2 100644 --- a/source/scripts/_00e_cqj05_functions.psc +++ b/source/scripts/_00e_cqj05_functions.psc @@ -49,8 +49,7 @@ Function PlayKissAnimation() _00E_QuestFunctions.EndWerewolfModeWhenTransformed() If Player.GetRace() == HighElfRace - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(1.0) + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) EndIf If PlayerREF.GetEquippedShield() != None @@ -103,9 +102,9 @@ Function FadeOut() PlayerREF.SetUnconscious(False) Debug.ToggleMenus() Debug.ToggleCollisions() - if Player.GetRace() == HighElfRace + If Player.GetRace() == HighElfRace PlayerREF.SetScale(fPlayerScale) - endif + EndIf _00E_MC_JesparREF.MoveTo(MQ13a_StarshipBedREF) _00E_MC_JesparREF.MoveTo(CQJ05_SC01_JesparLayMarker) PlayerREF.MoveTo(MQ13a_StarshipBedREF) diff --git a/source/scripts/_00e_frozenmescript.psc b/source/scripts/_00e_frozenmescript.psc index 06399333..68975e30 100644 --- a/source/scripts/_00e_frozenmescript.psc +++ b/source/scripts/_00e_frozenmescript.psc @@ -6,119 +6,117 @@ Scriptname _00E_FrozenMEScript extends activemagiceffect ;===================================================================================== Auto State Default + Event OnEffectStart(Actor akTarget, Actor akCaster) + Debug.Trace(self + ", OnEffectStart (Default): akTarget = " + akTarget + "; akCaster = " + akCaster) + FrozenActor = akCaster + + If FrozenActor && FrozenActor.GetAVPercentage("Health") > 0.1 && FrozenActor.HasPerk(_00E_FrozenPerk) == False + _00E_A1_ArcticWindFreezeM.Play(akTarget) + FrozenActor.AddPerk(_00E_FrozenPerk) + FrozenActor.EnableAI(False) + FrozenActor.SetAV("Paralysis", 1.0) ; Prevents movement and attacking. + GoToState("Frozen") + EndIf -Event OnEffectStart(Actor TheTarget, Actor TheCaster) - - FrozenActor = TheCaster - - If FrozenActor.GetAVPercentage("Health") > 0.1 - - KillMove.SetValueInt(0) - _00E_A1_ArcticWindFreezeM.Play(TheTarget) - FrozenActor.AddPerk(_00E_FrozenPerk) - FrozenActor.EnableAI(False) - GoToState("Frozen") - - EndIf - -EndEvent - + Debug.Trace(self + ", OnEffectStart (Default): done") + EndEvent EndState -;======================================FROZEN STATE================================ +;====================================== FROZEN STATE ================================= State Frozen + ;/ + Event OnBeginState() + Debug.Trace(self + ", OnBeginState (Frozen)") + PositionMarkerRef = FrozenActor.PlaceAtMe(XMarker) + Debug.Trace(self + ", OnBeginState (Frozen): done") + EndEvent /; -Event OnUpdate() - - bHitLock = False + Event OnUpdate() + bHitLock = False + EndEvent -EndEvent + Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) + Debug.Trace(self + ", OnHit: akAggressor = " + akAggressor + "; akSource = " + akSource + "; akProjectile = " + akProjectile + "; abPowerAttack = " + abPowerAttack + "; abSneakAttack = " + abSneakAttack + "; abBashAttack = " + abBashAttack + "; abBashAttack = " + abHitBlocked) -Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) - - WPNImpactBladeVsIce.Play(FrozenActor) + WPNImpactBladeVsIce.Play(FrozenActor) - If !_00E_NoShatterNPCFormList.HasForm(FrozenActor.GetActorBase()) + If FrozenActor.IsEssential() + Return + EndIf - If !PlayerREF.HasPerk(_04E_30_UNI_SongOfWinterFrostDamagePerk) - - ShatterChance = __Config_BaseShatterChance - + Float fShatterChance + If PlayerREF.HasPerk(_04E_30_UNI_SongOfWinterFrostDamagePerk) + fShatterChance = __Config_BaseShatterChance * 2.0 Else - - ShatterChance = __Config_BaseShatterChance*2 - + fShatterChance = __Config_BaseShatterChance EndIf - If !bHitLock - + If bHitLock == False bHitLock = True If akSource.HasKeyword(WeaponTypeBluntWeapon) - ShatterChance = (ShatterChance + __Config_ShatterChanceBluntWeaponBonus) + fShatterChance += __Config_ShatterChanceBluntWeaponBonus EndIf - - If abPowerAttack == True - ShatterChance = (ShatterChance + __Config_ShatterChancePowerAttackBonus) + If abPowerAttack + fShatterChance += __Config_ShatterChancePowerAttackBonus EndIf - If ShockSpells.HasForm(akSource) - ShatterChance = (ShatterChance + __Config_ShatterChanceShockSpellBonus) + fShatterChance += __Config_ShatterChanceShockSpellBonus + fShatterChance += 1.0 EndIf - If akSource == _00E_A1_OnslaughtCloakDMG - ShatterChance = (ShatterChance + __Config_ShatterChanceOnslaughtSpellBonus) - + fShatterChance += __Config_ShatterChanceOnslaughtSpellBonus If _00E_Synergy_ArcticWindOnslaught.GetValueInt() == 0 _00E_Synergy_ArcticWindOnslaught.SetValueInt(1) Levelsystem.ShowSynergyMessage() EndIf - EndIf - If Utility.RandomFloat() < ShatterChance - HasBeenShattered = true - ShatterEnemy() - GoToState("Finished") + If Utility.RandomFloat() < fShatterChance + If bNoShatter == False + GoToState("Finished") + ShatterEnemy() + Debug.Trace(self + ", OnHit: shatter!") + EndIf + Else + If bNoShatter == False + RegisterForSingleUpdate(1.5) + EndIf EndIf - - RegisterForSingleUpdate(fHitTimer) - - Endif - - EndIf - -EndEvent - -Event OnDying(Actor akKiller) - - FrozenActor.EnableAI(True) - Self.Dispel() - -EndEvent + EndIf -Event OnEffectFinish(Actor akTarget, Actor akCaster) - - ;If FrozenActor.GetAV("Health") < 1 && !_00E_NoShatterNPCFormList.HasForm(FrozenActor.GetActorBase()) - ; ShatterEnemy() - ;Else + Debug.Trace(self + ", OnHit: done") + EndEvent + + Event OnDying(Actor akKiller) + Debug.Trace(self + ", OnDying") + bNoShatter = True + EnableTargetAI() + ; FrozenActor.EnableAI(True) + ; Self.Dispel() + Debug.Trace(self + ", OnDying: done") + EndEvent + + Event OnEffectFinish(Actor akTarget, Actor akCaster) + Debug.Trace(self + ", OnEffectFinish") + bNoShatter = True + GoToState("Finished") _00E_A1_ArcticWindFreezeM.Play(akTarget) FrozenActor.SetAlpha(1.0, true) - ;EndIf - FrozenActor.EnableAI(True) - FrozenActor.RemovePerk(_00E_FrozenPerk) - If Utility.GetINIBool("bVATSDisable:VATS") == 0 - KillMove.SetValueInt(1) - EndIf - GoToState("Finished") + ; Debug.Trace(self + ", OnEffectFinish: distance from the marker: " + FrozenActor.GetDistance(PositionMarkerRef)) -EndEvent - + EnableTargetAI() + FrozenActor.RemovePerk(_00E_FrozenPerk) + + ; DeletePositionMarker() + + Debug.Trace(self + ", OnEffectFinish: done") + EndEvent EndState -;======================================FINISHED STATE================================ +;====================================== FINISHED STATE =============================== State Finished @@ -131,19 +129,19 @@ EndState ;===================================================================================== Function ShatterEnemy() - + ; EnableTargetAI() FrozenActor.Kill(PlayerREF) Utility.Wait(0.1) FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion02) - if FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace + If FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace FrozenActor.PlaceAtMe(_00E_FS_MAGIceGoreExplosion) Else FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion) EndIf - FrozenActor.SetAlpha (0.0, true) FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateStart) + FrozenActor.SetAlpha(0.0, true) FrozenActor.AttachAshPile(_00E_ShatteredEnemyPile) WPNImpactBladeVsIce.Play(FrozenActor) Game.ShakeCamera(afStrength = 0.3) @@ -154,31 +152,48 @@ Function ShatterEnemy() Game.UnlockAchievement("END_FROZEN_01") _00E_FrozenAchievementUnlocked.SetValueInt(1) EndIf - + + ; DeletePositionMarker() +EndFunction + +Function DeletePositionMarker() + If PositionMarkerRef + PositionMarkerRef.Disable() + PositionMarkerRef.Delete() + PositionMarkerRef = None + EndIf +EndFunction + +Function EnableTargetAI() + If bReenabledAI == False + bReenabledAI = True + FrozenActor.SetAV("Paralysis", 0) + ;/ If PositionMarkerRef + FrozenActor.MoveTo(PositionMarkerRef) + EndIf /; + FrozenActor.EnableAI(True) + EndIf EndFunction ;===================================================================================== ; PROPERTIES ;===================================================================================== -float ShatterChance -float KillMoveChanceOriginal -bool HasBeenShattered -bool bHitLock +Bool bHitLock +Bool bReenabledAI +Bool bNoShatter -float fHitTimer = 1.5 +Actor FrozenActor +ObjectReference PositionMarkerRef -float __Config_BaseShatterChance = 0.06 -float __Config_ShatterChancePowerAttackBonus = 0.035 -float __Config_ShatterChanceBluntWeaponBonus = 0.02 -float __Config_ShatterChanceShockSpellBonus = 0.025 -float __Config_ShatterChanceOnslaughtSpellBonus = 0.04 +Float Property __Config_BaseShatterChance = 0.06 AutoReadOnly +Float Property __Config_ShatterChancePowerAttackBonus = 0.035 AutoReadOnly +Float Property __Config_ShatterChanceBluntWeaponBonus = 0.02 AutoReadOnly +Float Property __Config_ShatterChanceShockSpellBonus = 0.025 AutoReadOnly +Float Property __Config_ShatterChanceOnslaughtSpellBonus = 0.04 AutoReadOnly _00E_QuestFunctions Property Levelsystem Auto -Actor FrozenActor - -GlobalVariable Property KillMove Auto GlobalVariable Property _00E_Synergy_ArcticWindOnslaught Auto GlobalVariable Property _00E_FrozenAchievementUnlocked Auto GlobalVariable Property _00E_AchievementsEnabled Auto @@ -207,4 +222,4 @@ Perk Property _04E_30_UNI_SongOfWinterFrostDamagePerk Auto Sound Property WPNImpactBladeVsIce Auto -FormList Property _00E_NoShatterNPCFormList Auto \ No newline at end of file +Static Property XMarker Auto diff --git a/source/scripts/_00e_fs_affinity_absoulcallersc.psc b/source/scripts/_00e_fs_affinity_absoulcallersc.psc index c62ae3e6..51f7e074 100644 --- a/source/scripts/_00e_fs_affinity_absoulcallersc.psc +++ b/source/scripts/_00e_fs_affinity_absoulcallersc.psc @@ -4,8 +4,10 @@ WordOfPower Property _00E_Affinity_Soulcaller_TransformApparation_Word01 Auto Shout Property _00E_Affinity_Soulcaller_TransformApparation Auto Event OnEffectStart(Actor akTarget, Actor akCaster) - Game.TeachWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) - Game.UnlockWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) + If Game.IsWordUnlocked(_00E_Affinity_Soulcaller_TransformApparation_Word01) == False + Game.TeachWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) + Game.UnlockWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) + EndIf akTarget.AddShout(_00E_Affinity_Soulcaller_TransformApparation) Endevent diff --git a/source/scripts/_00e_fs_affinity_ghostblade_onattack.psc b/source/scripts/_00e_fs_affinity_ghostblade_onattack.psc index d5eab38a..979b61a0 100644 --- a/source/scripts/_00e_fs_affinity_ghostblade_onattack.psc +++ b/source/scripts/_00e_fs_affinity_ghostblade_onattack.psc @@ -6,6 +6,7 @@ Spell Property _00E_FakeArrowSP Auto Spell Property _00E_FS_Ghostblade_FakeAttackSpellSP Auto Event OnEffectStart(Actor akTarget, Actor akCaster) + Debug.Trace("_00E_FS_Affinity_Ghostblade_OnSneakAttack: OnEffectStart") Actor akApparition = PhasmalistControlQuest.GetApparitionFailsafeRef() If akApparition Int iEquippedItemType = akApparition.GetEquippedItemType(1) diff --git a/source/scripts/_00e_fs_dreameatersc.psc b/source/scripts/_00e_fs_dreameatersc.psc index bdbfa643..acbff15b 100644 --- a/source/scripts/_00e_fs_dreameatersc.psc +++ b/source/scripts/_00e_fs_dreameatersc.psc @@ -35,6 +35,7 @@ Event OnEffectStart(Actor akTarget, Actor akCaster) If akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) akTarget.DispelSpell(_00E_FS_PsychosisWeaknessSP) + akTarget.DispelSpell(_00E_FS_PsychosisWeaknessSP_NoSlow) EndIf EndEvent @@ -69,3 +70,4 @@ Message Property _00E_FS_FakeStealthMsg Auto Sound Property UISneakAttackM Auto Spell Property _00E_FS_PsychosisWeaknessSP Auto +Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto diff --git a/source/scripts/_00e_fs_nq07_dinnercontrolsc.psc b/source/scripts/_00e_fs_nq07_dinnercontrolsc.psc index 6472ee53..6013673a 100644 --- a/source/scripts/_00e_fs_nq07_dinnercontrolsc.psc +++ b/source/scripts/_00e_fs_nq07_dinnercontrolsc.psc @@ -52,4 +52,4 @@ Potion Property FoodCabbagePotatoSoup Auto GlobalVariable Property FS_NQ07_HoneyWineBought Auto GlobalVariable Property FS_NQ07_ChickenCooked Auto -GlobalVariable Property FS_NQ07_SoupBrewed Auto \ No newline at end of file +GlobalVariable Property FS_NQ07_SoupBrewed Auto diff --git a/source/scripts/_00e_fs_nqr05_perversionsc.psc b/source/scripts/_00e_fs_nqr05_perversionsc.psc index 4fded896..d1827f0c 100644 --- a/source/scripts/_00e_fs_nqr05_perversionsc.psc +++ b/source/scripts/_00e_fs_nqr05_perversionsc.psc @@ -41,8 +41,10 @@ Function PlayDeathFX() SetCriticalStage(CritStage_DisintegrateEnd) myActorBase.SetEssential(True) - If (Game.GetPlayer() as _00E_EPUpdateFunctions).receiveEP(RewardExp) - ; Player receives EXP + If RewardExp > 0 + If (Game.GetPlayer() as _00E_EPUpdateFunctions).receiveEP(RewardExp) + ; Player receives EXP + EndIf EndIf EndFunction diff --git a/source/scripts/_00e_fs_psychosissc.psc b/source/scripts/_00e_fs_psychosissc.psc index 3e295c13..4c04cf1c 100644 --- a/source/scripts/_00e_fs_psychosissc.psc +++ b/source/scripts/_00e_fs_psychosissc.psc @@ -24,42 +24,39 @@ EndEvent ;===================================================================================== Function CheckForPsychosis() - - If !akVictim.HasSpell(_00E_FS_PsychosisWeaknessSP) - - If !akVictim.HasSpell(_00E_FS_PsychosisCounter_01_SP) + If akVictim.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) == False + If akVictim.HasSpell(_00E_FS_PsychosisCounter_01_SP) == False akVictim.AddSpell(_00E_FS_PsychosisCounter_01_SP, False) - - ElseIf akVictim.HasSpell(_00E_FS_PsychosisCounter_01_SP) && !akVictim.HasSpell(_00E_FS_PsychosisCounter_02_SP) - akVictim.AddSpell(_00E_FS_PsychosisCounter_02_SP, false) + ElseIf akVictim.HasSpell(_00E_FS_PsychosisCounter_02_SP) == False + akVictim.AddSpell(_00E_FS_PsychosisCounter_02_SP, False) Else AddDebuff() EndIf - EndIf - EndFunction Function AddDebuff() - + Spell weaknessSpell = _00E_FS_PsychosisWeaknessSP_NoSlow If caster == PlayerREF + If PlayerREF.HasPerk(_00E_Class_Sinistrope_P08_C_Illusionist) + weaknessSpell = _00E_FS_PsychosisWeaknessSP + EndIf _00E_FS_Psychosis_Weakened.Show() EndIf - float fResist = caster.GetActorValue("Illusion")/2 + Float fResist = caster.GetActorValue("Illusion") * 0.5 - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(0, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(1, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(2, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(3, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(4, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(5, fResist) + weaknessSpell.SetNthEffectMagnitude(0, fResist) + weaknessSpell.SetNthEffectMagnitude(1, fResist) + weaknessSpell.SetNthEffectMagnitude(2, fResist) + weaknessSpell.SetNthEffectMagnitude(3, fResist) + weaknessSpell.SetNthEffectMagnitude(4, fResist) + weaknessSpell.SetNthEffectMagnitude(5, fResist) - _00E_FS_PsychosisWeaknessSP.Cast(akVictim, akVictim) + weaknessSpell.Cast(akVictim, akVictim) akVictim.RemoveSpell(_00E_FS_PsychosisCounter_01_SP) akVictim.RemoveSpell(_00E_FS_PsychosisCounter_02_SP) - EndFunction ;===================================================================================== @@ -71,7 +68,10 @@ Actor caster Actor Property PlayerREF Auto +Perk Property _00E_Class_Sinistrope_P08_C_Illusionist Auto Spell Property _00E_FS_PsychosisWeaknessSP Auto +Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto +MagicEffect Property _00E_FS_PsychosisWeaknessVisualME Auto Spell Property _00E_FS_PsychosisCounter_01_SP Auto Spell Property _00E_FS_PsychosisCounter_02_SP Auto diff --git a/source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc b/source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc index 508be80b..41436723 100644 --- a/source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc +++ b/source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc @@ -1,47 +1,16 @@ Scriptname _00E_FS_Theriantrophist_AllowTempTSC extends ObjectReference Event OnTriggerEnter(ObjectReference akActionRef) - - if akActionRef == PlayerREF - + If akActionRef == PlayerREF _00E_FS_Theriantrophist_AllowTemporaryTransform.SetValueInt(1) - - if bCrampyDungeon - fOriginalScale = PlayerREF.GetScale() - PlayerREF.SetScale(0.92) - endif - - endif - - - + EndIf EndEvent Event OnTriggerLeave(ObjectReference akActionRef) - - if akActionRef == PlayerREF - + If akActionRef == PlayerREF _00E_FS_Theriantrophist_AllowTemporaryTransform.SetValueInt(0) - - if bCrampyDungeon - - if fOriginalScale > 0 - PlayerREF.SetScale(fOriginalScale) - else - PlayerREF.SetScale(1.0) - endif - - endif - - endif - - + EndIf EndEvent -float fOriginalScale = 1.0 - -bool Property bCrampyDungeon = False Auto -; This makes the werewolf a bit smaller - Actor Property PlayerREF Auto GlobalVariable Property _00E_FS_Theriantrophist_AllowTemporaryTransform Auto \ No newline at end of file diff --git a/source/scripts/_00e_gaboff_grammophonesc.psc b/source/scripts/_00e_gaboff_grammophonesc.psc index c394488e..beb7f698 100644 --- a/source/scripts/_00e_gaboff_grammophonesc.psc +++ b/source/scripts/_00e_gaboff_grammophonesc.psc @@ -1,40 +1,132 @@ Scriptname _00E_Gaboff_GrammophoneSC extends ObjectReference -Event OnUpdate() +Message Property _00E_Gaboff_GrammophoneMSG Auto +Message Property _00E_PlayerhousingKoppophonVolume Auto +Sound Property _00E_MUS_Special_OceansWidowM Auto +MiscObject Property Gold001 Auto +Actor Property PlayerREF Auto + +Int iSoundID = -1 +Float fVolume = 0.5 +Bool bMusicLocked = False + +Float Property MUSIC_LENGTH = 212.3 AutoReadOnly + + +;===================================================================================== +; FUNCTIONS +;===================================================================================== + +Function PlayMusic(Sound musicSound, Float fMusicLength) + If fVolume <= 0.0 || fVolume > 1.0 + fVolume = 0.5 + EndIf + RegisterForModEvent("BardsLoadGame", "OnBardsLoadGame") + iSoundID = musicSound.Play(Self) + Sound.SetInstanceVolume(iSoundID, fVolume) + RegisterForSingleUpdate(_00E_QuestFunctions.AdjustTimePeriodByEngineTimerError(fMusicLength)) + GoToState("") + _00E_PlayerhousingKoppophonVolume.Show(fVolume * 100.0) +EndFunction + +Function ChangeMusicVolume() + If fVolume >= 0.0 && fVolume < 1.0 + fVolume += 0.25 + Else ; fVolume >= 1.0 or something is wrong with fVolume + fVolume = 0.0 + EndIf + Sound.SetInstanceVolume(iSoundID, fVolume) + _00E_PlayerhousingKoppophonVolume.Show(fVolume * 100.0) +EndFunction + +Function StopMusic() + bMusicLocked = True + + GoToState("DoneCleanup") + UnregisterForModEvent("BardsLoadGame") + UnregisterForUpdate() + + If iSoundID != -1 + Sound.StopInstance(iSoundID) + iSoundID = -1 + EndIf + + bMusicLocked = False +EndFunction + +Function TryStopMusic() + If bMusicLocked == False + StopMusic() + Else + RegisterForSingleUpdate(0.5) + EndIf +EndFunction - bIsPlaying = False +;===================================================================================== +; EVENTS +;===================================================================================== + +Event OnInit() + GoToState("DoneCleanup") EndEvent Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF && bMusicLocked == False + bMusicLocked = True - If !bIsPlaying - - int iButton = _00E_Gaboff_GrammophoneMSG.Show() - - if iButton == 0 - - bIsPlaying = True - PlayerREF.RemoveItem(Gold001, 5) - _00E_MUS_Special_OceansWidowM.Play(Self) - RegisterForSingleUpdate(160) - + If iSoundID == -1 + If _00E_Gaboff_GrammophoneMSG.Show() == 0 + PlayerREF.RemoveItem(Gold001, 5) + PlayMusic(_00E_MUS_Special_OceansWidowM, MUSIC_LENGTH) + EndIf Else - - Return - + ChangeMusicVolume() EndIf - + + bMusicLocked = False EndIf - EndEvent -bool bIsPlaying +Event OnUpdate() + TryStopMusic() +EndEvent -Actor Property PlayerREF Auto +Event OnBardsLoadGame(string eventName, string strArg, float numArg, Form sender) + ; Player just loaded a save with the gramophone playing. The sound is dead by now. + TryStopMusic() +EndEvent -MiscObject Property Gold001 Auto +Event OnCellAttach() + TryStopMusic() +EndEvent -Message Property _00E_Gaboff_GrammophoneMSG Auto +Event OnLoad() + TryStopMusic() +EndEvent + +Event OnCellDetach() + TryStopMusic() +EndEvent + +Event OnUnload() + TryStopMusic() +EndEvent + +State DoneCleanup + Event OnCellAttach() + ; Do nothing + EndEvent + + Event OnLoad() + ; Do nothing + EndEvent + + Event OnCellDetach() + ; Do nothing + EndEvent -Sound Property _00E_MUS_Special_OceansWidowM Auto \ No newline at end of file + Event OnUnload() + ; Do nothing + EndEvent +EndState diff --git a/source/scripts/_00e_game_playerhouse_boardsc.psc b/source/scripts/_00e_game_playerhouse_boardsc.psc index 733ade9e..5297a5c8 100644 --- a/source/scripts/_00e_game_playerhouse_boardsc.psc +++ b/source/scripts/_00e_game_playerhouse_boardsc.psc @@ -104,8 +104,8 @@ function OnActivate(ObjectReference akActionRef) EndIf elseif iButton == 6 - - PlayerhousingMaster.ShowTutorial() + + _00E_PlayerhousingMaster.GetMaster().ShowExpansionBoardTutorial() endIf @@ -184,4 +184,3 @@ Message Property _00E_Game_PlayerHouse_RemoveFurniture Auto _00E_NQ24_Playerhousing_Functions Property NQ24 Auto _00E_PlayerHousing_CellNameSC Property Player Auto -_00E_PlayerhousingTutorial Property PlayerhousingMaster Auto \ No newline at end of file diff --git a/source/scripts/_00e_game_skillmenusc.psc b/source/scripts/_00e_game_skillmenusc.psc index d1e22ef3..9c63de52 100644 --- a/source/scripts/_00e_game_skillmenusc.psc +++ b/source/scripts/_00e_game_skillmenusc.psc @@ -39,8 +39,7 @@ Event OnKeyDown(Int KeyCode) If KeyCode == iHeroMenuKeycode || (MenuOpen && (KeyCode == iExitHeroMenuKeycode1 || KeyCode == iExitHeroMenuKeycode2)) If !MenuOpen - If Utility.IsInMenuMode() == False && UI.IsTextInputEnabled() == False && bReadyToOpen && PlayerREF.GetCurrentLocation() != _00E_Dreamworld_Location - bReadyToOpen = False + If Utility.IsInMenuMode() == False && UI.IsTextInputEnabled() == False && PlayerREF.GetCurrentLocation() != _00E_Dreamworld_Location && bReadyToOpen bReadyToOpen = False InitializeActorValueInfos() OpenSkillmenu() diff --git a/source/scripts/_00e_mq10a_functions.psc b/source/scripts/_00e_mq10a_functions.psc index 996c1bea..8ee16e07 100644 --- a/source/scripts/_00e_mq10a_functions.psc +++ b/source/scripts/_00e_mq10a_functions.psc @@ -15,8 +15,7 @@ Function SetUpScene() MQ10a_SC1_HeartParentREF.Enable() Levelsystem.RemoveSilence() PlayerREF.MoveTo(PlayerStartMarkerNew) - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(0.85) + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85) Levelsystem.SkipTimeToHour(18.4) Game.ForceFirstPerson() _00E_QuestFunctions.PlayerAIWalkStop() ; workaround for the "uncompiled scripts bug" of patch 1.5.8.0 diff --git a/source/scripts/_00e_mq12c_functions.psc b/source/scripts/_00e_mq12c_functions.psc index 1cec8cc4..b02dc706 100644 --- a/source/scripts/_00e_mq12c_functions.psc +++ b/source/scripts/_00e_mq12c_functions.psc @@ -254,8 +254,7 @@ Function StartSC03() _00E_QuestFunctions.PlayerAIWalkStop() Game.ShowFirstPersonGeometry(False) Game.RequestAutoSave() - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(0.85) + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85) TimeScale.SetValue(0.1) Levelsystem.SkipTimeToHour(18.5) ImageSpaceModifier.RemoveCrossFade(3) diff --git a/source/scripts/_00e_mq12c_harbirsiegesc.psc b/source/scripts/_00e_mq12c_harbirsiegesc.psc index 72f3d18f..f3b14ee7 100644 --- a/source/scripts/_00e_mq12c_harbirsiegesc.psc +++ b/source/scripts/_00e_mq12c_harbirsiegesc.psc @@ -6,8 +6,7 @@ Scriptname _00E_MQ12c_HarbirSiegeSC extends ObjectReference Conditional Event OnTriggerEnter(ObjectReference akActionRef) - If MQ12c.GetStage() >= 5 && akActionRef == PlayerREF - _00E_EnderalOvercast.SetActive(True) + If akActionRef == PlayerREF bInTrigger = True RegisterForSingleUpdate(1) SpotPlayer() @@ -17,9 +16,8 @@ EndEvent Event OnTriggerLeave(ObjectReference akActionRef) - If MQ12c.GetStage() >= 5 && akActionRef == PlayerREF + If akActionRef == PlayerREF bInTrigger = False - Weather.ReleaseOverride() if MQ12c_OpenFire.GetValueInt() == 1 StopFireOnPlayer() EndIf @@ -49,6 +47,7 @@ State KillPlayerState EndEvent EndState + ;===================================================================================== ; FUNCTIONS ;===================================================================================== @@ -150,13 +149,9 @@ Message Property _00E_MQ12c_CaughtByNehrimese Auto MusicType Property _00E_Music_Combat_BonehunterNoCond Auto -Weather Property _00E_EnderalOvercast Auto - Sound Property MAGVampireSunlight Auto Spell Property _00E_MQ12c_BallistaSpell Auto -Quest Property MQ12c Auto - Topic Property MQ12c_D01_NehrimeseScoutBranchTopic Auto Topic Property BanditDialogue_NormalToCombat Auto \ No newline at end of file diff --git a/source/scripts/_00e_mq13a_functions.psc b/source/scripts/_00e_mq13a_functions.psc index ad268690..fdffcf35 100644 --- a/source/scripts/_00e_mq13a_functions.psc +++ b/source/scripts/_00e_mq13a_functions.psc @@ -326,10 +326,13 @@ Function CleanUpAndSetUpSC07() PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(0), false, true) PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(1), false, true) PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true) - - If PlayerREF.GetActorBase().GetRace() == HighElfRace && PlayerREF.GetActorBase().GetSex() == 0 + + ; TODO, Gavrant, 2021-06-21: No idea what the commented-out code below was supposed to do. + ; But it would conflict with the follow-up romance kiss scenes that attempt to do the same, but for both sexes of HighElfRace + ; Why only for males and why no scale reverts if no romance happens are a mystery. Target this for later purge. + ;/ If PlayerREF.GetActorBase().GetRace() == HighElfRace && PlayerREF.GetActorBase().GetSex() == 0 PlayerREF.SetScale(0.92) - EndIf + EndIf /; Weather.ReleaseOverride() MQ13a_Door02_REF.Enable() diff --git a/source/scripts/_00e_mq13a_grammophonesc.psc b/source/scripts/_00e_mq13a_grammophonesc.psc index 1dd1c870..fb03f968 100644 --- a/source/scripts/_00e_mq13a_grammophonesc.psc +++ b/source/scripts/_00e_mq13a_grammophonesc.psc @@ -1,21 +1,127 @@ Scriptname _00E_MQ13a_GrammophoneSC extends ObjectReference -Event OnUpdate() +Actor Property PlayerREF Auto +Sound Property _00E_MUS_Special_DrachenflugM Auto +Message Property _00E_PlayerhousingKoppophonVolume Auto + +Int iSoundID = -1 +Float fVolume = 0.5 +Bool bMusicLocked = False + +Float Property MUSIC_LENGTH = 243.0 AutoReadOnly + + +;===================================================================================== +; FUNCTIONS +;===================================================================================== + +Function PlayMusic(Sound musicSound, Float fMusicLength) + If fVolume <= 0.0 || fVolume > 1.0 + fVolume = 0.5 + EndIf + RegisterForModEvent("BardsLoadGame", "OnBardsLoadGame") + iSoundID = musicSound.Play(Self) + Sound.SetInstanceVolume(iSoundID, fVolume) + RegisterForSingleUpdate(_00E_QuestFunctions.AdjustTimePeriodByEngineTimerError(fMusicLength)) + GoToState("") + _00E_PlayerhousingKoppophonVolume.Show(fVolume * 100.0) +EndFunction + +Function ChangeMusicVolume() + If fVolume >= 0.0 && fVolume < 1.0 + fVolume += 0.25 + Else ; fVolume >= 1.0 or something is wrong with fVolume + fVolume = 0.0 + EndIf + Sound.SetInstanceVolume(iSoundID, fVolume) + _00E_PlayerhousingKoppophonVolume.Show(fVolume * 100.0) +EndFunction + +Function StopMusic() + bMusicLocked = True + + GoToState("DoneCleanup") + UnregisterForModEvent("BardsLoadGame") + UnregisterForUpdate() + + If iSoundID != -1 + Sound.StopInstance(iSoundID) + iSoundID = -1 + EndIf + + bMusicLocked = False +EndFunction + +Function TryStopMusic() + If bMusicLocked == False + StopMusic() + Else + RegisterForSingleUpdate(0.5) + EndIf +EndFunction + - bIsPlaying = False +;===================================================================================== +; EVENTS +;===================================================================================== +Event OnInit() + GoToState("DoneCleanup") EndEvent Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF && bMusicLocked == False + bMusicLocked = True - If !bIsPlaying - bIsPlaying = True - _00E_MUS_Special_DrachenflugM.Play(Self) - RegisterForSingleUpdate(160) + If iSoundID == -1 + PlayMusic(_00E_MUS_Special_DrachenflugM, MUSIC_LENGTH) + Else + ChangeMusicVolume() + EndIf + + bMusicLocked = False EndIf - EndEvent -bool bIsPlaying +Event OnUpdate() + TryStopMusic() +EndEvent + +Event OnBardsLoadGame(string eventName, string strArg, float numArg, Form sender) + ; Player just loaded a save with the gramophone playing. The sound is dead by now. + TryStopMusic() +EndEvent + +Event OnCellAttach() + TryStopMusic() +EndEvent + +Event OnLoad() + TryStopMusic() +EndEvent + +Event OnCellDetach() + TryStopMusic() +EndEvent + +Event OnUnload() + TryStopMusic() +EndEvent + +State DoneCleanup + Event OnCellAttach() + ; Do nothing + EndEvent + + Event OnLoad() + ; Do nothing + EndEvent + + Event OnCellDetach() + ; Do nothing + EndEvent -Sound Property _00E_MUS_Special_DrachenflugM Auto \ No newline at end of file + Event OnUnload() + ; Do nothing + EndEvent +EndState diff --git a/source/scripts/_00e_nq_g_07_functions.psc b/source/scripts/_00e_nq_g_07_functions.psc index 3a530d44..d64f7feb 100644 --- a/source/scripts/_00e_nq_g_07_functions.psc +++ b/source/scripts/_00e_nq_g_07_functions.psc @@ -486,8 +486,7 @@ EndFunction Function PlayKiss() If PlayerREF.GetActorBase().GetRace() == HighElfRace - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(0.92) + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) EndIf PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true) @@ -529,9 +528,7 @@ Function FadeOut() PlayerREF.RemoveSpell(_00E_Game_abSlowTime) If PlayerREF.GetActorBase().GetRace() == HighElfRace - PlayerREF.SetScale(fPlayerScale) - EndIf PlayerREF.SetUnconscious(False) diff --git a/source/scripts/_00e_perkblutrauschffaimedscript.psc b/source/scripts/_00e_perkblutrauschffaimedscript.psc new file mode 100644 index 00000000..36d5bd5d --- /dev/null +++ b/source/scripts/_00e_perkblutrauschffaimedscript.psc @@ -0,0 +1,5 @@ +Scriptname _00E_PerkBlutrauschFFAimedScript extends activemagiceffect + +Event OnEffectStart(Actor akTarget, Actor akCaster) + Debug.Trace("Bloodlust: OnEffectStart") +EndEvent \ No newline at end of file diff --git a/source/scripts/_00e_phasmalist_newapparitionalias.psc b/source/scripts/_00e_phasmalist_newapparitionalias.psc index 7c999a08..9143ea62 100644 --- a/source/scripts/_00e_phasmalist_newapparitionalias.psc +++ b/source/scripts/_00e_phasmalist_newapparitionalias.psc @@ -47,6 +47,8 @@ Int Property iGhostlyWarriorBoostArmorSkill1 = 7 AutoReadOnly Int Property iGhostlyWarriorBoostArmorSkill2 = 17 AutoReadOnly Int Property iGhostlyWarriorBoostArmorSkill3 = 30 AutoReadOnly +Float Property DEFAULT_HEAL_RATE = 50.0 AutoReadOnly + Explosion Property _00E_Phasmalist_EnterWorldExp Auto Perk Property _00E_Class_Phasmalist_P03_Talent_SummonApparation_01 Auto @@ -98,6 +100,8 @@ _00E_Phasmalist_TrinketSC SummonTrinket ; Needed for the failsafe in OnLoadGame() and some other shenanigans Actor Property AliasFailsafeRef = None Auto Hidden +Bool bTeleportHealRate = False + ;===================================================================================== ; SUMMON & SETUP @@ -108,6 +112,7 @@ Function Summon(_00E_Phasmalist_TrinketSC trinket, ObjectReference moveToRef, Bo SummonTrinket = trinket bActivationBusy = bPhasmalismTankMode ; Reset just in case + bTeleportHealRate = False ; Reset just in case _00E_Phasmalist_IsApparitionSummoned.SetValue(1) Setup() ; init stats before any armor buffs are applied @@ -158,11 +163,8 @@ Function Summon(_00E_Phasmalist_TrinketSC trinket, ObjectReference moveToRef, Bo EndFunction Function PlaySummonExplosion(ObjectReference markerRef) - ObjectReference expMarker = markerRef.placeAtMe(XMarker) - expMarker.MoveTo(markerRef, 0.0, 0.0, 15) - expMarker.PlaceAtMe(_00E_Phasmalist_EnterWorldExp) - expMarker.Disable() - expMarker.Delete() + ObjectReference expMarker = _PlaceExplosionEx(_00E_Phasmalist_EnterWorldExp, markerRef, 15.0) + _DeleteMarker(expMarker) EndFunction Int Property BOOST_CLASS_MAGE = 0 AutoReadOnly @@ -219,11 +221,19 @@ EndFunction Function SetupNotPersistentStats(Actor akSelf) akSelf.GetActorBase().SetCombatStyle(SummonTrinket.GetUsedCombatStyle()) - akSelf.SetAV("HealRate", 50) + If bTeleportHealRate == False + akSelf.SetAV("HealRate", DEFAULT_HEAL_RATE) + Else + akSelf.SetAV("HealRate", 0.0) + EndIf akSelf.SetAV("MagickaRate", fApparitionManaRate) ;failsafe since setav doesn't work sometimes - akSelf.ForceAV("HealRate", 50) + If bTeleportHealRate == False + akSelf.ForceAV("HealRate", DEFAULT_HEAL_RATE) + Else + akSelf.ForceAV("HealRate", 0.0) + EndIf akSelf.ForceAV("MagickaRate", fApparitionManaRate) EndFunction @@ -290,8 +300,11 @@ Function _AddClassBoost(Actor akSelf, Int iBoostClass, Int iBoostLevel) akSelf.ModAV("HeavyArmor", iBoostArmor) ;akSelf.ForceAV("LightArmor", akSelf.GetAV("LightArmor") + iBoostArmor) akSelf.ModAV("LightArmor", iBoostArmor) + ; MeleeDamage AV seems to be not working, it's actually always zero ;akSelf.ForceAV("MeleeDamage", akSelf.GetAV("MeleeDamage") + iBoostMelee) - akSelf.ModAV("MeleeDamage", iBoostMelee) + ;akSelf.ModAV("MeleeDamage", iBoostMelee) + akSelf.ModAV("OneHanded", iBoostMelee) + akSelf.ModAV("TwoHanded", iBoostMelee) Else Debug.Notification("Phasmalist Control Quest has issues: Unsupported boost class " + iBoostClass) EndIf @@ -393,12 +406,20 @@ EndFunction Function TeleportToPlayer(Bool bTeleportInFront, Bool bSilent) Actor akSelf = Self.GetActorReference() If akSelf + ; Zero out-of-combat heal rate for teleport and a few seconds after it. + ; This is to prevent the apparition regenerating health IN combat on "Call Apparition" spam. + UnregisterForUpdate() + akSelf.ForceAV("HealRate", 0.0) + bTeleportHealRate = True + akSelf.Disable() _MoveToPlayer(akSelf, bTeleportInFront) akSelf.Enable() If bSilent == False akSelf.PlaceAtMe(_00E_Phasmalist_EnterWorldExp) EndIf + + RegisterForSingleUpdate(2.0) EndIf EndFunction @@ -460,10 +481,11 @@ FormList Property _00E_Phasmalist_CombatStyleWerewolfList Auto Spell Property _00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP Auto Idle Property WerewolfTransformBack Auto Idle Property IdleWerewolfTransformation Auto -Idle Property _00E_IdleStomp Auto Explosion Property _00E_FS_Theriantrophist_TransEXP Auto Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto ObjectReference Property _00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest Auto +Idle Property LooseFullBodyStagger Auto +Armor Property _00E_InvisibleHelmet_Armor Auto Float Property WEREWOLF_TRANSFORM_UNARMED_DAMAGE_BOOST = 20.0 AutoReadOnly Float Property WEREWOLF_TRANSFORM_HEALTH_BOOST = 40.0 AutoReadOnly @@ -475,34 +497,38 @@ Bool Function IsTransformedToWerewolf() EndFunction Function TransformToWerewolf(Actor akSpellTarget) + ObjectReference expMarker + Actor akSelf = GetActorReference() If (akSelf == None) || (akSelf != akSpellTarget) Return EndIf - akSelf.SetPlayerTeammate(False) + bActivationBusy = True - Utility.Wait(0.2) - akSelf.UnequipAll() + akSelf.SetPlayerTeammate(False) + akSelf.EvaluatePackage() WerewolfTranform_OriginalRace = akSelf.getRace() + Utility.Wait(0.2) akSelf.PlayIdle(IdleWerewolfTransformation) + Utility.Wait(0.8) _SetCombatStyle(akSelf, _00E_Phasmalist_CombatStyleWerewolfList.GetAt(0) as CombatStyle) _00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP.SetNthEffectMagnitude(0, WEREWOLF_TRANSFORM_UNARMED_DAMAGE_BOOST) _00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP.SetNthEffectMagnitude(1, WEREWOLF_TRANSFORM_HEALTH_BOOST) akSelf.AddSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP) - - Utility.Wait(1) - - ObjectReference expMarker = akSelf.PlaceAtMe(XMarker) - expMarker.MoveTo(akSelf, 0.0, 0.0, 100.0) - expMarker.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP) + expMarker = _PlaceExplosionEx(_00E_FS_Theriantrophist_TransEXP, akSelf, 100.0) + Utility.Wait(0.4) ; Pause to synchronize the explosion with the transformation animation(s) + akSelf.SetLookAt(akSelf) ; Reset headtracking to prevent the head getting stuck looking sideways after the tranformation + akSelf.UnequipAll() akSelf.SetRace(_00E_Theriantrophist_PlayerWerewolfRace) - expMarker.Disable() - expMarker.Delete() - Utility.Wait(0.2) + _DeleteMarker(expMarker) + Utility.Wait(0.2) akSelf.SetPlayerTeammate(True) + akSelf.EvaluatePackage() + + bActivationBusy = False EndFunction Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSilent) @@ -511,6 +537,9 @@ Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSi Return EndIf + bActivationBusy = True + bTeleportHealRate = False + If akSelf.IsDead() _TransformFromWerewolfDead(akSelf, bIsUnsummoned, bSilent) Else @@ -518,25 +547,33 @@ Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSi EndIf WerewolfTranform_OriginalRace = None + + bActivationBusy = False EndFunction Function _TransformFromWerewolfDead(Actor akSelf, Bool bIsUnsummoned, Bool bSilent) + ObjectReference expMarker = None + GoToState("") + If bSilent == False + expMarker = _PlaceExplosionEx(_00E_FS_Theriantrophist_TransEXP, akSelf, 15.0) + EndIf + ; RemoveAllItems is needed here for _TriggerEquipmentUpdate to work akSelf.RemoveAllItems(_00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest) + akSelf.SetPlayerTeammate(False) akSelf.Resurrect() _00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest.RemoveAllItems(akSelf) - - Utility.Wait(0.2) - - If bSilent == False - akSelf.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP) - EndIf + Utility.Wait(0.2) ; Pause for the ragdoll to settle. Without it the apparition appears in the air on SetRace _SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle()) akSelf.RemoveSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP) + If expMarker + _DeleteMarker(expMarker) + expMarker = None + EndIf akSelf.SetRace(WerewolfTranform_OriginalRace) - - Utility.Wait(0.2) + _TriggerEquipmentUpdate(akSelf, False) + akSelf.ClearLookAt() ; Reenable headtracking If bIsUnsummoned == False GoToState("Working") @@ -545,27 +582,42 @@ Function _TransformFromWerewolfDead(Actor akSelf, Bool bIsUnsummoned, Bool bSile EndFunction Function _TransformFromWerewolfAlive(Actor akSelf, Bool bIsUnsummoned, Bool bSilent) + ObjectReference expMarker = None + akSelf.SetPlayerTeammate(False) - If bSilent == False - akSelf.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP) - EndIf + akSelf.EvaluatePackage() akSelf.PlayIdle(WerewolfTransformBack) - _SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle()) akSelf.RemoveSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP) + _SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle()) + If bSilent == False + expMarker = _PlaceExplosionEx( _00E_FS_Theriantrophist_TransEXP, akSelf, 100.0) + EndIf akSelf.SetRace(WerewolfTranform_OriginalRace) - ; RemoveAllItems is necessary to correctly reequip items - akSelf.RemoveAllItems(_00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest) - _00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest.RemoveAllItems(akSelf) - akSelf.PlayIdle(_00E_IdleStomp) - If bIsUnsummoned - Utility.Wait(0.2) - Else - Utility.Wait(0.1) + _TriggerEquipmentUpdate(akSelf, True) + If expMarker + _DeleteMarker(expMarker) + expMarker = None + EndIf + Utility.Wait(0.2) + akSelf.ClearLookAt() ; Reenable headtracking + If bIsUnsummoned == False SetupBehaviour(akSelf) SetupNotPersistentStats(akSelf) + akSelf.EvaluatePackage() EndIf EndFunction +Function _TriggerEquipmentUpdate(Actor akSelf, Bool bPlayStaggerIdle) + akSelf.SetPlayerTeammate(True) ; Yes, the apparition has to be a player's teammate for AddItem-EquipItem below to trigger equipment update + If bPlayStaggerIdle + akSelf.PlayIdle(LooseFullBodyStagger) + EndIf + + akSelf.AddItem(_00E_InvisibleHelmet_Armor, 1, True) + akSelf.EquipItem(_00E_InvisibleHelmet_Armor, 1) + akSelf.RemoveItem(_00E_InvisibleHelmet_Armor, 1) +EndFunction + ;===================================================================================== ; HELPER FUNCTIONS @@ -629,6 +681,18 @@ Function _UnregisterSpellBook(Actor akSelf, Form akBaseItem) EndIf EndFunction +ObjectReference Function _PlaceExplosionEx(Explosion exp, ObjectReference refSpot, Float fOffsetZ) + ObjectReference expMarker = refSpot.PlaceAtMe(XMarker) + expMarker.MoveTo(refSpot, 0.0, 0.0, fOffsetZ) + expMarker.PlaceAtMe(exp) + Return expMarker +EndFunction + +Function _DeleteMarker(ObjectReference refMarker) + refMarker.Disable() + refMarker.Delete() +EndFunction + ;===================================================================================== ; EVENTS @@ -650,12 +714,14 @@ State Working UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 0, "$View_Attributes") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 0, "$View_Attributes") - - UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 1, "$Adapt_Combat_Style") - UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 1, "$Adapt_Combat_Style") - - UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 4, "$Currently_Equipped") - UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 4, "$Currently_Equipped") + + If IsTransformedToWerewolf() == False + UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 1, "$Adapt_Combat_Style") + UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 1, "$Adapt_Combat_Style") + + UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 4, "$Currently_Equipped") + UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 4, "$Currently_Equipped") + EndIf UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 5, "$Quit") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 5, "$Quit") @@ -708,4 +774,11 @@ State Working EndIf EndEvent + Event OnUpdate() + If bTeleportHealRate + bTeleportHealRate = False + GetActorReference().ForceAV("HealRate", DEFAULT_HEAL_RATE) + EndIf + EndEvent + EndState diff --git a/source/scripts/_00e_phasmalist_workbench.psc b/source/scripts/_00e_phasmalist_workbench.psc index 33535a91..c3f2b001 100644 --- a/source/scripts/_00e_phasmalist_workbench.psc +++ b/source/scripts/_00e_phasmalist_workbench.psc @@ -1,21 +1,21 @@ Scriptname _00E_Phasmalist_Workbench extends ObjectReference ; script that is attached to all phasmalist workbenches and manages their gui and functions -Message Property illegalTrinket auto +Message Property illegalTrinket Auto {Message objects whose title is the message that is displayed when the player tries to summon an apparition but wears no phasmalist trinket object} -Message Property reallyDespectralize auto -_FS_Phasmalist_ControlQuest Property phasmalistControlQuest auto -ObjectReference Property spectralizerContainer auto +Message Property reallyDespectralize Auto +_FS_Phasmalist_ControlQuest Property phasmalistControlQuest Auto +ObjectReference Property spectralizerContainer Auto {the container items that should be spectralized are put in; should be the same for all workbenches} -ObjectReference Property _00E_Phasmalist_DespectralizingContainerReference auto +ObjectReference Property _00E_Phasmalist_DespectralizingContainerReference Auto -Keyword Property _00E_Phasmalist_CraftingWorkbench_NPCMarker auto +Keyword Property _00E_Phasmalist_CraftingWorkbench_NPCMarker Auto Actor Property PlayerREF Auto Message Property _00E_Theriantrophist_CantCraftMSG Auto Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto -_00E_PlayerhousingMaster Property PlayerhousingMaster Auto GlobalVariable Property _00E_Phasmalist_TankMode Auto +Static Property _00E_NPCMarkerBlue Auto Bool bApparitionPrepared = False bool bApparitionSummoned = False @@ -24,6 +24,10 @@ String Property CRAFTING_MENU = "Crafting Menu" AutoReadOnly String Property CONTAINER_MENU = "ContainerMenu" AutoReadOnly +;===================================================================================== +; EVENTS +;===================================================================================== + Event OnInit() BlockActivation() EndEvent @@ -40,20 +44,36 @@ Event OnActivate(ObjectReference akActionRef) If akActionRef == PlayerREF GoToState("Waiting") - If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace - _00E_Theriantrophist_CantCraftMSG.Show() - ElseIf (((Self as ObjectReference) as _00E_Playerhousing_Furniture) == None) || PlayerhousingMaster.GetState() == "Buildmode" - ShowMainMenu() + If _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) + If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace + _00E_Theriantrophist_CantCraftMSG.Show() + Else + ShowMainMenu() + Return + EndIf EndIf + + GoToState("") Else Activate(akActionRef, true) EndIf EndEvent +State Waiting + Event OnActivate(ObjectReference akActionRef) + ; Do nothing + EndEvent +EndState + + +;===================================================================================== +; PHASMALISM MENU +;===================================================================================== + ; Summons the apparition and places it in the tank Function PrepareApparition() If bApparitionPrepared == False - ObjectReference tankMarkerRef = GetlinkedRef(_00E_Phasmalist_CraftingWorkbench_NPCMarker) + ObjectReference tankMarkerRef = GetTankMarker() If bApparitionPrepared == False bApparitionPrepared = True _00E_Phasmalist_TankMode.SetValue(1) @@ -76,7 +96,7 @@ EndFunction Function ResetApparitionOnInventoryChange() If bApparitionPrepared - ObjectReference tankMarkerRef = GetlinkedRef(_00E_Phasmalist_CraftingWorkbench_NPCMarker) + ObjectReference tankMarkerRef = GetTankMarker() Actor akApparition = phasmalistControlQuest.GetApparitionRef() If akApparition akApparition.Disable() @@ -264,7 +284,7 @@ State Spectralize EndState State Despectralize - Event onBeginState() + Event OnBeginState() Actor akApparition = phasmalistControlQuest.GetApparitionRef() If akApparition reallyDespectralize.show() @@ -299,8 +319,68 @@ State Despectralize EndEvent EndState -State Waiting - Event OnActivate(ObjectReference akActionRef) - ; Do nothing - EndEvent -EndState + +;===================================================================================== +; PLACEABLE WORKBENCH +;===================================================================================== + +ObjectReference PlaceableTankMarkerRef = None + +Float Property FAST_TRANSLATION_SPEED = 1000000.0 AutoReadOnly + +ObjectReference Function GetTankMarker() + If PlaceableTankMarkerRef + Return PlaceableTankMarkerRef + EndIf + + Return GetlinkedRef(_00E_Phasmalist_CraftingWorkbench_NPCMarker) +EndFunction + +Function StartPlacement() + If PlaceableTankMarkerRef + PlaceableTankMarkerRef.Disable() + EndIf +EndFunction + +Function OnPickUp() + If PlaceableTankMarkerRef + PlaceableTankMarkerRef.Disable() + PlaceableTankMarkerRef.Delete() + PlaceableTankMarkerRef = None + EndIf +EndFunction + +Function FinishPlacement() + If PlaceableTankMarkerRef == None + PlaceableTankMarkerRef = PlaceAtMe(_00E_NPCMarkerBlue, abInitiallyDisabled = True) + Else + PlaceableTankMarkerRef.Disable() + EndIf + + ; (Re)position the marker + Float fOffsetX = -116.0 + Float fOffsetY = 5.0 ; 54 ; 22.4 + Float fOffsetZ = 20.0 + Float fOffsetAngleZ = 136.0 + + Float fWorkbenchAngleZ = GetAngleZ() + + Float cosZ = Math.Cos(fWorkbenchAngleZ) + Float sinZ = Math.Sin(fWorkbenchAngleZ) + Float mx = GetPositionX() + fOffsetY * sinZ + fOffsetX * cosZ + Float my = GetPositionY() + fOffsetY * cosZ - fOffsetX * sinZ + Float mz = GetPositionZ() + fOffsetZ + + PlaceableTankMarkerRef.MoveTo(self) + + PlaceableTankMarkerRef.Enable() + + _00E_QuestFunctions.WaitForReferenceToLoad(PlaceableTankMarkerRef) + + PlaceableTankMarkerRef.TranslateTo(mx, my, mz, 0, 0, fWorkbenchAngleZ + fOffsetAngleZ, FAST_TRANSLATION_SPEED, FAST_TRANSLATION_SPEED) + + + ; PlaceableTankMarkerRef.SetPosition(mx, my, mz) + ; PlaceableTankMarkerRef.SetAngle(0, 0, fWorkbenchAngleZ + fOffsetAngleZ) + +EndFunction \ No newline at end of file diff --git a/source/scripts/_00e_placeablegrammophonplay.psc b/source/scripts/_00e_placeablegrammophonplay.psc index c28ab841..4a428c87 100644 --- a/source/scripts/_00e_placeablegrammophonplay.psc +++ b/source/scripts/_00e_placeablegrammophonplay.psc @@ -1,63 +1,161 @@ Scriptname _00E_PlaceableGrammophonPlay extends ObjectReference -Sound Property soundToPlay Auto -MusicType Property _00E_SilenceTransitionHighPriority Auto +Sound Property _00E_MUS_Placeable_Koppophon Auto +MusicType Property _00E_SilenceTransitionHighPriority Auto ; OBSOLETE. Left for version update on older saves. +MusicType Property _00E_SilenceKoppophon Auto GlobalVariable Property _00E_AchievementsEnabled Auto Message Property _00E_PlayerhousingKoppophonVolume Auto -bool bDone -float Property soundLengthInSeconds Auto +Actor Property PlayerREF Auto -int playbackId = -1 -float volume = 0.5 -bool bmuted = true +Int playbackId = -1 +Float volume = 0.5 +Bool bDone ; Unlocked END_KOPPOPHON_01 achievement +Bool bMusicLocked = False +Bool bOldSilenceUpdated = False -Event OnCellAttach() - playbackId = -1 - bmuted = true -Endevent +Float Property MUSIC_LENGTH = 87.2 AutoReadOnly -Event OnLoad() - playbackId = -1 - bmuted = true -Endevent -Event OnCellDetach() - _00E_SilenceTransitionHighPriority.Remove() - Sound.StopInstance(playbackId) - playbackId = -1 +;===================================================================================== +; FUNCTIONS +;===================================================================================== + +Function StopMusic() + bMusicLocked = True + + UnregisterForModEvent("BardsLoadGame") UnregisterForUpdate() -Endevent + + If bOldSilenceUpdated == False + bOldSilenceUpdated = True + If playbackId != -1 + _00E_SilenceTransitionHighPriority.Remove() + EndIf + EndIf + + If playbackId != -1 + Sound.StopInstance(playbackId) + playbackId = -1 + EndIf + + _00E_SilenceKoppophon.Remove() + + bMusicLocked = False +EndFunction + +Function TryStopMusic() + If bMusicLocked == False + StopMusic() + Else + RegisterForSingleUpdate(0.5) + EndIf +EndFunction + +Function Cleanup() + GoToState("DoneCleanup") + TryStopMusic() +EndFunction + + +;===================================================================================== +; EVENTS +;===================================================================================== + +Event OnInit() + GoToState("DoneCleanup") +EndEvent Event OnActivate(ObjectReference triggerRef) - if playbackId == -1 - playbackId = soundToPlay.Play(Self) - RegisterForSingleUpdate(soundLengthInSeconds) - If volume == 0 - volume = 0.5 - endif - Sound.setInstanceVolume(playbackId, volume) - _00E_SilenceTransitionHighPriority.Add() - If _00E_AchievementsEnabled.GetValueInt() == 1 && !bDone - bDone = true - Game.UnlockAchievement("END_KOPPOPHON_01") + If triggerRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bMusicLocked == False + bMusicLocked = True + + If playbackId == -1 ; Start playing + bOldSilenceUpdated = True + RegisterForModEvent("BardsLoadGame", "OnBardsLoadGame") + + _00E_SilenceKoppophon.Add() + + playbackId = _00E_MUS_Placeable_Koppophon.Play(Self) + If volume <= 0.0 || volume > 1.0 + volume = 0.5 + EndIf + Sound.SetInstanceVolume(playbackId, volume) + RegisterForSingleUpdate(_00E_QuestFunctions.AdjustTimePeriodByEngineTimerError(MUSIC_LENGTH)) + + GoToState("") + + _00E_PlayerhousingKoppophonVolume.Show(volume * 100.0) + + If _00E_AchievementsEnabled.GetValueInt() == 1 && (bDone == False) + bDone = True + Game.UnlockAchievement("END_KOPPOPHON_01") + EndIf + + ElseIf bOldSilenceUpdated == False + ; Player just loaded an older save with the Koppophon playing. The sound is dead by now. + StopMusic() + + Else ; Volume control + Float fNewVolume = volume + 0.25 + If fNewVolume > 1.0 + fNewVolume = 0.0 + EndIf + + Sound.SetInstanceVolume(playbackId, fNewVolume) + If fNewVolume == 0.0 ; On mute + _00E_SilenceKoppophon.Remove() + ElseIf volume == 0.0 ; On unmute + _00E_SilenceKoppophon.Add() + EndIf + volume = fNewVolume + + _00E_PlayerhousingKoppophonVolume.Show(volume * 100.0) + EndIf - else - volume = volume + 0.25 - if volume > 1 - volume = 0 - bmuted = false - _00E_SilenceTransitionHighPriority.Remove() - elseif bmuted == false - bmuted = true - _00E_SilenceTransitionHighPriority.Add() - Endif - Sound.SetInstanceVolume(playbackId, volume) - Endif - _00E_PlayerhousingKoppophonVolume.Show(volume*100) -Endevent + + bMusicLocked = False + EndIf +EndEvent Event OnUpdate() - _00E_SilenceTransitionHighPriority.Remove() - Sound.StopInstance(playbackId) - playbackId = -1 -Endevent \ No newline at end of file + TryStopMusic() +EndEvent + +Event OnBardsLoadGame(string eventName, string strArg, float numArg, Form sender) + ; Player just loaded a save with the Koppophon playing. The sound is dead by now. + TryStopMusic() +EndEvent + +Event OnCellAttach() + Cleanup() +EndEvent + +Event OnLoad() + Cleanup() +EndEvent + +Event OnCellDetach() + Cleanup() +EndEvent + +Event OnUnload() + Cleanup() +EndEvent + +State DoneCleanup + Event OnCellAttach() + ; Do nothing + EndEvent + + Event OnLoad() + ; Do nothing + EndEvent + + Event OnCellDetach() + ; Do nothing + EndEvent + + Event OnUnload() + ; Do nothing + EndEvent +EndState diff --git a/source/scripts/_00e_playerhousing_furniture.psc b/source/scripts/_00e_playerhousing_furniture.psc index caa89086..f5717f8f 100644 --- a/source/scripts/_00e_playerhousing_furniture.psc +++ b/source/scripts/_00e_playerhousing_furniture.psc @@ -1,25 +1,48 @@ scriptname _00E_Playerhousing_Furniture extends ObjectReference {A manipulatable housing object while being in the world} -_00E_Playerhousing_FurnitureItem Property furnitureItem auto hidden -{Set by Playerhousing_FurnitureItem when placing this Furniture} - -_00E_Playerhousing_FurnitureItem function getFurnitureItem() - return furnitureItem -Endfunction - -bool function shouldActivateBePossible() - return !((self as ObjectReference) as _00E_Playerhousing_FurnitureItem) ; if the _00E_Playerhousing_FurnitureItem script is on this object, activating means taking -Endfunction - -function finishPlacement() -{this function is called when the furniture object is at the right position and being placed; use e.g. for light} - blockActivation(true) - disable() - enable() +Float Property CustomDistance Auto +{ Custom distance from the player in the placemenet Move Mode } +Float Property OffsetAngleZ Auto +{ Custom offset Z rotation in the placemenet Move Mode } +Float Property OffsetPositionZ Auto +{ Custom offset Z position in the placemenet Move Mode } +Bool Property IsSetPositionIncompatible Auto +{ If the .nif of the object has a bhkCollisionObject with SET_LOCAL flag, SetPosition() or MoveTo() can easily mess this object up in the placement mode. } + +Form Property InventoryItem Auto Hidden + +_00E_Playerhousing_FurnitureItem Property furnitureItem Auto Hidden +{ OBSOLETE. Left for compatibility with older saves. } + +Form Function GetInventoryItem() + If furnitureItem ; Update from the old way of storing the base inventory item + If InventoryItem == None + InventoryItem = furnitureItem.GetBaseObject() + EndIf + furnitureItem = None + EndIf + + Return InventoryItem +EndFunction + +Function finishPlacement() + ; This function is called when the furniture object is at the right position and being placed. + + SetMotionType(Motion_Dynamic, True) + ; in case we place a mannequin, we need to store its position - If self.GetBaseObject() == Game.GetFormFromFile(0x00141028, "Skyrim.esm") - ObjectReference akNPC = self as ObjectReference - (akNPC as _00E_Playerhousing_MannequinControl).setForcePosition(akNPC.GetPositionX(), akNPC.GetPositionY(), akNPC.GetPositionZ(), akNPC.GetAngleX(), akNPC.GetAngleY(), akNPC.GetAngleZ()) + ObjectReference myObjRef = self as ObjectReference + If myObjRef as _00E_Playerhousing_MannequinControl + (myObjRef as _00E_Playerhousing_MannequinControl).FinishPlacement() + Else + BlockActivation(true) + Disable() + Utility.Wait(0.1) + Enable() + + If myObjRef as _00E_Phasmalist_Workbench + (myObjRef as _00E_Phasmalist_Workbench).FinishPlacement() + EndIf EndIf -Endfunction +EndFunction diff --git a/source/scripts/_00e_playerhousing_furnitureitem.psc b/source/scripts/_00e_playerhousing_furnitureitem.psc index 8d5d00af..30ea0540 100644 --- a/source/scripts/_00e_playerhousing_furnitureitem.psc +++ b/source/scripts/_00e_playerhousing_furnitureitem.psc @@ -1,8 +1,8 @@ scriptname _00E_Playerhousing_FurnitureItem extends ObjectReference {A manipulatable housing object while being in the players inventory} -Actorbase Property _MANNEQUIN_toCreate auto -furniture Property _FURNITURE_toCreate auto +ActorBase Property _MANNEQUIN_toCreate auto +Furniture Property _FURNITURE_toCreate auto Container Property _CONTAINER_toCreate auto Light Property _LIGHT_toCreate auto MiscObject Property _MISC_toCreate Auto @@ -11,42 +11,33 @@ Activator Property _ACTIVATOR_toCreate Auto _00E_PlayerhousingMaster Property master Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) - if akNewContainer == none - if master == none - Debug.messagebox("ERROR: PlayerhousingMaster property in Playerhousingfurnitureitem is missing, please write a bugticket") - return - endif - - if master.canPlaceItem() - master.playerItemDropped(Self) - else - master.cannotPlaceObjectHere.show() - Game.getplayer().additem((self ), 1, true) - endif - endif -ENDevent + If akNewContainer == None + If master == None + master = _00E_PlayerhousingMaster.GetMaster() + EndIf + master.playerItemDropped(Self) + EndIf +EndEvent -_00E_Playerhousing_Furniture function placeFurnitureAtMe() +_00E_Playerhousing_Furniture Function placeFurnitureAtMe() _00E_Playerhousing_Furniture result = None - if _MANNEQUIN_toCreate - result = placeAtMe(_MANNEQUIN_toCreate, abForcePersist = true) as _00E_Playerhousing_Furniture - elseif _FURNITURE_toCreate - result = placeAtMe(_FURNITURE_toCreate) as _00E_Playerhousing_Furniture - elseif _CONTAINER_toCreate - result = placeAtMe(_CONTAINER_toCreate) as _00E_Playerhousing_Furniture - elseif _LIGHT_toCreate - result = placeAtMe(_LIGHT_toCreate) as _00E_Playerhousing_Furniture - elseif _ACTIVATOR_toCreate - result = placeAtMe(_ACTIVATOR_toCreate) as _00E_Playerhousing_Furniture - elseif _MISC_toCreate - result = placeAtMe(_MISC_toCreate) as _00E_Playerhousing_Furniture - else - Debug.MessageBox("ERROR: *_toCreate property in playerhousingfurnitureitem is missing, please write a bugticket") - return None - ENDif - if result == None + If _MANNEQUIN_toCreate + result = PlaceAtMe(_MANNEQUIN_toCreate, abForcePersist = True, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture + ElseIf _FURNITURE_toCreate + result = PlaceAtMe(_FURNITURE_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture + ElseIf _CONTAINER_toCreate + result = PlaceAtMe(_CONTAINER_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture + ElseIf _LIGHT_toCreate + result = PlaceAtMe(_LIGHT_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture + ElseIf _ACTIVATOR_toCreate + result = PlaceAtMe(_ACTIVATOR_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture + ElseIf _MISC_toCreate + result = PlaceAtMe(_MISC_toCreate, abInitiallyDisabled = True) as _00E_Playerhousing_Furniture + EndIf + + If result == None Debug.MessageBox("ERROR: *_toCreate property in playerhousingfurnitureitem is no furnitureitem, please write a bugticket") - Endif - result.furnitureItem = Self - return result -ENDfunction + EndIf + + Return result +EndFunction \ No newline at end of file diff --git a/source/scripts/_00e_playerhousing_lightfurniture.psc b/source/scripts/_00e_playerhousing_lightfurniture.psc index 09d7ed98..e61375f6 100644 --- a/source/scripts/_00e_playerhousing_lightfurniture.psc +++ b/source/scripts/_00e_playerhousing_lightfurniture.psc @@ -2,7 +2,7 @@ Scriptname _00E_Playerhousing_LightFurniture extends _00E_Playerhousing_Furnitur Light Property LIGHT_toCreate auto {not used due to graphic bugs} -ObjectReference createdLight +; ObjectReference createdLight function finishPlacement() {this function is called when the furniture object is at the right position and being placed; use e.g. for light} @@ -13,9 +13,11 @@ function finishPlacement() ;createdLight.setScale(0.99) Endfunction +;/ Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if akOldContainer== None createdLight.disable() createdLight.delete() Endif Endevent +/; \ No newline at end of file diff --git a/source/scripts/_00e_playerhousing_mannequincontrol.psc b/source/scripts/_00e_playerhousing_mannequincontrol.psc index f9c4fa7b..8b70a7b1 100644 --- a/source/scripts/_00e_playerhousing_mannequincontrol.psc +++ b/source/scripts/_00e_playerhousing_mannequincontrol.psc @@ -2,292 +2,230 @@ Scriptname _00E_Playerhousing_MannequinControl extends Actor import utility -Form Property ArmorSlot01 auto hidden -Form Property ArmorSlot02 auto hidden -Form Property ArmorSlot03 auto hidden -Form Property ArmorSlot04 auto hidden -Form Property ArmorSlot05 auto hidden -Form Property ArmorSlot06 auto hidden -Form Property ArmorSlot07 auto hidden -Form Property ArmorSlot08 auto hidden -Form Property ArmorSlot09 auto hidden -Form Property ArmorSlot10 auto hidden - -Armor Property ArmorRefresh auto - Actor Property PlayerREF Auto -Form Property EmptySlot auto hidden +Bool bIsInPlacementMode = False +Bool bActivationBlocked = False -MiscObject Property _00E_Placeable_Mannequin Auto -Message Property _00E_MannequinInteractMSG Auto +;===================================================================================== +; EVENTS +;===================================================================================== -;int Property CurrentPose = 1 Auto -{The pose the Mannequin starts in, and is currently in. DEFAULT = 1} +Event OnCellLoad() + If bIsInPlacementMode == False + ResetOnLoad() + EndIf +EndEvent -float forceX -float forceY -float forceZ -float forceAngleX -float forceAngleY -float forceAngleZ +Event OnLoad() + If bIsInPlacementMode + ResetOnLoad() + EndIf +EndEvent -;===================================================================================== -; EVENTS -;===================================================================================== +Event OnActivate(ObjectReference TriggerRef) + If TriggerRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(self) && bActivationBlocked == False + bActivationBlocked = True -EVENT OnInit() - - self.BlockActivation() - PrepareForcePosition() - -EndEVENT + ConvertArmorSlots() ; Version update -EVENT OnCellLoad() - - If !(self.IsActivationBlocked()) - self.BlockActivation() + OpenInventory(True) + ResetPosition() + Wait(0.1) + EnableAI(False) + + bActivationBlocked = False EndIf - - PrepareForcePosition() - -EndEVENT +EndEvent -EVENT OnActivate(ObjectReference TriggerRef) - - If self.IsActivationBlocked() - int iButton = _00E_MannequinInteractMSG.Show() - - If iButton == 0 - self.OpenInventory(true) - wait(0.1) - self.EnableAI(false) +Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) + If (akBaseItem as Armor) + If TryRegisterAddedArmor(akBaseItem) + EquipItem(akBaseItem) Else - self.RemoveAllItems(PlayerREF) - Wait(0.5) - PlayerREF.addItem(_00E_Placeable_Mannequin, 1, true) - PlayerREF.DropObject(_00E_Placeable_Mannequin, 1) - self.disable() - self.delete() + ;Turn it back if the mannequin has one of these already, or if all the slots are full. + RemoveItem(akBaseItem, aiItemCount, True, PlayerREF) EndIf + Else + RemoveItem(akBaseItem, aiItemCount, True, PlayerREF) + EndIf +EndEvent + +Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) + If (akBaseObject as Armor) + UnregisterRemovedArmor(akBaseObject) EndIf +EndEvent -EndEVENT -EVENT OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) - - if (akBaseItem as Armor) - if akBaseItem != ArmorRefresh - AddToArmorSlot(akBaseItem) - self.EquipItem(akBaseItem) - endif - else - self.RemoveItem(akBaseItem, aiItemCount, true, PlayerREF) - endif +;===================================================================================== +; ARMOR SLOTS TRACKING +;===================================================================================== + +Form Property ArmorSlot01 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot02 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot03 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot04 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot05 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot06 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot07 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot08 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot09 Auto Hidden ; Obsolete. Left for version updates on older saves. +Form Property ArmorSlot10 Auto Hidden ; Obsolete. Left for version updates on older saves. + +Form[] ArmorSlots +Bool bConvertedArmorSlots = False + +Function ConvertArmorSlots() + If bConvertedArmorSlots + Return + EndIf + bConvertedArmorSlots = True + + ArmorSlots = New Form[10] + + Int index = _ConvertArmorSlot(0, ArmorSlot01) + index = _ConvertArmorSlot(index, ArmorSlot02) + index = _ConvertArmorSlot(index, ArmorSlot03) + index = _ConvertArmorSlot(index, ArmorSlot04) + index = _ConvertArmorSlot(index, ArmorSlot05) + index = _ConvertArmorSlot(index, ArmorSlot06) + index = _ConvertArmorSlot(index, ArmorSlot07) + index = _ConvertArmorSlot(index, ArmorSlot08) + index = _ConvertArmorSlot(index, ArmorSlot09) + index = _ConvertArmorSlot(index, ArmorSlot10) + + ArmorSlot01 = None + ArmorSlot02 = None + ArmorSlot03 = None + ArmorSlot04 = None + ArmorSlot05 = None + ArmorSlot06 = None + ArmorSlot07 = None + ArmorSlot08 = None + ArmorSlot09 = None + ArmorSlot10 = None +EndFunction + +Int Function _ConvertArmorSlot(Int index, Form armorItem) + If armorItem && ArmorSlots.Find(armorItem) < 0 + ArmorSlots[index] = armorItem + index += 1 + EndIf + + Return index +EndFunction + +Bool Function TryRegisterAddedArmor(Form armorItem) + ; First check to see if this is already in a slot + If ArmorSlots.Find(armorItem) >= 0 + Return False + EndIf + + ; Now find an emtpy slot to put it in, if there is one. + Int i = 0 + While i < ArmorSlots.Length + If ArmorSlots[i] == None + ArmorSlots[i] = armorItem + Return True + EndIf + + i += 1 + EndWhile -endEVENT + ; Nope. No room left. + Return False +EndFunction + +Function UnregisterRemovedArmor(Form armorItem) + ;This loop will also clear duplicates that might have been generated. + Int i = 0 + While i < ArmorSlots.Length + If ArmorSlots[i] == armorItem + ArmorSlots[i] = None + EndIf + i += 1 + EndWhile +EndFunction + +Function ReequipAllArmor() + UnequipAll() + + Int i = 0 + While i < ArmorSlots.Length + If ArmorSlots[i] + EquipItem(ArmorSlots[i]) + EndIf + i += 1 + EndWhile +EndFunction -EVENT OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) - if (akBaseObject as Armor) - RemoveFromArmorSlot(akBaseObject) - endif -endEVENT ;===================================================================================== -; FUNCTIONS +; FUNCTIONS ;===================================================================================== -function PrepareForcePosition() +Float forceX +Float forceY +Float forceZ +Float forceAngleX +Float forceAngleY +Float forceAngleZ - wait(0.25) - self.BlockActivation(true) - ForcePosition() +Bool bPosisionValidated = False -Endfunction +Function ResetPosition() + If bPosisionValidated == False + bPosisionValidated = True -function ForcePosition() + If forceX == 0 && forceY == 0 && forceZ == 0 + Float fAngleZ = PlayerREF.GetAngleZ() + Float fDistanceFromPlayer = 100.0 - self.Enable() - self.EnableAI(false) - - If forceX == 0 && forceY == 0 && forceZ == 0 - forceX = PlayerREF.GetPositionX() - forceY = PlayerREF.GetPositionY() - forceZ = PlayerREF.GetPositionZ() + forceX = PlayerREF.GetPositionX() + fDistanceFromPlayer * Math.sin(fAngleZ) + forceY = PlayerREF.GetPositionY() + fDistanceFromPlayer * Math.cos(fAngleZ) + forceZ = PlayerREF.GetPositionZ() + EndIf EndIf - - wait(0.1) - self.setPosition(forceX, forceY, forceZ) - self.setAngle(forceAngleX,forceAngleY,forceAngleZ) - - self.additem(ArmorRefresh, 1) - self.removeitem(ArmorRefresh, 1) - - EquipCurrentArmor() - -ENDfunction - -function setForcePosition(float x, float y, float z, float angleX, float angleY, float angleZ) - forceX = x - forceY = y - forceZ = z - forceAngleX = angleX - forceAngleY = angleY - forceAngleZ = angleZ -Endfunction - -Function EquipCurrentArmor() - if (ArmorSlot01 != EmptySlot) - self.EquipItem(ArmorSlot01) - endif - if (ArmorSlot02 != EmptySlot) - self.EquipItem(ArmorSlot02) - endif - if (ArmorSlot03 != EmptySlot) - self.EquipItem(ArmorSlot03) - endif - if (ArmorSlot04 != EmptySlot) - self.EquipItem(ArmorSlot04) - endif - if (ArmorSlot05 != EmptySlot) - self.EquipItem(ArmorSlot05) - endif - if (ArmorSlot06 != EmptySlot) - self.EquipItem(ArmorSlot06) - endif - if (ArmorSlot07 != EmptySlot) - self.EquipItem(ArmorSlot07) - endif - if (ArmorSlot08 != EmptySlot) - self.EquipItem(ArmorSlot08) - endif - if (ArmorSlot09 != EmptySlot) - self.EquipItem(ArmorSlot09) - endif - if (ArmorSlot10 != EmptySlot) - self.EquipItem(ArmorSlot10) - endif -endFunction - -Function AddToArmorSlot(Form akBaseItem) - bool FoundEmptySlot = FALSE - - if (ArmorSlot01 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot01 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot02 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot02 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot03 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot03 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot04 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot04 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot05 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot05 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot06 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot06 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot07 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot07 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot08 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot08 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot09 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot09 = akBaseItem - FoundEmptySlot = TRUE - endif - - if (ArmorSlot10 == EmptySlot) && (FoundEmptySlot == FALSE) - ArmorSlot10 = akBaseItem - FoundEmptySlot = TRUE - endif - FoundEmptySlot = FALSE -endFunction -Function RemoveFromArmorSlot(Form akBaseItem) - ;Trace("DARYL - " + self + " Running the RemoveFromArmorSlot Function") + SetPosition(forceX, forceY, forceZ) + SetAngle(forceAngleX, forceAngleY, forceAngleZ) +EndFunction - bool FoundMatchingSlot = FALSE - - if (ArmorSlot01 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 01") - ArmorSlot01 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot02 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 02") - ArmorSlot02 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot03 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 03") - ArmorSlot03 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot04 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 04") - ArmorSlot04 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot05 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 05") - ArmorSlot05 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot06 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 06") - ArmorSlot06 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot07 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 07") - ArmorSlot07 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot08 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 08") - ArmorSlot08 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot09 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 09") - ArmorSlot09 = EmptySlot - FoundMatchingSlot = TRUE - endif - - if (ArmorSlot10 == akBaseItem) && (FoundMatchingSlot == FALSE) - ;Trace("DARYL - " + self + " Match Found, Removing " + akBaseItem + " from armor slot 10") - ArmorSlot10 = EmptySlot - FoundMatchingSlot = TRUE - endif - -endFunction +Function ResetOnLoad() + ConvertArmorSlots() ; Version update + + BlockActivation() + + EnableAI(True) + If bIsInPlacementMode == False + ResetPosition() + EndIf + ReequipAllArmor() + EnableAI(False) +EndFunction + +Function StartPlacement() + bIsInPlacementMode = True +EndFunction + +Function FinishPlacement() + bIsInPlacementMode = False + + Disable() + + forceX = GetPositionX() + forceY = GetPositionY() + forceZ = GetPositionZ() + forceAngleX = GetAngleX() + forceAngleY = GetAngleY() + forceAngleZ = GetAngleZ() + + bPosisionValidated = True + + Enable() + + _00E_QuestFunctions.WaitForReferenceToLoad(self) + ResetOnLoad() +EndFunction diff --git a/source/scripts/_00e_playerhousingcurrentomanipulate.psc b/source/scripts/_00e_playerhousingcurrentomanipulate.psc index 49572393..ff095ced 100644 --- a/source/scripts/_00e_playerhousingcurrentomanipulate.psc +++ b/source/scripts/_00e_playerhousingcurrentomanipulate.psc @@ -1,31 +1,336 @@ Scriptname _00E_PlayerhousingCurrentOManipulate extends ReferenceAlias -float deltaTranslationZ = 0.0 -float deltaRotation = 0.0 - -;translations needs to be extracted from the rest of the code due to performance reasons (don't know why exactely, but defining new functions slows this down dramatically) -;the registerForControl / unregisterForControl are called in _00E_PlayerhousingMaster - -Event onControlDown(String control) - getRef().stopTranslation() - if control == "Forward" - deltaTranslationZ = 100 - elseif control == "Back" - deltaTranslationZ = -100 - elseif control == "strafe left" - deltaRotation = 100 - elseif control == "strafe right" - deltaRotation = -100 - Endif - getRef().translateTo(getRef().getPositionX(), getRef().getPositionY(), getRef().getPositionZ() + deltaTranslationZ, getRef().getAngleX(), getRef().getAngleY(), getRef().getAngleZ() + deltaRotation, 100, 100) -Endevent - -Event onControlUp(String control, float holdTime) - getRef().stopTranslation() - if control == "Forward" || control == "Back" - deltaTranslationZ = 0 - elseif control == "strafe left" || control == "strafe right" - deltaRotation = 0 - Endif - getRef().translateTo(getRef().getPositionX(), getRef().getPositionY(), getRef().getPositionZ() + deltaTranslationZ, getRef().getAngleX(), getRef().getAngleY(), getRef().getAngleZ() + deltaRotation, 100, 100) -Endevent +EffectShader Property _00E_PlayerHousingManipulationShader Auto +Sound Property UIMenuPrevNext Auto +Actor Property PlayerRef Auto + +String Property CONTROL_TURN_LEFT = "Strafe Left" AutoReadOnly +String Property CONTROL_TURN_RIGHT = "Strafe Right" AutoReadOnly +String Property CONTROL_MOVE_UP = "Forward" AutoReadOnly +String Property CONTROL_MOVE_DOWN = "Back" AutoReadOnly + +Int Property TRANSLATION_TURN_LEFT = 0 AutoReadOnly +Int Property TRANSLATION_TURN_RIGHT = 1 AutoReadOnly +Int Property TRANSLATION_MOVE_UP = 2 AutoReadOnly +Int Property TRANSLATION_MOVE_DOWN = 3 AutoReadOnly + +Int Property STATE_IDLE = 0 AutoReadOnly +Int Property STATE_UPDATING = 1 AutoReadOnly +Int Property STATE_WORKING = 2 AutoReadOnly + +Float Property ROTATION_SPEED_START = 15.0 AutoReadOnly +Float Property ROTATION_SPEED_FALLBACK = 20.0 AutoReadOnly +Float Property ROTATION_SPEED_MAX = 180.0 AutoReadOnly +Float Property ROTATION_SPEED_CHANGE_MOD = 0.25 AutoReadOnly +Float Property ROTATION_MAX = 90.0 AutoReadOnly + +Float Property MOVEMENT_SPEED_START = 10.0 AutoReadOnly +Float Property MOVEMENT_SPEED_FALLBACK = 20.0 AutoReadOnly +Float Property MOVEMENT_SPEED_MAX = 200.0 AutoReadOnly +Float Property MOVEMENT_SPEED_CHANGE_MOD = 0.25 AutoReadOnly +Float Property MOVEMENT_MAX = 100.0 AutoReadOnly + +Float Property FAST_TRANSLATION_SPEED = 1000000.0 AutoReadOnly + +Float fObjectPosX +Float fObjectPosY +Float fObjectPosZ +Float fObjectAngleX +Float fObjectAngleY +Float fObjectAngleZ +Float fPlayerPosZ +Float fTablePosZ + +Float fTranslationSpeed +Float fTranslationSpeedIncrease + +Int iWorkingState +Int iCurrentTranslation +Bool bGamepadMode +Int iWatchedKeyCode +Int iTurnLeftKey +Int iTurnRightKey +Int iMoveUpKey +Int iMoveDownKey + +Function Setup(ObjectReference curObjectRef) + ForceRefTo(curObjectRef) + + iWorkingState = STATE_IDLE + + bGamepadMode = Game.UsingGamepad() + If bGamepadMode == False + iTurnLeftKey = Input.GetMappedKey(CONTROL_TURN_LEFT, 0) + iTurnRightKey = Input.GetMappedKey(CONTROL_TURN_RIGHT, 0) + iMoveUpKey = Input.GetMappedKey(CONTROL_MOVE_UP, 0) + iMoveDownKey = Input.GetMappedKey(CONTROL_MOVE_DOWN, 0) + Else + iTurnLeftKey = 274 + iTurnRightKey = 275 + iMoveUpKey = 280 + iMoveDownKey = 281 + EndIf + + If PlayerRef == None ; Just in case + PlayerRef = Game.GetPlayer() + EndIf + + fPlayerPosZ = PlayerRef.GetPositionZ() + fTablePosZ = fPlayerPosZ + 64.0 + + GoToState("Working") + + TryRegisterForKey(iTurnLeftKey, CONTROL_TURN_LEFT) + TryRegisterForKey(iTurnRightKey, CONTROL_TURN_RIGHT) + TryRegisterForKey(iMoveUpKey, CONTROL_MOVE_UP) + TryRegisterForKey(iMoveDownKey, CONTROL_MOVE_DOWN) + + _00E_PlayerHousingManipulationShader.Play(curObjectRef) +EndFunction + +Function TryRegisterForKey(Int iKeyCode, String control) + If iKeyCode > 0 + RegisterForKey(iKeyCode) + Else + RegisterForControl(control) + EndIf +EndFunction + +Function Shutdown(Bool bRegisterNewOffsets) + GoToState("") + UnregisterForAllKeys() + UnregisterForAllControls() + UnregisterForUpdate() + + ObjectReference myRef = GetRef() + If myRef != None + _00E_PlayerHousingManipulationShader.Stop(myRef) + + While iWorkingState != STATE_IDLE && iWorkingState != STATE_WORKING + Utility.WaitMenuMode(0.05) + EndWhile + If iWorkingState == STATE_WORKING + myRef.StopTranslation() + EndIf + + If bRegisterNewOffsets + Float fNewOffsetAngleZ = myRef.GetAngleZ() - PlayerRef.GetAngleZ() + Float fNewOffsetPosZ = myRef.GetPositionZ() - PlayerRef.GetPositionZ() + (GetOwningQuest() as _00E_PlayerhousingMaster).RegisterNewHousingObjectOffsets(fNewOffsetAngleZ, fNewOffsetPosZ) + EndIf + + Clear() + EndIf +EndFunction + +State Working + Event OnKeyDown(Int iKeyCode) + TryStartTranslation(KeyCodeToTranslationMode(iKeyCode), iKeyCode) + EndEvent + + Event OnKeyUp(Int iKeyCode, Float fHoldTime) + TryStopTranslation(KeyCodeToTranslationMode(iKeyCode)) + EndEvent + + Event OnControlDown(String control) + TryStartTranslation(ControlToTranslationMode(control), 0) + EndEvent + + Event OnControlUp(String control, Float fHoldTime) + TryStopTranslation(ControlToTranslationMode(control)) + EndEvent + + Event OnUpdate() + ; OnControlUp is not always properly triggered. Maybe OnKeyUp too. The code below is a workaround for that. + ; For gamepads this failsafe is useless because Input.IsKeyPressed always returns False for controller buttons. + If iWatchedKeyCode > 0 && iWorkingState == STATE_WORKING + If Input.IsKeyPressed(iWatchedKeyCode) + RegisterForSingleUpdate(0.05) + Else + TryStopTranslation(iCurrentTranslation) + EndIf + EndIf + EndEvent + + Event OnTranslationComplete() + ; The previously started translation reached its end point + + If iWorkingState != STATE_WORKING + Return + EndIf + iWorkingState = STATE_UPDATING + + ObjectReference myRef = GetRef() + + If iWatchedKeyCode <= 0 || fTranslationSpeedIncrease < 0.0 + ; Do nothing + ElseIf iCurrentTranslation == TRANSLATION_TURN_LEFT || iCurrentTranslation == TRANSLATION_TURN_RIGHT + Float fRotationAngle = GetNextTranslationStep(ROTATION_SPEED_MAX, ROTATION_SPEED_CHANGE_MOD, ROTATION_MAX) + fObjectAngleZ = myRef.GetAngleZ() + TurnTranslate(myRef, fRotationAngle) + + iWorkingState = STATE_WORKING + Return + ElseIf iCurrentTranslation == TRANSLATION_MOVE_UP || iCurrentTranslation == TRANSLATION_MOVE_DOWN + Float fMoveZ = GetNextTranslationStep(MOVEMENT_SPEED_MAX, MOVEMENT_SPEED_CHANGE_MOD, MOVEMENT_MAX) + fObjectPosZ = myRef.GetPositionZ() + MoveTranslate(myRef, fMoveZ) + + iWorkingState = STATE_WORKING + Return + EndIf + + ; Fallback + FinalizeTranslation(myRef) + UIMenuPrevNext.Play(PlayerRef) + + iWorkingState = STATE_IDLE + EndEvent +EndState + +Int Function KeyCodeToTranslationMode(Int iKeyCode) + If iKeyCode > 0 + If iKeyCode == iTurnLeftKey + Return TRANSLATION_TURN_LEFT + ElseIf iKeyCode == iTurnRightKey + Return TRANSLATION_TURN_RIGHT + ElseIf iKeyCode == iMoveUpKey + Return TRANSLATION_MOVE_UP + ElseIf iKeyCode == iMoveDownKey + Return TRANSLATION_MOVE_DOWN + EndIf + EndIf + + Return -1 +EndFunction + +Int Function ControlToTranslationMode(String control) + If control == CONTROL_TURN_LEFT + Return TRANSLATION_TURN_LEFT + ElseIf control == CONTROL_TURN_RIGHT + Return TRANSLATION_TURN_RIGHT + ElseIf control == CONTROL_MOVE_UP + Return TRANSLATION_MOVE_UP + ElseIf control == CONTROL_MOVE_DOWN + Return TRANSLATION_MOVE_DOWN + EndIf + + Return -1 +EndFunction + +Function TryStartTranslation(Int iTranslationMode, Int iTriggerKeyCode) + If iTranslationMode < 0 || iWorkingState != STATE_IDLE + Return + EndIf + + iWorkingState = STATE_UPDATING + iCurrentTranslation = iTranslationMode + iWatchedKeyCode = iTriggerKeyCode + + ObjectReference myRef = GetRef() + + fObjectPosX = myRef.GetPositionX() + fObjectPosY = myRef.GetPositionY() + fObjectPosZ = myRef.GetPositionZ() + + fObjectAngleX = myRef.GetAngleX() + fObjectAngleY = myRef.GetAngleY() + fObjectAngleZ = myRef.GetAngleZ() + + fTranslationSpeedIncrease = 0.0 + + If iCurrentTranslation == TRANSLATION_TURN_LEFT || iCurrentTranslation == TRANSLATION_TURN_RIGHT + If iWatchedKeyCode > 0 + fTranslationSpeed = ROTATION_SPEED_START + TurnTranslate(myRef, fTranslationSpeed * ROTATION_SPEED_CHANGE_MOD) + Else + fTranslationSpeed = ROTATION_SPEED_FALLBACK + TurnTranslate(myRef, ROTATION_MAX) + EndIf + ElseIf iCurrentTranslation == TRANSLATION_MOVE_UP || iCurrentTranslation == TRANSLATION_MOVE_DOWN + If iWatchedKeyCode > 0 + fTranslationSpeed = MOVEMENT_SPEED_START + MoveTranslate(myRef, fTranslationSpeed * MOVEMENT_SPEED_CHANGE_MOD) + Else + fTranslationSpeed = MOVEMENT_SPEED_FALLBACK + MoveTranslate(myRef, MOVEMENT_MAX) + EndIf + EndIf + + If iWatchedKeyCode > 0 && bGamepadMode == False + RegisterForSingleUpdate(0.05) + EndIf + + iWorkingState = STATE_WORKING +EndFunction + +Function TryStopTranslation(Int iTranslationMode) + If iCurrentTranslation != iTranslationMode || iWorkingState != STATE_WORKING + Return + EndIf + + iWorkingState = STATE_UPDATING + + ObjectReference myRef = GetRef() + myRef.StopTranslation() + UnregisterForUpdate() + FinalizeTranslation(myRef) + + iWorkingState = STATE_IDLE +EndFunction + +Function TurnTranslate(ObjectReference myRef, Float fRotationAngle) + If iCurrentTranslation == TRANSLATION_TURN_LEFT + fObjectAngleZ -= fRotationAngle + Else + fObjectAngleZ += fRotationAngle + EndIf + myRef.TranslateTo(fObjectPosX, fObjectPosY, fObjectPosZ, fObjectAngleX, fObjectAngleY, fObjectAngleZ, FAST_TRANSLATION_SPEED, fTranslationSpeed) +EndFunction + +Function MoveTranslate(ObjectReference myRef, Float fMoveZ) + If iCurrentTranslation == TRANSLATION_MOVE_DOWN + Float fNewZ = fObjectPosZ - fMoveZ + If fObjectPosZ > fTablePosZ && fNewZ < fTablePosZ + ; A primitive "drop on the table" + fNewZ = fTablePosZ + fTranslationSpeedIncrease = -1.0 ; Stop on reaching fPlayerPosZ. + ElseIf fObjectPosZ > fPlayerPosZ && fNewZ < fPlayerPosZ + ; A primitive "drop on the floor" + fNewZ = fPlayerPosZ + fTranslationSpeedIncrease = -1.0 ; Stop on reaching fPlayerPosZ. + EndIf + fObjectPosZ = fNewZ + Else + fObjectPosZ += fMoveZ + EndIf + myRef.TranslateTo(fObjectPosX, fObjectPosY, fObjectPosZ, fObjectAngleX, fObjectAngleY, fObjectAngleZ, fTranslationSpeed, FAST_TRANSLATION_SPEED) +EndFunction + +Float Function GetNextTranslationStep(Float fSpeedMax, Float fSpeedChangeMod, Float fChangeMax) + If fTranslationSpeed < fSpeedMax + If fTranslationSpeedIncrease < 20.0 + fTranslationSpeedIncrease += 5.0 + EndIf + fTranslationSpeed += fTranslationSpeedIncrease + If fTranslationSpeed > fSpeedMax + fTranslationSpeed = fSpeedMax + EndIf + EndIf + Float fResult = fTranslationSpeed * fSpeedChangeMod + If fTranslationSpeed >= fSpeedMax || fResult > fChangeMax + Return fChangeMax + Else + Return fResult + EndIf +EndFunction + +Function FinalizeTranslation(ObjectReference myRef) + ; TranslateTo below prevents the object from twitching and becoming blurry when a translation ends + If iCurrentTranslation == TRANSLATION_TURN_LEFT || iCurrentTranslation == TRANSLATION_TURN_RIGHT + fObjectAngleZ = myRef.GetAngleZ() + ElseIf iCurrentTranslation == TRANSLATION_MOVE_UP || iCurrentTranslation == TRANSLATION_MOVE_DOWN + fObjectPosZ = myRef.GetPositionZ() + EndIf + myRef.TranslateTo(fObjectPosX, fObjectPosY, fObjectPosZ, fObjectAngleX, fObjectAngleY, fObjectAngleZ, FAST_TRANSLATION_SPEED, FAST_TRANSLATION_SPEED) +EndFunction diff --git a/source/scripts/_00e_playerhousingcurrentotranslation.psc b/source/scripts/_00e_playerhousingcurrentotranslation.psc index ef0e1554..45bac641 100644 --- a/source/scripts/_00e_playerhousingcurrentotranslation.psc +++ b/source/scripts/_00e_playerhousingcurrentotranslation.psc @@ -1,12 +1,117 @@ Scriptname _00E_PlayerhousingCurrentOTranslation extends ReferenceAlias -GlobalVariable Property continueTranslateToPlayerLoop Auto +EffectShader Property _00E_PlayerHousingTranslationShader Auto +Actor Property PlayerRef Auto -Event onLoad() - ;loop needs to be extracted from the rest of the code due to performance reasons (don't know why exactely, but defining new functions slows this down dramatically) - Actor player = Game.getPlayer() - while continueTranslateToPlayerLoop.getValue() - getRef().TranslateTo(player.getPositionX() + 100 * Math.sin(player.getAngleZ()), player.getPositionY() + 100 * Math.cos(player.getAngleZ()), player.getPositionZ(), 0, 0, player.getAngleZ(), 5000) - Endwhile -Endevent +Bool bIsWorking = False +Bool bIsWarmingUp = False +Float fDistance +Float fOffsetAngleZ +Float fOffsetPosZ + +Float Property ORBIT_ANGULAR_SPEED_CAP = 30.0 AutoReadOnly +Float Property FAST_TRANSLATION_SPEED = 1000000.0 AutoReadOnly + + +Function Setup(_00E_Playerhousing_Furniture furnitureRef, Bool bEnteringPlacement, Float fStoredOffsetAngleZ, Float fStoredOffsetPositionZ) + bIsWarmingUp = True + furnitureRef.Disable() + + If PlayerRef == None + PlayerRef = Game.GetPlayer() + EndIf + + fDistance = furnitureRef.CustomDistance + If fDistance <= 0.0 + fDistance = 100.0 + EndIf + + If bEnteringPlacement + fOffsetAngleZ = furnitureRef.OffsetAngleZ + fOffsetPosZ = furnitureRef.OffsetPositionZ + + If furnitureRef.IsSetPositionIncompatible == False + Float x = PlayerRef.GetPositionX() + Float y = PlayerRef.GetPositionY() + Float z = PlayerRef.GetPositionZ() + Float fAngleZ = PlayerRef.GetAngleZ() + + furnitureRef.SetPosition(x + fDistance * Math.sin(fAngleZ), y + fDistance * Math.cos(fAngleZ), z + fOffsetPosZ) + furnitureRef.SetAngle(0, 0, fAngleZ + fOffsetAngleZ) + EndIf + + ObjectReference myRef = furnitureRef as ObjectReference + If (myRef as _00E_Playerhousing_MannequinControl) + (myRef as _00E_Playerhousing_MannequinControl).StartPlacement() + ElseIf (myRef as _00E_Phasmalist_Workbench) + (myRef as _00E_Phasmalist_Workbench).StartPlacement() + EndIf + Else + fOffsetAngleZ = fStoredOffsetAngleZ + fOffsetPosZ = fStoredOffsetPositionZ + EndIf + + ForceRefTo(furnitureRef) + bIsWorking = True + furnitureRef.Enable() +EndFunction + +Function Shutdown() + bIsWorking = False + + ObjectReference myRef = GetRef() + If myRef + While bIsWarmingUp && (PlayerRef.GetParentCell() == myRef.GetParentCell()) + Utility.WaitMenuMode(0.05) + EndWhile + myRef.StopTranslation() + _00E_PlayerHousingTranslationShader.Stop(myRef) + Clear() + EndIf +EndFunction + +Event OnLoad() + ; Loop needs to be extracted from the rest of the code due to performance reasons (don't know why exactly, but defining new functions slows this down dramatically) + ObjectReference myRef = GetRef() + Float fPrevAngleZ = -1.0 + + myRef.SetMotionType(4) ; Set motion type to Motion_Keyframed. This would fix "collision phantoms" of the object while the player is moving around "dragging" it. + _00E_PlayerHousingTranslationShader.Play(myRef) + + bIsWarmingUp = False + + While bIsWorking + Float x = PlayerRef.GetPositionX() + Float y = PlayerRef.GetPositionY() + Float z = PlayerRef.GetPositionZ() + Float fAngleZ = PlayerRef.GetAngleZ() + + ; Cap the angular speed of the object's orbiting around the player at ORBIT_ANGULAR_SPEED_CAP. + ; This fixes some objects pushing the player (because they pass THROUGH the player?) on sharp camera turns. + If fPrevAngleZ >= 0.0 + Float fDelta = fAngleZ - fPrevAngleZ + If fDelta < -180.0 + fDelta += 360.0 + ElseIf fDelta > 180.0 + fDelta -= 360.0 + EndIf + If fDelta < -ORBIT_ANGULAR_SPEED_CAP + fAngleZ = fPrevAngleZ - ORBIT_ANGULAR_SPEED_CAP + If fAngleZ < 0.0 + fAngleZ += 360.0 + EndIf + ElseIf fDelta > ORBIT_ANGULAR_SPEED_CAP + fAngleZ = fPrevAngleZ + ORBIT_ANGULAR_SPEED_CAP + If fAngleZ >= 360.0 + fAngleZ -= 360.0 + EndIf + EndIf + EndIf + + If bIsWorking + myRef.TranslateTo(x + fDistance * Math.sin(fAngleZ), y + fDistance * Math.cos(fAngleZ), z + fOffsetPosZ, 0, 0, fAngleZ + fOffsetAngleZ, FAST_TRANSLATION_SPEED, FAST_TRANSLATION_SPEED) + EndIf + fPrevAngleZ = fAngleZ + EndWhile +EndEvent diff --git a/source/scripts/_00e_playerhousingmaster.psc b/source/scripts/_00e_playerhousingmaster.psc index f4869efa..bff27002 100644 --- a/source/scripts/_00e_playerhousingmaster.psc +++ b/source/scripts/_00e_playerhousingmaster.psc @@ -1,246 +1,554 @@ scriptname _00E_PlayerhousingMaster extends Quest -EffectShader Property shaderActive Auto -{Shader that is applied while the object is being manipulated} Actor Property player Auto -GlobalVariable Property continueTranslateToPlayerLoop Auto -{Controls the translateTo player loop while being in Translation mode. This variable is used to communicate with _00E_PlayerhousingCurrentOTranslation} ReferenceAlias Property currentHousingObjectInTranslation Auto ReferenceAlias Property currentHousingObjectInManipulation Auto -Message Property cannotPlaceObjectHere auto +Message Property _00E_Playerhousing_CannotPlaceObjectsHere Auto +Message Property _00E_Playerhousing_ContainerContentMove Auto +Message Property _00E_Playerhousing_StartTutorial Auto +Message Property _00E_Playerhousing_ExpansionBoardTutorial Auto +Message Property _00E_Playerhousing_TranslationMode Auto +Message Property _00E_Playerhousing_TranslationModeTutorial Auto +Message Property _00E_Playerhousing_TranslationModeTutorial_Gamepad Auto +Message Property _00E_Playerhousing_ManipulationMode Auto +Message Property _00E_Playerhousing_ManipulationModeTutorial Auto +Message Property _00E_Playerhousing_ManipulationModeTutorial_Gamepad Auto +Sound Property UIMenuActive Auto +GlobalVariable Property _00E_Meditate_Allowed Auto +GlobalVariable Property _00E_Phasmalist_TankMode Auto +GlobalVariable Property _00E_DisableCraftingTutorials Auto _00E_Playerhousing_Furniture currentHousingObject -float timeToHoldActivateToFinish = 2.0 -Event onBeginState() - currentHousingObject = None ; prevent persistence +Bool bIsInPlacementMode = False +Bool bDisableNormalActivation = False +Bool bGamepadMode = False +Bool bDroppedFromInventory = False +Int iPickupKey + +Float fStoredOffsetAngleZ +Float fStoredOffsetPositionZ + +String Property CONTROL_ACTIVATE = "Activate" AutoReadOnly +String Property CONTROL_SHEATH = "Ready Weapon" AutoReadOnly + + +;===================================================================================== +; GLOBAL FUNCTIONS +;===================================================================================== + +_00E_PlayerhousingMaster Function GetMaster() Global + Return Game.GetFormFromFile(0x00043270, "Skyrim.esm") as _00E_PlayerhousingMaster +EndFunction + +Bool Function ReferenceCanBeActivated(ObjectReference ref) Global + If (ref as _00E_Playerhousing_Furniture) + _00E_PlayerhousingMaster master = GetMaster() + If master + Return master.IsNormalActivationEnabled() + EndIf + EndIf + + Return True +EndFunction + + +;===================================================================================== +; TUTORIALS +;===================================================================================== + +Bool bStartTutorialShown = False + +Bool bHideTranslationTutorial = False +Bool bHideTranslationTutorial_Gamepad = False +Bool bHideManipulationTutorial = False +Bool bHideManipulationTutorial_Gamepad = False + +Function ShowStartBuildModeTutorial() + If _00E_DisableCraftingTutorials.GetValueInt() == 0 && bStartTutorialShown == False + bStartTutorialShown = True + _00E_Playerhousing_StartTutorial.Show() + EndIf +EndFunction + +Function ShowExpansionBoardTutorial() + ; Called from _00E_Game_Playerhouse_BoardSC + If _00E_Playerhousing_ExpansionBoardTutorial.Show() == 1 + bHideTranslationTutorial = False + bHideTranslationTutorial_Gamepad = False + bHideManipulationTutorial = False + bHideManipulationTutorial_Gamepad = False + EndIf +EndFunction + +Bool Function _ShowPlacementModeTutorial(Message msgTutorial, Bool bHideFlag) + If bHideFlag == False + Return (msgTutorial.Show() == 1) + Else + Return bHideFlag + EndIf +EndFunction + +Function ShowTranslationModeTutorial() + If bGamepadMode + bHideTranslationTutorial_Gamepad = _ShowPlacementModeTutorial(_00E_Playerhousing_TranslationModeTutorial_Gamepad, bHideTranslationTutorial_Gamepad) + Else + bHideTranslationTutorial = _ShowPlacementModeTutorial(_00E_Playerhousing_TranslationModeTutorial, bHideTranslationTutorial) + EndIf +EndFunction + +Function ShowManipulationModeTutorial() + If bGamepadMode + bHideManipulationTutorial_Gamepad = _ShowPlacementModeTutorial(_00E_Playerhousing_ManipulationModeTutorial_Gamepad, bHideManipulationTutorial_Gamepad) + Else + bHideManipulationTutorial = _ShowPlacementModeTutorial(_00E_Playerhousing_ManipulationModeTutorial, bHideManipulationTutorial) + EndIf +EndFunction + + +;===================================================================================== +; SERVICE FUNCTIONS +;===================================================================================== + +Bool Function CanEnterPlacementMode() + Return (_00E_Meditate_Allowed.GetValue() != 0.0 && _00E_Phasmalist_TankMode.GetValue() == 0.0) +EndFunction + +Float fPlacementModeCarryWeightMod = 0.0 + +Function EnterPlacementMode() + If bIsInPlacementMode == False + bIsInPlacementMode = True + _00E_Meditate_Allowed.SetValueInt(0) + Game.SetInChargen(true, true, false) ; Forbid saving the game while placing stuff + + ; Make the player over encumbered to prevent them from the default running and in general to slow them down + fPlacementModeCarryWeightMod = Player.GetAV("CarryWeight") * 2.0 + If fPlacementModeCarryWeightMod < 1000.0 + fPlacementModeCarryWeightMod = 1000.0 + EndIf + Player.ModAV("CarryWeight", -fPlacementModeCarryWeightMod) + + bGamepadMode = Game.UsingGamepad() + If bGamepadMode == False + iPickupKey = Input.GetMappedKey(CONTROL_SHEATH, 0) + Else + iPickupKey = 277 + EndIf + EndIf +EndFunction + +Function ExitPlacementMode() + If bIsInPlacementMode + bIsInPlacementMode = False + If fPlacementModeCarryWeightMod != 0.0 + Player.ModAV("CarryWeight", fPlacementModeCarryWeightMod) + fPlacementModeCarryWeightMod = 0.0 + EndIf + Game.SetInChargen(false, true, false) ; Re-allow saving + _00E_Meditate_Allowed.SetValueInt(1) + EndIf + + currentHousingObject = None ; Prevent persistence +EndFunction + +Function PickUpHousingObject() + ; Clear currentHousingObject ASAP because of possible race conditions + _00E_Playerhousing_Furniture furnitureRef = (currentHousingObject as _00E_Playerhousing_Furniture) + currentHousingObject = None + + Form furnBaseObject = furnitureRef.GetBaseObject() + If (furnBaseObject as ActorBase) || (furnBaseObject as Container) + If furnitureRef.GetNumItems() > 0 + furnitureRef.RemoveAllItems(Player) + _00E_Playerhousing_ContainerContentMove.Show() + Else + ; Whatever... + furnitureRef.RemoveAllItems(Player) + EndIf + EndIf + Player.AddItem(furnitureRef.GetInventoryItem(), 1, False) + furnitureRef.Disable() + _00E_Phasmalist_Workbench worbenchRef = (furnitureRef as ObjectReference) as _00E_Phasmalist_Workbench + If worbenchRef + worbenchRef.OnPickUp() + EndIf + furnitureRef.Delete() +EndFunction + +Function FinishPlacingHousingObject() + ; Clear currentHousingObject ASAP because of possible race conditions + _00E_Playerhousing_Furniture furnitureRef = (currentHousingObject as _00E_Playerhousing_Furniture) + currentHousingObject = None + + Utility.Wait(0.05) ; Wait for the shaders to stop for sure + furnitureRef.finishPlacement() + PlaySwitchSound() +EndFunction + +Function PlaySwitchSound() + UIMenuActive.Play(player) +EndFunction + +Function RegisterNewHousingObjectOffsets(Float fNewOffsetAngleZ, Float fNewOffsetPositionZ) + fStoredOffsetAngleZ = fNewOffsetAngleZ + fStoredOffsetPositionZ = fNewOffsetPositionZ +EndFunction + +Function Update_209() + bStartTutorialShown = ((Self as Quest) as _00E_PlayerhousingTutorial).StartTutorialIsShown() +EndFunction + + +;===================================================================================== +; CONTROLS +;===================================================================================== + +Bool bLockActions = False +Bool bActiveActivate = False + +Function LockActions() + bLockActions = True + InterruptActivate() +EndFunction + +Function UnlockActions() + bLockActions = False + InterruptActivate() +EndFunction + +Function InterruptActivate() + If bActiveActivate + bActiveActivate = False + UnregisterForUpdate() + EndIf +EndFunction + +Function EnableBuildmodeControls() + RegisterForControl(CONTROL_ACTIVATE) + If bIsInPlacementMode && iPickupKey > 0 + RegisterForKey(iPickupKey) + EndIf + + UnlockActions() +EndFunction + +Function DisableBuildmodeControls() + LockActions() + + UnregisterForAllControls() + UnregisterForAllKeys() + UnregisterForUpdate() +EndFunction + +Event OnControlDown(String control) + If control == CONTROL_ACTIVATE + If bActiveActivate + bActiveActivate = False + bDisableNormalActivation = True + UnregisterForUpdate() + ElseIf bLockActions == False + bActiveActivate = True + bDisableNormalActivation = False + RegisterForSingleUpdate(1.1) + EndIf + EndIf EndEvent -bool function canPlaceItem() - return false -Endfunction +Event OnControlUp(String control, Float holdTime) + If control == CONTROL_ACTIVATE + If bActiveActivate + bActiveActivate = False + UnregisterForUpdate() + If bLockActions == False + activateShortPressed() + EndIf + EndIf + EndIf +EndEvent -Event onControlUp(String control, float holdTime) - if holdTime > timeToHoldActivateToFinish - activateLongPressed() - else - activatePressed() - Endif +Event OnUpdate() + If bActiveActivate + bActiveActivate = False + bDisableNormalActivation = True + If bLockActions == False + activateLongPressed() + EndIf + EndIf EndEvent -function enableBuildmode() -{Enables the player to choose housing objects for manipulation or translation; should be called when the player enters one of his houses} - ((Self as Quest) as _00E_PlayerhousingTutorial).onStartBuildmode() - GoToState("Buildmode") -ENDfunction +Event OnKeyDown(Int iKeyCode) + If iKeyCode == iPickupKey + If bLockActions == False + pickUpPressed() + EndIf + EndIf +EndEvent + + +;===================================================================================== +; DEFAULT STATE +;===================================================================================== -function playerItemDropped(_00E_Playerhousing_FurnitureItem akItemReference) -{Tests if this item drop by the player triggers an entering into buildmode and performs this change if necessary} -ENDfunction +Event OnBeginState() + ExitPlacementMode() +EndEvent + +Function playerItemDropped(_00E_Playerhousing_FurnitureItem akItemReference) + ; Called from _00E_Playerhousing_FurnitureItem on a placeable dropped from the inventory + Player.AddItem(akItemReference, 1, False) + _00E_Playerhousing_CannotPlaceObjectsHere.Show() +EndFunction -function enterBuildmode() -{Enables the player to translate the current housing object and change to manipulation mode} - GoToState("Translation") -ENDfunction +Function activateShortPressed() + ; Process short activate press +EndFunction -function toggleMode() -{Switches between tranlation and manipulation buildmode} -ENDfunction +Function activateLongPressed() + ; Process long activate press +EndFunction -function leaveBuildmode() -{Disables the player to translate or manipulate a housing object; the player can still enter buildmode again} -ENDfunction +Function pickUpPressed() + ; Process pick up key press +EndFunction -function disableBuildmode() -{Disables the player to enter buildmode} -ENDfunction +Function enableBuildmode() + ; Enter the build mode when the player enters their house + ShowStartBuildModeTutorial() + GoToState("Buildmode") +EndFunction -function activatePressed() -{updates the buildmode as necessary when the activation control has been pressed} -Endfunction +Function disableBuildmode() + ; Exit a build mode when the player leaves their house +EndFunction -function activateLongPressed() -{updates the buildmode as necessary when the activation control has been pressed long} -Endfunction +Bool Function IsNormalActivationEnabled() + ; The player can activate a placeable furniture normally + Return True +EndFunction -function translateCurrentHousingObjectLoop() -{translates the current housing object before the player in a recursive loop} -ENDfunction -function pickUp() -{deletes the current housing object and adds the appropriate item to the player's inventory} - Player.addItem(currentHousingObject.getFurnitureItem().getBaseObject(), 1) - currentHousingObject.disable() - currentHousingObject.delete() -Endfunction +;===================================================================================== +; STATE Buildmode +;===================================================================================== -;==================================================================== STATE Buildmode =================================================================================================== STATE Buildmode -;the player can enter the manipulation or translation mode by choosing a housing object or dropping a housing item + ; The player can enter the manipulation or translation mode by choosing a housing object or dropping a housing item - Event onBeginState() - currentHousingObject = None ; prevent persistence - RegisterForControl("activate") + Event OnBeginState() + ExitPlacementMode() + bDisableNormalActivation = True + EnableBuildmodeControls() EndEvent - bool function canPlaceItem() - return True - Endfunction - - Event onEndState() - unRegisterForControl("activate") + Event OnEndState() + DisableBuildmodeControls() EndEvent - - function playerItemDropped(_00E_Playerhousing_FurnitureItem akItemReference) - {Tests if this item drop by the player triggers an entering into buildmode and performs this change if necessary} + + Function playerItemDropped(_00E_Playerhousing_FurnitureItem akItemReference) + If CanEnterPlacementMode() == False || bLockActions ; Locked by something else + Player.AddItem(akItemReference, 1, False) + Return + EndIf + LockActions() + currentHousingObject = akItemReference.placeFurnitureAtMe() - akItemReference.delete() + If currentHousingObject == None + ; Some error happened + Player.AddItem(akItemReference, 1, False) + UnlockActions() + Return + EndIf + + DisableBuildmodeControls() + akItemReference.Disable() + currentHousingObject.InventoryItem = akItemReference.GetBaseObject() + akItemReference.Delete() + bDroppedFromInventory = True GoToState("Translation") - ENDfunction + EndFunction - function activateLongPressed() - {updates the buildmode as necessary when the activation control has been pressed long} - ObjectReference targetRef = Game.GetCurrentCrosshairRef() - if targetRef as _00E_Playerhousing_Furniture - currentHousingObject = targetRef as _00E_Playerhousing_Furniture + Function activateLongPressed() + LockActions() + + _00E_Playerhousing_Furniture targetRef = Game.GetCurrentCrosshairRef() as _00E_Playerhousing_Furniture + If targetRef && targetRef.IsFurnitureInUse() == False && Utility.IsInMenuMode() == False && CanEnterPlacementMode() + currentHousingObject = targetRef GoToState("Translation") - Endif - Endfunction + Else + UnlockActions() + EndIf + EndFunction - function activatePressed() - {updates the buildmode as necessary when the activation control has been pressed} + Function activateShortPressed() ObjectReference targetRef = Game.GetCurrentCrosshairRef() - if !(targetRef as _00E_Phasmalist_Workbench) && (targetRef as _00E_Playerhousing_Furniture) && (targetRef as _00E_Playerhousing_Furniture).shouldActivateBePossible() - targetRef.activate(player, true) - Endif - Endfunction - - function disableBuildmode() - {Disables the player to enter buildmode} - GoToState("null") - ENDfunction + If (targetRef as _00E_Playerhousing_Furniture) && (bLockActions == False) + If (targetRef as _00E_Playerhousing_FurnitureItem) + ; Activate() would mean "Take" for this misc. object, so do nothing + ElseIf (targetRef as _00E_Theriantrophist_BlockCraftingSC) || (targetRef as _00E_Playerhousing_MannequinControl) || (targetRef as _00E_BedScript) || (targetRef as _00E_Phasmalist_Workbench) || (targetRef as _00E_PlaceableGrammophonPlay) + ; These objects do activation themselves in OnActivate event + Else + targetRef.Activate(player, true) + EndIf + EndIf + EndFunction + + Function enableBuildmode() + ; Do nothing + EndFunction + Function disableBuildmode() + GoToState("") + EndFunction + + Bool Function IsNormalActivationEnabled() + Return ((bDisableNormalActivation == False) && (bLockActions == False)) + EndFunction + ENDSTATE -;==================================================================== STATE Translation =================================================================================================== + +;===================================================================================== +; STATE Translation +;===================================================================================== + STATE Translation -;the selected housing object is moved with the player + ; The selected housing object is moved with the player - Event onBeginState() - Game.DisablePlayerControls(abMovement = false, abFighting = true, abCamSwitch = false, abLooking = false, abSneaking = false, abMenu = false, abActivate = true) - - ((Self as Quest) as _00E_PlayerhousingTutorial).onTranslationMode() + Event OnBeginState() + Bool bEnteringPlacement = (bIsInPlacementMode == False) - continueTranslateToPlayerLoop.setValue(1) - currentHousingObjectInTranslation.forceRefTo(currentHousingObject) - currentHousingObject.disable() - currentHousingObject.enable() ;disable - enable reloads the 3d so onLoad of the object is invoked; this will start the translateToPlayer-loop - - RegisterForControl("activate") - while !currentHousingObject.is3DLoaded() - Utility.wait(0.1) - Endwhile - shaderActive.Play(currentHousingObject) + Game.DisablePlayerControls(abMovement = false, abFighting = true, abCamSwitch = false, abLooking = false, abSneaking = false, abMenu = true, abActivate = true) + EnterPlacementMode() + + If bEnteringPlacement && bDroppedFromInventory == False + ObjectReference housingObjRef = currentHousingObject as ObjectReference + If (housingObjRef as _00E_PlaceableGrammophonPlay) + (housingObjRef as _00E_PlaceableGrammophonPlay).StopMusic() + EndIf + EndIf + + If bDroppedFromInventory == False + PlaySwitchSound() + Else + bDroppedFromInventory = False + EndIf + + _00E_Playerhousing_TranslationMode.Show() + + (currentHousingObjectInTranslation as _00E_PlayerhousingCurrentOTranslation).Setup(currentHousingObject, bEnteringPlacement, fStoredOffsetAngleZ, fStoredOffsetPositionZ) + + ShowTranslationModeTutorial() + + EnableBuildmodeControls() EndEvent - Event onEndState() - shaderActive.Stop(currentHousingObject) - continueTranslateToPlayerLoop.setValue(0) - - currentHousingObjectInTranslation.clear() - unRegisterForControl("activate") - + Event OnEndState() Game.EnablePlayerControls(abMovement = true, abFighting = true, abCamSwitch = true, abLooking = true, abSneaking = true, abMenu = true, abActivate = true) EndEvent - function activatePressed() - {updates the buildmode as necessary when the activation control has been pressed} - toggleMode() - Endfunction - - function activateLongPressed() - {updates the buildmode as necessary when the activation control has been pressed long} - pickUp() - leaveBuildmode() - Endfunction - - function toggleMode() - {Switches between tranlation and manipulation buildmode} + Function activateShortPressed() + DisableBuildmodeControls() + (currentHousingObjectInTranslation as _00E_PlayerhousingCurrentOTranslation).Shutdown() GoToState("Manipulation") - ENDfunction - - function disableBuildmode() - {Disables the player to enter buildmode} - GoToState("null") - ENDfunction + EndFunction - function leaveBuildmode() - {Disables the player to translate or manipulate a housing object; the player can still enter buildmode again} + Function activateLongPressed() + DisableBuildmodeControls() + (currentHousingObjectInTranslation as _00E_PlayerhousingCurrentOTranslation).Shutdown() + FinishPlacingHousingObject() + GoToState("Buildmode") + EndFunction + + Function pickUpPressed() + DisableBuildmodeControls() + (currentHousingObjectInTranslation as _00E_PlayerhousingCurrentOTranslation).Shutdown() + PickUpHousingObject() GoToState("Buildmode") - ENDfunction + EndFunction + + Function enableBuildmode() + ; Do nothing + EndFunction + + Function disableBuildmode() + DisableBuildmodeControls() + (currentHousingObjectInTranslation as _00E_PlayerhousingCurrentOTranslation).Shutdown() + If currentHousingObject + PickUpHousingObject() + EndIf + GoToState("") + EndFunction + + Bool Function IsNormalActivationEnabled() + Return False + EndFunction ENDSTATE -;==================================================================== STATE Manipulation =================================================================================================== + +;===================================================================================== +; STATE Manipulation +;===================================================================================== + STATE Manipulation -;the player can change orientation or height of the selected housing object by using the keys + ; The player can change orientation or altitude of the selected housing object by using the keys - Event onBeginState() - Game.DisablePlayerControls(abMovement = false, abFighting = true, abCamSwitch = false, abLooking = false, abSneaking = false, abMenu = false, abActivate = true) + Event OnBeginState() + Game.DisablePlayerControls(abMovement = false, abFighting = true, abCamSwitch = false, abLooking = false, abSneaking = false, abMenu = true, abActivate = true) Game.SetPlayerAIDriven(True) - ((Self as Quest) as _00E_PlayerhousingTutorial).onManipulationMode() - - currentHousingObjectInManipulation.forceRefTo(currentHousingObject) - currentHousingObjectInManipulation.RegisterForControl("forward") - currentHousingObjectInManipulation.RegisterForControl("back") - currentHousingObjectInManipulation.RegisterForControl("strafe left") - currentHousingObjectInManipulation.RegisterForControl("strafe right") - - RegisterForControl("activate") - - ;we do not have to wait until the 3d is loaded since the manipulation mode is only entered from the translation mode - shaderActive.Play(currentHousingObject) - EndEvent + PlaySwitchSound() - Event onEndState() - shaderActive.Stop(currentHousingObject) - unRegisterForControl("activate") + _00E_Playerhousing_ManipulationMode.Show() - currentHousingObjectInManipulation.unRegisterForControl("forward") - currentHousingObjectInManipulation.unRegisterForControl("back") - currentHousingObjectInManipulation.unRegisterForControl("strafe left") - currentHousingObjectInManipulation.unRegisterForControl("strafe right") - currentHousingObjectInManipulation.clear() + (currentHousingObjectInManipulation as _00E_PlayerhousingCurrentOManipulate).Setup(currentHousingObject) + + ShowManipulationModeTutorial() + + EnableBuildmodeControls() + EndEvent + Event OnEndState() Game.SetPlayerAIDriven(False) Game.EnablePlayerControls(abMovement = true, abFighting = true, abCamSwitch = true, abLooking = true, abSneaking = true, abMenu = true, abActivate = true) EndEvent - function activatePressed() - {updates the buildmode as necessary when the activation control has been pressed} - toggleMode() - Endfunction + Function activateShortPressed() + DisableBuildmodeControls() + (currentHousingObjectInManipulation as _00E_PlayerhousingCurrentOManipulate).Shutdown(True) + GoToState("Translation") + EndFunction - function activateLongPressed() - {updates the buildmode as necessary when the activation control has been pressed long} - currentHousingObject.finishPlacement() - leaveBuildmode() - Endfunction + Function activateLongPressed() + DisableBuildmodeControls() + (currentHousingObjectInManipulation as _00E_PlayerhousingCurrentOManipulate).Shutdown(False) + FinishPlacingHousingObject() + GoToState("Buildmode") + EndFunction - function toggleMode() - {Switches between tranlation and manipulation buildmode} - GoToState("Translation") - ENDfunction + Function pickUpPressed() + DisableBuildmodeControls() + (currentHousingObjectInManipulation as _00E_PlayerhousingCurrentOManipulate).Shutdown(False) + PickUpHousingObject() + GoToState("Buildmode") + EndFunction - function disableBuildmode() - {Disables the player to enter buildmode} - GoToState("null") - ENDfunction + Function enableBuildmode() + ; Do nothing + EndFunction - function leaveBuildmode() - {Disables the player to translate or manipulate a housing object; the player can still enter buildmode again} - GoToState("Buildmode") - ENDfunction + Function disableBuildmode() + DisableBuildmodeControls() + (currentHousingObjectInManipulation as _00E_PlayerhousingCurrentOManipulate).Shutdown(False) + If currentHousingObject + PickUpHousingObject() + EndIf + GoToState("") + EndFunction + + Bool Function IsNormalActivationEnabled() + Return False + EndFunction ENDSTATE diff --git a/source/scripts/_00e_playerhousingtutorial.psc b/source/scripts/_00e_playerhousingtutorial.psc index e1f2a013..308e38f8 100644 --- a/source/scripts/_00e_playerhousingtutorial.psc +++ b/source/scripts/_00e_playerhousingtutorial.psc @@ -1,48 +1,14 @@ Scriptname _00E_PlayerhousingTutorial extends Quest +{ OBSOLETE. Left for version update. } -Message Property buildmodeTutorial auto -Message Property translationModeTutorial auto -Message Property manipulationModeTutorial auto - -GlobalVariable Property _00E_DisableCraftingTutorials Auto - -function ShowTutorial() - int button = buildmodeTutorial.show() - if button == 0 - GotoState("") - else - GotoState("NoTutorial") - Endif -Endfunction - -function onStartBuildmode() - If _00E_DisableCraftingTutorials.GetValueInt() == 0 - ShowTutorial() - EndIf -Endfunction - -function onTranslationMode() - Debug.Notification(translationModeTutorial.getName()) - translationModeTutorial.show() -Endfunction - -function onManipulationMode() - Debug.Notification(manipulationModeTutorial.getName()) - manipulationModeTutorial.show() -Endfunction +Bool Function StartTutorialIsShown() + Return False +EndFunction STATE NoTutorial - function onStartBuildmode() - - Endfunction - - function onTranslationMode() - Debug.Notification(translationModeTutorial.getName()) - Endfunction - - function onManipulationMode() - Debug.Notification(manipulationModeTutorial.getName()) - Endfunction + Bool Function StartTutorialIsShown() + Return True + EndFunction Endstate diff --git a/source/scripts/_00e_playersetupscript.psc b/source/scripts/_00e_playersetupscript.psc index 037303cf..65452046 100644 --- a/source/scripts/_00e_playersetupscript.psc +++ b/source/scripts/_00e_playersetupscript.psc @@ -1,7 +1,7 @@ Scriptname _00E_PlayerSetUpScript extends ObjectReference {Initializes all the necessary Quests, maintains the player, contains various OnPlayerLoadGame() failsafes} -Float Property CURRENT_PATCH_VERSION = 2.08 AutoReadOnly +Float Property CURRENT_PATCH_VERSION = 2.09 AutoReadOnly ;===================================================================================== @@ -355,6 +355,25 @@ Function FillAnimTestPackages(Int idNPC, String esmNPC, Int idPackage, String es EndFunction +;===================================================================================== +; 2.0.9 +;===================================================================================== + +Function Update_209() + Spell abSoulcaller = Game.GetFormFromFile(0x002F0EA, "Enderal - Forgotten Stories.esm") as Spell + If PlayerREF.HasSpell(abSoulcaller) + PlayerREF.RemoveSpell(abSoulcaller) + Utility.Wait(1) + PlayerREF.AddSpell(abSoulcaller, False) + EndIf + + Perk perkBloodlust = Game.GetFormFromFile(0x00069D38, "Skyrim.esm") as Perk + _ResetPerk(perkBloodlust) + + _00E_PlayerhousingMaster.GetMaster().Update_209() +EndFunction + + ;===================================================================================== ; ALL UPDATES ;===================================================================================== @@ -406,10 +425,10 @@ Function RefreshMountNamesOnLoad() EndFunction -Function _ResetArmorWeightPerk(Perk weightPerk) - If PlayerREF.HasPerk(weightPerk) - PlayerREF.RemovePerk(weightPerk) - PlayerREF.AddPerk(weightPerk) +Function _ResetPerk(Perk p) + If PlayerREF.HasPerk(p) + PlayerREF.RemovePerk(p) + PlayerREF.AddPerk(p) EndIf EndFunction @@ -419,8 +438,8 @@ Function ResetArmorWeightPerks() ; The push is needed only if the player is over-encumbered on game load. ; If the player is not over-encumbered, the push is not needed because checking the inventory, picking up items, sheathing/drawing a weapon will reset the perks anyway. If PlayerREF.IsOverEncumbered() - _ResetArmorWeightPerk(_00E_Class_Keeper_P05_C_Conditioning) - _ResetArmorWeightPerk(_00E_Class_Vagrant_P05_B_Lightweight) + _ResetPerk(_00E_Class_Keeper_P05_C_Conditioning) + _ResetPerk(_00E_Class_Vagrant_P05_B_Lightweight) EndIf EndFunction @@ -543,7 +562,7 @@ Function Maintenance() bdoOnce = true EndIf EndIf - ElseIf fPatchVersion >= 1.5 + ElseIf fPatchVersion >= 1.5 && fPatchVersion < CURRENT_PATCH_VERSION ; only do this once when update 1.5.6.0 is applied If fPatchVersion < 1.56 @@ -584,6 +603,10 @@ Function Maintenance() If fPatchVersion < 2.08 Update_208() EndIf + ; only do this once when update 2.0.9 (SE) is applied + If fPatchVersion < 2.09 + Update_209() + EndIf fPatchVersion = CURRENT_PATCH_VERSION EndIf diff --git a/source/scripts/_00e_questfunctions.psc b/source/scripts/_00e_questfunctions.psc index f4edeab1..ff55b944 100644 --- a/source/scripts/_00e_questfunctions.psc +++ b/source/scripts/_00e_questfunctions.psc @@ -134,14 +134,6 @@ endFunction Function DisableDialogueQuitting() Global {Disables the TAB Key during dialogue. Resets automatically upon dialogue exit via Goodbye.} - if UI.GetBool("Dialogue Menu", "_root.DialogueMenu_mc.bEnableTab") != true - ; Suspected non-Enderal dialoguemenu.swf replacer, rechecking value in order to be sure. - UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", True) - if UI.GetBool("Dialogue Menu", "_root.DialogueMenu_mc.bEnableTab") != true - Debug.Notification("Detected incompatible dialoguemenu.swf!") - endif - endif - UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", False) EndFunction @@ -288,6 +280,27 @@ Function DisableReferenceFormList(FormList referenceList) Global EndFunction +Float Function SetActorScale(Actor akActor, Float fNewScale) Global + + ; Sets the scale of akActor to fNewScale and returns the old scale. + ; This is a workaround for GetScale() returning the cumulative scale of Race.Height * Actor.Scale for actors. + ; So it results in a messed up scale if the value returned by GetScale() is used to revert the scale change for an actor whose race has a non-1.00 height (for example, HighElfRace) + + Float fOriginalScale = akActor.GetScale() + akActor.SetScale(fNewScale) + ; Now use the known fNewScale and the return of GetScale() to get the race height coeff, and apply that coeff to fOriginalScale to calculate the true actor's reference scale. + Return fOriginalScale * fNewScale / akActor.GetScale() + +EndFunction + +Float Function AdjustTimePeriodByEngineTimerError(Float fUnadjustedPeriod) Global + + ; In SE, the game time runs slower than the real time by about 2.5/60 second + + Return fUnadjustedPeriod - (2.5 * Math.Floor(fUnadjustedPeriod) / 60.0) + +EndFunction + Function PrintDebugMessage(String msg) Global ; Dummy to fix error messages in Papyrus.log about missing function EndFunction diff --git a/source/scripts/_00e_smokingpipescript.psc b/source/scripts/_00e_smokingpipescript.psc index e93f9460..29cab54c 100644 --- a/source/scripts/_00e_smokingpipescript.psc +++ b/source/scripts/_00e_smokingpipescript.psc @@ -1,10 +1,14 @@ -Scriptname _00E_SmokingPipeScript extends ObjectReference +Scriptname _00E_SmokingPipeScript extends ObjectReference _00E_PeaceweedControlScript Property PeaceweedControl Auto Actor Property PlayerRef Auto Event OnEquipped(Actor akActor) If akActor == PlayerRef - PeaceweedControl.StartSmoking() + ; The check of base object is needed because this script somehow gets attached to the quest ref of _00E_FS_NQ07_Rezept (and to various containers) + Form baseObj = GetBaseObject() + If baseObj == None || (baseObj as MiscObject) != None + PeaceweedControl.StartSmoking() + EndIf EndIf EndEvent \ No newline at end of file diff --git a/source/scripts/_00e_theriantrophist_blockcraftingsc.psc b/source/scripts/_00e_theriantrophist_blockcraftingsc.psc index 580eac2d..fba5a5af 100644 --- a/source/scripts/_00e_theriantrophist_blockcraftingsc.psc +++ b/source/scripts/_00e_theriantrophist_blockcraftingsc.psc @@ -1,27 +1,30 @@ Scriptname _00E_Theriantrophist_BlockCraftingSC extends ObjectReference -Event OnInit() +Actor Property PlayerREF Auto +Message Property _00E_Theriantrophist_CantCraftMSG Auto +Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto + +Bool bActivationBlocked = False - BlockActivation(True) +Event OnInit() + BlockActivation(True) EndEvent Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF + If _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False + bActivationBlocked = True - if akActionRef == PlayerREF - - if PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace - _00E_Theriantrophist_CantCraftMSG.Show() - elseif !((self as ObjectReference) as _00E_Playerhousing_Furniture) - Activate(akActionRef, true) - endif - - else - Activate(akActionRef, true) - endif + If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace + _00E_Theriantrophist_CantCraftMSG.Show() + Else + Activate(akActionRef, true) + EndIf + bActivationBlocked = False + EndIf + Else + Activate(akActionRef, true) + EndIf EndEvent - -Actor Property PlayerREF Auto -Message Property _00E_Theriantrophist_CantCraftMSG Auto -Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto \ No newline at end of file diff --git a/source/scripts/_00e_theriantrophist_wolfattributes.psc b/source/scripts/_00e_theriantrophist_wolfattributes.psc index 7465767b..6b36d61f 100644 --- a/source/scripts/_00e_theriantrophist_wolfattributes.psc +++ b/source/scripts/_00e_theriantrophist_wolfattributes.psc @@ -141,6 +141,12 @@ State WolfForm carryCapacityMod = PlayerREF.getAV("CarryWeight") - WerewolfBaseCarryCapacity humanSpeedMult = PlayerREF.getAV("speedMult") + ; If the player is under the influence of a slowdown magic effect, take the player's normal speedMult from Fame AV. See FrostSlowFix.psc + Float fFame = PlayerREF.GetBaseActorValue("Fame") + If fFame > humanSpeedMult + humanSpeedMult = fFame + EndIf + speedMult = humanSpeedMult temporarySpeedMultMod = 0 renewNotPersistentStats() diff --git a/source/scripts/_00e_weathercontrolscriptsc.psc b/source/scripts/_00e_weathercontrolscriptsc.psc index a6e899de..59a52062 100644 --- a/source/scripts/_00e_weathercontrolscriptsc.psc +++ b/source/scripts/_00e_weathercontrolscriptsc.psc @@ -78,6 +78,14 @@ Event OnLocationChange(Location akOldLoc, Location akNewLoc) bGradualTransition = True EndIf + ElseIf bArkSpecialWeather && akNewLoc == ArkSiegeWeatherEdge + ; If we're leaving Ark's outskirts, keep the current Ark weather for a bit longer. + ; This prevents frequent weather switches if we're wondering at the edge of the siege weather zone and regularly crossing that edge. + If (akOldLoc == CapitalCityLocation || akOldLoc == ArkSiegeWeather) && (iCurrentArkWeather == WEATHER_OVERCAST || iCurrentArkWeather == WEATHER_RAIN) + iNewWeather = iCurrentArkWeather + bGradualTransition = True + EndIf + EndIf SetNewWeather(iNewWeather, bGradualTransition) @@ -158,8 +166,10 @@ Bool Function LocationIsSuntemple(Location lc) EndFunction Bool Function LocationIsArk(Location lc) - If lc && ((lc == CapitalCityLocation) || lc.isChild(CapitalCityLocation)) - Return True + If lc + If (lc == CapitalCityLocation) || (lc == ArkSiegeWeather) || lc.isChild(CapitalCityLocation) + Return True + EndIf EndIf Return False @@ -244,6 +254,8 @@ Int iCurrentArkWeather = 0 Bool bGameTimeUpdatesActive = False Location Property CapitalCityLocation Auto +Location Property ArkSiegeWeather Auto +Location Property ArkSiegeWeatherEdge Auto FormList Property _00E_SuntempleLocations Auto Weather Property _00E_EnderalOvercast Auto diff --git a/source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc b/source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc index a775f796..fd417ce4 100644 --- a/source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc +++ b/source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc @@ -4,19 +4,16 @@ Scriptname _60E_FS_Mystical_ThoughtImplosionSC extends ActiveMagicEffect ; EVENTS ;===================================================================================== - Event OnEffectStart(Actor akTarget, Actor akCaster) - - int iChance = Utility.RandomInt(1, 100) + Int iChance = Utility.RandomInt(1, 100) - if iChance > 0 && iChance < 33 + If iChance < 33 ; Do nothing - Elseif iChance >= 33 && iChance < 66 + ElseIf iChance < 66 || akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) PushBack(akTarget) - Elseif iChance >= 66 + Else Weaken(akTarget) EndIf - EndEvent ;===================================================================================== @@ -24,34 +21,39 @@ EndEvent ;===================================================================================== Function PushBack(Actor Target) - MAGAlterationTelekinesisThrow.Play(Target) - float fPushStrength = (PlayerREF.GetActorValue("Illusion")/10) - - if fPushStrength < 4 + Float fPushStrength = PlayerREF.GetActorValue("Illusion") / 10.0 + If fPushStrength < 4 _00E_FS_PsionicPushStaggerSP.Cast(Target, Target) Else - PlayerREF.PushActorAway(Target, (PlayerREF.GetActorValue("Illusion")/10)) + PlayerREF.PushActorAway(Target, fPushStrength) EndIf - EndFunction Function Weaken(Actor Target) + Spell weaknessSpell + If PlayerREF.HasPerk(_00E_Class_Sinistrope_P08_C_Illusionist) + weaknessSpell = _00E_FS_PsychosisWeaknessSP + Else + weaknessSpell = _00E_FS_PsychosisWeaknessSP_NoSlow + EndIf _00E_FS_Psychosis_Weakened.Show() - float fResist = PlayerREF.GetActorValue("Illusion")/2 + Float fResist = PlayerREF.GetActorValue("Illusion") * 0.5 - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(0, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(1, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(2, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(3, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(4, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(5, fResist) + weaknessSpell.SetNthEffectMagnitude(0, fResist) + weaknessSpell.SetNthEffectMagnitude(1, fResist) + weaknessSpell.SetNthEffectMagnitude(2, fResist) + weaknessSpell.SetNthEffectMagnitude(3, fResist) + weaknessSpell.SetNthEffectMagnitude(4, fResist) + weaknessSpell.SetNthEffectMagnitude(5, fResist) - _00E_FS_PsychosisWeaknessSP.Cast(Target, Target) + weaknessSpell.Cast(Target, Target) + Target.RemoveSpell(_00E_FS_PsychosisCounter_01_SP) + Target.RemoveSpell(_00E_FS_PsychosisCounter_02_SP) EndFunction ;===================================================================================== @@ -60,9 +62,16 @@ EndFunction Actor Property PlayerREF Auto -Spell Property _00E_FS_PsychosisWeaknessSP Auto Spell Property _00E_FS_PsionicPushStaggerSP Auto Sound Property MAGAlterationTelekinesisThrow Auto -Message Property _00E_FS_Psychosis_Weakened Auto \ No newline at end of file +Message Property _00E_FS_Psychosis_Weakened Auto + +Perk Property _00E_Class_Sinistrope_P08_C_Illusionist Auto +Spell Property _00E_FS_PsychosisWeaknessSP Auto +Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto +MagicEffect Property _00E_FS_PsychosisWeaknessVisualME Auto + +Spell Property _00E_FS_PsychosisCounter_01_SP Auto +Spell Property _00E_FS_PsychosisCounter_02_SP Auto diff --git a/source/scripts/_fs_phasmalist_controlquest.psc b/source/scripts/_fs_phasmalist_controlquest.psc index f015632f..17aaadae 100644 --- a/source/scripts/_fs_phasmalist_controlquest.psc +++ b/source/scripts/_fs_phasmalist_controlquest.psc @@ -22,12 +22,14 @@ GlobalVariable Property _00E_Phasmalist_TankMode Auto Message Property _00E_Phasmalist_NoApparitionCurrentlySummoned Auto +Perk Property _00E_Class_Phasmalist_P05_C_Violence_01 Auto + Actor Property PlayerREF Auto Bool bCreatedFirstTrinket = false Int iScriptVersion = 0 -Int Property CURRENT_SCRIPT_VERSION = 1 AutoReadOnly +Int Property CURRENT_SCRIPT_VERSION = 2 AutoReadOnly ;===================================================================================== @@ -78,6 +80,11 @@ Function LoadGameFailsave() RegisterTeleportKey() ((self as Quest) as _FS_Phasmalist_AffinityControlQuest).OnGameLoad() ; Obsolete, not needed anymore, so shut it down bDoApparitionOnLoadGame = False + Else + If iScriptVersion < 2 && PlayerREF.HasPerk(_00E_Class_Phasmalist_P05_C_Violence_01) && IsApparitionSpawned() + SummonApparition(PlayerREF, False, True) + bDoApparitionOnLoadGame = False + EndIf EndIf iScriptVersion = CURRENT_SCRIPT_VERSION diff --git a/source/scripts/frostslowfix.psc b/source/scripts/frostslowfix.psc index 86eaefef..5d14aeb8 100644 --- a/source/scripts/frostslowfix.psc +++ b/source/scripts/frostslowfix.psc @@ -1,43 +1,37 @@ Scriptname FrostSlowFix extends activemagiceffect {Behebt den Fehler, dass die Verlangsamung von Frostzaubern nicht funktioniert, indem das SpeedMult-Attribut durch kurzzeitige Änderung des InventoryWeight geupdatet wird.} +Keyword Property MagicSlowDownTarget Auto -MagicEffect Property FrostSlowFFAimed Auto -MagicEffect Property FrostSlowConcAimed Auto -MagicEffect Property FrostSlowFFContact Auto -MagicEffect Property FrostSlowFFSelfArea100 Auto -float speed -float basespeed -float slowspeed - - Event OnEffectStart(Actor akTarget, Actor akCaster) - - If akTarget.GetBaseActorValue("Speedmult") > akTarget.GetBaseActorValue("Fame") ;ensures that the speedmult gets only halved once - basespeed=akTarget.GetBaseActorValue("Speedmult") - akTarget.SetActorValue("Fame", basespeed) - slowspeed=akTarget.GetBaseActorValue("Speedmult")/2 - akTarget.SetActorValue("Speedmult", slowspeed) - EndIf - - akTarget.ModActorValue("InventoryWeight", -0.1) - Utility.Wait(0.01) - akTarget.ModActorValue("InventoryWeight", 0.1) +Actor Target -Endevent +Event OnEffectStart(Actor akTarget, Actor akCaster) + Target = akTarget + Float fBaseSpeed = Target.GetBaseActorValue("Speedmult") + If fBaseSpeed > Target.GetBaseActorValue("Fame") ; ensures that the speedmult gets only halved once + Target.SetActorValue("Fame", fBaseSpeed) + Target.SetActorValue("Speedmult", fBaseSpeed * 0.5) + ForceSpeedMultUpdate() + EndIf +EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) - - If (akTarget.HasMagicEffect(FrostSlowFFAimed)||akTarget.HasMagicEffect(FrostSlowConcAimed)||akTarget.HasMagicEffect(FrostSlowFFContact)||akTarget.HasMagicEffect(FrostSlowFFSelfArea100))==0 - basespeed=akTarget.GetBaseActorValue("Fame") - akTarget.SetActorValue("Speedmult", basespeed) - akTarget.SetActorValue("Fame", 0) + If Target == None ; version update + Target = akTarget EndIf - - akTarget.ModActorValue("InventoryWeight", -0.1) - Utility.Wait(0.01) - akTarget.ModActorValue("InventoryWeight", 0.1) -Endevent + If Target.HasMagicEffectWithKeyword(MagicSlowDownTarget) == False + Target.SetActorValue("Speedmult", Target.GetBaseActorValue("Fame")) + Target.SetActorValue("Fame", 0) + + ForceSpeedMultUpdate() + EndIf +EndEvent +Function ForceSpeedMultUpdate() + Target.ModActorValue("InventoryWeight", -0.1) + Utility.Wait(0.01) + Target.ModActorValue("InventoryWeight", 0.1) +EndFunction diff --git a/source/scripts/fs_nq05_alchemyscript.psc b/source/scripts/fs_nq05_alchemyscript.psc index c148176b..f819f265 100644 --- a/source/scripts/fs_nq05_alchemyscript.psc +++ b/source/scripts/fs_nq05_alchemyscript.psc @@ -10,21 +10,24 @@ Ingredient Property MothWingMonarch Auto Ingredient Property Garlic Auto Message Property FS_NQ05_AlchemyMessagebox Auto -Event OnActivate(objectReference akActionRef) +Bool bActivationBlocked = False - If (akActionRef == PlayerREF && FS_NQ05.GetStage() < 40 && FS_NQ05.GetStage() >= 30) - int iButton = FS_NQ05_AlchemyMessagebox.Show() - - if iButton == 0 - PlayerREF.RemoveItem(Nirnroot, 1) - PlayerREF.RemoveItem(SkeeverTail, 1) - PlayerREF.RemoveItem(MothWingMonarch, 1) - PlayerREF.RemoveItem(Garlic, 1) - PlayerREF.RemoveItem(FS_NQ05_Rezept, 1) - FS_NQ05.SetStage(40) - ElseIf iButton == 1 - Return +Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False + bActivationBlocked = True + + Int qStage = FS_NQ05.GetStage() + If qStage >= 30 && qStage < 40 + If FS_NQ05_AlchemyMessagebox.Show() == 0 + PlayerREF.RemoveItem(Nirnroot, 1) + PlayerREF.RemoveItem(SkeeverTail, 1) + PlayerREF.RemoveItem(MothWingMonarch, 1) + PlayerREF.RemoveItem(Garlic, 1) + PlayerREF.RemoveItem(FS_NQ05_Rezept, 1) + FS_NQ05.SetStage(40) + EndIf EndIf - Endif + bActivationBlocked = False + EndIf EndEvent \ No newline at end of file diff --git a/source/scripts/fs_nq07_alchemyscript.psc b/source/scripts/fs_nq07_alchemyscript.psc index fd3299d8..5b827ac8 100644 --- a/source/scripts/fs_nq07_alchemyscript.psc +++ b/source/scripts/fs_nq07_alchemyscript.psc @@ -9,21 +9,23 @@ Ingredient Property FrostMirriam Auto Potion Property FoodBananenschnaps Auto Message Property _00E_FS_NQ07_AlchemyMessagebox Auto +Bool bActivationBlocked = False -Event OnActivate(objectReference akActionRef) - If (akActionRef == PlayerREF && FS_NQ07.GetStage() == 115) - int iButton = _00E_FS_NQ07_AlchemyMessagebox.Show() - - if iButton == 0 - PlayerREF.RemoveItem(FoodMead, 1) - PlayerREF.RemoveItem(FrostMirriam, 2) - PlayerREF.RemoveItem(FoodBananenschnaps, 1) - PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1) - FS_NQ07.SetStage(120) - ElseIf iButton == 1 - Return +Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False + bActivationBlocked = True + + If FS_NQ07.GetStage() == 115 + If _00E_FS_NQ07_AlchemyMessagebox.Show() == 0 + PlayerREF.RemoveItem(FoodMead, 1) + PlayerREF.RemoveItem(FrostMirriam, 2) + PlayerREF.RemoveItem(FoodBananenschnaps, 1) + PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1) + FS_NQ07.SetStage(120) + EndIf EndIf - EndIf + bActivationBlocked = False + EndIf EndEvent diff --git a/source/scripts/fxwitchlightattachscript.psc b/source/scripts/fxwitchlightattachscript.psc new file mode 100644 index 00000000..a79358a6 --- /dev/null +++ b/source/scripts/fxwitchlightattachscript.psc @@ -0,0 +1,52 @@ +Scriptname FXWitchlightAttachSCRIPT extends ActiveMagicEffect conditional +{Attaches and manages witchlights's fx} + +VisualEffect Property WitchlightFXAttachEffect Auto +Spell Property WispDrainAttack Auto +Sound Property NPCWitchlightAttackM Auto +Actor Property PlayerREF Auto + +ObjectReference selfRef + +Event OnEffectStart(Actor Target, Actor Caster) + selfRef = caster + + ; Small version update. + ; The new script properties do not get auto-filled if the NPC ref has been already inited + If PlayerREF == None + PlayerREF = Game.GetPlayer() + EndIf + If WispDrainAttack == None + WispDrainAttack = Game.GetFormFromFile(0x00091F78, "Skyrim.esm") as Spell + EndIf + If NPCWitchlightAttackM == None + NPCWitchlightAttackM = Game.GetFormFromFile(0x00036E7E, "GavrantFixes_210510.esp") as Sound + EndIf + + ;USKP 2.0.1 - Stop this from attaching to the player. + If selfRef == PlayerREF + Dispel() + Return + EndIf + + ; only attack FX once the 3D is loaded + Int iLoadCountdown = 50 + While selfRef.Is3DLoaded() == False && iLoadCountdown > 0 + iLoadCountdown -= 1 + EndWhile + ;USKP 2.0.2 - So despite ALL THAT above, we still need to check this. Stupid. + If selfRef.Is3DLoaded() + WitchlightFXAttachEffect.Play(selfRef, -1) + EndIf +EndEvent + +Event OnSpellCast(Form akSpell) + If akSpell == WispDrainAttack + NPCWitchlightAttackM.Play(selfRef) + EndIf +EndEvent + +Event OnEffectFinish(Actor Target, Actor Caster) + WitchlightFXAttachEffect.Stop(selfRef) +EndEvent +