[.87 Bug] Can't upgrade hammer to lightning hammer

I started a new game on .87, and designed a unit with an upgradable hammer for a weapon.  After researching enchantment, the lightning hammer becomes available, and I thought I should have been able to upgrade my unit's weapon.  But on the upgrade window, there is no weapon upgrade available.

In the unit's XML, I see this:

        <EquipmentUpgradeDef>
            <SelectionCriterion>MaximizeBest</SelectionCriterion>
            <ComparisonAttribute>UnitStat_Attack_Pierce</ComparisonAttribute>
            <WeaponUpgradeType>Blunt</WeaponUpgradeType>
            <EquipmentSlot>Weapon</EquipmentSlot>
            <ForUpgradeActionOnly>0</ForUpgradeActionOnly>
        </EquipmentUpgradeDef>

Should that be UnitStat_Attack_Pierce for a blunt weapon?  Or does that not matter anymore?

7,909 views 11 replies
Reply #1 Top

i think lightning hammers got changed recently (from+1 att per level to a flat +2). maybe they messed up something when they made that change? 

Reply #2 Top

Had similar problem in last beta- it was solved by redoing the design as weapon stats changing screws up the autoupgrade.

 

 

Reply #3 Top

Quoting Alstein, reply 2
it was solved by redoing the design as weapon stats changing screws up the autoupgrade.
End of Alstein's quote

My problem was entirely on .87.  I deleted all old unit types (and shut off Steam synch) and designed this one from scratch within the .87 game.  So it must be a bug.

Reply #4 Top

Are warhammers two-handed

 

Did you originally have a staff?  My second guess is this is some sort of 1h/2h-bug with the weapon class changes introduced.

 

Reply #5 Top

there was a similar bug with longswords not upgrading to boreal blades a few patches ago. might just be an oversight that they haven't fixed the same(?) issue with warhammer -> lightning hammer. as i said, lightning hammers got nerfed recently, so it's also possible that this change somehow reverted the original fix.

Reply #6 Top

If you want it to upgrade to a vareity of things you might consider changing that .xml code to read

        <EquipmentUpgradeDef>
            <SelectionCriterion>MaximizeSum</SelectionCriterion>
            <ComparisonAttribute>UnitStat_Attack_Pierce</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Lightning</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Fire</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Poison</ComparisonAttribute>
             <WeaponUpgradeType>Blunt</WeaponUpgradeType>
            <EquipmentSlot>Weapon</EquipmentSlot>
            <ForUpgradeActionOnly>0</ForUpgradeActionOnly>
        </EquipmentUpgradeDef>

Reply #7 Top

Quoting Alstein, reply 4
Are warhammers two-handed
End of Alstein's quote

Both the hammer and the lightning hammer are one handed.  The unit equips both a hammer and shield.

Reply #8 Top

Quoting parrottmath, reply 6
If you want it to upgrade to a vareity of things you might consider changing that .xml code to read
End of parrottmath's quote

Ah, I think I see.  The base weapon damage of the lightning hammer (9) is the same as the base damage of the warhammer.  I guess the additional lightning damage isn't accounted for in the upgrade calculation.

Reply #9 Top

Quoting Publius, reply 8

Quoting parrottmath, reply 6If you want it to upgrade to a vareity of things you might consider changing that .xml code to read

Ah, I think I see.  The base weapon damage of the lightning hammer (9) is the same as the base damage of the warhammer.  I guess the additional lightning damage isn't accounted for in the upgrade calculation.
End of Publius's quote

Correct.

Reply #10 Top

I designed two units, one carrying an Ice Staff and the other carrying an Incineration Staff.  Here's the upgrade XML for the first:

        <EquipmentUpgradeDef>
            <SelectionCriterion>MaximizeBest</SelectionCriterion>
            <ComparisonAttribute>UnitStat_Attack_Cold</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Fire</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Lightning</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Poison</ComparisonAttribute>
            <WeaponUpgradeType>ColdStaff</WeaponUpgradeType>
            <EquipmentSlot>Weapon</EquipmentSlot>
            <EquipmentSlot>Defense</EquipmentSlot>
            <ForUpgradeActionOnly>0</ForUpgradeActionOnly>
        </EquipmentUpgradeDef>

and here's the XML for the second:

        <EquipmentUpgradeDef>
            <SelectionCriterion>MaximizeBest</SelectionCriterion>
            <ComparisonAttribute>UnitStat_Attack_Cold</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Fire</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Lightning</ComparisonAttribute>
            <ComparisonAttribute>UnitStat_Attack_Poison</ComparisonAttribute>
            <WeaponUpgradeType>FireStaff</WeaponUpgradeType>
            <EquipmentSlot>Weapon</EquipmentSlot>
            <EquipmentSlot>Defense</EquipmentSlot>
            <ForUpgradeActionOnly>0</ForUpgradeActionOnly>
        </EquipmentUpgradeDef>

Having now researched the appropriate tech, the first unit now upgrades from the Ice Staff to the Hailstone Staff (expected), while the second upgrades from the Incineration Staff to the Leht Staff instead of to the Hellfire Staff (not expected).  I'm guessing that this is because both the Leht Staff and the Hellfire staff are classified as FireStaff, despite the Leht Staff doing lightning damage rather than fire.

And, indeed, the Leht Staff is listed as an Enchanted Fire Staff in the unit design window:

If units that are vulnerable to fire damage (ice elementals, for example) are also vulnerable to lightning damage, then this is not a problem and I should stop thinking about it.  Otherwise, the inability to upgrade to a HellFire Staff could present a reason not to upgrade and to design and train a new unit type instead.

Reply #11 Top

Yes, but the real problem is that there is only 1 lightning staff. So it is rather pointless to give it's own staff classification. I would just suggest that you mod the .xml yourself and remove the lightning portion on the fire staff and it will never upgrade to that other staff.