Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Class Mechanics » Paladins

Reply
 
LinkBack Thread Tools
Old 08/04/09, 8:07 AM   #166
Neraya
Banned
 
Human Paladin
 
Khadgar (EU)
Originally Posted by Kuosi View Post
I know this is purely cosmetic thing and thus not really all that important, but is there any way to use custom texture to skin the icons?
You can override the actual in-game icons.
  1. Create your own icon image or edit an existing one (64x64). For a proper icon, you'll need to make this truecolor with the edges bevelled via an alphachannel.
  2. Convert to BLP format. BLP2PNG is one way to do this. You'll need to save/convert the icon image as .png first for this one.
  3. Copy the .blp file to Wow\Interface\Icons. It needs to have the proper icon name. DS would be Ability_Paladin_DivineStorm.blp, HoW would be Ability_ThunderClap.blp, etc...
  4. Restart wow (Reloading UI isn't enough).

I've already done this to change some icons... With all the yellow in our spells, I wanted some icons to stand out more. So I recolored DS from yellow to green.

The down side is that if said icons are used for anything else, the icon will also change there. Icons aren't unique, they get recycled a lot. If you change the icon for HoW, it'll also change the icon for warrior's Thunderclap, and the Thunderclap debuff on mobs, ...

Last edited by Neraya : 08/04/09 at 6:13 PM. Reason: Added more details on how to override icons

Offline
Reply With Quote
Old 08/04/09, 6:26 PM   #167
gmedina
Banned
 
Dwarf Paladin
 
Gnomeregan
seems to not be working for the new 4sec crusader strike.

Offline
Reply With Quote
Old 08/04/09, 7:46 PM   #168
 frmorrison
Protector
 
frmorrison's Avatar
 
Ashstrike
Human Paladin
 
No WoW Account
Originally Posted by gmedina View Post
seems to not be working for the new 4sec crusader strike.
I looked at his code, and he is using the API GetSpellCooldown to see the cooldown. If the game is saying 6 seconds, that means the API is returning the wrong value (should be 4 seconds).

Maybe one can write - 2 seconds in the code, but that may cause other issues.

United States Offline
Reply With Quote
Old 08/05/09, 12:04 AM   #169
gmedina
Banned
 
Dwarf Paladin
 
Gnomeregan
nevermind seems that i had a conflict with addon it is working fine now

Offline
Reply With Quote
Old 08/05/09, 5:04 PM   #170
Neraya
Banned
 
Human Paladin
 
Khadgar (EU)
Upgraded to the latest version (from several versions back)...

An issue I noticed
Even with the 'range check' box not selected. Abilities still get displayed in red when out of range.


-> See next post, that's why I went looking in the source and did more than just try to find this...

At the end of SHIT: DecideSpells, there's the tests for spellrange and nextspellrange. There should be a condition added here for SHITdb.range

Last edited by Neraya : 08/06/09 at 6:31 AM. Reason: Explained things in better wording (don't drink and forum).

Offline
Reply With Quote
Old 08/06/09, 6:16 AM   #171
Neraya
Banned
 
Human Paladin
 
Khadgar (EU)
I'm not a Wow addon specialist, far from it, I've never written one before. So my knowledge with the Wow APi is limited. I'm also not fluent in Lua, I can read/understand (usually) a piece of lua presented to me, but i'm not going to be spewing lines of lua code without constantly looking things up... I am however a professional software developper and have been for many years, so I do at least know how to write something slightly more complex than a "hello world" application :p

I went over the SHIT.lua source to try and figure out an issue I was having and ended up going way beyond that. Here's some stuff I noticed that may (or may not) help make this an even better mod than it already is.

1) the PLAYER_ALIVE event is being registered to the eventFrame, but all this event ever does is unregister itself. So unless this is a placeholder for a planned future feature. it can be removed entirely.

2) The PLAYER_REGEN_DISABLED and the COMBAT_LOG_EVENT_UNFILTERED handler do exactly the same. So could both be delegated to a single helper function.
the COMBAT_LOG_EVENT_UNFILTERED event seems a weird choice to me here (but then I don't know the wow api that well) but it's my understanding this is fired each and every time a line gets added to the combatlog, isn't this a bit "extreme" ? I'd imagine updates don't need to happen anywhere near that frequent (?).

2b) the PLAYER_REGEN_DISABLED function (and thus the combat event one) can be written smaller and more optimal (less overhead). Note that unless an error (or a purposed attempt at sabotage by manually changing the savedvariable file) is made, SHITdb.showon cannot have any other value than 1, 2 or 3. This assumption means we can rewrite the entire function to:

function SHIT.events.PLAYER_REGEN_DISABLED(...)
    if (GetSpellInfo(SHIT.L["Crusader Strike"]) == null then
        SHIT.displayFrame_last:Hide()
        SHIT.displayFrame_current:Hide()
        SHIT.displayFrame_next:Hide()
    elseif (UnitName("target") == nil or
            (SHITdb.showon == 1 and (UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0)) or
            (SHITdb.showon == 2 and InCombatLockdown() == nil) or
            (SHITdb.showon == 3 and UnitClassification("target") ~= "worldboss"))
        SHIT.displayFrame_last:Hide()
        SHIT.displayFrame_current:Hide()
        SHIT.displayFrame_next:Hide()
        SHIT.eventFrame:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    else
        SHIT.displayFrame_last:Show()
        SHIT.displayFrame_current:Show()
        SHIT.displayFrame_next:Show()
        SHIT:DecideSpells()
    end
end
3) The same logic as 2b can be applied to the PLAYER_TARGET_CHANGED() event handler.
function SHIT.events.PLAYER_TARGET_CHANGED(...)
  -- target changed, set last target, update current target, will be nil if no target
    SHIT.lastTarget = SHIT.currentTarget
    SHIT.currentTarget = UnitGUID("target")  

    if GetSpellInfo(SHIT.L["Crusader Strike"]) == null then
        SHIT.displayFrame_last:Hide()
        SHIT.displayFrame_current:Hide()
        SHIT.displayFrame_next:Hide()
    elsif (UnitName("target") == nil or
           (SHITdb.showon == 1 and (UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0)) or
           (SHITdb.showon == 2 and  InCombatLockdown() == nil) or
           (SHITdb.showon == 3 and  UnitClassification("target") ~= "worldboss")) then
        SHIT.displayFrame_last:Hide()
        SHIT.displayFrame_current:Hide()
        SHIT.displayFrame_next:Hide()
    else
        SHIT.displayFrame_last:Show()
        SHIT.displayFrame_current:Show()
        SHIT.displayFrame_next:Show()
        SHIT.eventFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
        SHIT:DecideSpells()
    end
end
4) SHIT: DecideSpells() is now always being called in a situation where prior testing has been performed to determing that indeed something needs to be displayed.
Yet, in the start of DecideSpells() function this same set of tests (player has Crusader strike, testing the ShowOn conditions etc) is being done again to have an 'early out' type test.
The tests seem to be not needed.

The one exception is in the showon=1 case where some extra stuff happens. If this is needed the start of DecideSpells() can be changed to just:
    if (SHITdb.showon==1)
        local guid = UnitGUID("target")

        if guid == nil then
            SHIT.textureList["last"]:SetTexture(nil)
            SHIT.textureList["current"]:SetTexture(nil)
            SHIT.textureList["next"]:SetTexture(nil)
            return
        end
    end
My guess is it isn't needed. DecideSpells() is now always being called when UnitName("target") has not returned nil. I'd guess/expect that when you have a targetname you will always also have a targetGUID (?).

5) SHIT: DecideSpells()
Is using a hardcoded 1.5sec (GCD) towards calculating the spell to use after the current one.
This is correct except for Consecration, Exorcism, Divine Plea and Sacred Shield as those are on hasted GCD.
Is there a way to calculate actual GCD ? maybe you could use the CastTime for FOL. since that's a 1.5sec spell and has the same haste benefit as the GCD on spells.
I'm not sure if our GCD's on the melee abilities get hasted from Heroism, but that would also mean the "next spell" might be off with the actual spell that will be suggested as new current one after casting the current one.

The next spell also doesn't account for the change in mana for casting the current ability. So next spell could be suggested to be Consecration, but after casting your current ability not have enough mana left to meet the Consecration mana requirement. Or other way around, if you just casted judgement, the mana returned could mean you suddenly have enough mana for Consecration where you previously had not.

Next spell also assumes the consecration glyph (hardcoding the cooldown in nextspell to 10 seconds), and also assumes 2/2 Imp Judgement setting judgement at 8sec cd, while we probably "all" will have this, there was the debate about whether or not you'd ever judge faster than every 9 seconds, so only 1/2 imp judgements would be needed.

A minor issue, but... don't trust too much on the "next" ability to actually going to be the next one being suggested

6) SHIT:NextSpell()
The long chain of if-tests to test each possible ability in each possible priority seems like a prime candidate for a better alternative.

for a start the pr1, pr2, pr3, pr4... can be changed to an array...
-> pr[1], pr[2], pr[3], pr[4]...
you can then already cut the chain of if's down to a for-loop testing each priority (by index) for the various ability numbers.
That'll cut down in lua code size, but I'm not sure how that change would affect performance.

Last edited by Neraya : 08/06/09 at 7:37 AM. Reason: typo's, grammar

Offline
Reply With Quote
Old 08/10/09, 6:43 AM   #172
Neraya
Banned
 
Human Paladin
 
Khadgar (EU)
More optimizations.

7) In SHIT:NextSpell()
Concerning the code for determining judgecare, exocare, cscare, dscare, conscare, howcare, dpleacare.

NextSpell() is called very often. You don't always get into this part of the function because it breaks off early when stuff is on CD.

These variables can be precalculated when the config is being changed. Their values won't change unless you change the config anyways. So you can move it from NextSpell to a new function, and call this new function in each of the Priority?_OnClick() functions. The variables can no longer be local to NextSpell then of course, so making them part of the global SHIT class seems to be the way to go.

8) Food for thought...
The entire NextSpell() function keeps 'bothering' me somehow... And it made me wonder...
The way the config panel works makes sense... you have priority Combo's where you can select spells. The only thing "better" would be to have an actual list where you can move abilities up/down the priority (like RAWR FCFS rotation works), but I don't know if that's possible in the option screens.

However, it seems less than ideal for actual use in DecideSpells/NextSpell. I haven't actually worked it out, but I think that turning it around would make the code a lot easier... Having a priority number for each spell rather than a spell for each priority.
so.. instead of pr1 having the internal spell index for the ability.
you'd have a prjudge having the priority index for judgement.
prcs = 1 is cs being on priority 1, prjudge = 2 is judgement being on priority 2 etc...

Combine with point 7) above, this means that any ability not used can have it's value set to 0 (or very high).
These variables then take care of the cscare, judgecare, exocare.... as well as a means for testing which ability to cast next.

I'll ponder on this some more today (got another day with little to do at work) and see if I this road of thinking actually does make things easier to code in DecideSpells/NextSpell.

Offline
Reply With Quote
Old 08/12/09, 1:07 PM   #173
burghy
Don Flamenco
 
Human Paladin
 
Ravencrest (EU)
Since it wasn't updated in a while (at least on curse and wowinterface) I took a stab at coding something similar:
clcret - Addons - Curse

Testing is minimal since I rarely play as ret in raids and in pvp I don't use it.
It fits my needs but I'm open to suggestions since I haven't used SHIT that much either so not sure what options people cold be looking for.

Offline
Reply With Quote
Old 08/12/09, 3:45 PM   #174
TheEnder
Von Kaiser
 
Blood Elf Paladin
 
Stormreaver
I know this may not be the best place for an addition such as this; but if this add is primarily for helping the ret rotation; would it be feasible to have a timer to track what has SoV on it?

I've been looking for a good one anyways (ForteWarlock for instance; but the addon is huge.)

Offline
Reply With Quote
Old 08/12/09, 5:13 PM   #175
Heck
Von Kaiser
 
Heck's Avatar
 
Blood Elf Paladin
 
Velen
I've been using NeedToKnow to track the dot on targets. Shows the duration of the dot left and also the number of stacks. Handy for many classes/mechanics within the game.

Any dot timer would do a similar job, though.

Of course, that's just me... I could be wrong.
-Dennis Miller

Offline
Reply With Quote
Old 08/12/09, 5:36 PM   #176
TheEnder
Von Kaiser
 
Blood Elf Paladin
 
Stormreaver
Can it handle multiple targets?

The two that I found could only handle target and focus.

Offline
Reply With Quote
Old 08/13/09, 3:55 AM   #177
vorda
Bald Bull
 
vorda's Avatar
 
Blood Elf Paladin
 
Jaedenar (EU)
Originally Posted by burghy View Post
Since it wasn't updated in a while (at least on curse and wowinterface) I took a stab at coding something similar:
clcret - Addons - Curse

Testing is minimal since I rarely play as ret in raids and in pvp I don't use it.
It fits my needs but I'm open to suggestions since I haven't used SHIT that much either so not sure what options people cold be looking for.
Could you maybe write a few lines where exactly it's different from SHIT? Is it coded more efficiently?

Offline
Reply With Quote
Old 08/13/09, 4:03 AM   #178
cremor
Piston Honda
 
Human Paladin
 
Blackmoore (EU)
Originally Posted by vorda View Post
Could you maybe write a few lines where exactly it's different from SHIT? Is it coded more efficiently?
The code seems much cleaner and it doesn't use OnUpdate or CLEU, so it should be a lot more efficient too.

Will try it as soon as possible, thanks burghy!

Offline
Reply With Quote
Old 08/13/09, 4:18 AM   #179
Neraya
Banned
 
Human Paladin
 
Khadgar (EU)
Originally Posted by burghy View Post
Since it wasn't updated in a while (at least on curse and wowinterface) I took a stab at coding something similar:
clcret - Addons - Curse

Testing is minimal since I rarely play as ret in raids and in pvp I don't use it.
It fits my needs but I'm open to suggestions since I haven't used SHIT that much either so not sure what options people cold be looking for.
Interesting... Especially seeing I'm not really into mod programming (yet, have been planning to for a while). I can see definate parallels between this and 'shit' code wise in setting things up, but clcret is much cleaner in design. Lua is amazingly flexible it would seem...

I'm currently running a slightly modified version of 'shit' and was already planning to either start a new project or continue on it if Thaeryn wasn't going to continue supporting it. I didn't want to just 'steal' it. I kinda wanted to talk to Thaeryn about that but haven't seen him on here for... near a month now (?).


Code wise: I had already come up with the 'sorting' by time/priority as a much better way to decide the next spell myself, but as it is coded now in clcrret it's flawed for the 2nd (and 3rd) spell in line since it will prioritise spells already off CD over higher priority spells that will come off cd within the next GCD (and the GCD after that for 3rd).

For various reasons predicting the 2nd spell in line after the current one isn't going to be 100% accurate, but you can get it to a decent degree of reliability. Not accounting for the GCD and remaining cooldown on the current spell however will make the 2nd and 3rd spell so totally random it's essentially unusable.

Now I'm faced with the trilemma to work with Thaeryn (if he is still going to support it), making my own or working with you

Offline
Reply With Quote
Old 08/13/09, 4:25 AM   #180
Neraya
Banned
 
Human Paladin
 
Khadgar (EU)
Originally Posted by cremor View Post
The code seems much cleaner and it doesn't use OnUpdate or CLEU, so it should be a lot more efficient too.

Will try it as soon as possible, thanks burghy!

Actually clcret DOES use OnUpdate (see clcretOnUpdate), which from what i can tell is the proper way to actually do something like this. It's probably how the original program 'shit' was copied from did things as well, but this got changed by moving most of the work to the COMBAT_LOG_EVENT_UNFILTERED (CLEU) event which is strange as I'd imaging that being called A LOT more frequent than OnUpdate. It's also the cause of an annoying bug in 'shit' in that if you target something and are out of range and out of combat, then run to it, it won't update to signalling in range. That's because the COMBAT_LOG_EVENT_UNFILTERED event handler doesn't get registered until combat starts.

It's currently hardcoded to not update more than 10 times a second, which imo is too restrictive. It should be lower by default, and should be configurable to toggle it off. (or configurable throttling)

Last edited by Neraya : 08/13/09 at 4:33 AM.

Offline
Reply With Quote
Reply

Go Back   Elitist Jerks » Class Mechanics » Paladins

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cat DPS Rotation Kazanir Druids 1356 12/07/09 12:07 PM
Ret FCFS Rotation Helper Thaeryn User Interface and AddOns 0 04/10/09 12:18 AM
FCFS (Retribution) modeling script Left Paladins 25 03/21/09 10:06 AM
Designing a hunter shot-rotation helper addon Zeza Public Discussion 40 11/27/06 7:52 PM