I think it could be cool if this worked only for "Bladed" weapons like swords, or if it was more responsive for them perhaps, compared to "Blunt" weapons like axes and bludgeons. Except if you have a shield I guess. Thought, to motivate that inequality you'd almost have to do something else to buff Blunts or nerf Blades, perhaps in how they inflict stagger or something. IDK, I'm just thinking out loud here, how more subtle mechanics like this could present options to make weapon types more distinct from one another.
Could this also be made to go the other way: that attacking cancels blocking... like it was in original Oblivion (where the attacking-from-blocking animation was faster than the usual animation)? I've noticed not only does it take about half a second for the block animation to even activate, but continuously trying to attack while blocking just locks the block in place even without the button held down... as opposed to interrupting it.
(Tried my hand at improving the script myself, all approaches I tried failed miserably. The input function hook is the only workable method, failed in my attempts to improve stability too. meh.)
Thanks for the mod. I block a lot and it's nice to no longer have to wait for each swing to finish to block an attack. Two small things: 1) It makes shield bashing overpowered because you can spam it a lot faster now. Maybe shield bashes could be excluded? 2) A suggestion for an additional feature is to make it so that you can also cancel attacks to switch weapons. So many times, I've gotten the message that I can't switch weapons during combat, even when I should be able to. Thanks again.
ChatGPT didn't work on anything with that, I wrote that all by hand for one. For two, it did fix crashes, you most likely used the alpha of a new mod I'm creating, or you have other UE4SS mods causing crashing.
mattmartin609, does this basically mean that every UE4SS mod that checks playcontroller or its pawn is subject to this crash? Sounds like I have some debugging to do because I'm using a Hitstop mod and some animation mods.
What happened to the fix? I still have that fixed version installed and no crashes. I would get crashes not in combat but changing cells. I haven't had a consistent crash in a long while, but I have been working mod by mod.
@gerokishi Yes, any mod that accesses PlayerController or Pawn without proper validation can crash.
@sydney I'm glad you're using it and I apologize! I just felt the other attack cancelling mod had better features but even more problems (which I understand why Xor did it his way), and when I started fixing them I just went- why don't I just make an original mod thats better than all of this that's safe? Tbh UE4SS is the problem, but defensive programming is always good. And, I felt I could do even more error handling and just go insane with it. My current mod even the debug is wrapped in pcalls lol.
Anyway, rn its in a pre RC beta and does skill based dodge cancel with weapon specific timings and skill based fatigue drain, block cancel (same skill based etc etc) and slomo on cancel with both early and late cancels, perfect block with slomo with a bow rapid shot response, H2H "TysonMode" response, and weapon dmg boost response, kills have slomo, headshots with magic and bow that do dmg boost, slomo, and stagger, and directional jump cancels. Additionally, all of these work synergistically, so you can perfect block attack cancel into special response into this or anything! All nested pcalls, full error handling, vastly superior. One mod does it all.
Persistent but unpredictable CTD that happens whenever unsheathing a weapon. Seems to occur more when you enter a new cell and quickly try to unsheathe, but does happen outside as well. Not always when in combat.
Tested on new save without the mod and error goes away.
Frustratingly, It's possible to play for a few hours without the CTD but it does seem to be happening progressively more on my save.
Especially when fast travelling/transitioning into any area and unsheating within the first ~ 20 seconds after fade in has a high probability to crash my game. Any area - interior or exterior, any weapon type - regular or enchanted. Happened with this mod as well as the "fixed" version
Since I removed this, or rather the "fixed" version that is now deleted and integrated into this one - I have had zero crashes on load&unsheathe for about 5 hours platime where i had one every 30-60 minutes before.
So the crash is happening when playerController is nil.
Yours will mostly fix it when playerController doesn't exist. However, there's still potential stability issues.
What needs to be done is where playerController.Pawn exists but accessing it throws an error, pawn exists but pawn:IsValid() crashes, weaponActor:IsA() throws an error, or there's any other unexpected UE4SS weirdness.
I have a fix in testing rn, I wrapped all functions in error handlers so it's impossible to crash. Testing rn, if it works I'll upload as a patch that Xorberax can take. Unfortunately the other attack cancel has the same issues.
250 comments
I've noticed not only does it take about half a second for the block animation to even activate, but continuously trying to attack while blocking just locks the block in place even without the button held down... as opposed to interrupting it.
(Tried my hand at improving the script myself, all approaches I tried failed miserably. The input function hook is the only workable method, failed in my attempts to improve stability too. meh.)
Per OP's own comments, Xorberax can even use/upload to his page.
Sounds like I have some debugging to do because I'm using a Hitstop mod and some animation mods.
Just curious as to why the fix was taken down?
@sydney I'm glad you're using it and I apologize! I just felt the other attack cancelling mod had better features but even more problems (which I understand why Xor did it his way), and when I started fixing them I just went- why don't I just make an original mod thats better than all of this that's safe? Tbh UE4SS is the problem, but defensive programming is always good. And, I felt I could do even more error handling and just go insane with it. My current mod even the debug is wrapped in pcalls lol.
Anyway, rn its in a pre RC beta and does skill based dodge cancel with weapon specific timings and skill based fatigue drain, block cancel (same skill based etc etc) and slomo on cancel with both early and late cancels, perfect block with slomo with a bow rapid shot response, H2H "TysonMode" response, and weapon dmg boost response, kills have slomo, headshots with magic and bow that do dmg boost, slomo, and stagger, and directional jump cancels. Additionally, all of these work synergistically, so you can perfect block attack cancel into special response into this or anything! All nested pcalls, full error handling, vastly superior. One mod does it all.
Tested on new save without the mod and error goes away.
Frustratingly, It's possible to play for a few hours without the CTD but it does seem to be happening progressively more on my save.
'Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000002820967250cUE4SS!RC::Unreal::UObjectBase::GetInternalIndex() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\Unreal\src\UObject.cpp:57]UE4SS!`RC::LuaType::UObjectBase<RC::Unreal::UObject,RC::LuaType::UObjectName>::setup_member_functions<1>'::`2'::<lambda_17>::<lambda_invoker_cdecl>() [D:\a\RE-UE4SS\RE-UE4SS\UE4SS\include\LuaType\LuaUObject.hpp:717]UE4SS!RC::LuaMadeSimple::TRY<`RC::LuaMadeSimple::process_lua_function'::`2'::<lambda_1> >() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaMadeSimple\include\LuaMadeSimple\LuaMadeSimple.hpp:782]UE4SS!RC::LuaMadeSimple::process_lua_function() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaMadeSimple\src\LuaMadeSimple.cpp:1018]UE4SS!precallC() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaRaw\src\ldo.c:507]UE4SS!luaD_precall() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaRaw\src\ldo.c:570]UE4SS!luaV_execute() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaRaw\src\lvm.c:1636]UE4SS!ccall() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaRaw\src\ldo.c:612]UE4SS!luaD_rawrunprotected() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaRaw\src\ldo.c:147]UE4SS!luaD_pcall() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaRaw\src\ldo.c:927]UE4SS!lua_pcallk() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaRaw\src\lapi.c:1067]UE4SS!RC::LuaMadeSimple::Lua::call_function() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\LuaMadeSimple\src\LuaMadeSimple.cpp:847]UE4SS!RC::lua_unreal_script_function_hook_pre() [D:\a\RE-UE4SS\RE-UE4SS\UE4SS\src\Mod\LuaMod.cpp:214]UE4SS!std::_Func_impl_no_alloc<void (__cdecl*)(RC::Unreal::UnrealScriptFunctionCallableContext,void *),void,RC::Unreal::UnrealScriptFunctionCallableContext &,void *>::_Do_call() [C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\functional:909]UE4SS!RC::Unreal::UnrealScriptFunctionData::FirePreCallbacks() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\Unreal\src\UFunctionStructs.cpp:85]UE4SS!RC::Unreal::Internal::UnrealScriptFunctionHook() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\Unreal\src\UFunctionStructs.cpp:176]OblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingUE4SS!RC::Unreal::HookedProcessEvent() [D:\a\RE-UE4SS\RE-UE4SS\deps\first\Unreal\src\Hooks.cpp:472]OblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_ShippingOblivionRemastered_Win64_Shippingkernel32ntdll'
Especially when fast travelling/transitioning into any area and unsheating within the first ~
20 seconds after fade in has a high probability to crash my game.
Any area - interior or exterior, any weapon type - regular or enchanted.
Happened with this mod as well as the "fixed" version
Since I removed this, or rather the "fixed" version that is now deleted and
integrated into this one - I have had zero crashes on load&unsheathe
for about 5 hours platime where i had one every 30-60 minutes before.
Replace it at "...OblivionRemastered\Binaries\Win64\ue4ss\Mods\AttackCancelling\Scripts".
No crashes after whatever chatgpt did.
The difference is on this line:
(original) local pawn = playerController.Pawn
(chatgpt) local pawn = playerController and playerController.Pawn
I have no idea if this change makes any sense, but I think it is worth trying.
local pawn = playerController.Pawn
with:
local pawn = playerController and playerController.Pawn
correct?
Yours will mostly fix it when playerController doesn't exist. However, there's still potential stability issues.
What needs to be done is where playerController.Pawn exists but accessing it throws an error, pawn exists but pawn:IsValid() crashes, weaponActor:IsA() throws an error, or there's any other unexpected UE4SS weirdness.
I have a fix in testing rn, I wrapped all functions in error handlers so it's impossible to crash. Testing rn, if it works I'll upload as a patch that Xorberax can take. Unfortunately the other attack cancel has the same issues.
Doesn't matter if you don't play on high difficulty or with the rebalance mod, I guess, considering you can just face tank everything.
Lots of funny gameplay design decisions with this release.