Official Pawn forums Forum Index
  
Point Modifier stat for unrecognized effects

 
Post new topic   Reply to topic    Official Pawn forums Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
mynickis1234



Joined: 11 Jun 2008
Posts: 3

PostPosted: Wed Jun 11, 2008 8:17 am    Post subject: Point Modifier stat for unrecognized effects Reply with quote

Hi Vger,

First thanks for the awesome addon. Really amazing work. I was looking for a way to handle unknown enchantments like surefooted. I was able to add the regex to the localization but there is no good way for my two scales MAEP and AEP to calculate the snare resistance effect of surefooted. I want the AEP scale to give 30 points to the surefooted snare resistance and then I want the MAEP scale to give the snare resistance 16 points.

So I was thinking about a good way to handle surefooted and future proof it for the Wotlk expansion and all the new unrecognized effects to come.

It would be nice to have a "Point Modifier Stat" section under the stats list below where the special weapon stats is in the options window and allow us to add values to anything unrecognized on a per scale basis. For instance surefooted would be detected as unrecognized and added to that list with a zero value for it's point modifier stat. Then I could just open the options window and give it a value of 36 to add 36 points to the total AEP scale calculation. Then select MAEP from the scale drop down and give the surefooted Point Modifier Stat a 16 point value. Then it would save that under the pawn options scales in SavedVariables/Pawn.lua. Anything unrecognized could be fixed by the Point Modifier and it wouldn't be too big because each class only uses a small set of enchants that are strange.

Thanks for your time
Back to top
View user's profileSend private message
mynickis1234



Joined: 11 Jun 2008
Posts: 3

PostPosted: Wed Jun 11, 2008 5:39 pm    Post subject: Reply with quote

So I've found a way to add the ability to give points to any spell effect on a item. This allows import strings to still work in v1.0 by just passing in the wowhead,wowdb,thottbot spellID for the effect. The effects have to be shipped in the localization but it still gives us a way to give points to them on a per scale basis while keeping the import strings small because they only use the spellID. These are just 3 unrecognized effects I picked as an example to give stats to. As people request them you could add them to the localization.

An example import string that gives Surefooted spell 27954 36 AEP points is...

Code:
( Pawn: v1: "AEP": 27954=36, ArcaneResist=0.001, FrostResist=0.001, ResilienceRating=1, MeleeMaxDamage=1.25, ExpertiseRating=0.65, YellowSocket=8, IsThrown=1, ArmorPenetration=0.15, MeleeDps=1, IsBow=1, Strength=0.65, MetaSocket=40, Health=0.07, NatureResist=0.001, Ap=0.65, CritRating=0.63, MeleeMinDamage=1.25, HasteRating=0.6, Armor=0.001, IsGun=1, RedSocket=10, ShadowResist=0.001, Stamina=0.7, DefenseRating=0.002, Agility=1, HitRating=0.6, DodgeRating=0.001, BlueSocket=9, FireResist=0.001, IsCrossbow=1, ParryRating=0.001, AllResist=0.001 )



Line 414 to Localization.lua

Code:
PawnMultipleStatsExtract = "_MultipleExtract"
PawnMultipleStatsSpellID = "_MultipleSpellID"
PawnRegexes =


Line 625-627 to Localization.lua

Code:
    {"^Meta Socket$", "MetaSocket", 1, PawnMultipleStatsFixed},
    {"^Surefooted$", "27954", 1, PawnMultipleStatsSpellID},
    {"^Mongoose$", "27984", 1, PawnMultipleStatsSpellID},
    {"^Equip: Causes your Deadly Throw ability to interrupt spellcasting and prevent any spell in that school from being cast for 3 sec.$", "32748", 1, PawnMultipleStatsSpellID},
}


Line 129-132 Localization.lua

Code:
    {"Other stats"},
    {"Deadly Throw Interrupt", "32748", "Causes your Deadly Throw ability to interrupt spellcasting and prevent any spell in that school from being cast for 3 sec."},
    {"Surefooted", "27954", "Permanently enchant boots to increase snare and root resistance by 5% and increase hit rating by 10.  Requires a level 35 or higher item."},
    {"Mongoose", "27984", "Permanently enchant a Melee Weapon to occasionally increase Agility by 120 and attack speed slightly. Requires a level 35 or higher item."},
}


Line 1077-1083 Pawn.lua

Code:
                PawnAddStatToTable(Stats, Stat, Number)
            elseif Source == PawnMultipleStatsSpellID then
                -- This is a spell effect that gets it's point value from the scale settings
                local PawnLookupSpellID = tonumber(math.abs(Number))
                if DebugMessages then PawnDebugMessage(string.format(PawnLocal.FoundStatMessage, Number, Stat)) end
                PawnAddStatToTable(Stats, Stat, PawnLookupSpellID)
            else
Back to top
View user's profileSend private message
Vger
Pawn Mod Creator


Joined: 09 Jul 2007
Posts: 120
Location: Azjol-Nerub (US)

PostPosted: Thu Jun 12, 2008 1:42 pm    Post subject: Reply with quote

Wow. Hardcore. :) That's one option for valuing enchantments as part of a scale. Another option would be to give each enchantment an equivalence in stats -- for example, you could say that Mongoose was worth, say, 50 agility (totally making that number up). Stats equivalence would make it a little easier to change scales in the future (so you don't have to reevaluate Mongoose every time you change Agility), but it's not as flexible as just giving each enchantment a flat value, and it would be a lot more work. If I add support for enchantments, it will probably be something similar to what you did.

So, I can certainly see value for this sort of thing in comparing items with Equip bonuses (for example, my PVP gauntlets give me +5 yards on my shocks, and my PVE gauntlets don't). I'm not sure I see much of a point for enchantments, though. If you have surefooted on your current boots, won't you probably put surefooted on the next pair of boots you get? If you do, then it doesn't actually matter what surefooted is worth. It could be worth 0, or it could be worth 1000. You probably want to be comparing the unenchanted values anyway.

Can you explain a little more about what you want to accomplish? I've never felt like I had much of a reason for putting a value on my enchantments.
Back to top
View user's profileSend private messageVisit poster's website
mynickis1234



Joined: 11 Jun 2008
Posts: 3

PostPosted: Thu Jun 12, 2008 3:41 pm    Post subject: Reply with quote

So enchant wise I guess it doesn't matter because you can look at the unenchanted values but it is nice to be able to give any effect values.

The real use is being able to give set bonuses and things like the deadly throw effect example values because that is part of the unenchanted value of the gear. If you get a green in wotlk that is slightly better than a item you have but you dont know if that unrecognized effect makes it worth it or not this will lets us know quickly.

In the end I just don't like to see uncalculated stats for gear. ;)
Back to top
View user's profileSend private message
Vger
Pawn Mod Creator


Joined: 09 Jul 2007
Posts: 120
Location: Azjol-Nerub (US)

PostPosted: Thu Jun 26, 2008 1:38 pm    Post subject: Reply with quote

Fairnuff.
Back to top
View user's profileSend private messageVisit poster's website
Vordak



Joined: 13 Aug 2008
Posts: 33

PostPosted: Wed Aug 13, 2008 2:08 pm    Post subject: Reply with quote

Is this fix for spell values still accurate?
Back to top
View user's profileSend private message
Vordak



Joined: 13 Aug 2008
Posts: 33

PostPosted: Mon Aug 18, 2008 5:33 pm    Post subject: Reply with quote

this fix was posted a year ago... is it still accurate way of adding spell effects to the scales?
Back to top
View user's profileSend private message
Vger
Pawn Mod Creator


Joined: 09 Jul 2007
Posts: 120
Location: Azjol-Nerub (US)

PostPosted: Tue Aug 19, 2008 10:14 pm    Post subject: Reply with quote

A year ago? That's a little bit over-the-top, seeing as this thread is two months old.

I'm not planning on adding any official support for doing this, so you'll need to make the changes every time you update Pawn. I really recommend that you just don't. But, this method of doing it is more complex than it needs to be. All you need to do is add extra lines to Localization.lua; the other changes are unnecessary. Instead of PawnMultipleStatsSpellID, just use PawnMultipleStatsFixed like the existing code does.
Back to top
View user's profileSend private messageVisit poster's website
Vordak



Joined: 13 Aug 2008
Posts: 33

PostPosted: Wed Aug 20, 2008 4:16 am    Post subject: Reply with quote

Vger wrote:
A year ago? That's a little bit over-the-top, seeing as this thread is two months old.

I'm not planning on adding any official support for doing this, so you'll need to make the changes every time you update Pawn. I really recommend that you just don't. But, this method of doing it is more complex than it needs to be. All you need to do is add extra lines to Localization.lua; the other changes are unnecessary. Instead of PawnMultipleStatsSpellID, just use PawnMultipleStatsFixed like the existing code does.


The posts say July 2007... but anyways...

Yeah I'd really like to be able to do this, because there are so many effects that should be accounted for somehow. Like Fiery, icy, mongoose, boar's speed, deflection, increased ap in cat/bear form items, etc
Back to top
View user's profileSend private message
Vger
Pawn Mod Creator


Joined: 09 Jul 2007
Posts: 120
Location: Azjol-Nerub (US)

PostPosted: Wed Aug 20, 2008 10:41 am    Post subject: Reply with quote

(Weird. For me, the posts clearly say 2008, not 2007. Maybe it's due to time settings, though that's bizarre.)

Items that give attack power in feral forms are currently understood by Pawn; it's called "Feral attack power" I think. Fiery weapon, and the stamina from boar's speed, are also currently understood. The other enchantments you list don't give stats, so they aren't currently tracked. I may reevaluate this decision if I decide to add an Enchantments tab to the Pawn UI to help people pick out enchantments, but there are quite a few other things I'd like to do first.
Back to top
View user's profileSend private messageVisit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Official Pawn forums Forum Index -> Feature Requests All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum