Quantcast
Legion Interface Files - Page 2 - WoWInterface
 
Thread Tools Display Modes
05-18-16, 06:36 PM   #21
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 962
compat.lua?

You mean Lua 5.3 code compatible with Lua 5.1 or something?
 
05-18-16, 06:52 PM   #22
Predicate
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 18
compat.lua is a file Blizzard loads before it gets to GlueXML/FrameXML, containing stuff like aliases (strfind = string.find), wrappers (trig functions that take degrees), and a few other custom functions (like string.split). You can't export it from the console, but knowing it's there makes it easier to understand why these functions are being called that would otherwise not exist.
 
05-19-16, 04:38 AM   #23
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Predicate View Post
compat.lua is a file Blizzard loads before it gets to GlueXML/FrameXML, containing stuff like aliases (strfind = string.find), wrappers (trig functions that take degrees), and a few other custom functions (like string.split). You can't export it from the console, but knowing it's there makes it easier to understand why these functions are being called that would otherwise not exist.
How can you access this file than without memory sniffing?
 
05-19-16, 06:31 AM   #24
Predicate
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 18
Originally Posted by Resike View Post
How can you access this file than without memory sniffing?
It can be extracted from the client .exe without even running the game, but I can't elaborate further as the forum rules prohibit discussion of EULA-breaking activities (which, sadly, includes reverse engineering).
 
05-19-16, 07:40 AM   #25
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Predicate View Post
It can be extracted from the client .exe without even running the game, but I can't elaborate further as the forum rules prohibit discussion of EULA-breaking activities (which, sadly, includes reverse engineering).
You can pm me or simply just send me the file.
 
05-19-16, 08:10 AM   #26
Nevcairiel
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 62
Originally Posted by Resike View Post
You can pm me or simply just send me the file.
Why even bother, the WoW-specific aliases are well documented on wowpedia and the likes.
 
05-19-16, 08:24 AM   #27
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Nevcairiel View Post
Why even bother, the WoW-specific aliases are well documented on wowpedia and the likes.
I would be just curious about the whole file itself. I personally create some functions inside the global ones, it would be easier to prevent overwrites.
 
05-19-16, 09:20 AM   #28
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 962
I remember I made a thread once that also was about getting aliases: http://forums.wowace.com/showthread.php?t=19736
The mentioned Wowpedia page for reference: http://wow.gamepedia.com/Lua_functions
Code:
local t = {}

for _, v1 in pairs( {math, string, table} ) do
	for k, v2 in pairs(v1)do
		t[v2] = k
	end
end

for k, v in pairs(_G) do
	if type(v) == "function" and t[v] then
		print(k, t[v])
	end
end
I think these are most of the aliases
There don't seem to be aliases for the bit functions
Lua Code:
  1. abs == math.abs
  2. ceil == math.ceil
  3. deg == math.deg
  4. exp == math.exp
  5. floor == math.floor
  6. frexp == math.frexp
  7. ldexp == math.ldexp
  8. log == math.log
  9. log10 == math.log10
  10. max == math.max
  11. min == math.min
  12. mod == math.fmod
  13. rad == math.rad
  14. random == math.random
  15. sqrt == math.sqrt
  16.  
  17. PI == math.pi
  18.  
  19. acos ~= math.acos
  20. asin ~= math.asin
  21. atan ~= math.atan
  22. atan2 ~= math.atan2
  23. cos ~= math.cos
  24. sin ~= math.sin
  25. tan ~= math.tan
  26.  
  27. format == string.format
  28. gmatch == string.gmatch
  29. gsub == string.gsub
  30. strbyte == string.byte
  31. strchar == string.char
  32. strfind == string.find
  33. strjoin == string.join
  34. strlen == string.len
  35. strlower == string.lower
  36. strmatch == string.match
  37. strrep == string.rep
  38. strrev == string.reverse
  39. strsplit == string.split
  40. strsub == string.sub
  41. strtrim == string.trim
  42. strupper == string.upper
  43.  
  44. foreach == table.foreach
  45. foreachi == table.foreachi
  46. getn == table.getn
  47. sort == table.sort
  48. tinsert == table.insert
  49. tremove == table.remove
  50. wipe == table.wipe

Last edited by Ketho : 05-19-16 at 09:34 AM.
 
05-19-16, 09:40 AM   #29
Predicate
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 18
Just verifying that Ketho's listing is complete as far as compat.lua's effects, so the original file is unnecessary for developer reference. All other non-standard stuff is implemented in C, but that Wowpedia page documents them well enough.
 
05-19-16, 10:46 AM   #30
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Predicate View Post
Just verifying that Ketho's listing is complete as far as compat.lua's effects, so the original file is unnecessary for developer reference. All other non-standard stuff is implemented in C, but that Wowpedia page documents them well enough.
Well it does not cointain the PI variable at all.
 
05-19-16, 10:56 AM   #31
Predicate
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 18
The listing he posted contains the PI alias on line 17. The Wowpedia page is specifically about functions, but as PI is an odd one out, I don't know where else it would go. You can always update the wiki if you feel it's notable enough.

Last edited by Predicate : 05-19-16 at 10:58 AM.
 
05-19-16, 11:40 AM   #32
ykiigor
A Murloc Raider
Join Date: Jun 2014
Posts: 9
Lua Code:
  1. -------------------------------------------------------------------
  2. -- Table library
  3. local tab = table
  4. foreach = tab.foreach
  5. foreachi = tab.foreachi
  6. getn = tab.getn
  7. tinsert = tab.insert
  8. tremove = tab.remove
  9. sort = tab.sort
  10. wipe = tab.wipe
  11.  
  12. -------------------------------------------------------------------
  13. -- math library
  14. local math = math
  15. abs = math.abs
  16. acos = function (x) return math.deg(math.acos(x)) end
  17. asin = function (x) return math.deg(math.asin(x)) end
  18. atan = function (x) return math.deg(math.atan(x)) end
  19. atan2 = function (x,y) return math.deg(math.atan2(x,y)) end
  20. ceil = math.ceil
  21. cos = function (x) return math.cos(math.rad(x)) end
  22. deg = math.deg
  23. exp = math.exp
  24. floor = math.floor
  25. frexp = math.frexp
  26. ldexp = math.ldexp
  27. log = math.log
  28. log10 = math.log10
  29. max = math.max
  30. min = math.min
  31. mod = math.fmod
  32. PI = math.pi
  33. --??? pow = math.pow
  34. rad = math.rad
  35. random = math.random
  36. sin = function (x) return math.sin(math.rad(x)) end
  37. sqrt = math.sqrt
  38. tan = function (x) return math.tan(math.rad(x)) end
  39.  
  40. -------------------------------------------------------------------
  41. -- string library
  42. local str = string
  43. strbyte = str.byte
  44. strchar = str.char
  45. strfind = str.find
  46. format = str.format
  47. gmatch = str.gmatch
  48. gsub = str.gsub
  49. strlen = str.len
  50. strlower = str.lower
  51. strmatch = str.match
  52. strrep = str.rep
  53. strrev = str.reverse
  54. strsub = str.sub
  55. strupper = str.upper
  56. -------------------------------------------------------------------
  57. -- Add custom string functions to the string table
  58. str.trim = strtrim
  59. str.split = strsplit
  60. str.join = strjoin
 
05-19-16, 06:06 PM   #33
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 962
Well, that finally explains why the trigonometry functions are not the same
 
05-20-16, 12:26 AM   #34
Nevcairiel
Premium Member
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 62
Originally Posted by Ketho View Post
Well, that finally explains why the trigonometry functions are not the same
It was well known tha the global un-prefixed ones work in degrees while the others work in radians.
Why they choose do offer these however... legacy reasons probably.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Legion Interface Files

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off