Here's my fix for the auto-block for lance. I also play charge blade and i am lazy to point guard. However my auto-point guard works only if you are blocking otherwise you will need to manually set the zCBGuardCheck to true to get auto-point guard to work fully automatic (as long as you're facing the monster)
--Attack Enemy Check zHitInfo = sdk.to_managed_object(args[3]) zDamageData = zHitInfo:call("get_AttackData") zDmgOwnerType = zDamageData:call("get_OwnerType") if zDmgOwnerType == 1 then zDmgFromEnemy = true else zDmgFromEnemy = false end
if zLanceCheck and zDmgFromEnemy and sdk.to_managed_object(args[2]):call("isMasterPlayer") then zLanceGuardCheck = true else zLanceGuardCheck = false end
if zCBCheck and zDmgFromEnemy and sdk.to_managed_object(args[2]):call("isMasterPlayer") then zCBGuardCheck = false else zCBGuardCheck = false end
end, function(retval)
if zLanceGuardCheck then zQuest:call("set_IsGuardActionDuration", true) --auto guard zQuest:set_field("_EquipSkill_036_Timer", 15.0) -- offensive guard check else --zQuest:call("set_IsGuardActionDuration", false) zQuest:set_field("_EquipSkill_036_Timer", 15.0) -- offensive guard check end
if sdk.to_managed_object(args[2]):call("isMasterPlayer") then zLance = sdk.to_managed_object(args[2]) if (zLance:get_field("_ExGuardType") == 0) then -- if normal guard zQuest:call("set_IsGuardActionDuration", true) zQuest:set_field("_EquipSkill_036_Timer", 15.0) -- offensive guard check zLance:set_field("_ExGuardType", 4) -- just guard end end
if sdk.to_managed_object(args[2]):call("isMasterPlayer") then zCB = sdk.to_managed_object(args[2]) if (zCB:get_field("_GuardPoint") == false) then -- if not guard point --zQuest:call("set_IsGuardActionDuration", false) zQuest:call("set_IsGuardActionDuration", true) zQuest:set_field("_EquipSkill_036_Timer", 15.0) -- offensive guard check zCB:set_field("_GuardPoint", true) -- set guard point end end
As Jyugo already said, it doesn't work after the last TU. I'd also like to let you know that I've been working on it so that the skill Offensive guard can be activated every time the character does an instablock.
Hello Scolopendra. Unfortunately I don't have good news: every variation of the code I've tried did not work so far, in fact the only result I've managed to consistently obtain is to proc Insta-guard only when the shield is already engaged, and it doesn't work on multi-hit moves, therefore it's not automatic. I'll continue to work on it in my free time, although don't expect much of me since I'm not a LUA script expert.
No worries, Bassgian. I'm no expert on LUA, let alone advance coding, so I find it admirable you're attempting this. If it doesn't work out, it's not the end of the world. I can still play lance without it. It was a nice perk to cheese the anomaly monsters.
then counter block will only trigger when you are in manual block.
Furthermore, down below you can change the motion after a block: zLance:set_field("_ExGuardType", 4) -- just guard 4 is counter block, 0 is normal block, 1 is normal counter block (low) (like pressing block + B on xbox controller), 2 is probably high (havent tested 2)
To make it work on any weapon, remove the weapon check: should look like:
Beware though, LS seems to be broken, it blocks aswell but sets you in a stuck motion afterwards, hence the author probably implemented the weapon check (aswell as a flag for LS).
Hi there, do u know how to retain the demon mode on dual blade after auto dodging? I dowoaded this multifunction dual blade mod which auto dodge but it will remove demon mode after dodging, how to make it permanent? I dont know where to edit it since the modder is not active any more..ty
Hi there, I've been trying to make this mod work again after TU6, but being totally ignorant about lua scripts for reframework, I'm using the help of an AI, but so far I've only managed to trigger the counter block when I'm manually blocking. If I provided you with my new script, could you help me pinpoint out where or what I'm doing wrong, please? Thank you.
I really like the mod but its not working with the guardbash decoration which deals blunt damage when using the guard..is it possible to make it work? Thanks in advance
Hello monobit, firstly, thank you for making these mods. Not only they work perfectly but you've also the possibility to customize them according to people's desire.
Now, since I can't send you a private message, I wanted to ask you if there's a way to trigger offensive guard every time I get a parry with Charge Axe. I modified your main file so that'll work on Charge Axe too, and it does work well, but the only problem is that it doesn't trigger Offensive guard every time I get a parry. Do you know if there's a way to activate it after a parry? I can send you the file I modified to give you a better understanding.
82 comments
Copy/paste however you want. Have fun boys!
sdk.hook(sdk.find_type_definition("snow.player.PlayerQuestBase"):get_method("checkCalcDamage_DamageSide"),
function(args)
--Attack Enemy Check
zHitInfo = sdk.to_managed_object(args[3])
zDamageData = zHitInfo:call("get_AttackData")
zDmgOwnerType = zDamageData:call("get_OwnerType")
if zDmgOwnerType == 1 then
zDmgFromEnemy = true
else
zDmgFromEnemy = false
end
if zLanceCheck and zDmgFromEnemy and sdk.to_managed_object(args[2]):call("isMasterPlayer") then
zLanceGuardCheck = true
else
zLanceGuardCheck = false
end
if zCBCheck and zDmgFromEnemy and sdk.to_managed_object(args[2]):call("isMasterPlayer") then
zCBGuardCheck = false
else
zCBGuardCheck = false
end
end,
function(retval)
if zLanceGuardCheck then
zQuest:call("set_IsGuardActionDuration", true) --auto guard
zQuest:set_field("_EquipSkill_036_Timer", 15.0) -- offensive guard check
else
--zQuest:call("set_IsGuardActionDuration", false)
zQuest:set_field("_EquipSkill_036_Timer", 15.0) -- offensive guard check
end
return retval
end
)
sdk.hook(sdk.find_type_definition("snow.player.Lance"):get_method("lateUpdate"),
function(args)
if sdk.to_managed_object(args[2]):call("isMasterPlayer") then
zLance = sdk.to_managed_object(args[2])
if (zLance:get_field("_ExGuardType") == 0) then -- if normal guard
zQuest:call("set_IsGuardActionDuration", true)
zQuest:set_field("_EquipSkill_036_Timer", 15.0) -- offensive guard check
zLance:set_field("_ExGuardType", 4) -- just guard
end
end
end,
function(retval)
return retval
end
)
sdk.hook(sdk.find_type_definition("snow.player.ChargeAxe"):get_method("lateUpdate"),
function(args)
if sdk.to_managed_object(args[2]):call("isMasterPlayer") then
zCB = sdk.to_managed_object(args[2])
if (zCB:get_field("_GuardPoint") == false) then -- if not guard point
--zQuest:call("set_IsGuardActionDuration", false)
zQuest:call("set_IsGuardActionDuration", true)
zQuest:set_field("_EquipSkill_036_Timer", 15.0) -- offensive guard check
zCB:set_field("_GuardPoint", true) -- set guard point
end
end
end,
function(retval)
return retval
end
)
sdk.hook(sdk.find_type_definition("snow.player.PlayerQuestBase"):get_method("update"),
function(args)
if sdk.to_managed_object(args[2]):call("isMasterPlayer") then
zQuest = sdk.to_managed_object(args[2])
end
if ( zQuest:get_field("_playerWeaponType") == 7) then
zLanceCheck = true
else
zLanceCheck = false
end
if ( zQuest:get_field("_playerWeaponType") == 11) then
zCBCheck = true
zLanceCheck = false
else
zCBCheck = false
end
end,
function(retval)
return retval
end
)
Because it triggers when im with other people and sometimes cancels my combos or attacks
I'd also like to let you know that I've been working on it so that the skill Offensive guard can be activated every time the character does an instablock.
Unfortunately I don't have good news: every variation of the code I've tried did not work so far, in fact the only result I've managed to consistently obtain is to proc Insta-guard only when the shield is already engaged, and it doesn't work on multi-hit moves, therefore it's not automatic. I'll continue to work on it in my free time, although don't expect much of me since I'm not a LUA script expert.
But, probably shouldn't put my hopes up...
zQuestBase:call("set_IsGuardActionDuration", true) --auto guard
then counter block will only trigger when you are in manual block.
Furthermore, down below you can change the motion after a block:
zLance:set_field("_ExGuardType", 4) -- just guard
4 is counter block, 0 is normal block, 1 is normal counter block (low) (like pressing block + B on xbox controller), 2 is probably high (havent tested 2)
To make it work on any weapon, remove the weapon check:
should look like:
sdk.hook(sdk.find_type_definition("snow.player.PlayerQuestBase"):get_method("preCalcDamage_DamageSide"),
function(args)
zQuestBase = sdk.to_managed_object(args[2])
?-- remove this middle section --
zQuestBase:call("set_IsGuardActionDuration", true) --auto guard
end,
Beware though, LS seems to be broken, it blocks aswell but sets you in a stuck motion afterwards, hence the author probably implemented the weapon check (aswell as a flag for LS).
" To make it work on any weapon, remove the weapon check:
should look like:
sdk.hook(sdk.find_type_definition("snow.player.PlayerQuestBase"):get_method("preCalcDamage_DamageSide"),
function(args)
zQuestBase = sdk.to_managed_object(args[2])
?-- remove this middle section --
zQuestBase:call("set_IsGuardActionDuration", true) --auto guard"
But I dont know exacly what you mean by that :/
If I provided you with my new script, could you help me pinpoint out where or what I'm doing wrong, please? Thank you.
Now, since I can't send you a private message, I wanted to ask you if there's a way to trigger offensive guard every time I get a parry with Charge Axe.
I modified your main file so that'll work on Charge Axe too, and it does work well, but the only problem is that it doesn't trigger Offensive guard every time I get a parry.
Do you know if there's a way to activate it after a parry? I can send you the file I modified to give you a better understanding.
See you.
EDIT: nvm figured it out <3 great mod btw