gw2.static#

local static = require 'gw2.static'

Attributes#

gw2.static.db#

A sqlite database housing all loaded GW2 API data.

Version History

Version

Notes

0.0.1

Added

Database Tables#

achievements#

Achievements

Columns

Name

Type

Description

id

INTEGER

Achievement ID, matches the GW2 API ID

icon

TEXT

Render service URL

name

TEXT

Achievement name

description

TEXT

requirement

TEXT

Requirement as listed in game

locked_text

TEXT

Description prior to unlocking

type

TEXT

Either ‘Default’ or ‘ItemSet’

point_cap

INTEGER

Maximum number of AP for repeatable achievements

Version History

Version

Notes

0.0.1

Added

achievement_flags#

Achievement Flags

Possible values:

Value

Description

Pvp

Can only progress achievement in PvP or WvW

CategoryDisplay

Meta achievement

MoveToTop

IgnoreNearlyComplete

Not shown in game ‘nearly complete’ list

Repeatable

Can be repeated multiple times

Hidden

RequiresUnlock

RepairOnLogin

Daily

Weekly

Monthly

Permanent

Columns

Name

Type

Description

achievement

INTEGER

Achievement ID

flag

TEXT

One of the flags above

Version History

Version

Notes

0.0.1

Added

achievement_tiers#

Achievement Tiers

Columns

Name

Type

Description

achievement

INTEGER

Achievement ID

count

INTEGER

Number of items that must be completed in this tier

points

INTEGER

AP awarded for this tier

sequence

INTEGER

Sequence order of this tier

Version History

Version

Notes

0.0.1

Added

achievement_prerequisites#

Achievement Prerequisites

Columns

Name

Type

Description

achievement

INTEGER

Achievement ID

prerequisite

INTEGER

A different achievement ID that must be completed before this achievement is available

Version History

Version

Notes

0.0.1

Added

achievement_rewards#

Achievement Rewards

Columns

Name

Type

Description

achievement

INTEGER

Achievement ID

type

TEXT

'Coins', 'Item', 'Mastery', or 'Title'

count

INTEGER

The number of 'Coins' or 'Item' rewarded

id

INTEGER

The 'Title', 'Mastery' Point, or 'Item' id rewarded

region

TEXT

The 'Mastery' Point region

Version History

Version

Notes

0.0.1

Added

achievement_bits#

Achievement Bits

Columns

Name

Type

Description

achievement

INTEGER

Achievement ID

sequence

INTEGER

type

TEXT

'Text', 'Item', 'Minipet', or 'Skin'

id

INTEGER

ID of the 'Item', 'Minipet', or 'Skin'

text

TEXT

Text description if type = 'Text'

Version History

Version

Notes

0.0.1

Added

specializations#

Specializations

Columns

Name

Type

Description

id

INTEGER

Specialization ID, matches the ID returned by mumble-link and the GW2 API.

name

TEXT

Specialization name.

profession

TEXT

elite

BOOL

Indicates if this is an elite specialization or not.

weapon_trait

INTEGER

icon

TEXT

Render service URL.

background

TEXT

Render service URL.

Version History

Version

Notes

0.0.1

Added

specialization_traits#

Specialization Traits

Columns

Name

Type

Description

id

INTEGER

Trait ID

specialization

INTEGER

Specialization ID

major

BOOL

TRUE if this is a major trait

Version History

Version

Notes

0.0.1

Added

continents#

GW2 Continents

Columns

Name

Type

Description

id

INTEGER

Continent ID, matches the ID returned by the GW2 API.

name

TEXT

Continent name.

continent_width

REAL

The width portion of continent_dims returned by the GW2 API.

continent_height

REAL

The height portion of continent_dims returned by the GW2 API.

min_zoom

INTEGER

max_zoom

INTEGER

Version History

Version

Notes

0.0.1

Added

regions#

GW2 Regions

Columns

Name

Type

Description

id

INTEGER

Region ID, matches the region ID returned by the GW2 API.

name

TEXT

Region name.

continent

INTEGER

The continent ID of this region.

continent_rect_left

REAL

The left portion of continent_rect returned by the GW2 API.

continent_rect_right

REAL

The right portion of continent_rect returned by the GW2 API.

continent_rect_top

REAL

The top portion of continent_rect returned by the GW2 API.

continent_rect_bottom

REAL

The bottom portion of continent_rect returned by the GW2 API.

Version History

Version

Notes

0.0.1

Added

maps#

GW2 Maps

Columns

Name

Type

Description

id

INTEGER

Map ID, matches the id returned from mumble-link and the GW2 API.

name

TEXT

Map name.

region

INTEGER

Region ID.

min_level

INTEGER

max_level

INTEGER

default_flooor

INTEGER

label_x

REAL

label_y

REAL

map_rect_left

REAL

The left portion of map_rect returned by the GW2 API.

map_rect_right

REAL

The right portion of map_rect returned by the GW2 API.

map_rect_top

REAL

The top portion of map_rect returned by the GW2 API.

map_rect_bottom

REAL

The bottom portion of map_rect returned by the GW2 API.

continent_rect_left

REAL

The left portion of continent_rect returned by the GW2 API.

continent_rect_right

REAL

The right portion of continent_rect returned by the GW2 API.

continent_rect_top

REAL

The top portion of continent_rect returned by the GW2 API.

continent_rect_bottom

REAL

The bottom portion of continent_rect returned by the GW2 API.

Version History

Version

Notes

0.0.1

Added

pois#

GW2 points of interest. This includes waypoints, vistas, and actual POIs.

Columns

Name

Type

Description

id

INTEGER

map

INTEGER

Map ID

name

TEXT

POI name. May be NULL.

type

TEXT

landmark = POI, vista = vista, waypoint = waypoint, unlock = other (dungeons, etc.)

floor

INTEGER

x

REAL

X coordinate of the POI in continent coordinates.

y

REAL

Y coordinate of the POI in continent coordinates.

chat_link

TEXT

icon

TEXT

Render service URL

Version History

Version

Notes

0.0.1

Added

tasks#

GW2 Renown Hearts

Columns

Name

Type

Description

id

INTEGER

map

INTEGER

Map ID.

objective

TEXT

The text description of the renown heart.

level

INTEGER

x

REAL

X coordinate of the renown heart in continent coordinates.

y

REAL

Y coordinate of the renown heart in continent coordinates.

chat_link

TEXT

Version History

Version

Notes

0.0.1

Added

taskbounds#

Renown Heart Boundary Coordinates

Columns

Name

Type

Description

id

INTEGER

seq

INTEGER

Sequence ID.

task

INTEGER

Renown Heart (task) ID.

x

REAL

y

REAL

Version History

Version

Notes

0.0.1

Added

skillchallenges#

Hero Point Locations

Columns

Name

Type

Description

id

TEXT

map

INTEGER

Map ID.

x

REAL

y

REAL

Version History

Version

Notes

0.0.1

Added

sectors#

Map sectors

Columns

Name

Type

Description

id

INTEGER

map

INTEGER

Map ID.

name

TEXT

level

x

REAL

Center X location

y

REAL

Center Y location

Version History

Version

Notes

0.0.1

Added

sectorbounds#

Map sector boundary coordinates

Columns

Name

Type

Description

id

INTEGER

seq

INTEGER

Sequence number

sector

INTEGER

Sector ID

map

INTEGER

Map ID

x

REAL

y

REAL

Version History

Version

Notes

0.0.1

Added

adventures#

Adventure locations

Columns

Name

Type

Description

id

TEXT

Adventure GUID.

map

INTEGER

Map ID.

name

TEXT

description

TEXT

x

REAL

y

REAL

Version History

Version

Notes

0.0.1

Added

masterypoints#

Mastery Point locations

Columns

Name

Type

Description

id

INTEGER

map

INTEGER

Map ID

region

TEXT

The region/type of the mastery point. One of: Tyria, Maguuma, Desert, Tundra, Jade, or Sky.

x

REAL

Y

REAL

Version History

Version

Notes

0.0.1

Added

Functions#

gw2.static.updateachievements()#

Update the following tables from the GW2 API.

  • achievements

  • achievement_flags

  • achievement_tiers

  • achievement_prerequisites

  • achievement_rewards

  • achievement_bits

Version History

Version

Notes

0.0.1

Added

gw2.static.updatespecializations()#

Update the following tables from the GW2 API.

  • specializations

  • specialization_traits

Version History

Version

Notes

0.0.1

Added

gw2.static.updatecontinents()#

Update the following tables from the GW2 API. If an error occurs, no changes will be made.

  • continents

  • regions

  • maps

  • pois (waypoints, vistas, pois, etc.)

  • tasks (renown hearts)

  • taskbounds

  • skillchallenges (hero points)

  • sectors

  • sectorbounds

  • adventures

  • masterypoints

Version History

Version

Notes

0.0.1

Added

gw2.static.specialization(specid)#

Return the specializtion given by specid.

The returned value is a Lua table with the following fields.

Field

Description

id

Specialization ID

name

Specialization Name

profession

Profession Name

elite

Indicates if this is an elite specialization

icon

Icon URL

background

Background URL

minor_traits

A sequence of minor trait IDs

major_traits

A sequence of major trait IDs

Version History

Version

Notes

0.0.1

Added

gw2.static.waypointsinmap(mapid)#

Return a table of waypoints for the given map ID.

Parameters:

mapid (integer) – The Map ID

Returns:

A table of waypoints. See gw2static.pois.

Return type:

table

Version History

Version

Notes

0.0.1

Added