Jump to content

Dual Wielding and weapon CAs.


Recommended Posts

So, to my disappointment, I just found a major hitch in my planned Dual Wield build focused on Damage Lore. Here is the damage composition of a basic attack and Pelting Strikes while Dual Wielding:

dw.jpg.188ffeeb8405f467bed2aac14ab8e777.jpg

I have 2 weapons, one with a Poison Fang in it and the other with a Lava Chunk in it. While basic attacks do alternate between the weapons and thus can apply both of the status effects, the Combat Art only takes the main hand into account. The fire weapon is in my right hand and is the one Pelting Strikes is based off of. So while dual wielding Pelting Strikes results in more hits during a single execution (3 with one weapon compared to 6 with 2 weapons), the damage of all the hits is based purely on the main hand weapon and the off hand is not used at all.

Would it be possible to change it so that the hits during Pelting Strikes (or any other weapon CAs) alternate the weapon used, as it happens during basic attacks? 1st hit main hand, 2nd hit off-hand and so on.

It really doesn't make much sense as you are visibly landing hits with both of the weapons, but only the main hand is taken into account. Quite misleading I must say.

Edited by idbeholdME
Link to comment
17 hours ago, Flix said:

Are you sure it's not just the tooltip lying to you?  That's much more likely IMO.

100%. Pelting Strikes only ever applies the secondary effect of the weapon in the right hand. Same with Soul Hammer and I'd assume, any of the Inquisitor's and Shadow Warrior's weapon CAs. When I use basic attacks, I see both poison and fire DoTs, as per the tooltip.

CAs do not alternate the weapons like regular dual wield attacks do. The second weapon is used solely to change the animation into the one that lands more hits during a single execution, but is not actually used for the CA itself, only for regular attacks.

The tooltips are actually the main thing here. The normal attack combines the damage of both weapons (that is why the number is so much higher than Pelting Strikes), but halves the secondary effect chances of both of the weapons, because a weapon will only be used every other hit.

The one for Pelting Strikes simply shows the main hand, which clearly tells that the off hand is not used in any way.

 

The easiest way to see it to just simply equip a high level Niob weapon in the main hand and a level 1 weapon in the off hand. All hits of Pelting Strikes will be doing the high damage of the main hand, but normal attacks will alternate between high and low numbers.

Or 2 weapons that have different hit sounds. Dagger + hammer for example. Normal attacks, you will hear both hit sounds. During Pelting Strikes, only the main hand,

Edited by idbeholdME
Link to comment
  • 3 weeks later...

Just a bump with an ask, whether anyone has any further input on this? Seems like quite a major thing that I'm surprised nobody caught/noticed before.

I'm afraid that changing the behavior of how CAs utilize weapons is going to be either hardcoded, or very difficult to change and my meager modding knowledge is woefully insufficient for this task. But changing it so both weapons are used during CAs would be a great logical (visually making sense) and quality of life change (from build perspective for dual wield characters).

Edited by idbeholdME
Link to comment

The thing is, I like to pick the "raisins" of modding atm. On this topic however, there's no basic research done yet.

I'd recommend to do a test series on all multi hit (not just chain attack) spells. Don't forget spells which only get double hits through modification like "ravaged impact" with "double shot". If there's any multi hit spell which behaves in a way that is acceptable, it will be easy to implement it for Pelting Strikes. No need to re-invent the wheel.

If however there's no such spell, then I'll see what can be done. Btw I already have an idea: Maybe it's part of the animation used. seraphim's "ANIM_TYPE_ATTACKA_BH" has two attacks scripted, just do the same with "ANIM_TYPE_SM02" and look and see what happens.

The only dual wielding char I've played so far was my double blood dryad sword inquisitor, and there I figured out that melee is not fun for me.

Link to comment
5 hours ago, Lindor said:

I'd recommend to do a test series on all multi hit (not just chain attack) spells. Don't forget spells which only get double hits through modification like "ravaged impact" with "double shot". If there's any multi hit spell which behaves in a way that is acceptable, it will be easy to implement it for Pelting Strikes. No need to re-invent the wheel.

I can try all the weapon CAs of characters that can dual wield, meaning the weapon CAs of the Inquisitor, Shadow Warrior, Dryad and Seraphim.

For the Seraphim, I already tested that Pelting Strikes and Soul Hammer only use the main hand for all the hits (6 for PS and 2 for SH).

 

5 hours ago, Lindor said:

If however there's no such spell, then I'll see what can be done. Btw I already have an idea: Maybe it's part of the animation used. seraphim's "ANIM_TYPE_ATTACKA_BH" has two attacks scripted, just do the same with "ANIM_TYPE_SM02" and look and see what happens.

I don't think that anything in the animation.txt is going to help here. This is what the dual wield Pelting Strikes entry looks like:

["entry394"] = 
        {
            ["name"] = "ANIM_TYPE_SM02_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["SHOUT"] = 0.4000,
                ["ATTACK"] = 0.4400,
                ["SHOUT1"] = 0.7600,
                ["ATTACK1"] = 0.8000,
                ["SHOUT2"] = 1.4000,
                ["ATTACK2"] = 1.4400,
                ["ATTACK3"] = 2.6800,
                ["SHOUT3"] = 2.8800,
                ["ATTACK4"] = 3.0400,
                ["ATTACK5"] = 3.4400,
                ["SHOUT4"] = 3.8400,
                ["ANIMEND"] = 4.6000,
            },
        },

 

Every hit has its own attack entry. And I don't think you can specify which weapon should a specific attack occurrence utilize.

 

Soul Hammer on the other hand:

{
            ["name"] = "ANIM_TYPE_SM04_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["SHOUT"] = 0.4800,
                ["ATTACK"] = 0.6000,
                ["ANIMEND"] = 1.2000,
            },
        },

 

Has only one attack entry, but still hits twice. Both hits occur at the exact same time, dealing identical damage which is another peculiarity. For Pelting Strikes, every hit rolls damage again, meaning you rarely get hits with the same damage values. Soul Hammer only rolls it once (one attack occurrence) and both hits do that amount. But note that if the first hit brings the enemy to the Deathblow level, the 2nd hit WILL do double damage.

 

ONGOING TEST LOG:   @Lindor Only missing the Dryad for now. Will add that tomorrow. Overall results are that upon closer inspection, dual wielding and weapon CA behavior leave a LOT to be desired.

Spoiler

Seraphim

Soul Hammer - Performs two identical hits at the same time with the main hand weapon only. Optimally, both weapons should be used for the two hits. animation.txt entry:

{
            ["name"] = "ANIM_TYPE_SM04_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["SHOUT"] = 0.4800,
                ["ATTACK"] = 0.6000,
                ["ANIMEND"] = 1.2000,
            },
        },

 

Pelting Strikes - Performs 6 strikes over the duration of the animation, all with the main hand weapon only. Optimally, the weapon used to deal damage would visually correspond with the animation. So RIGHT-LEFT-RIGHT-LEFT-LEFT-EITHER (the last attack swings both weapons, if one has to be picked, it would be RIGHT, to make it an equal amount of hits) animation.txt entry:

["entry394"] = 
        {
            ["name"] = "ANIM_TYPE_SM02_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["SHOUT"] = 0.4000,
                ["ATTACK"] = 0.4400,
                ["SHOUT1"] = 0.7600,
                ["ATTACK1"] = 0.8000,
                ["SHOUT2"] = 1.4000,
                ["ATTACK2"] = 1.4400,
                ["ATTACK3"] = 2.6800,
                ["SHOUT3"] = 2.8800,
                ["ATTACK4"] = 3.0400,
                ["ATTACK5"] = 3.4400,
                ["SHOUT4"] = 3.8400,
                ["ANIMEND"] = 4.6000,
            },
        },

 

Assailing Sommersault - Performs only a single hit with the main hand weapon even when dual wielding. Optimally would strike twice, using both weapons. animation.txt entry:

["entry400"] = 
        {
            ["name"] = "ANIM_TYPE_SM03_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["STARTJUMP"] = 0.6000,
                ["SHOUT"] = 0.6800,
                ["ATTACK"] = 1.6000,
                ["ENDJUMP"] = 1.7600,
                ["FOOT_ON_GROUND_FL"] = 1.8000,
                ["ANIMEND"] = 2.8000,
            },
        },

 

 

Inquisitor

Ruthless Mutilation - Animation kinda sucks (doesn't look like 2 hits at all). But it does strike twice but NOT at the same time and not identical hits (damage rolls separately for each, unlike Soul Hammer). Both hits are, again, only performed using the main hand weapon. Optimally, both weapons would be used for the two hits. animation.txt entry:

["entry349"] = 
        {
            ["name"] = "ANIM_TYPE_SM01_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["SHOUT"] = 0.6800,
                ["ATTACK"] = 0.7200,
                ["ANIMEND"] = 1.5200,
            },
        },

 

Callous Execution - Performs two hits, both using the main hand weapon only. NOT at the same time and each hit rolled separately for damage. Optimally, would strike with main hand for the first hit, off hand for the second. animation.txt entry:

["entry355"] = 
        {
            ["name"] = "ANIM_TYPE_SM02_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["SHOUT"] = 0.3400,
                ["ATTACK"] = 0.4400,
                ["ANIMEND"] = 1.6000,
            },
        },

 

 

Shadow Warrior

Demonic Blow Performs two hits, both using the main hand weapon only. NOT at the same time and each hit rolled separately for damage. Optimally, would strike with main hand for the first hit, off hand for the second. animation.txt entry:

        ["entry428"] = 
        {
            ["name"] = "ANIM_TYPE_SM01_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["SHOUT"] = 0.4000,
                ["ATTACK"] = 0.4400,
                ["ATTACK1"] = 0.9600,
                ["ANIMEND"] = 1.5200,
            },
        },

 

Scything Sweep - Actually performs only a single hit with the main hand weapon even when dual wielding for some reason. The animation entry even has 2 ATTACK instances, but still always lands only one hit on an enemy. Something seems to be very wrong here. Optimally, would hit twice at the same time (animation is similar to Soul Hammer ) once with each weapon. This is the worst offender so far. Visually striking with both weapons but doing only a single damage instance. animation.txt entry:

        ["entry448"] = 
        {
            ["name"] = "ANIM_TYPE_SM03_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["ATTACK"] = 0.4400,
                ["ATTACK1"] = 0.9600,
                ["ANIMEND"] = 1.1600,
            },
        },

 

Frenzied Rampage - Probably the most complicated move in the game. As always, all hits are based on the main hand weapon only. Performs 10 hits overall even though the animation definition only has 8 ATTACK occurrences. Optimally, the order of attacks should be: RIGHT-LEFT-RIGHT-RIGHT-LEFT-EITHER-LEFT-RIGHT-LEFT-RIGHT. In this case, the EITHER should probably be LEFT to keep the weapon usage equal. animation.txt entry:

["entry485"] = 
        {
            ["name"] = "ANIM_TYPE_SM07_BH",
            ["marker"] = 
            {
                ["ANIMSTART"] = 0.0000,
                ["SHOUT"] = 0.2400,
                ["ATTACK"] = 0.2800,
                ["ATTACK1"] = 0.6800,
                ["ATTACK2"] = 1.3600,
                ["ATTACK3"] = 1.8800,
                ["ATTACK4"] = 2.7600,
                ["ATTACK5"] = 3.0000,
                ["ATTACK6"] = 3.4000,
                ["ATTACK7"] = 3.9600,
                ["ANIMEND"] = 4.6000,
            },
        },

Interesting to note with Frenzied Rampage is that corresponds with my research of its ranged behavior in that it adds 2 ATTACKS by itself, even if they are not defined in the animation definition, which is the reason why it fires 3 shots even though it just uses the default ranged attack animation. More info here: 

 

There are a couple quite large problems:

1) Separating the main and off hand for the CAs and making them alternate accordingly during their execution.

2) Dealing with some of the gimmicky built-in behaviors of some CAs where the amount of hits does not correspond to the animation entries and such.

Edited by idbeholdME
  • Respect! 1
Link to comment

Oh I see you have been busy, kudos for that!

These are the two standard melee attack CAs as scripted in spells.txt:

Spoiler

mgr.defineSpell( "melee_attack_ca", {
    eiStateName = "cSpellCast",
    fxTypeCast = "",
    fxTypeSpell = "",
    fxTypeCastSpecial = "",
    duration = 0.000000,
    animType = "ANIM_TYPE_ATTACKA",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_INVALID",
    causesSpellDamage = 0,
    tokens = {
    },
    fightDistance = 45.000000,
    aspect = "EA_ENEMY_ANY",
    cooldown = 0.500000,
    soundProfile = 0,
    cost_level = 0,
    cost_base = 0,
    focus_skill_name = "skill__enemy_focus",
    lore_skill_name = "skill_tactics_lore",
    spellClass = "cSpellInqPranger",
    spellcontroltype = "eCAtype_a_weapon_attack",
    sorting_rank = 2,
})

mgr.defineSpell( "doublehit_attack_ca", {
    eiStateName = "cSMZealhit",
    fxTypeCast = "",
    fxTypeSpell = "",
    fxTypeCastSpecial = "",
    duration = 0.000000,
    animType = "ANIM_TYPE_SM24",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_INVALID",
    causesSpellDamage = 0,
    tokens = {
    },
    fightDistance = 45.000000,
    aspect = "EA_ENEMY_ANY",
    cooldown = 4.000000,
    soundProfile = 0,
    cost_level = 0,
    cost_base = 0,
    focus_skill_name = "skill__enemy_focus",
    lore_skill_name = "skill_tactics_lore",
    spellClass = "cSpellSMove",
    spellcontroltype = "eCAtype_a_weapon_attack",
    sorting_rank = 2,
})

I'd suggest swapping a CA with one of those two next. If one of those have the wanted behaviour, I'd suggest playing around with different combinations of their eiStateNames, spellClasses and spellcontroltypes. The alternating weapon behaviour might be scripted into one of those or their combination.

Link to comment
2 hours ago, Lindor said:

Oh I see you have been busy, kudos for that!

These are the two standard melee attack CAs as scripted in spells.txt:

  Hide contents

mgr.defineSpell( "melee_attack_ca", {
    eiStateName = "cSpellCast",
    fxTypeCast = "",
    fxTypeSpell = "",
    fxTypeCastSpecial = "",
    duration = 0.000000,
    animType = "ANIM_TYPE_ATTACKA",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_INVALID",
    causesSpellDamage = 0,
    tokens = {
    },
    fightDistance = 45.000000,
    aspect = "EA_ENEMY_ANY",
    cooldown = 0.500000,
    soundProfile = 0,
    cost_level = 0,
    cost_base = 0,
    focus_skill_name = "skill__enemy_focus",
    lore_skill_name = "skill_tactics_lore",
    spellClass = "cSpellInqPranger",
    spellcontroltype = "eCAtype_a_weapon_attack",
    sorting_rank = 2,
})

mgr.defineSpell( "doublehit_attack_ca", {
    eiStateName = "cSMZealhit",
    fxTypeCast = "",
    fxTypeSpell = "",
    fxTypeCastSpecial = "",
    duration = 0.000000,
    animType = "ANIM_TYPE_SM24",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_INVALID",
    animTypeSpecial = "ANIM_TYPE_INVALID",
    causesSpellDamage = 0,
    tokens = {
    },
    fightDistance = 45.000000,
    aspect = "EA_ENEMY_ANY",
    cooldown = 4.000000,
    soundProfile = 0,
    cost_level = 0,
    cost_base = 0,
    focus_skill_name = "skill__enemy_focus",
    lore_skill_name = "skill_tactics_lore",
    spellClass = "cSpellSMove",
    spellcontroltype = "eCAtype_a_weapon_attack",
    sorting_rank = 2,
})

I'd suggest swapping a CA with one of those two next. If one of those have the wanted behaviour, I'd suggest playing around with different combinations of their eiStateNames, spellClasses and spellcontroltypes. The alternating weapon behaviour might be scripted into one of those or their combination.

I'll just try toying with the eiStateName and spellClass. spellcontroltype seems to be the same (eCAtype_a_weapon_attack).

Not really sure what all would need to be done to "replace" Pelting Strikes for example, with one of the 2 attacks. I doubt it'd just be a copy-paste.

Link to comment
2 hours ago, Lindor said:

These are the two standard melee attack CAs as scripted in spells.txt:

We made those, they're not part of the base game.   Melee_attack_ca was meant to force melee attacks for NPC's whose AI might otherwise prohibit it (spellcaster AI). I've mostly moved away from it since I understand how to manipulate the AI in behaviour.txt better now. Doublehit_attack_ca was designed to allow NPC's with double hit attack animations to actually use them and score two hits on attack.

I'm not sure if this was ever explained publicly, but double hit animations are mostly broken in the base game.  Every player character and many NPC's had an "ATTACKX" scripted which has two hits scripted in animation.txt.  The problem is that when they were called on, they would only land one hit, because basic left click attacks are unable at the code level to make use of extra hits.  Therefore the animations were changed into "SM24" and the doublehit_CA was given to all enemies who had such animations.  This way, their double hit attacks blend fairly seamlessly into their other melee attacks.

  • Thanks! 1
Link to comment
1 hour ago, idbeholdME said:

Not really sure what all would need to be done to "replace" Pelting Strikes for example

Generally: Mostly overwrite the contents of Pelting strikes with those of the spell you want it to replace with, but leave name (and I mean name, not eistatename), aspect and sorting rank. Also would be good to leave lore and focus, but not required.

Here: Since we're looking for everything and there might stuff be hardcoded into the name, it would be good to also replace name and lore/focus, but then the original spell must be deleted because if two spells with the same name are present, the first gets overwritten by the second in order they appear in spells.txt.

1 hour ago, Flix said:

We made those, they're not part of the base game.

Oh I see.

1 hour ago, Flix said:

because basic left click attacks are unable at the code level to make use of extra hits.

Well that's a downer. Since we're trying to replace a CA with whatever is triggered when a leftclick attack fires, it means this bug would also be drawn over.

 

It's still a good idea to test those CM CAs for possible weapon alternation I think. From what I can tell from my spells.txt spreadsheet, the only other non-Boss and non-spell melee CAs scripted are the six "enemy_whit_..." CAs. Well, aside from the two "ZZZenemy_flight_..." CAs, but those don't count. If none of the other spells work, maybe one of those does. But I have to say, if that also doesn't work then I'm out of ideas. There's no other easy accessible file controlling the melee attack behaviour rom what I can see, not even in the system folder. In the end the dual wielding issue probably sits at the code level. It sucks but I think this may be one of the occasions where assembly skills are necessary to fix the behaviour.

Edited by Lindor
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up