I just want to say thanks to everyone that has been working on this <3
I just want to say thanks to everyone that has been working on this <3
should beCode:if HNSOptions.Radar.Rotate then local radar_x = ((dist_x * cos(rotation)) - (dist_y * sin(rotation))) * yardInPixel local radar_y = ((dist_x * sin(rotation)) + (dist_y * cos(rotation))) * yardInPixel dot:ClearAllPoints(); dot:SetPoint("CENTER", self.Radar, "CENTER", radar_x, radar_y) else radar_x = dist_x * yardInPixel radar_y = dist_y * yardInPixel end
or the dots wont get its position updated if the rotation is disabled.Code:if HNSOptions.Radar.Rotate then local radar_x = ((dist_x * cos(rotation)) - (dist_y * sin(rotation))) * yardInPixel local radar_y = ((dist_x * sin(rotation)) + (dist_y * cos(rotation))) * yardInPixel else radar_x = dist_x * yardInPixel radar_y = dist_y * yardInPixel end dot:ClearAllPoints(); dot:SetPoint("CENTER", self.Radar, "CENTER", radar_x, radar_y)
And HolyNovaRadius should be the actual holy nova range. We have a MapErrorFactor variable to decrease the actual scanner range due to position inaccuracies.
-- Edit
Btw, the new positions API does work with npc party chars so u can use and test it in proving grounds.
Last edited by mmoc1481f7b61b; 2014-09-25 at 04:40 PM.
No, i mean the old GetPlayerMapPosition() returns 0,0 for NPCs and the new UnitPosition() returns the right values. Has nothing to do with the libraries, they use GetPlayerMapPosition() internally too.
-- Edit
At least the static radar is somehow working in PG (but the direction is wrong). I dont see any dots when i enable the rotation but the scanner is working.
-- Edit2
I know whats wrong, some local vars inside the codeblock for the rotation, fixed:
But shouldnt the static radar display the dots identically to dots on the non turning minimap? They are always 90° to the left.Code:local rotation = 0 function HolySonar:UpdatePinMap() -- Holy Nova Heal amount local HolyNovaAmount = self:getHolyNovaHealingValue() local playersInRange = 0 local playerX, playerY = UnitPosition("player") local numMembers = GetNumGroupMembers() local prefix = "raid" -- If the player is in a party, he's not on the Unit ID list if not IsInRaid() then prefix = "party" numMembers = numMembers - 1 end local last = 1 rotation = (1.5 * pi) - GetPlayerFacing()--*57.2957795 for i=1, numMembers do -- String.Format is faster than concatenating strings - Or is it? --local unit = prefix..i local unit = format("%s%d", prefix, i) -- Don't consider units that are Dead or disconnected -- Also, don't include the player here, he'll be taken in account after this for iteration if UnitExists(unit) and not UnitIsDeadOrGhost(unit) and not UnitIsUnit(unit,"player") then local pctHp, difHp = UnitHP(unit) unitX, unitY = UnitPosition(unit) -- All in Yards! (Hopefully) local distance = HolySonar:getDistance(playerX,playerY,unitX,unitY) -- Check if the HP Deficit is bigger than what we're looking to heal! if difHp > HolyNovaAmount*HNSOptions.HolyNovaOverhealCoheficient then if distance <= HolyNovaRadius*MapErrorFactor then playersInRange = playersInRange + 1 end end -- Get a dot local dot = dots[i] -- Get dot color based on player Health percent local color = getDeficitColor(pctHp) dot:SetVertexColor(color.r,color.g,color.b,1) -- Calculate Radar Coordinates local dist_x = playerX - unitX local dist_y = playerY - unitY -- Normalize it to pixels -- How much does 1 yard is in pixels for our radar size? RadarRadius/Measuring radius local yardInPixel = (HNSOptions.Radar.Size/(HolyNovaRadius*2)) -- Multiply it so we get the values in pixel -- Also factor in the player rotation! local radar_x, radar_y if HNSOptions.Radar.Rotate then radar_x = ((dist_x * cos(rotation)) - (dist_y * sin(rotation))) * yardInPixel radar_y = ((dist_x * sin(rotation)) + (dist_y * cos(rotation))) * yardInPixel else radar_x = dist_x * yardInPixel radar_y = dist_y * yardInPixel end dot:ClearAllPoints(); dot:SetPoint("CENTER", self.Radar, "CENTER", radar_x, radar_y) --radar_y = -radar_y --print(unit..": ( "..unitX..","..unitY..") ("..radar_x..","..radar_y..")") -- Since we considered the player is in the center, we set the anchor to the center of the radar -- and place our offsets for x and y as calculated -- Need to clear point always if HNSOptions.Radar.ShowOutsideRadar then if distance <= HolyNovaRadius*HNSOptions.Radar.OutsideRange then dot:Show() else dot:Hide() end else if distance <= HolyNovaRadius then dot:Show() else dot:Hide() end end else dots[i]:Hide() end -- If this is the last, then everything beyond should be hidden (see below) last = i + 1 end
-- Edit 3
I will do a -p/2 rotation to the static radar so it matches the minimap.
I will look into the range of the green circle of the radar, because people are healed even if they are slightly out (with HolyNovaRadius = 12 and MapErrorFactor = 1 which means they should be standing on the border of the green circle but they dont)
Last edited by mmoc1481f7b61b; 2014-09-25 at 05:41 PM.
Never use hardcoded localized spell namesUnitBuff("player", "Twist of Fate")
Code:local holynova_name = GetSpellInfo(132157) UnitBuff("player", holynova_name)
Last edited by Aleaa; 2014-09-25 at 06:36 PM.
Blizzard also made a new WoD API for returning distance, the UnitDistanceSquared(unit)
maybe with that you could optimize the code even more or if you are having rotation issues still
btw: this addon http://www.wowinterface.com/download...r-WoDBeta.html uses that API and has the rotation/player facing working very well
see if it helps
Do you even need a radar for this type of thing? Couldn't you just have one cell that shows you the strength of the cast, in a percentage depending on the surroundings. You know the distance of people, the health (current and total) & the amount the spell will heal (based on your current SP, buffs etc).
You could just write a string to divide the expected by the optimal and give a efficiency percentage. If you have 5 targets (including yourself) within 12 yards who are below the HP threshold (You know the coefficient of the spell so you know how much it will heal) then you will get a 100% efficiency and you know that the cast is worth pushing.
If you instead have 3 players or 5 players with high HP the efficiency will go down and you know that it might not be worth using.
You know where the players are, so personally I don't think a radar would be useful!
the rotation is working. The thing that bothers me currently, is inaccuracy in the values you get from blizz. E.g. if you do proving grounds and you stand at max holy nova range to somebody (which is 12 yrd) you get a distance of 13,x yrds from wow api and the accuracy is different from zone to zone.
@Clampy
There is a indicator in the addon which shows how many player with a health deficit more or equal than the current holy nova heal amount are in range of the spell. And the indicator changes color depending on the amount of player (green on 5+ targets which means it should be worth pushing the button). The radar helps on positioning. E.g. you can see when you should take a step to the left to be in range of one more buddy. But you can turn of the radar too.
Libraries weren't returning correct map sizes or something, but ye, GetplayerMap position was returning 0 also.
I don't understand this, but I tried adding a static 90° to the angle and it seemed to be fixed, as you suggested.
One guy helped me out to test this on beta (that's why I provided the code with HolyNovaRange as 11.5), I was doing some testing but couldn't figure it out exactly why it was happening...
Boy, I totally forgot about that. Thanks for the tip
Last edited by moothz; 2014-09-26 at 12:09 AM.
No, he's saying it does work in proving grounds, which is awesome
- - - Updated - - -
Yes, because Holy Nova is a PBAoE force cast on the player, so the whole point of the radar is to help you see where to move nearby to heal the most people. If you don't want to use the radar you can turn it off and just use the Icon, which is basically what you've described anyway.
A % is kind of unintuitive for many people though, so ours is simply an icon that shows the number of people in range of HN who are below the healing threshold.
- - - Updated - - -
Also, guess what, I've finally got beta! A friend of mine won two beta key giveaways and gave one to me
Disc Priests: Just 2 mana trinkets away from becoming Withered
This addon certainly doesn't need all the libs. Anyhow, by convention, in curse you are going to specify what repositories to pull the libs from in the pkgmeta as you don't want the whole Ace3 folder.
Here's my latest file: https://www.dropbox.com/s/6r5xmhmdfj...Sonar.zip?dl=0
* Load the addon on OnInitialize instead of OnEnable b/c OnEnable can fire multiple times during the loading process. OnInit is the standard.
* Reworked options table to remove all the tostring() tonumber() stuff. You don't need to validate options that you know are going to be a number
- Also, I don't think anyone is going to be using the 'okay' 'cancel' buttons on the interface module so I removed all the deep copy table stuff. I checked a whole bunch of other addons and none do this. Especially with a GUI addon, you're going to make changes and close it when it looks good.
* Added Init.lua file, setup the addon, event frame, and slash command there. Now /hns
* Draws dots outside of radar, you can specify the range on those.
* Added a neat little feature called Radar Pitch. Turn it on and it'll project the radar to it's a 3D plane determined by the azimuth of your characters camera. It works really well if you are a mouse turner like I know most people are.
OH an one other thing - you need to add something so that it only activates on priest toons (by default) because it was showing up on my dk, which i found annoying, and the setting are accross all toons too, not individual
Disc Priests: Just 2 mana trinkets away from becoming Withered
It would have been nice if it was coded to allow for expanding the HN Helper addon to be a PBAoE addon working other spells and specs, Mistweaver for example. So, instead of hard-coding the spells it works with have that be selectable. But this is a great effort and I suppose one step at a time.
Yeah I knew I forgot something. I'll throw it in on the next build and also pick up swapping specs.
Are you talking about stuff like chi burst?
If you want to implement AoE spells like wild growth, you need a way of displaying the infomation you get out of it, usually on raid frames. But then you usually code for a specific raid frame. Like I did with ElvUI, which does Wild Growth, Holy Radiance, and Chain Heal. (In my wod update)
This has been considered already, and is something we'd like to add once we've finalized a working priest only version. No point expanding into other areas when it's not yet fully functonal.
- - - Updated - - -
That being said, SCK is pretty much the only other player cast PBAoE that this addon could apply to. Anything else can utilize Cluster finders on raidframe addons such as Vuhdo.
- - - Updated - - -
I should note though, the Radar component is still useful for Holy and on my MW Monk, since they also have healing spells that have facing requirements (Divine Star / Halo, Chi Burst, SCK). I don't know if there are any other healers that this would be useful for. I don't think Druids, palas or shammy have anything like this, and their ground based ones obviously don't apply. It would actually be more helpful for dps with Nova's and cone based attacks, but obviously we cant use it to track enemies so that idea's pointless.
- - - Updated - - -
Actually. Okay getting really ahead of myself now, BUT work with me here. What if the radar was interactive. As in, you could target someone by clicking on their dot on the radar. This could be helpful for spells like Clarity of Purpose, Holy Radiance, Chain Heal (maybe?), Chi Explosion, Breath of the Serpent(maybe?). I'm sure it would function pretty similarly to raidframes do, so it should be possible to implement. Idk, I'm getting way ahead of ourselves with this idea, but just something to throw around the ideas pile for later.
- - - Updated - - -
Getting this error when trying to load the current version of Holy Nova Sonar that you linked from your dropbox.Message: Interface\AddOns\HolySonar\Init.lua:4: Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of "AceConsole-3.0".
Time: 09/29/14 13:29:33
Count: 1
Stack: [C]: ?
...\AddOns\HolySonar\libs\AceAddon-3.0\AceAddon-3.0.lua:220: in function `EmbedLibrary'
...\AddOns\HolySonar\libs\AceAddon-3.0\AceAddon-3.0.lua:202: in function `EmbedLibraries'
...\AddOns\HolySonar\libs\AceAddon-3.0\AceAddon-3.0.lua:169: in function `NewAddon'
Interface\AddOns\HolySonar\Init.lua:4: in main chunk
Locals: (*temporary) = "Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of "AceConsole-3.0"."
Disc Priests: Just 2 mana trinkets away from becoming Withered
Add
<Include file="AceConsole-3.0\AceConsole-3.0.xml"/>
to the load_libs.xml file.
I didn't catch this because I have other addons that load the Ace Library.
I have reflected this change in the file.
Yes, SCK/RJW and Chi Explosion (which is 8 yards around the caster in Crane Stance) are the two big ones for MW. Eminence is around the caster but player position is restricted to being on the boss so there isn't as much freedom to position that.
Edit: and agree these can be done fairly easily (hopefully) after HN is done.
Last edited by Darkener; 2014-09-30 at 04:32 PM.
Yeah undoubtably.
I have been playing my MW on the beta, oddly enough I found it harder to complete Proving Grounds as MW than as disc (CoW OP yo). In both dungeons and PG I've found Chi Explosion so disappointingly underwhelming, so so underwhelming. Crane stance too. So so sad, I was extremely excited for it after the atonement nerfs, and functionally its actually pretty great, far superior to where atonement is, but sadly it too is suffering Celestalonitis and is very undertuned. It should be viable to Fistweave vs normal dungeon mobs and keep the tank alive for more than 15 seconds.
Anyway, back on task, yeah i didn't think of crane stance Chi Explosion, but that's a good one.
Disc Priests: Just 2 mana trinkets away from becoming Withered
I have an idea about how I would like to approach HN positioning help, but since I am a bit rusty, I'd like a quick heads up first if it is even viable.
So here is my question: How would you judge the load for combining 40 discs of varying transparency into one texture every 500ms?
How about extracting the resulting transparency at specific points? Can I make he game engine do it for me? :P
- - - Updated - - -
My idea was the following (yes it is from physics):
Gravity Well
Pseudocode:
DO
get positions of all raidmembers relative to the player: positions
discard those too far away to be of interest (use variable: range_of_interest -> options)
calculate average direct healing exspected for HN (5 targets!): exspected_heal (use boolean variable: include_cit_and_multistrike? -> options)
get health deficit of player (in range of interest): player_health_deficit
calculate player_health_deficit/(exspected_heal*(laziness+1)) (use variable: laziness -> options; how long to stay in one spot): mass
cap mass at 0.2(because a single player can only get 1/5 at most);
calculate mass/(1+da_mass)+0.1*da_mass (use variable 0<=da_mass<=1 -> options): effective_mass
build: gravity_surface; basically a minimap, but instead of dots for players use transparent disc. These disc should have uniform colour and effective_mass for opacity, and the range of HN as radius. Do not forget to include the player. (use variable: include_player_dots -> options
get resultant opacity at the position of the player: gravity (can get this by adding up effective_mass of everyone in HN range)
Wait a bit
LOOP (update!)
This would produce the following:
1th: A map (gravity_surface) where the brightest areas (less transparent) are those where HN would have the most effect, darkest (more transparent), least effect.
2nd: Opacity at player position (gravity) is of course effectiveness at the current player position.
You will want to move towards the brightest spots and stay the longest where 'gravity' is highest, just like anything would under the effect of 'gravity'.
(I will edit this to make it more legible, currently using a substandard browser and 'keyboard'.)
- - - Updated - - -
There are two instance where you have to change code in HolySonar.lua (one of them throws an error every update) otherwise it only works correctly while pitch is selected:
Should be:Code:if HolySonar.db.profile.radar.pitch then y_compression = sin(math.max(-GetUnitPitch("player"), .4)) end
And:Code:if HolySonar.db.profile.radar.pitch then y_compression = sin(math.max(-GetUnitPitch("player"), .4)) else y_compression = 1 end
Should be:Code:if HolySonar.db.profile.radar.pitch then local y_compression = sin(math.max(-GetUnitPitch("player"), .4)) local size = HolySonar.db.profile.radar.size local height = size * y_compression + 1 HolySonar.Radar.circle:SetSize(size, height) end
- - - Updated - - -Code:if HolySonar.db.profile.radar.pitch then local y_compression = sin(math.max(-GetUnitPitch("player"), .4)) local size = HolySonar.db.profile.radar.size local height = size * y_compression + 1 HolySonar.Radar.circle:SetSize(size, height) else local y_compression = 1 local size = HolySonar.db.profile.radar.size local height = size * y_compression + 1 HolySonar.Radar.circle:SetSize(size, height) end
In Init.lua
Radar -> HolySonar.Radar
HolyNovaIcon -> HolySonar.HolyNovaIcon
Last edited by Noradin; 2014-10-02 at 06:01 PM.