Compare commits

..

No commits in common. "98f4a89e41d50211383f9336a777e67f411e7a73" and "67b3dd3b2dd0fe24b73d98c2aece01dbd9ffde95" have entirely different histories.

50 changed files with 290 additions and 524 deletions

Binary file not shown.

View File

@ -645,7 +645,6 @@ FNIS by Fore
Unfuzer by greentea101 Unfuzer by greentea101
UIExtensions by expired6978 UIExtensions by expired6978
Flat Map Markers SSE, Stay At The System Page, Yes Im Sure by Ryan McKenzie Flat Map Markers SSE, Stay At The System Page, Yes Im Sure by Ryan McKenzie
powerofthree's Tweaks
CommonLibSSE-NG and general reverse engineering by Ryan McKenzie, powerofthree, Charmed Baryon, Qudix, Maxsu, doodlum, and others CommonLibSSE-NG and general reverse engineering by Ryan McKenzie, powerofthree, Charmed Baryon, Qudix, Maxsu, doodlum, and others
Better Dialogue Controls by ecirbaf Better Dialogue Controls by ecirbaf
Unofficial Enderal Port (fs.dll) by Hishutup Unofficial Enderal Port (fs.dll) by Hishutup

View File

@ -6,18 +6,6 @@ See https://en.wiki.sureai.net/Enderal:Patch for the list of official patches up
Beware, spoilers ahead! Beware, spoilers ahead!
2.1.2 (2024-08-01)
- Entropic Blood fixes:
-- Controlled actor no longer remains hostile to player.
-- INI settings get properly restored after save reload occured during victim selection - fixes floating in the air and increased activation distance.
-- Fixed the damage bonus never applying to controlled NPCs.
-- Changed the time slow effect to be two times slower.
-- Marking NPCs no longer happens solely by pointing, press "Activate" to mark an actor.
- Added the light attach crash fix by powerofthree.
- Brought back hightlighting of permanent effects in the hero menu.
- Fixed apparition talismans not being recognized as equipped after turning back from the werewolf form.
2.1.1 (2024-04-24) 2.1.1 (2024-04-24)
- Fixed hidden stashes not showing up. - Fixed hidden stashes not showing up.
- Fixed incorrectly assigned racial bonus during quick start. - Fixed incorrectly assigned racial bonus during quick start.

View File

@ -4,4 +4,3 @@ MapMarkerPlacementFixes = true
AchievementFix = true AchievementFix = true
VideoInterruptPatch = true VideoInterruptPatch = true
ForceBorderless = true ForceBorderless = true
AttachLightHitEffectCrashFix = true

View File

@ -1 +1 @@
version = 2.1.2 version = 2.1.1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -313,7 +313,6 @@ scripts\defaultsetstageonattacked.pex
scripts\defaultsetstageondeath.pex scripts\defaultsetstageondeath.pex
scripts\dragonactorscript.pex scripts\dragonactorscript.pex
scripts\masterambushscript.pex scripts\masterambushscript.pex
scripts\QuickReflexesFix.pex
scripts\_00e_setupinitquestlist.pex scripts\_00e_setupinitquestlist.pex
scripts\_00e_func_setnpcascompanion.pex scripts\_00e_func_setnpcascompanion.pex
scripts\_00e_func_safemove.pex scripts\_00e_func_safemove.pex

View File

@ -6,27 +6,30 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")
######################################################################################################################## ########################################################################################################################
project( project(
EnderalSE EnderalSE
VERSION 2.1.2 VERSION 2.1.0
DESCRIPTION "Enderal SE DLL" DESCRIPTION "Enderal SE DLL"
LANGUAGES CXX) LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
include(GNUInstallDirs)
find_path(SIMPLEINI_INCLUDE_DIRS "ConvertUTF.c")
configure_file( configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in
${CMAKE_CURRENT_BINARY_DIR}/version.rc ${CMAKE_CURRENT_BINARY_DIR}/version.rc
@ONLY) @ONLY)
#include(GNUInstallDirs) set(sources
find_path(SIMPLEINI_INCLUDE_DIRS "ConvertUTF.c") src/Main.cpp
src/EventListener.cpp
src/Papyrus.cpp
src/Patches/TweenMenuPatch.cpp
src/Patches/HeroMenuPatch.cpp
file( ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
GLOB_RECURSE
sources
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)
source_group( source_group(
TREE ${CMAKE_CURRENT_SOURCE_DIR} TREE ${CMAKE_CURRENT_SOURCE_DIR}
@ -37,35 +40,10 @@ source_group(
######################################################################################################################## ########################################################################################################################
## Configure target DLL ## Configure target DLL
######################################################################################################################## ########################################################################################################################
find_package(CommonLibSSE CONFIG REQUIRED)
include(FetchContent)
FetchContent_Declare(
CommonLibNG
GIT_REPOSITORY https://github.com/alandtse/CommonLibVR.git
GIT_TAG 5e5417e3585c9434295e919bdda27737244e9c5a
)
set(ENABLE_SKYRIM_SE ON CACHE BOOL " " FORCE)
set(ENABLE_SKYRIM_AE ON CACHE BOOL " " FORCE)
set(ENABLE_SKYRIM_VR ON CACHE BOOL " " FORCE)
set(BUILD_TESTS OFF CACHE BOOL " " FORCE)
FetchContent_MakeAvailable(CommonLibNG)
# Use a local copy instead
#add_subdirectory("d:/Git/CommonLibVR/" ${CMAKE_BINARY_DIR}/_deps/clib-build)
#find_package(CommonLibSSE CONFIG REQUIRED)
get_target_property(COMMONLIB_SRC_DIR CommonLibSSE SOURCE_DIR)
include(${COMMONLIB_SRC_DIR}/cmake/CommonLibSSE.cmake)
add_commonlibsse_plugin(${PROJECT_NAME} SOURCES ${headers} ${sources}) add_commonlibsse_plugin(${PROJECT_NAME} SOURCES ${headers} ${sources})
add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}") add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}")
target_link_libraries(${PROJECT_NAME} PUBLIC CommonLibSSE::CommonLibSSE)
target_include_directories(${PROJECT_NAME} target_include_directories(${PROJECT_NAME}
PRIVATE PRIVATE
@ -79,15 +57,6 @@ target_include_directories(${PROJECT_NAME}
PUBLIC PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
find_package(spdlog CONFIG REQUIRED)
target_link_libraries(
"${PROJECT_NAME}"
PUBLIC
spdlog::spdlog
Version.lib
)
target_precompile_headers(${PROJECT_NAME} target_precompile_headers(${PROJECT_NAME}
PRIVATE PRIVATE
src/PCH.h) src/PCH.h)
@ -105,4 +74,3 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/") COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/")
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}> "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/") COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}> "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/")

View File

@ -668,8 +668,9 @@ inline void CheckSkyrimCells()
inline void CheckCCMods() inline void CheckCCMods()
{ {
std::string filenames[73] = { std::string filenames[74] = {
"ccASVSSE001-ALMSIVI.esm", "ccASVSSE001-ALMSIVI.esm",
"ccBGSSSE001-Fish.esm",
"ccBGSSSE002-ExoticArrows.esl", "ccBGSSSE002-ExoticArrows.esl",
"ccBGSSSE003-Zombies.esl", "ccBGSSSE003-Zombies.esl",
"ccBGSSSE004-RuinsEdge.esl", "ccBGSSSE004-RuinsEdge.esl",
@ -744,17 +745,12 @@ inline void CheckCCMods()
"ccAFDSSE001-DweSanctuary.esm", "ccAFDSSE001-DweSanctuary.esm",
}; };
for (short i = 0; i < 73; i++) { for (short i = 0; i < 74; i++) {
if (DataFileExists(filenames[i], 800)) { if (DataFileExists(filenames[i], 800)) {
MessageBoxW(NULL, L"Creation Club mods are incompatible with Enderal.", L"Error", MB_OK | MB_ICONERROR); MessageBoxW(NULL, L"Creation Club mods are incompatible with Enderal.", L"Error", MB_OK | MB_ICONERROR);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} }
if (DataFileExists("ccBGSSSE001-Fish.esm", 1200000)) {
MessageBoxW(NULL, L"Fishing CC are incompatible with Enderal without a patch.", L"Error", MB_OK | MB_ICONERROR);
exit(EXIT_FAILURE);
}
} }
inline void CheckUnconvertedMap() inline void CheckUnconvertedMap()

View File

@ -12,7 +12,6 @@
#include "Patches/HeroMenuPatch.h" #include "Patches/HeroMenuPatch.h"
#include "Patches/HUDMenuPatch.h" #include "Patches/HUDMenuPatch.h"
#include "Patches/ForceBorderless.h" #include "Patches/ForceBorderless.h"
#include "Patches/AttachLightHitEffectCrash.h"
using namespace SKSE; using namespace SKSE;
@ -22,8 +21,7 @@ static std::map<std::string, bool> g_settings{
{ "MapMarkerPlacementFixes", true }, { "MapMarkerPlacementFixes", true },
{ "AchievementFix", true }, { "AchievementFix", true },
{ "VideoInterruptPatch", true }, { "VideoInterruptPatch", true },
{ "ForceBorderless", true }, { "ForceBorderless", true }
{ "AttachLightHitEffectCrashFix", true }
}; };
namespace { namespace {
@ -64,10 +62,6 @@ namespace {
if (message->type == MessagingInterface::kPostLoad) { if (message->type == MessagingInterface::kPostLoad) {
if (!REL::Module::IsVR()) { if (!REL::Module::IsVR()) {
if (g_settings.at("AttachLightHitEffectCrashFix")) {
logger::info("Installing light attach crash fix...");
AttachLightHitEffectCrash::Install();
}
if (g_settings.at("StayAtSystemPage")) { if (g_settings.at("StayAtSystemPage")) {
if (const auto pluginInfo = GetLoadInterface()->GetPluginInfo("StayAtSystemPage"); pluginInfo) { if (const auto pluginInfo = GetLoadInterface()->GetPluginInfo("StayAtSystemPage"); pluginInfo) {
MessageBoxW(NULL, L"Stay At The System Page is already included in Enderal, please, disable it.", L"Enderal SE Error", MB_OK | MB_ICONERROR); MessageBoxW(NULL, L"Stay At The System Page is already included in Enderal, please, disable it.", L"Enderal SE Error", MB_OK | MB_ICONERROR);

View File

@ -1,33 +0,0 @@
namespace SKSE::stl
{
namespace detail
{
struct asm_patch :
Xbyak::CodeGenerator
{
asm_patch(std::uintptr_t a_dst)
{
Xbyak::Label dst;
mov(rax, a_dst);
jmp(rax);
}
};
}
void asm_jump(std::uintptr_t a_from, [[maybe_unused]] std::size_t a_size, std::uintptr_t a_to)
{
detail::asm_patch p{ a_to };
p.ready();
assert(p.getSize() <= a_size);
REL::safe_write(
a_from,
std::span{ p.getCode<const std::byte*>(), p.getSize() });
}
void asm_replace(std::uintptr_t a_from, std::size_t a_size, std::uintptr_t a_to)
{
REL::safe_fill(a_from, REL::INT3, a_size);
asm_jump(a_from, a_size, a_to);
}
}

View File

@ -9,7 +9,6 @@
#include <spdlog/sinks/basic_file_sink.h> #include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/msvc_sink.h> #include <spdlog/sinks/msvc_sink.h>
#include <xbyak/xbyak.h>
// Compatible declarations with other sample projects. // Compatible declarations with other sample projects.
#define DLLEXPORT __declspec(dllexport) #define DLLEXPORT __declspec(dllexport)
@ -18,14 +17,3 @@ using namespace std::literals;
using namespace REL::literals; using namespace REL::literals;
namespace logger = SKSE::log; namespace logger = SKSE::log;
namespace SKSE::stl
{
void asm_replace(std::uintptr_t a_from, std::size_t a_size, std::uintptr_t a_to);
template <class T>
void asm_replace(std::uintptr_t a_from, std::size_t a_size)
{
asm_replace(a_from, a_size, reinterpret_cast<std::uintptr_t>(T::func));
}
}

View File

@ -1,54 +0,0 @@
#pragma once
// fix BSFadeNode nullptr crash re: AttachLightHitEffectVisitor
// Copied from powerofthree's Tweaks (MIT)
namespace AttachLightHitEffectCrash
{
struct AttachLightHitEffectVisitor
{
static RE::BSContainer::ForEachResult func(RE::AttachLightHitEffectVisitor* a_this, RE::ReferenceEffect* a_hitEffect)
{
if (a_hitEffect->GetAttached()) {
auto root = a_hitEffect->GetAttachRoot();
if (const auto attachLightObj = root ? root->GetObjectByName(RE::FixedStrings::GetSingleton()->attachLight) : //crash here because no null check
nullptr) {
root = attachLightObj;
}
if (root && root != a_this->attachRoot) {
a_this->attachLightNode = root;
}
if (a_this->attachLightNode) {
return RE::BSContainer::ForEachResult::kStop;
}
} else {
a_this->allAttached = false;
}
return RE::BSContainer::ForEachResult::kContinue;
}
};
void Install()
{
if (!GetLoadInterface()->GetPluginInfo("po3_Tweaks")) {
// proceed normally
} else if (std::filesystem::exists("Data/SKSE/Plugins/po3_Tweaks.ini")) {
CSimpleIniA ini;
ini.SetMultiKey(false);
ini.LoadFile("Data/SKSE/Plugins/po3_Tweaks.ini");
if (!ini.GetBoolValue("Fixes", "Light Attach Crash", false)) {
logger::info("Detected po3's Tweaks with disabled Light Attach Crash Fix");
// proceed normally
} else {
logger::info("Detected po3's Tweaks with enabled Light Attach Crash Fix");
return;
}
}
REL::Relocation<std::uintptr_t> func{ REL::RelocationID(33610, 34388) };
std::size_t size = REL::Module::get().version() > REL::Version(1, 5, 97, 0) ? 0xEC : 0x86;
SKSE::stl::asm_replace<AttachLightHitEffectVisitor>(func.address(), size);
logger::info("Initialized Light Attach Crash Fix");
}
}

View File

@ -13,7 +13,7 @@ namespace BinkInterruptPatch
return true; return true;
} }
if (REX::W32::GetKeyState(VK_SPACE) & 0x8000 || REX::W32::GetKeyState(VK_ESCAPE) & 0x8000 || REX::W32::GetKeyState(VK_LBUTTON) & 0x8000 || REX::W32::GetKeyState(VK_RBUTTON) & 0x8000 || REX::W32::GetKeyState(VK_LMENU) & 0x8000) { if (SKSE::WinAPI::GetKeyState(VK_SPACE) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_ESCAPE) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_LBUTTON) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_RBUTTON) & 0x8000 || SKSE::WinAPI::GetKeyState(VK_LMENU) & 0x8000) {
return false; return false;
} }

View File

@ -122,24 +122,24 @@ void HeroMenuPatch::FillMenuValues()
args2[10].SetNumber(Lernpunkte->value); args2[10].SetNumber(Lernpunkte->value);
args2[11].SetNumber(Handwerkspunkte->value); args2[11].SetNumber(Handwerkspunkte->value);
args2[12].SetNumber(TalentPoints->value); args2[12].SetNumber(TalentPoints->value);
args2[13].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kIllusion)); args2[13].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kIllusion));
args2[14].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kDestruction)); args2[14].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kDestruction));
args2[15].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kAlteration)); args2[15].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kAlteration));
args2[16].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kOneHanded)); args2[16].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kOneHanded));
args2[17].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kBlock)); args2[17].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kBlock));
args2[18].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kArchery)); args2[18].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kArchery));
args2[19].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kConjuration)); args2[19].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kConjuration));
args2[20].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kRestoration)); args2[20].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kRestoration));
args2[21].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kTwoHanded)); args2[21].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kTwoHanded));
args2[22].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kLightArmor)); args2[22].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kLightArmor));
args2[23].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kHeavyArmor)); args2[23].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kHeavyArmor));
args2[24].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kSneak)); args2[24].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kSneak));
args2[25].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kAlchemy)); args2[25].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kAlchemy));
args2[26].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kPickpocket)); args2[26].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kPickpocket));
args2[27].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kLockpicking)); args2[27].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kLockpicking));
args2[28].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kEnchanting)); args2[28].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kEnchanting));
args2[29].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kSmithing)); args2[29].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kSmithing));
args2[30].SetNumber(playerAV->GetBaseActorValue(RE::ActorValue::kSpeech)); args2[30].SetNumber(playerAV->GetPermanentActorValue(RE::ActorValue::kSpeech));
args2[31].SetNumber(playerExp->value - fEXPNeededForCurrentLevel); args2[31].SetNumber(playerExp->value - fEXPNeededForCurrentLevel);
args2[32].SetNumber(fEXPNeededForNextLevel - fEXPNeededForCurrentLevel); args2[32].SetNumber(fEXPNeededForNextLevel - fEXPNeededForCurrentLevel);
@ -149,23 +149,23 @@ void HeroMenuPatch::FillMenuValues()
args3[0].SetNumber(0); args3[0].SetNumber(0);
args3[1].SetNumber(0); args3[1].SetNumber(0);
args3[2].SetNumber(0); args3[2].SetNumber(0);
args3[3].SetNumber(playerAV->GetActorValue(RE::ActorValue::kIllusion) - playerAV->GetBaseActorValue(RE::ActorValue::kIllusion)); args3[3].SetNumber(playerAV->GetActorValue(RE::ActorValue::kIllusion) - playerAV->GetPermanentActorValue(RE::ActorValue::kIllusion));
args3[4].SetNumber(playerAV->GetActorValue(RE::ActorValue::kDestruction) - playerAV->GetBaseActorValue(RE::ActorValue::kDestruction)); args3[4].SetNumber(playerAV->GetActorValue(RE::ActorValue::kDestruction) - playerAV->GetPermanentActorValue(RE::ActorValue::kDestruction));
args3[5].SetNumber(playerAV->GetActorValue(RE::ActorValue::kAlteration) - playerAV->GetBaseActorValue(RE::ActorValue::kAlteration)); args3[5].SetNumber(playerAV->GetActorValue(RE::ActorValue::kAlteration) - playerAV->GetPermanentActorValue(RE::ActorValue::kAlteration));
args3[6].SetNumber(playerAV->GetActorValue(RE::ActorValue::kOneHanded) - playerAV->GetBaseActorValue(RE::ActorValue::kOneHanded)); args3[6].SetNumber(playerAV->GetActorValue(RE::ActorValue::kOneHanded) - playerAV->GetPermanentActorValue(RE::ActorValue::kOneHanded));
args3[7].SetNumber(playerAV->GetActorValue(RE::ActorValue::kBlock) - playerAV->GetBaseActorValue(RE::ActorValue::kBlock)); args3[7].SetNumber(playerAV->GetActorValue(RE::ActorValue::kBlock) - playerAV->GetPermanentActorValue(RE::ActorValue::kBlock));
args3[8].SetNumber(playerAV->GetActorValue(RE::ActorValue::kArchery) - playerAV->GetBaseActorValue(RE::ActorValue::kArchery)); args3[8].SetNumber(playerAV->GetActorValue(RE::ActorValue::kArchery) - playerAV->GetPermanentActorValue(RE::ActorValue::kArchery));
args3[9].SetNumber(playerAV->GetActorValue(RE::ActorValue::kConjuration) - playerAV->GetBaseActorValue(RE::ActorValue::kConjuration)); args3[9].SetNumber(playerAV->GetActorValue(RE::ActorValue::kConjuration) - playerAV->GetPermanentActorValue(RE::ActorValue::kConjuration));
args3[10].SetNumber(playerAV->GetActorValue(RE::ActorValue::kRestoration) - playerAV->GetBaseActorValue(RE::ActorValue::kRestoration)); args3[10].SetNumber(playerAV->GetActorValue(RE::ActorValue::kRestoration) - playerAV->GetPermanentActorValue(RE::ActorValue::kRestoration));
args3[11].SetNumber(playerAV->GetActorValue(RE::ActorValue::kTwoHanded) - playerAV->GetBaseActorValue(RE::ActorValue::kTwoHanded)); args3[11].SetNumber(playerAV->GetActorValue(RE::ActorValue::kTwoHanded) - playerAV->GetPermanentActorValue(RE::ActorValue::kTwoHanded));
args3[12].SetNumber(playerAV->GetActorValue(RE::ActorValue::kLightArmor) - playerAV->GetBaseActorValue(RE::ActorValue::kLightArmor)); args3[12].SetNumber(playerAV->GetActorValue(RE::ActorValue::kLightArmor) - playerAV->GetPermanentActorValue(RE::ActorValue::kLightArmor));
args3[13].SetNumber(playerAV->GetActorValue(RE::ActorValue::kHeavyArmor) - playerAV->GetBaseActorValue(RE::ActorValue::kHeavyArmor)); args3[13].SetNumber(playerAV->GetActorValue(RE::ActorValue::kHeavyArmor) - playerAV->GetPermanentActorValue(RE::ActorValue::kHeavyArmor));
args3[14].SetNumber(playerAV->GetActorValue(RE::ActorValue::kSneak) - playerAV->GetBaseActorValue(RE::ActorValue::kSneak)); args3[14].SetNumber(playerAV->GetActorValue(RE::ActorValue::kSneak) - playerAV->GetPermanentActorValue(RE::ActorValue::kSneak));
args3[15].SetNumber(playerAV->GetActorValue(RE::ActorValue::kAlchemy) - playerAV->GetBaseActorValue(RE::ActorValue::kAlchemy)); args3[15].SetNumber(playerAV->GetActorValue(RE::ActorValue::kAlchemy) - playerAV->GetPermanentActorValue(RE::ActorValue::kAlchemy));
args3[16].SetNumber(playerAV->GetActorValue(RE::ActorValue::kPickpocket) - playerAV->GetBaseActorValue(RE::ActorValue::kPickpocket)); args3[16].SetNumber(playerAV->GetActorValue(RE::ActorValue::kPickpocket) - playerAV->GetPermanentActorValue(RE::ActorValue::kPickpocket));
args3[17].SetNumber(playerAV->GetActorValue(RE::ActorValue::kLockpicking) - playerAV->GetBaseActorValue(RE::ActorValue::kLockpicking)); args3[17].SetNumber(playerAV->GetActorValue(RE::ActorValue::kLockpicking) - playerAV->GetPermanentActorValue(RE::ActorValue::kLockpicking));
args3[18].SetNumber(playerAV->GetActorValue(RE::ActorValue::kEnchanting) - playerAV->GetBaseActorValue(RE::ActorValue::kEnchanting)); args3[18].SetNumber(playerAV->GetActorValue(RE::ActorValue::kEnchanting) - playerAV->GetPermanentActorValue(RE::ActorValue::kEnchanting));
args3[19].SetNumber(playerAV->GetActorValue(RE::ActorValue::kSmithing) - playerAV->GetBaseActorValue(RE::ActorValue::kSmithing)); args3[19].SetNumber(playerAV->GetActorValue(RE::ActorValue::kSmithing) - playerAV->GetPermanentActorValue(RE::ActorValue::kSmithing));
args3[20].SetNumber(playerAV->GetActorValue(RE::ActorValue::kSpeech) - playerAV->GetBaseActorValue(RE::ActorValue::kSpeech)); args3[20].SetNumber(playerAV->GetActorValue(RE::ActorValue::kSpeech) - playerAV->GetPermanentActorValue(RE::ActorValue::kSpeech));
uiMovie->Invoke("heromenu_mc.SetModifier", nullptr, args3, 21); uiMovie->Invoke("heromenu_mc.SetModifier", nullptr, args3, 21);
} }

View File

@ -107,7 +107,7 @@ inline void CheckScriptVersions()
std::map<std::string, short> scripts; std::map<std::string, short> scripts;
scripts["EnderalFunctions"] = 1; scripts["EnderalFunctions"] = 1;
scripts["_00E_PlayerFunctions"] = 2; scripts["_00E_PlayerFunctions"] = 1;
scripts["_00E_PlayerSetUpScript"] = 1; scripts["_00E_PlayerSetUpScript"] = 1;
scripts["_00E_EngineBugfixAlias"] = 1; scripts["_00E_EngineBugfixAlias"] = 1;
scripts["_00E_Phasmalist_NewApparitionAlias"] = 1; scripts["_00E_Phasmalist_NewApparitionAlias"] = 1;
@ -177,9 +177,6 @@ inline void CheckScriptVersions()
scripts["_00e_nq06_functions"] = 1; scripts["_00e_nq06_functions"] = 1;
scripts["_00e_mq18a_functions"] = 1; scripts["_00e_mq18a_functions"] = 1;
scripts["_00e_mq05prologue_functions"] = 1; scripts["_00e_mq05prologue_functions"] = 1;
scripts["_00E_A2_EldritchBloodSC"] = 1;
scripts["_00E_A2_EldritchBloodPlayerSC"] = 1;
scripts["_00E_A2_EldritchBloodPlayerMarkSC"] = 1;
for (const auto& entry : scripts) { for (const auto& entry : scripts) {
RE::BSTSmartPointer<ScriptVersionCallback>{ RE::BSTSmartPointer<ScriptVersionCallback>{

View File

@ -2,6 +2,19 @@
"default-registry": { "default-registry": {
"kind": "git", "kind": "git",
"repository": "https://github.com/microsoft/vcpkg.git", "repository": "https://github.com/microsoft/vcpkg.git",
"baseline": "cacf5994341f27e9a14a7b8724b0634b138ecb30" "baseline": "08c4e71048eb54733d9b180a28b9b1d7ce637454"
} },
"registries": [
{
"kind": "git",
"repository": "https://gitlab.com/colorglass/vcpkg-colorglass",
"baseline": "6309841a1ce770409708a67a9ba5c26c537d2937",
"packages": [
"commonlibsse-ng",
"gluino",
"script-extender-common",
"skse"
]
}
]
} }

View File

@ -10,11 +10,8 @@
"plugin": { "plugin": {
"description": "Enderal SE functions and potion replacer.", "description": "Enderal SE functions and potion replacer.",
"dependencies": [ "dependencies": [
"simpleini", "commonlibsse-ng",
"spdlog", "simpleini"
"directxtk",
"rapidcsv",
"xbyak"
] ]
} }
}, },

View File

@ -11,7 +11,7 @@ float function _GetVersionFull() global
; C - backward-compatible update ; C - backward-compatible update
; D - hotfix ; D - hotfix
; E - build ; E - build
return 2120.0 return 2100.0
endfunction endfunction
int function GetVersion() global int function GetVersion() global

View File

@ -1,10 +1,8 @@
Scriptname _00E_A2_EldritchBloodPlayerMarkSC extends ReferenceAlias Scriptname _00E_A2_EldritchBloodPlayerMarkSC extends ReferenceAlias
Import Utility Import Utility
int function _GetScriptVersion() Global
return 1
endFunction
;===================================================================================== ;=====================================================================================
; EVENTS ; EVENTS
@ -12,75 +10,70 @@ endFunction
Auto State Marking Auto State Marking
Event OnControlUp(string control, float HoldTime) Event OnCrosshairRefChange(ObjectReference ref)
Actor rTarget = Game.GetCurrentCrosshairRef() as Actor if lastTarget != None
lastTarget.blockActivation(false)
EndIf
lastTarget = ref
ref.blockActivation(true)
if ! rTarget || rTarget == Game.GetForm(0x14) If _00E_A2_EldritchBloodGlobal.GetValueInt() == 1
return If Ref.GetSelfAsActor() && Ref != Game.GetPlayer()
endif EldritchBloodEffectScript.SelectEnemy(Ref as Actor)
If _00E_A2_EldritchBloodGlobal.GetValueInt() == 1
EldritchBloodEffectScript.SelectEnemy(rTarget)
EndIf EndIf
Else
UnregisterForCrosshairRef()
EndIf
EndEvent EndEvent
Event OnCrosshairRefChange(ObjectReference ref) Event OnAnimationEvent(ObjectReference akSource, string asEventName)
if lastTarget != None if(akSource == akSelfRef && asEventName == "weaponSwing")
lastTarget.blockActivation(false) if iAttackCounter == 0
EndIf iAttackCounter = 1
lastTarget = ref Else
if ref
ref.blockActivation(true)
endif
EndEvent
Event OnAnimationEvent(ObjectReference akSource, string asEventName)
if(akSource == akSelfRef && asEventName == "weaponSwing")
if iAttackCounter == 0
iAttackCounter = 1
Else
; Debug.Notification(sMarkingModeInterrupted)
_00E_MarkingTalents_sMarkingModeInterrupted.Show()
EldritchBloodEffectScript.abort()
UnregisterForAnimationEvent(akSelfRef, "weaponSwing")
EndIf
EndIf
EndEvent
Event OnObjectEquipped(Form equippedObject, ObjectReference reference)
if ! equippedObject as Shout
; Debug.Notification(sMarkingModeInterrupted) ; Debug.Notification(sMarkingModeInterrupted)
_00E_MarkingTalents_sMarkingModeInterrupted.Show() _00E_MarkingTalents_sMarkingModeInterrupted.Show()
EldritchBloodEffectScript.abort() EldritchBloodEffectScript.abort()
UnregisterForAnimationEvent(akSelfRef, "weaponSwing")
EndIf EndIf
EndIf
EndEvent EndEvent
Event OnSpellCast(Form akSpell) Event OnObjectEquipped(Form equippedObject, ObjectReference reference)
if akSpell != _00E_A2_EldritchBloodSP Shout equippedShout = equippedObject as Shout
; Debug.Notification(sMarkingModeInterrupted)
_00E_MarkingTalents_sMarkingModeInterrupted.Show()
EldritchBloodEffectScript.abort()
EndIf
EndEvent
Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)
if(!equippedShout)
; Debug.Notification(sMarkingModeInterrupted) ; Debug.Notification(sMarkingModeInterrupted)
_00E_MarkingTalents_sMarkingModeInterrupted.Show() _00E_MarkingTalents_sMarkingModeInterrupted.Show()
EldritchBloodEffectScript.abort() EldritchBloodEffectScript.abort()
EndIf
EndEvent EndEvent
Event OnSpellCast(Form akSpell)
Shout equippedShout = akSpell as Shout
if akSpell != _00E_A2_EldritchBloodSP
; Debug.Notification(sMarkingModeInterrupted)
_00E_MarkingTalents_sMarkingModeInterrupted.Show()
EldritchBloodEffectScript.abort()
EndIf
EndEvent
Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing)
; Debug.Notification(sMarkingModeInterrupted)
_00E_MarkingTalents_sMarkingModeInterrupted.Show()
EldritchBloodEffectScript.abort()
EndEvent
EndState EndState
@ -93,32 +86,27 @@ Function EnterMarkingMode(Float iReach, _00E_A2_EldritchBloodPlayerSC _00E_A2_El
akSelfRef = Self.GetActorReference() akSelfRef = Self.GetActorReference()
RegisterForAnimationEvent(akSelfRef, "weaponSwing") RegisterForAnimationEvent(akSelfRef, "weaponSwing")
Game.DisablePlayerControls(false, false, false, false, false, false, false, false)
fActivatePickLengthBefore = GetINIFloat("fActivatePickLength:Interface") fActivatePickLengthBefore = GetINIFloat("fActivatePickLength:Interface")
SetINIFloat("fActivatePickLength:Interface", iReach) SetINIFloat("fActivatePickLength:Interface", iReach)
EldritchBloodEffectScript = _00E_A2_EldritchBloodMEScript EldritchBloodEffectScript = _00E_A2_EldritchBloodMEScript
RegisterForCrosshairRef() RegisterForCrosshairRef()
RegisterForControl("Activate")
EndFunction EndFunction
Function ExitMarkingMode() Function ExitMarkingMode()
iAttackCounter = 0
UnregisterForAllControls()
UnregisterForCrosshairRef()
UnregisterForAnimationEvent(akSelfRef, "weaponSwing")
; Restore activation reach
if fActivatePickLengthBefore <= 0
fActivatePickLengthBefore = 150.0
endif
SetINIFloat("fActivatePickLength:Interface", fActivatePickLengthBefore)
if lastTarget != None if lastTarget != None
lastTarget.blockActivation(false) lastTarget.blockActivation(false)
EndIf EndIf
lastTarget = None lastTarget = None
iAttackCounter = 0
UnregisterForAnimationEvent(akSelfRef, "weaponSwing")
Game.EnablePlayerControls()
UnregisterForCrosshairRef()
SetINIFloat("fActivatePickLength:Interface", 150)
EndFunction EndFunction
;===================================================================================== ;=====================================================================================

View File

@ -3,10 +3,6 @@ Scriptname _00E_A2_EldritchBloodPlayerSC extends activemagiceffect
Import _00E_TalentLibrary Import _00E_TalentLibrary
Import Utility Import Utility
int function _GetScriptVersion() Global
return 1
endFunction
;===================================================================================== ;=====================================================================================
; EVENTS & STATES ; EVENTS & STATES
;===================================================================================== ;=====================================================================================
@ -55,79 +51,69 @@ EndFunction
State MarkTargets State MarkTargets
Event OnBeginState() Event OnBeginState()
If _00E_SelectionTutorialShown.GetValueInt() == 0 && _00E_DisableSkillTutorials.GetValueInt() == 0 If _00E_SelectionTutorialShown.GetValueInt() == 0 && _00E_DisableSkillTutorials.GetValueInt() == 0
_00E_Tutorial_SelectionMode.Show() _00E_Tutorial_SelectionMode.Show()
_00E_SelectionTutorialShown.SetValueInt(1) _00E_SelectionTutorialShown.SetValueInt(1)
EndIf EndIf
If _00E_A2_EldritchBloodInDepthTutorial.GetValueInt() == 0 && _00E_DisableSkillTutorials.GetValueInt() == 0 If _00E_A2_EldritchBloodInDepthTutorial.GetValueInt() == 0 && _00E_DisableSkillTutorials.GetValueInt() == 0
_00E_A2_Tutorial_EldritchBloodDetailed.Show() _00E_A2_Tutorial_EldritchBloodDetailed.Show()
_00E_A2_EldritchBloodInDepthTutorial.SetValueInt(1) _00E_A2_EldritchBloodInDepthTutorial.SetValueInt(1)
EndIf EndIf
If _00E_DisableSkillTutorials.GetValueInt() == 0 If _00E_DisableSkillTutorials.GetValueInt() == 0
_00E_A2_Tutorial_EldritchBlood.ShowAsHelpMessage("EldritchBlood", 8, 8, 1) _00E_A2_Tutorial_EldritchBlood.ShowAsHelpMessage("EldritchBlood", 8, 8, 1)
EndIf EndIf
_00E_A2_EldritchBloodGlobal.SetValueInt(1) _00E_A2_EldritchBloodGlobal.SetValueInt(1)
(PlayerREF as _00E_Game_TalentControlSC).SetTalentRecoveryTime(_00E_A2_EldritchBlood, 0) (PlayerREF as _00E_Game_TalentControlSC).SetTalentRecoveryTime(_00E_A2_EldritchBlood, 0)
A2_EldritchBlood_Player.ForceRefTo(PlayerREF) A2_EldritchBlood_Player.ForceRefTo(PlayerREF)
A2_EldritchBlood_PlayerForScript = A2_EldritchBlood_Player as _00E_A2_EldritchBloodPlayerMarkSC A2_EldritchBlood_PlayerForScript = A2_EldritchBlood_Player as _00E_A2_EldritchBloodPlayerMarkSC
PlayerREF.AddSpell(_00E_A2_EldritchBloodAbSelectionSP, False) PlayerREF.AddSpell(_00E_A2_EldritchBloodAbSelectionSP, False)
_00E_A2_EldritchBloodSelectionIntroIMOD.Apply() _00E_A2_EldritchBloodSelectionIntroIMOD.Apply()
MarkingLP = _00E_A2_GhostwalkMarkingLPM.Play(playerREF) MarkingLP = _00E_A2_GhostwalkMarkingLPM.Play(playerREF)
MAGConjurePortal.Play(PlayerREF) MAGConjurePortal.Play(PlayerREF)
A2_EldritchBlood_PlayerForScript.EnterMarkingMode(1800, Self as _00E_A2_EldritchBloodPlayerSC) A2_EldritchBlood_PlayerForScript.EnterMarkingMode(1800, Self as _00E_A2_EldritchBloodPlayerSC)
Wait(0.5) Wait(0.5)
_00E_A2_EldritchBloodSelectionHoldIMOD.ApplyCrossFade(1.5) _00E_A2_EldritchBloodSelectionHoldIMOD.ApplyCrossFade(1.5)
EndEvent EndEvent
EndState EndState
State AddEffect State AddEffect
Event OnBeginState() Event OnBeginState()
A2_EldritchBlood_Victim.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP) A2_EldritchBlood_Victim.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP)
A2_EldritchBlood_VictimTarget.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
PlayerREF.RemoveSpell(_00E_A2_EldritchBloodAbSelectionSP)
A2_EldritchBlood_PlayerForScript.ExitMarkingMode()
_00E_A2_EldritchBloodSelectionHoldIMOD.Remove()
Sound.StopInstance(MarkingLP)
QSTDA16SoulGemOffM.Play(PlayerREF)
A2_EldritchBlood_Player.Clear()
A2_EldritchBlood_Rune.GetReference().Delete()
A2_EldritchBlood_VictimRune.GetReference().Delete()
A2_EldritchBlood_Rune.Clear()
A2_EldritchBlood_VictimRune.Clear()
if A2_EldritchBlood_VictimTarget.GetActorReference() If MarkingRuneREF
A2_EldritchBlood_VictimTarget.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP) MarkingRuneREF.Delete()
endif EndIf
PlayerREF.RemoveSpell(_00E_A2_EldritchBloodAbSelectionSP) If MarkingVictimRuneREF
A2_EldritchBlood_PlayerForScript.ExitMarkingMode() MarkingVictimRuneREF.Delete()
_00E_A2_EldritchBloodSelectionHoldIMOD.Remove() EndIf
QSTDA16SoulGemOffM.Play(PlayerREF)
A2_EldritchBlood_Player.Clear()
if A2_EldritchBlood_Rune.GetReference()
A2_EldritchBlood_Rune.GetReference().Delete()
endif
if A2_EldritchBlood_VictimRune.GetReference() AddFrenzySpell()
A2_EldritchBlood_VictimRune.GetReference().Delete()
endif
A2_EldritchBlood_Rune.Clear() _00E_A2_EldritchBloodGlobal.SetValueInt(0)
A2_EldritchBlood_VictimRune.Clear()
If MarkingRuneREF EndEvent
MarkingRuneREF.Delete()
EndIf
If MarkingVictimRuneREF
MarkingVictimRuneREF.Delete()
EndIf
AddFrenzySpell()
_00E_A2_EldritchBloodGlobal.SetValueInt(0)
Sound.StopInstance(MarkingLP)
EndEvent
EndState EndState
@ -139,54 +125,38 @@ Function AddFrenzySpell()
float iExpDamage = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(iIndex - 1) float iExpDamage = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(iIndex - 1)
_00E_A2_EldritchBloodEnchantment.SetNthEffectMagnitude(0, iExpDamage) _00E_A2_EldritchBloodEnchantment.SetNthEffectMagnitude(0, iExpDamage)
_00E_A2_EldritchBloodMarkedVictimFXS.Stop(A2_EldritchBlood_VictimTarget.GetActorReference())
if A2_EldritchBlood_VictimTarget.GetActorReference()
_00E_A2_EldritchBloodMarkedVictimFXS.Stop(A2_EldritchBlood_VictimTarget.GetActorReference())
endif
float iFrenzyDMGMult = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(iIndex + 2) float iFrenzyDMGMult = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(iIndex + 2)
Int iFrenzyDuration = _00E_A2_EldritchBloodSP.GetNthEffectDuration(iIndex + 2) as Int Int iFrenzyDuration = _00E_A2_EldritchBloodSP.GetNthEffectDuration(iIndex + 2) as Int
_00E_A2_EldritchBloodVictimSP.SetNthEffectMagnitude(0, iFrenzyDMGMult) _00E_A2_EldritchBloodVictimSP.SetNthEffectMagnitude(0, iFrenzyDMGMult)
_00E_A2_EldritchBloodVictimSP.SetNthEffectDuration(0, iFrenzyDuration) _00E_A2_EldritchBloodVictimSP.SetNthEffectDuration(0, iFrenzyDuration)
if A2_EldritchBlood_Victim.GetReference() _00E_A2_EldritchBloodVictimSP.Cast(A2_EldritchBlood_Victim.GetReference(), A2_EldritchBlood_Victim.GetReference())
_00E_A2_EldritchBloodVictimSP.Cast(A2_EldritchBlood_Victim.GetReference(), A2_EldritchBlood_Victim.GetReference())
endif If iFrezyAttackTargetMarked
A2_EldritchBlood_Victim.GetActorReference().StartCombat(A2_EldritchBlood_VictimTarget.GetActorReference())
Else
A2_EldritchBlood_Victim.GetActorReference().StartCombat(PlayerREF.GetCombatTarget())
EndIf
EndFunction EndFunction
Function NotMarkedClearUp() Function NotMarkedClearUp()
if A2_EldritchBlood_Victim.GetActorReference() A2_EldritchBlood_Victim.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP)
A2_EldritchBlood_Victim.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP) A2_EldritchBlood_VictimTarget.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
endif
if A2_EldritchBlood_VictimTarget.GetActorReference()
A2_EldritchBlood_VictimTarget.GetActorReference().RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
_00E_A2_EldritchBloodMarkedVictimFXS.Stop(A2_EldritchBlood_VictimTarget.GetActorReference())
endif
(PlayerREF as _00E_Game_TalentControlSC).SetTalentRecoveryTime(_00E_A2_EldritchBlood, 0) (PlayerREF as _00E_Game_TalentControlSC).SetTalentRecoveryTime(_00E_A2_EldritchBlood, 0)
MAGFail.Play(PlayerREF) MAGFail.Play(PlayerREF)
PlayerREF.RemoveSpell(_00E_A2_EldritchBloodAbSelectionSP) PlayerREF.RemoveSpell(_00E_A2_EldritchBloodAbSelectionSP)
A2_EldritchBlood_PlayerForScript.ExitMarkingMode()
if A2_EldritchBlood_PlayerForScript
A2_EldritchBlood_PlayerForScript.ExitMarkingMode()
endif
_00E_A2_EldritchBloodSelectionHoldIMOD.Remove() _00E_A2_EldritchBloodSelectionHoldIMOD.Remove()
Sound.StopInstance(MarkingLP)
QSTDA16SoulGemOffM.Play(PlayerREF) QSTDA16SoulGemOffM.Play(PlayerREF)
A2_EldritchBlood_Player.Clear() A2_EldritchBlood_Player.Clear()
A2_EldritchBlood_Rune.GetReference().Delete()
if A2_EldritchBlood_Rune.GetReference() A2_EldritchBlood_VictimRune.GetReference().Delete()
A2_EldritchBlood_Rune.GetReference().Delete() _00E_A2_EldritchBloodMarkedVictimFXS.Stop(A2_EldritchBlood_VictimTarget.GetActorReference())
endif
if A2_EldritchBlood_VictimRune.GetReference()
A2_EldritchBlood_VictimRune.GetReference().Delete()
endif
A2_EldritchBlood_Rune.Clear() A2_EldritchBlood_Rune.Clear()
A2_EldritchBlood_VictimRune.Clear() A2_EldritchBlood_VictimRune.Clear()
A2_EldritchBlood_VictimTarget.Clear() A2_EldritchBlood_VictimTarget.Clear()
@ -200,38 +170,31 @@ Function NotMarkedClearUp()
MarkingVictimRuneREF.Delete() MarkingVictimRuneREF.Delete()
EndIf EndIf
if ! PlayerREF.IsDead() Wait(2)
Wait(2.0)
endif
_00E_A2_EldritchBloodGlobal.SetValueInt(0) _00E_A2_EldritchBloodGlobal.SetValueInt(0)
if MarkingLP
Sound.StopInstance(MarkingLP)
endif
EndFunction EndFunction
Function SelectEnemy(Actor iVictim) Function SelectEnemy(Actor iVictim)
If ! IsTargetValid(iVictim) If IsTargetValid(iVictim)
return If !IsTargetMarked(iVictim)
EndIf If !iFrenzyTargetMarked
MarkFrenzyVictim(iVictim)
If !IsTargetMarked(iVictim) iFrenzyTargetMarked = True
If !iFrenzyTargetMarked Elseif !iFrezyAttackTargetMarked
MarkFrenzyVictim(iVictim) MarkFrenzyTargetVictim(iVictim)
iFrenzyTargetMarked = True iFrezyAttackTargetMarked = True
Elseif !iFrezyAttackTargetMarked Else
MarkFrenzyTargetVictim(iVictim) _00E_Levelsystem_sEnemyAlreadyMarked.Show()
iFrezyAttackTargetMarked = True MAGFail.Play(PlayerREF)
EndIf
Else
UnmarkEnemy(iVictim)
EndIf
Else Else
_00E_Levelsystem_sEnemyAlreadyMarked.Show() Return
MAGFail.Play(PlayerREF)
EndIf EndIf
Else
UnmarkEnemy(iVictim)
EndIf
EndFunction EndFunction
@ -261,33 +224,35 @@ EndFunction
Function UnmarkEnemy(Actor iVictim) Function UnmarkEnemy(Actor iVictim)
bool Cleared
If iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimSP) If iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimSP)
A2_EldritchBlood_Rune.Clear() A2_EldritchBlood_Rune.Clear()
A2_EldritchBlood_Victim.Clear() A2_EldritchBlood_Victim.Clear()
MarkingRuneREF.Disable()
iFrenzyTargetMarked = False iFrenzyTargetMarked = False
_00E_Levelsystem_sEldritchBloodVictimMarkingRemoved.Show() _00E_Levelsystem_sEldritchBloodVictimMarkingRemoved.Show()
iVictim.RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP) iVictim.RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimSP)
_00E_A2_EldritchBloodMarkedFXS.Stop(iVictim) _00E_A2_EldritchBloodMarkedFXS.Stop(iVictim)
_00E_A2_GhostwalkDeselectM.Play(PlayerREF) _00E_A2_GhostwalkDeselectM.Play(PlayerREF)
MarkingRuneREF.Delete() Cleared = True
MarkingRuneREF = None
Elseif iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP) Elseif iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
A2_EldritchBlood_VictimRune.Clear() A2_EldritchBlood_VictimRune.Clear()
A2_EldritchBlood_VictimTarget.Clear() A2_EldritchBlood_VictimTarget.Clear()
MarkingVictimRuneREF.Disable()
iFrezyAttackTargetMarked = False iFrezyAttackTargetMarked = False
_00E_Levelsystem_sEldritchBloodAttackVictimMarkingRemoved.Show() _00E_Levelsystem_sEldritchBloodAttackVictimMarkingRemoved.Show()
iVictim.RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP) iVictim.RemoveSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
_00E_A2_EldritchBloodMarkedVictimFXS.Stop(iVictim) _00E_A2_EldritchBloodMarkedVictimFXS.Stop(iVictim)
_00E_A2_GhostwalkDeselectM.Play(PlayerREF) _00E_A2_GhostwalkDeselectM.Play(PlayerREF)
MarkingVictimRuneREF.Delete() Cleared = True
MarkingVictimRuneREF = None
EndIf EndIf
EndFunction EndFunction
bool Function IsTargetValid(Actor CheckVictim) bool Function IsTargetValid(Actor CheckVictim)
If CheckVictim.IsInFaction(PlayerAlliesFaction) || CheckVictim.IsCommandedActor() || CheckVictim.IsPlayerTeammate() If CheckVictim.IsInFaction(PlayerAlliesFaction)
Return False Return False
ElseIf CheckVictim.HasKeyword(MagicNoEldritchBlood) ElseIf CheckVictim.HasKeyword(MagicNoEldritchBlood)
_00E_Levelsystem_sAbilityEnemyLevelTooHigh.Show() _00E_Levelsystem_sAbilityEnemyLevelTooHigh.Show()
@ -307,13 +272,21 @@ bool Function EnemyLevelTooHigh(Actor LevelVictim)
Float iAllowedDif = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(6) Float iAllowedDif = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(6)
return (LevelVictim.GetLevel() > (PlayerLevel.GetValueInt() + iAllowedDif as Int)) If (LevelVictim.GetLevel() > (PlayerLevel.GetValueInt() + iAllowedDif as Int))
Return True
Else
Return False
EndIf
EndFunction EndFunction
bool Function IsTargetMarked(Actor iVictim) bool Function IsTargetMarked(Actor iVictim)
return iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimSP) || iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP) If iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimSP) || iVictim.HasSpell(_00E_A2_EldritchBloodAbMarkedVictimTargetSP)
Return True
Else
Return False
EndIf
EndFunction EndFunction

View File

@ -3,10 +3,6 @@ Scriptname _00E_A2_EldritchBloodSC extends activemagiceffect
Import _00E_TalentLibrary Import _00E_TalentLibrary
Import Utility Import Utility
int function _GetScriptVersion() Global
return 1
endFunction
;===================================================================================== ;=====================================================================================
; EVENTS ; EVENTS
;===================================================================================== ;=====================================================================================
@ -24,7 +20,7 @@ EndEvent
Event OnEffectStart(Actor akTarget, Actor akCaster) Event OnEffectStart(Actor akTarget, Actor akCaster)
Actor PlayerRef = Game.GetForm(0x14) as Actor Actor PlayerRef = Game.GetPlayer()
TalentLevel = GetPlayerTalentLevel(_00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood, _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood2, _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood3) TalentLevel = GetPlayerTalentLevel(_00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood, _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood2, _00E_Class_LifeAndDeath_P09b_Talent_EldritchBlood3)
Game.ShowFirstPersonGeometry() Game.ShowFirstPersonGeometry()
@ -33,6 +29,10 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
_00E_A2_EldritchBloodParticelAttachVFX.Play(Victim) _00E_A2_EldritchBloodParticelAttachVFX.Play(Victim)
If Victim.GetCombatTarget() == PlayerRef
Victim.StopCombat()
EndIf
; Strip Victim off all its factions ; Strip Victim off all its factions
VictimFactions = Victim.GetFactions(-128, 127) VictimFactions = Victim.GetFactions(-128, 127)
VictimFactionRanks = CreateIntArray(VictimFactions.Length) VictimFactionRanks = CreateIntArray(VictimFactions.Length)
@ -55,25 +55,16 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
Victim.SetActorValue("Confidence", 4) Victim.SetActorValue("Confidence", 4)
Victim.SetActorValue("Aggression", 2) Victim.SetActorValue("Aggression", 2)
AdjustDamageMult(Victim) Victim.EvaluatePackage()
AdjustAndAddFrenzyPerk()
Victim.StopCombat()
If A2_EldritchBlood_VictimTarget.GetActorReference()
A2_EldritchBlood_Victim.GetActorReference().StartCombat(A2_EldritchBlood_VictimTarget.GetActorReference())
ElseIf PlayerREF.GetCombatTarget()
A2_EldritchBlood_Victim.GetActorReference().StartCombat(PlayerREF.GetCombatTarget())
EndIf
EndEvent EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster) Event OnEffectFinish(Actor akTarget, Actor akCaster)
Victim.SetActorValue("attackdamagemult", fInitialAttackDamageMult)
Victim.SetActorValue("destructionpowermod", fInitialDestructionPowerMod)
_00E_A2_EldritchBloodMarkedFXS.Stop(Victim) _00E_A2_EldritchBloodMarkedFXS.Stop(Victim)
Victim.RemovePerk(iPerk)
A2_EldritchBlood_Victim.Clear() A2_EldritchBlood_Victim.Clear()
A2_EldritchBlood_VictimTarget.Clear() A2_EldritchBlood_VictimTarget.Clear()
_00E_A2_EldritchBloodParticelAttachVFX.Stop(Victim) _00E_A2_EldritchBloodParticelAttachVFX.Stop(Victim)
@ -94,7 +85,6 @@ Event OnEffectFinish(Actor akTarget, Actor akCaster)
EndWhile EndWhile
Victim.EvaluatePackage() Victim.EvaluatePackage()
EndEvent EndEvent
Event OnDying(Actor akKiller) Event OnDying(Actor akKiller)
@ -108,20 +98,33 @@ EndEvent
; FUNCTIONS ; FUNCTIONS
;===================================================================================== ;=====================================================================================
Function AdjustDamageMult(Actor Victim) Function AdjustAndAddFrenzyPerk()
float iDamageMultiplicator = GetMagnitude() float iDamageMultiplicator = _00E_A2_EldritchBloodSP.GetNthEffectMagnitude(TalentLevel + 2)
fInitialAttackDamageMult = Victim.GetActorValue("attackdamagemult") If TalentLevel == 1
fInitialDestructionPowerMod = Victim.GetActorValue("destructionpowermod") iPerk = _00E_A2_EldritchBloodPerk01
Elseif TalentLevel == 2
iPerk = _00E_A2_EldritchBloodPerk02
Elseif TalentLevel == 3
iPerk == _00E_A2_EldritchBloodPerk03
EndIf
Victim.SetActorValue("attackdamagemult", fInitialAttackDamageMult * iDamageMultiplicator) iPerk.SetNthEntryValue(1, 1, iDamageMultiplicator)
Victim.SetActorValue("destructionpowermod", fInitialDestructionPowerMod + (100 * iDamageMultiplicator)) iPerk.SetNthEntryValue(2, 1, iDamageMultiplicator)
EndFunction EndFunction
Function Explode() Function Explode()
If TalentLevel == 1
iPerk = _00E_A2_EldritchBloodPerk01
Elseif TalentLevel == 2
iPerk = _00E_A2_EldritchBloodPerk02
Elseif TalentLevel == 3
iPerk == _00E_A2_EldritchBloodPerk03
EndIf
Victim.SetCriticalStage(Victim.CritStage_DisintegrateStart) Victim.SetCriticalStage(Victim.CritStage_DisintegrateStart)
If bSynergySkyfallExplosion If bSynergySkyfallExplosion
@ -171,12 +174,12 @@ Function Explode()
EndIf EndIf
ObjectReference VictimREF = Victim as ObjectReference ObjectReference VictimREF = Victim as ObjectReference
(VictimREF as _00E_EPOnDeath).HasBlameSpell = true (VictimREF as _00E_EPOnDeath).HasBlameSpell = true
Victim.SetAlpha(0.0, true) Victim.SetAlpha(0.0, true)
Victim.Kill(Victim) Victim.Kill(Victim)
Victim.SetCriticalStage(Victim.CritStage_DisintegrateEnd) Victim.SetCriticalStage(Victim.CritStage_DisintegrateEnd)
EXPMarker.Delete() EXPMarker.Delete()
EndFunction EndFunction
@ -184,9 +187,6 @@ EndFunction
; PROPERTIES ; PROPERTIES
;===================================================================================== ;=====================================================================================
float fInitialAttackDamageMult
float fInitialDestructionPowerMod
Faction[] VictimFactions Faction[] VictimFactions
Int[] VictimFactionRanks Int[] VictimFactionRanks
FormList Property VoiceFactions Auto FormList Property VoiceFactions Auto

View File

@ -1,10 +1,5 @@
Scriptname _00E_FS_NQ03_CommentSkeletonScr extends ObjectReference Scriptname _00E_FS_NQ03_CommentSkeletonScr extends ObjectReference
event OnInit()
; Block loot menus
BlockActivation()
endevent
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
if Done == false if Done == false

View File

@ -1,16 +1,8 @@
Scriptname _00E_FS_NQR05_FatherDeathSC extends Actor Scriptname _00E_FS_NQR05_FatherDeathSC extends Actor
Event OnDying(Actor akKiller)
BlockActivation()
endEvent
Event OnDeath(Actor akKiller)
BlockActivation()
endEvent
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
if (akActionRef == Game.GetForm(0x14)) && IsDead() if akActionRef == Game.GetPlayer() && Self.IsDead()
_00E_MAGEldritchFireSSVar01M.Play(Game.GetPlayer()) _00E_MAGEldritchFireSSVar01M.Play(Game.GetPlayer())
_00E_FS_NQR05_FatherActivationBlock.Show() _00E_FS_NQR05_FatherActivationBlock.Show()

View File

@ -1,14 +1,5 @@
Scriptname _00E_NQ_G_06_ChestActivationEvent extends ObjectReference Scriptname _00E_NQ_G_06_ChestActivationEvent extends ObjectReference
event OnInit()
; Block loot menus
BlockActivation()
endevent
Event OnLoad()
BlockActivation()
endEvent
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
if akActionRef == PlayerREF && !bDone && _00E_NQ_G_SidedMael.GetValue() == 1 if akActionRef == PlayerREF && !bDone && _00E_NQ_G_SidedMael.GetValue() == 1

View File

@ -6,7 +6,7 @@ Float fDefaultHeadTrackTimerOldValue = 0.0
Float fStayHeadTrackTimerOldValue = 0.0 Float fStayHeadTrackTimerOldValue = 0.0
int function _GetScriptVersion() Global int function _GetScriptVersion() Global
return 2 return 1
endFunction endFunction
Event OnInit() Event OnInit()
@ -21,14 +21,6 @@ Event OnPlayerLoadGame()
if ControlRepository == None if ControlRepository == None
ControlRepository = Game.GetForm(0x493C2) as _00E_EnderalControls ControlRepository = Game.GetForm(0x493C2) as _00E_EnderalControls
endif endif
; Restore INI values changed by Entropic Blood
if Utility.GetINIFloat("fInAirFallingCharGravityMult:Havok") < 1.0
Utility.SetINIFloat("fInAirFallingCharGravityMult:Havok", 1.35)
endif
if Utility.GetINIFloat("fActivatePickLength:Interface") >= 1799.0
Utility.SetINIFloat("fActivatePickLength:Interface", 150.0)
endif
EndEvent EndEvent
_00E_SkillControl function GetSkillControl() Global _00E_SkillControl function GetSkillControl() Global

View File

@ -1,13 +1,5 @@
Scriptname _00E_SetStageOnOpen extends ObjectReference Scriptname _00E_SetStageOnOpen extends ObjectReference
Event OnInit()
BlockActivation()
EndEvent
Event OnLoad()
BlockActivation()
EndEvent
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
If (akActionRef == Game.GetPlayer()) && (doOnce == 0) If (akActionRef == Game.GetPlayer()) && (doOnce == 0)

View File

@ -12,8 +12,6 @@ EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster) Event OnEffectFinish(Actor akTarget, Actor akCaster)
_00E_PlayerFunctions.GetVisionControl().UpdateSpeed(akTarget) _00E_PlayerFunctions.GetVisionControl().UpdateSpeed(akTarget)
; Also restored on game load in _00E_PlayerFunctions
Utility.SetINIFloat("fInAirFallingCharGravityMult:Havok", 1.35) Utility.SetINIFloat("fInAirFallingCharGravityMult:Havok", 1.35)
EndEvent EndEvent

View File

@ -216,25 +216,24 @@ EndFunction
Function equipeItems() Function equipeItems()
Actor PlayerRef = Game.GetPlayer() Actor PlayerRef = Game.GetPlayer()
bool bSKSE = SKSE.GetVersion() as bool
if whatKindRight == 2 if whatKindRight == 2
PlayerRef.EquipSpell(EquippedItemRight as Spell, 1) PlayerRef.EquipSpell(EquippedItemRight as Spell, 1)
elseif EquippedItemRight && PlayerRef.GetItemCount(EquippedItemRight) > 0 elseif EquippedItemRight && PlayerRef.GetItemCount(EquippedItemRight) > 0
if bSKSE if SKSE.GetVersion()
PlayerRef.EquipItemEx(EquippedItemRight, 1) PlayerRef.EquipItemEx(EquippedItemRight, 1)
else else
PlayerRef.EquipItem(EquippedItemRight, false, true) PlayerRef.equipitem(EquippedItemRight, false, true)
endif endif
endif endif
if whatKindLeft == 2 if whatKindLeft == 2
PlayerRef.EquipSpell(EquippedItemLeft as Spell, 0) PlayerRef.EquipSpell(EquippedItemLeft as Spell, 0)
elseif EquippedItemLeft && PlayerRef.GetItemCount(EquippedItemLeft) > 0 elseif EquippedItemLeft && PlayerRef.GetItemCount(EquippedItemLeft) > 0
if bSKSE if SKSE.GetVersion()
PlayerRef.EquipItemEx(EquippedItemLeft, 2) PlayerRef.EquipItemEx(EquippedItemLeft, 2)
else else
PlayerRef.EquipItem(EquippedItemLeft, false, true) PlayerRef.equipitem(EquippedItemLeft, false, true)
endif endif
endif endif
@ -242,15 +241,10 @@ Function equipeItems()
while index > 0 while index > 0
index -= 1 index -= 1
If wornArmor[index] && PlayerRef.GetItemCount(wornArmor[index]) > 0 If wornArmor[index] && PlayerRef.GetItemCount(wornArmor[index]) > 0
if bSKSE ;removing and readding items fixes the issue that set bonuses wouldn't apply properly after re-transforming
; EquipItemEx triggers OnEquipped properly PlayerRef.RemoveItem(wornArmor[index], 1, true, _00E_TransformStorageREF)
PlayerRef.EquipItemEx(wornArmor[index], 0, false, false) _00E_TransformStorageREF.RemoveItem(wornArmor[index], 1, true, PlayerRef)
else PlayerRef.EquipItem(wornArmor[index],false,true)
;removing and readding items fixes the issue that set bonuses wouldn't apply properly after re-transforming
PlayerRef.RemoveItem(wornArmor[index], 1, true, _00E_TransformStorageREF)
_00E_TransformStorageREF.RemoveItem(wornArmor[index], 1, true, PlayerRef)
PlayerRef.EquipItem(wornArmor[index], false, true)
endif
EndIf EndIf
Endwhile Endwhile
endFunction endFunction

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.