You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1

Saturday, September 14th 2013, 8:06pm

Crit addon

Would it be possible to have an addon that keep track of actual crit % during play? I would like to know exactly how often I crit and right now I don't know of any addon that can tell me how often I crit. I don't need one to tell me when, just a total running number that updates with each attack.

SaitoHajime

Unregistered

2

Saturday, September 14th 2013, 10:12pm

Scrutinizer lists the name of your attacks, how often you executed them, and which percentage of it was a critical hit. Just check it's detailed options.

3

Saturday, September 14th 2013, 10:17pm

Ok, but that doesn't even come close to what I'm asking for.

BTW, I do have scrut, so I know what it does and how to read it. I don't want to know how often one skill hits, I want to know a running total of my current crit % for the time I've been playing.

4

Saturday, September 14th 2013, 10:22pm

So what im understanding is you want an addon that catches every hit you do while ur online (or until you reset it), counts total number, counts non crit, and counts crit, then displays what % were crits, and what % of the total were non crits?

Technically scrut can do that you just have to do the math by hand, you want an addon that does the math for you. I dont belive one like that exists, atleast not on curse.

If you want to go the scrut route, you do (total number of crit hits)/(total number of hits) * 100. You have to add it all up by hand though which is annoying.

5

Saturday, September 14th 2013, 10:27pm

So what im understanding is you want an addon that catches every hit you do while ur online (or until you reset it), counts total number, counts non crit, and counts crit, then displays what % were crits, and what % of the total were non crits?

Technically scrut can do that you just have to do the math by hand, you want an addon that does the math for you. I dont belive one like that exists, atleast not on curse.

If you want to go the scrut route, you do (total number of crit hits)/(total number of hits) * 100. You have to add it all up by hand though which is annoying.
Pretty much yes. I want it to tally all attacks, crits, non crits and display the current % value of crits done. I know it can be done in scrut, but like you said, doing it all by hand it tedious and time consuming. I would rather not have to do it that way. Besides I think being able to see a real time value for crit % might be useful.

I wouldn't think it would be that hard to write, I lack programming skills or I would attempt it. I would assume it's just a matter of monitoring your combat log, logging crit vs non crit and simple math after that from the total attacks.

6

Saturday, September 14th 2013, 10:38pm

So what im understanding is you want an addon that catches every hit you do while ur online (or until you reset it), counts total number, counts non crit, and counts crit, then displays what % were crits, and what % of the total were non crits?

Technically scrut can do that you just have to do the math by hand, you want an addon that does the math for you. I dont belive one like that exists, atleast not on curse.

If you want to go the scrut route, you do (total number of crit hits)/(total number of hits) * 100. You have to add it all up by hand though which is annoying.
Pretty much yes. I want it to tally all attacks, crits, non crits and display the current % value of crits done. I know it can be done in scrut, but like you said, doing it all by hand it tedious and time consuming. I would rather not have to do it that way. Besides I think being able to see a real time value for crit % might be useful.

I wouldn't think it would be that hard to write, I lack programming skills or I would attempt it. I would assume it's just a matter of monitoring your combat log, logging crit vs non crit and simple math after that from the total attacks.


Its doable. Ill give it a shot.

7

Saturday, September 14th 2013, 10:47pm

So what im understanding is you want an addon that catches every hit you do while ur online (or until you reset it), counts total number, counts non crit, and counts crit, then displays what % were crits, and what % of the total were non crits?

Technically scrut can do that you just have to do the math by hand, you want an addon that does the math for you. I dont belive one like that exists, atleast not on curse.

If you want to go the scrut route, you do (total number of crit hits)/(total number of hits) * 100. You have to add it all up by hand though which is annoying.
Pretty much yes. I want it to tally all attacks, crits, non crits and display the current % value of crits done. I know it can be done in scrut, but like you said, doing it all by hand it tedious and time consuming. I would rather not have to do it that way. Besides I think being able to see a real time value for crit % might be useful.

I wouldn't think it would be that hard to write, I lack programming skills or I would attempt it. I would assume it's just a matter of monitoring your combat log, logging crit vs non crit and simple math after that from the total attacks.


Its doable. Ill give it a shot.

Cool, thank you!

Cike

Rogue

Posts: 4,171

Occupation: Being Human

  • Send private message

8

Sunday, September 15th 2013, 2:51am

Its doable. Ill give it a shot.

i'd like something like this also...thx
my r/p can outdps r/m. your name is stupid.

mages should stack dex. word.

9

Sunday, September 15th 2013, 3:17am

Some stuff came up, and i might not beable to get around to this. IF anyone has some coding experience, the CritKing addon tracks every hit, and if its a critical hit it plays a sound. My basic plan was to take that addon and modify it, stripping the sounds and adding 3 internal counters: total hits, crit hits, non crit hits.

Cike

Rogue

Posts: 4,171

Occupation: Being Human

  • Send private message

10

Sunday, September 15th 2013, 3:23am

no idea how to do that...sorry...maybe youtube can help me...
my r/p can outdps r/m. your name is stupid.

mages should stack dex. word.

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

11

Monday, September 16th 2013, 9:08am

It's possible and that's the basic idea:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
local playerName
local hitCount, critCount = 0, 0

local someLabel = CreateUIComponent("Label", "CritCounter_Label", "UIParent") -- create the ui label
someLabel:SetScripts("OnEvent", [[ this.UpdateCritRate(_source, _type) ]]) -- set event handler
someLabel:SetFont("Fonts/DFHEIMDU.TTF", 14, "NORMAL", "NORMAL") -- set font
someLabel:SetJustifyHType("CENTER") -- horizontal alignment
someLabel:SetText("Crit: -,--%") -- initial text
someLabel:ClearAllAnchors() -- clear anchors
someLabel:SetAnchor("TOP", "TOP", 0, 150) -- set anchor
someLabel:SetSize(250, 16) -- set size
someLabel:SetLayers(3, UIParent) -- set as layer of UIParent

someLabel:RegisterEvent("COMBATMETER_DAMAGE") -- register event
someLabel:RegisterEvent("COMBATMETER_HEAL") -- register event

function someLabel.UpdateCritRate(source, hitType)
	playerName = playerName or UnitName("player)
	
	if source == playerName then
		if hitType == "CRITIAL" then -- eventhough there is a typo is is the correct value
			critCount = critCount + 1
		end
		hitCount = hitCount + 1
		
		someLabel:SetText(string.format("Crit: %.2d%%", (critCount * 100)/(hitCount or 0)))
	end
end


I'm currently unable to log in, otherwise I would have finished that to an addon.

12

Monday, September 16th 2013, 7:18pm

What's required to change the code into an actual addon? Create the .lua, .toc files and add in gui components?

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

13

Monday, September 16th 2013, 11:01pm

You would just need to put the code into a .lua file, create a matching .toc for that. (the content is the .lua file's name) A minimal gui is already created in the lua code, eventhough there is no configuration.

Todays maintenance fixed my login issues. I was able to test the code and fixed some minor stuff about the frames. To move the frame you would need to edit the lua file at line 12, where i wrote in a comment "set anchor ...". That also gives a quick description what the parameters do.

That's the fixed variant:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
local playerName
local hitCount, critCount = 0, 0

local someFrame = CreateUIComponent("Frame", "CritCounter_Frame", "UIParent") -- create the ui frame
someFrame:SetScripts("OnEvent", [[ this.UpdateCritRate(_source, _type) ]]) -- set event handler
someFrame:RegisterEvent("COMBATMETER_DAMAGE") -- register event
someFrame:RegisterEvent("COMBATMETER_HEAL") -- register event

local someLabel = CreateUIComponent("FontString", "CritCounter_Label", "UIParent") -- create the ui label
someLabel:ClearAllAnchors() -- clear anchors
someLabel:SetAnchor("TOP", "TOP", "UIParent", 0, 150) -- set anchor: anchor point, relative point, relative to, x offset, y offset
someLabel:SetSize(250, 16) -- set size
UIParent:SetLayers(1, someLabel) -- set as layer of UIParent

someLabel:SetFont("Fonts/DFHEIMDU.TTF", 14, "NORMAL", "NORMAL") -- set font
someLabel:SetJustifyHType("CENTER") -- horizontal alignment
someLabel:SetText("Crit: -,--%") -- initial text
someLabel:Show()

function someFrame.UpdateCritRate(source, hitType)
	playerName = playerName or UnitName("player")
	
	if source == playerName then
		if hitType == "CRITIAL" then -- eventhough there is a typo is is the correct value
			critCount = critCount + 1
		end
		hitCount = hitCount + 1
		
		someLabel:SetText(string.format("Crit: %03.2f%%", (critCount * 100)/(hitCount or 0)))
	end
end

Here's a complete addon package:
Noguai has attached the following file:
  • CritCounter.zip (911 Byte - 29 times downloaded - latest: Sep 16th 2015, 1:10am)

14

Monday, September 16th 2013, 11:29pm

You would just need to put the code into a .lua file, create a matching .toc for that. (the content is the .lua file's name) A minimal gui is already created in the lua code, eventhough there is no configuration.

Todays maintenance fixed my login issues. I was able to test the code and fixed some minor stuff about the frames. To move the frame you would need to edit the lua file at line 12, where i wrote in a comment "set anchor ...". That also gives a quick description what the parameters do.

That's the fixed variant:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
local playerName
local hitCount, critCount = 0, 0

local someFrame = CreateUIComponent("Frame", "CritCounter_Frame", "UIParent") -- create the ui frame
someFrame:SetScripts("OnEvent", [[ this.UpdateCritRate(_source, _type) ]]) -- set event handler
someFrame:RegisterEvent("COMBATMETER_DAMAGE") -- register event
someFrame:RegisterEvent("COMBATMETER_HEAL") -- register event

local someLabel = CreateUIComponent("FontString", "CritCounter_Label", "UIParent") -- create the ui label
someLabel:ClearAllAnchors() -- clear anchors
someLabel:SetAnchor("TOP", "TOP", "UIParent", 0, 150) -- set anchor: anchor point, relative point, relative to, x offset, y offset
someLabel:SetSize(250, 16) -- set size
UIParent:SetLayers(1, someLabel) -- set as layer of UIParent

someLabel:SetFont("Fonts/DFHEIMDU.TTF", 14, "NORMAL", "NORMAL") -- set font
someLabel:SetJustifyHType("CENTER") -- horizontal alignment
someLabel:SetText("Crit: -,--%") -- initial text
someLabel:Show()

function someFrame.UpdateCritRate(source, hitType)
	playerName = playerName or UnitName("player")
	
	if source == playerName then
		if hitType == "CRITIAL" then -- eventhough there is a typo is is the correct value
			critCount = critCount + 1
		end
		hitCount = hitCount + 1
		
		someLabel:SetText(string.format("Crit: %03.2f%%", (critCount * 100)/(hitCount or 0)))
	end
end

Here's a complete addon package:
THANK YOU! Exactly what I was looking for!

Cike

Rogue

Posts: 4,171

Occupation: Being Human

  • Send private message

15

Tuesday, September 17th 2013, 3:05am

thx
my r/p can outdps r/m. your name is stupid.

mages should stack dex. word.

Inferiority

Professional

Posts: 1,062

Location: Scotland

Occupation: Educator

  • Send private message

16

Tuesday, September 17th 2013, 8:32am

You would just need to put the code into a .lua file, create a matching .toc for that. (the content is the .lua file's name) A minimal gui is already created in the lua code, eventhough there is no configuration.

Can we have Noguai's forum status changed from "Trainee" to "Addon Legend" or something like that?
Inferiority Complex - Original wearer of the Snow Combat Drum!
Mage/Priest on Erebos // Warrior/Rogue (and millions of alts) on Aurora & Agenor
http://romhiddenquests.ml/ // RoM Client & Patches Manual Download
Everyone's name is better than mine! :(

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

17

Tuesday, September 17th 2013, 10:34pm

Thanks, sounds good, i'd take it. ^^ But I guess the community management won't change anything, even if you ask very nice...

18

Wednesday, September 18th 2013, 12:30am

Hi nogui, arkana and I have been playing around with your addon. He changed it such that it only counts dmg done to bosses.

I was wondering if you know how to check whether dmg done is physical or magical? Some classes like C/wl use warp charge, magical based crit rate, in their main rotation which would screw up the crit counts for physical skills, and I wanted to know if there was a way around this. Arkana mentioned there should be a global variable somewhere to record "pyhsical vs magical" dmg of a skill -- I believe the "type" integer returned from GetSkillDetail does this but it does not work properly on skills that do both physical and magical damage (c/wl rune siphon for example returns 1 for physical only despite hiting 2 times, once physical and once magical), thus (if it exists) the global variable would be a better option to check on incoming/outgoing damage and determine if it is magical or physical and sort it respectively. Surely this variable exists somewhere, since during combat/dmg calculation something has to determine whether you resist, dodge, parry, magical immune, phyiscal immune, etc.

Also arkana mentioned possible scrutinizer integration but I think that would be quite a project and don't think it is really necessary. Also a reset function would be nice though again, not necessary.

ArkanaROM

Intermediate

Posts: 193

Location: Devon, UK

Occupation: Making games...

  • Send private message

19

Wednesday, September 18th 2013, 1:40am

First off, thanks Noguai for putting this together, it's something I've wanted for a while, so tyvm :).

And in follow-up to Xamd's post just wanted to add that I've initially got it only triggering off of named skills too now (in this case physical) using the global variable _skill (Event:COMBATMETER_DAMAGE). Need to build a table, which in turn would need to be edited for the moment based on class combo so not the most elegant of solutions and also wouldn't solve the issue of physical skills that carry additional mdmg effects but for the time being seems to be doing what I was looking for.

Thanks again...

This post has been edited 1 times, last edit by "ArkanaROM" (Sep 18th 2013, 4:51pm)


Cike

Rogue

Posts: 4,171

Occupation: Being Human

  • Send private message

20

Wednesday, September 18th 2013, 2:05am

for scout this works perfectly...thx!
my r/p can outdps r/m. your name is stupid.

mages should stack dex. word.