mumble-link#
local ml = require 'mumble-link'
The mumble-link
module allows access to the MumbleLink shared memory
data from Guild Wars 2. The shared memory is read on each function call.
Functions#
- mumble-link.version()#
Version History
Version
Notes
0.3.0
Added
- mumble-link.tick()#
The current game tick. This is incremented roughly every frame and can be used to determine if the MumbleLink information is being actively updated by the game.
- Return type:
Version History
Version
Notes
0.3.0
Added
- mumble-link.avatarposition()#
The player’s current position in the game world in GW2.
Note
This is the position in map units using meters and is represented in a rendering fashion. X is east/west, Y is elevation (up/down), and Z is north/south.
Example#x, y, z = ml.avatarposition()
- Returns:
3 numbers.
Version History
Version
Notes
0.3.0
Added
- mumble-link.avatarfront()#
A vector pointing towards the direction the player is facing in the GW2 world.
See the note on
avatarposition()
about GW2 coordinates.- Returns:
3 numbers.
Version History
Version
Notes
0.3.0
Added
- mumble-link.avatartop()#
- Returns:
3 numbers.
Version History
Version
Notes
0.3.0
Added
- mumble-link.name()#
The GW2 MumbleLink name.
This should always return
"Guild Wars 2"
.See also
For the character’s name, see
identity.name()
.- Return type:
Version History
Version
Notes
0.3.0
Added
- mumble-link.cameraposition()#
The current camera position in the game world in GW2.
Note
This is the position in map units using meters and is represented in a rendering fashion. X is east/west, Y is elevation (up/down), and Z is north/south.
Example#x, y, z = ml.cameraposition()
- Returns:
3 numbers.
Version History
Version
Notes
0.3.0
Added
- mumble-link.camerafront()#
- Returns:
3 numbers.
Version History
Version
Notes
0.3.0
Added
- mumble-link.cameratop()#
- Returns:
3 numbers.
Version History
Version
Notes
0.3.0
Added
Identity#
The following values are parsed from the identity
value of the MumbleLink
data.
The functions below are located on a table named identity
within this module.
For example:
local ml = require 'mumble-link'
local charname = ml.identity.name()
Important
The mumble-link
module will only parse the identity JSON once per
tick()
, however module authors should still take care to only call
these functions when necessary.
- mumble-link.identity.name()#
Returns the GW2 character name.
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.profession()#
Returns the GW2 character profession ID.
Value
Description
1
Guardian
2
Warrior
3
Engineer
4
Ranger
5
Thief
6
Elementalist
7
Mesmer
8
Necromancer
9
Revenant
See also
- Function
professionname()
: Returns the profession as a string instead of the ID.
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- Function
- mumble-link.identity.professionname()#
Returns the GW2 character profession name.
One of:
guardian
warrior
engineer
ranger
thief
elementalist
mesmer
necromancer
revenant
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.spec()#
Returns the GW2 character’s third specialization ID, or 0 if none.
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.race()#
Returns the GW2 character’s race ID.
Value
Description
0
Asura
1
Charr
2
Human
3
Norn
4
Sylvari
See also
- Function
racename()
: This returns the race as a string instead of the ID number.
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- Function
- mumble-link.identity.racename()#
Returns the GW2 character’s race as a string.
One of: asura, charr, human, norn, or sylvari.
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.mapid()#
Returns the current Map ID.
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.See also
The context value
mumble-link.context.mapid()
should be preferred over this.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.worldid()#
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.teamcolorid()#
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.commander()#
Returns
true
if the player has a commander tag active orfalse
if not.- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.fov()#
Returns the vertical field-of-view.
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
- mumble-link.identity.uisz()#
Returns a value indicating the GW2 UI size:
Value
Description
0
Small
1
Normal
2
Large
3
Larger
- Return type:
Note
This function will return
nil
if the MumbleLink identity data does not contain valid JSON.Version History
Version
Notes
0.3.0
Added
Context#
The following values are parsed from the context
struct of the MumbleLink
data.
The functions below are located on a table named context
within this module.
For example:
local ml = require 'mumble-link'
local buildid = ml.context.buildid()
- mumble-link.context.serveraddress()#
The ipv4 or ipv6 address of the map server.
- Return type:
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.mapid()#
Returns the current GW2 map ID.
- Return type:
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.maptype()#
Returns the current GW2 map type ID.
Value
Description
0
Redirect or when the MubleLink data has not been initialized by the game yet
1
Character creation (this value is never actually returned, the MumbleLink data is not updated until a character is logged in)
2
Competitive PvP
3
GvG
4
Instance
5
Public (open world maps, etc.)
6
Tutorial
7
Tournament
8
User Tournament
9
Eternal Battlegrounds
10
Blue Borderlands
11
Green Borderlands
12
Red Borderlands
13
WvW Reward
14
Obsidian Sanctum
15
Edge of the Mists
16
Public Mini
17
Big Battle
18
Armistice Bastion
- Return type:
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.buildid()#
The GW2 Build ID.
- Return type:
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.uistate()#
A bitmask indicating various states of the GW2 UI:
Bit
Description
1
Map is open.
2
Compass (mini-map) is located at the top left. If not, lower left.
3
Compass (mini-map) has rotation enabled.
4
GW2 window has focus.
5
GW2 is in a competitive game mode.
6
A GW2 textbox has focus.
7
Player is in combat.
- Return type:
Example#local ml = require 'mumble-link' if ml.uistate() & 8 then -- window has focus ... end
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.compasswidth()#
The width in pixels of the compass (mini-map).
- Return type:
Version History
Version
Notes
0.3.0
added
- mumble-link.context.compassheight()#
The height in pixels of the compass (mini-map).
- Return type:
Version History
Version
Notes
0.3.0
added
- mumble-link.context.compassrotation()#
The compass (mini-map) rotation, in radians.
- Return type:
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.playerposition()#
The player’s current position (x,y) in continent coordinates.
- Returns:
2 numbers
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.mapcenter()#
The center of the (mini)map in continent coordinates.
- Returns:
2 numbers
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.processid()#
The GW2 process ID.
- Return type:
Version History
Version
Notes
0.3.0
Added
- mumble-link.context.mount()#
Returns the mount ID:
Value
Description
0
Player not on a mount.
1
Jackal
2
Griffon
3
Springer
4
Skimmer
5
Raptor
6
Roller Beetle
7
Warclaw
8
Skyscale
9
Skiff
10
Seige Turtle
See also
mountname()
returns this value as a string instead of the ID.- Return type:
Version History
Version
Notes
0.3.0
Added