How are damage skin effect and numbers displayed in game?

Initiate Mage
Joined
Nov 3, 2020
Messages
2
Reaction score
0
For each damage skin digit, I see that it has an origin value attached to it. However, how are the numbers rendered in game?

For example, let's say I'm using the default Damage Skin, and I dealt a critical hit that's 10 damage. The canvas needs to draw:
  • NoCri1 effect - Origin: (41, 70)
  • NoCri1 digit '1' - Origin: (14, 43)
  • NoCri0 digit '0' - Origin: (21, 45)
How do I determine where the effect, the '1' and '0' appear on the canvas to display it like it does in game? Is there a strict mathematical formula that is followed regardless of damage skin used? Does anyone have that formula?

The reason I'm asking is because I'm attempting to replicate a "preview" of damage skins on a webpage, and I've been pulling my hair out figuring how to do so as I don't have a formula that accurately matches what I'd expect to see in game. Thank you in advance for any help I receive!
 
Newbie Spellweaver
Joined
Jan 14, 2018
Messages
14
Reaction score
0
I'm also interested in knowing. The digits are staggered vertically, but there is no obvious formula to calculate the y coordinate of the final rendered digit
 
Initiate Mage
Joined
Nov 3, 2020
Messages
2
Reaction score
0
^ Thanks! I saw the formula used; unfortunately it lacks the critical effect that displays to the side of the number (seems to be the trickiest thing to position too). Hopefully someone here has information on those!