#[Solved] How to make weapon cast magic on block+heavy attack (L1+R2)

34 messages · Page 1 of 1 (latest)

tender brook
#

I finally managed to make Rellana's twin blades able to block and I was wondering if I would also be able to make it cast magic with L1+R1

spring pilot
#

There are probably a couple ways to go about it, but you have to edit c0000.hks

#

I would look into the "is_staff" variable and set something similar based on conditionals like holding L1 + having the specific weapon(technically it's tae) equipped if you are familliar with hks editing

#

and set attack interrupts properly when the variable is active so you can call magic

tender brook
#

I'm very very inexperienced and I only found the "is_staff" variable inside some attack functions (guard, fall attack, ride attack etc) so it didn't help me much, but under the "ExecMagic" function it seems that I could do what I want but what I'm trying isn't working so a bit more help would be appreciated

#

I tried adding
"if sp_kind == 249 and (style == HAND_LEFT_BOTH or style == HAND_RIGHT_BOTH) and request_l1 == TRUE then
buttonR = ACTION_ARM_MAGIC_R2
end"

#

but it doesn't seem to have any effect as mentioned

spring pilot
#

Where did you add that line?
Also even in the seemingly unrelated areas you will want to familiarize yourself with is_staff and how it works and why it is where it is, like in execattack it is effectively saying don't weapon swing if I am active, so that weapon swing won't take priority and block execmagic

#

I haven't looked into weapon catalysts/r2casting very much yet myself

tender brook
#

I put it inside ExecMagic, just below
"if IsWeaponCatalyst(sp_kind_L) == TRUE and is_ride == FALSE then
buttonL = ACTION_ARM_MAGIC_L2
end"

spring pilot
#

try removing what you have and go down to logic expansion and put 249over 293 like:
local weaponCatalystSpKinds = {
249, --Rell's
293, -- Carian Sorcery Sword
}

#

also do they block on l1 or attack?

tender brook
#

Vanilla it attacks on l1 but I changed it so it blocks

spring pilot
#

that should be fine, After you add that number in hks you have to edit rellanas equipparamweapon entry in your regulation.bin

#

towards the bottom is a value "unknown_0x17c_7" set that to 1

tender brook
#

Cool, so that makes it work like the carian sorc sword, that's a step ahead

#

now to figure how to preserve the heavy attack and make it cast on block+input instead

spring pilot
#

remove the number and try this :
function IsWeaponCatalyst(sp_kind)
local weaponCatalystSpKinds = {
293, -- Carian Sorcery Sword
}
if Contains(weaponCatalystSpKinds, sp_kind) == TRUE or env(1108, ACTION_ARM_L1) > 0 then
return TRUE
end
return FALSE
end

#

" or env(1108, ACTION_ARM_L1) > 0 then" makes blocking enable weapon casting in general if not using the specific weapon on list

#

but since you need that param value it only works on what you set it to, though it might block attack inputs when blocking

#

if that works you will want to set conditions so it only triggers 2 handed

tender brook
#

the first change did it, I can cast after l1+r2

#

I lose out on guard counters but it isn't an issue

spring pilot
#

it should work one handed too right now

tender brook
#

that it does

pure pawn
#

hot question cause im attempting a very similar thing to a different weapon but am not sure where your pulling the items numerical value from

spring pilot
#

its the special motion category if you mean 293 for css and 249 for rellana's

tender brook
#

seems like it, neat

#

How to make weapon cast magic on block+heavy attack (L1+R2)

#

[Solved] How to make weapon cast magic on block+heavy attack (L1+R2)

spring pilot
#

that is correct, that'll make all casting weapons require holding L1, should still work 1h and 2h I believe

pure pawn
#

been attempting to use this for the past few hrs now and it works on Carian Sorcery Sword & Rellana's Twin Blades but nothing else after other such as after adding dane's footwork to the code. Do I have to change a weapons type to WeaponCatalyst and if so how do i go about that?

pure pawn
#

NVM I had accidentally misstyped and found where and now its working