Raulfin / PCaPP

Repository for XMLs for Perkus Maxamus
9 stars 11 forks source link

Two modifiers one keyword #466

Closed ElArGee closed 9 years ago

ElArGee commented 9 years ago

Weapons with "(Legendary)" in their name are having two modifiers applied. This is affecting Nock to Tip compatibility as the (Legendary) variants of bows are gaining an additional buff from the "legendary" modifier.

Legendary modifier:

<binding>
    <substring>Legend</substring>
    <identifier>legendary</identifier>
</binding>

<weapon_modifier>
    <identifier>legendary</identifier>
    <factorDamage>1.25</factorDamage>
    <factorCritDamage>1.3</factorCritDamage>
    <factorWeight>1.0</factorWeight>
    <factorReach>1.0</factorReach>
    <factorAttackSpeed>0.75</factorAttackSpeed>
    <factorValue>1.4</factorValue>
</weapon_modifier>

Nock to Tip modifier:

<binding>
    <substring>(Legendary)</substring>
    <identifier>120</identifier>
</binding>

<weapon_modifier>
    <identifier>120</identifier>
    <factorDamage>1.66</factorDamage>
    <factorCritDamage>1</factorCritDamage>
    <factorWeight>1</factorWeight>
    <factorReach>1</factorReach>
    <factorAttackSpeed>0.8</factorAttackSpeed>
    <factorValue>1</factorValue>
</weapon_modifier>

The patcher log concurs with this:

[160]  [WEAPON_PATCHER]  Glass Bow (Legendary) [Shortbow]: Has modifiers [Ljava.lang.Object;@19ae53d
[161]  [WEAPON_PATCHER]  Glass Bow (Legendary) [Shortbow]: Applying modifier legendary
[162]  [WEAPON_PATCHER]  Glass Bow (Legendary) [Shortbow]: Applying modifier 120
ElArGee commented 9 years ago

I found this while tweaking another mod for Nock to Tip and PerMa compatibility.

I was trying to find a way to modify weapon variants with identical names to give each different stats (for an upgradable weapon), but so far haven't made much progress.

One potential solution that would solve the above issue, and the one I've had would be to allow <weapon_modifier> bindings to target EDID's. If that is possible it would be hugely appreciated.

Raulfin commented 9 years ago

Sorry for delay, haven't looked on the issues page in a bit

Had completly forgotten about the Legend binding, it's an easy enough fix, it can be changed to "xLegend" and another with "Legendx" (where x is a space). Will have the fix up shortly.

Also if you want, PM me on Nexus and I can try to help with any issue you're having with the other mod.