Repository navigation
Plugin API
Everything a plugin page can call, hear and read. For building and testing a plugin, start with the plugin guide; for what a plugin is allowed to do and who decides, see Permissions and trust.
The whole API lives on window.axidps, set by the SDK the overlay serves at /_sdk/axidps.js.
Most of it needs no permission; the data feeds and the icon styling do.
| Area | Member | Kind | Needs |
|---|---|---|---|
| Lifecycle | ready(fn) |
call | |
| Events | on("fight") |
event | fight |
on("squad") |
event | squad |
|
on("players") |
event |
enemies (verified) |
|
on("combat") |
event |
combat (verified) |
|
on("logs"), logs.fetch(name) |
event, call |
logs (verified) |
|
on("position") |
event |
position (verified); squad mates also need squad
|
|
on("look") |
event | ||
on("edit"), on("settings"), on("perf"), on("opened"), on("frame") |
event | ||
| Storage | settings.get(), settings.set(obj) |
call | |
Manifest settings (options in the hub) |
manifest | ||
| Window | window.setTitle, setStatus, autoSize, resize, tip, toggle, close |
call | |
| Game icons | textures.targets, textures.set(rules), textures.clear() |
call |
textures (verified) |
| World | world.set(markers), world.clear(), world.shapes |
call |
world (verified); squad anchors also need squad
|
| Helpers | fmt, clock, esc, profColor, specIcon, fightStatus, emptyText, api |
value | |
| Network |
fetch / XMLHttpRequest to your network hosts |
browser | manifest network
|
| Look | CSS variables and body classes | CSS |
"Verified" means the permission is a deeper one: it only loads once the registry has approved
the plugin (see Trust). Underneath the SDK is a small
postMessage protocol; you never need to use it directly.
Load the SDK first, in every window's HTML:
<script src="/_sdk/axidps.js"></script>It sets window.axidps. The overlay serves the copy that matches the running axidps, so never
ship your own. It also adds the overlay's fonts and base styles to your page (see
Theming).
Calls fn(info) once the page has answered your frame (or at once, if it already has).
info is {plugin, window, api, permissions}: your plugin id, this window's id, the API
version (1) and the permissions the manifest names.
Calls fn(value) each time the page sends type. A handler added later gets the latest value
at once. Each handler gets its own copy of the value. Errors thrown in a handler are logged and
don't stop other handlers.
type |
value |
|---|---|
"fight" |
The live feed (see The live feed), or null until axidps core has sent one. Only sent if the manifest names fight. |
"squad" |
The squad feed (see The squad feed), or null until core sends one. Only sent if the manifest names squad. Needs an axidps with the squad feed; check `(axidps.events |
"players" |
The players feed (see The players feed), or null until core sends one. Only sent if the manifest names enemies. |
"combat" |
A batch of new combat events (see The combat feed). Only sent if the manifest names combat. Unlike the other events it is a stream: each batch holds only events not sent before, and a handler added later gets nothing until the next batch. Check `(axidps.events |
"logs" |
The logs axidps saved this session, newest first (see Saved logs). Only sent if the manifest names logs, and only when the list changes; a closed window hears it too. Check `(axidps.events |
"position" |
Your position and camera, up to 20 times a second while they change (see The position feed). Only sent if the manifest names position. Check `(axidps.events |
"look" |
{theme, tokens, style, opacity, compact, rows, textScale} (see Theming). |
"edit" |
true while the player is arranging windows. Your frame gets no mouse input then. |
"settings" |
This window's saved settings ({} if none). |
"perf" |
The game's performance over the last second, once a second: {fps, ping, tick_rate} (frames per second, ping in ms, server ticks per second, normally 25). 0 means not known yet. Needs no permission. |
"opened" |
Another of your plugin's windows opened this one with axidps.window.toggle: {from, data}, from being that window's id. {from: null, data: null} when it closed this one the same way, or the player closed it. Opened from the hub, a window hears nothing. Needs no permission. |
"frame" |
What your frame sits in: {clear, page}. clear is true when the player turned on the window's see-through background, so your text sits straight over the game; page is true for a hub page ("in": "hub"). The SDK also puts the classes axidps-clear and axidps-page on <body>: with axidps-clear the text colours turn light with a dark edge on every theme, and with axidps-page the body is as wide as the page instead of its content. Needs no permission. |
-
axidps.settings.get(): a copy of this window's settings ({}until they arrive). -
axidps.settings.set(obj): replace this window's settings withobjand save them.objmust be a plain object, at most 16 KB as JSON; a larger one is not saved (the SDK logs an error and the settings stay as they were).
Settings are per window and are kept when the plugin is switched off and on again. They are the only storage a plugin has.
Each enabled plugin's card in the hub has a cog. It opens a panel with, for each of the plugin's windows:
- two options every plugin window gets, kept by axidps and never sent to your page:
- Show title bar (on by default). Off hides the title bar; the player still moves the window in Arrange. The bar comes back while the window is not responding, or, in developer mode, while it has errors, so those warnings still show.
- Transparent background (off by default). On removes the window's background, border and blurred backdrop, so only what your page draws shows.
- the settings your manifest declares for that window, in order:
"settings": [
{"key": "big", "type": "toggle", "label": "Large numbers", "default": false},
{"key": "unit", "type": "choice", "label": "Units", "options": ["ms", "s"], "default": "ms"},
{"key": "rows", "type": "number", "label": "Rows", "min": 1, "max": 20, "step": 1, "default": 5}
]| Field | Rules |
|---|---|
key |
a-z 0-9 -, unique within the window. The name of the value in axidps.settings. |
type |
toggle, choice or number. |
label |
1–60 characters, shown as text. |
options |
choice only: 1–12 names of 1–40 characters each. |
min, max
|
number only: required, min ≤ max. |
step |
number only: above 0, default 1. The panel shows − and + buttons that move by it. |
default |
Must fit the type. Left out, it is false, the first option, or min. |
A bad entry makes the manifest invalid, like any other field (axidps plugin check says which).
There is no text type: the overlay gets mouse clicks from the game but no keys, so nothing could
be typed into it.
The values live in the window's settings store, the same one axidps.settings reads. A
declared key that isn't stored yet comes to your page as its default. When the player changes
one, axidps merges it into the stored object, saves it, and sends the whole object in a
settings event. So when your page calls settings.set, keep the keys it didn't write itself:
axidps.settings.set({...axidps.settings.get(), mine: 1});The bundled Performance plugin is a small example: its Large numbers toggle makes the line bigger.
-
axidps.window.setTitle(text): the title bar text (""puts back the manifest'stitle). -
axidps.window.setStatus(text, {live}): the small status beside the title.live: trueshows it in the "in combat" style. -
axidps.window.autoSize(on): on by default. The window follows the size of your page's<body>. -
axidps.window.toggle(id, data): open another of your plugin's windows (manifestid) beside this one, the way clicking a player opens Details. Called again with the samedatawhile it is open from this window, it closes it.datais any JSON, at most 16 KB (or none). The opened window gets the"opened"event. Once the player closes it, it is no longer tied to this window: opened again from the hub, it goes to its own spot. Not for hub pages. Needs axidps 0.2.0-rc.22 or later; checktypeof axidps.window.toggle === "function". -
axidps.window.close(): close this window. The player opens it again from the hub, or the window that opened it withtoggledoes (its next click opens it rather than closing it). A window opened withtogglegets"opened"with{from: null, data: null}. Use it when the window has nothing left to show, such as when the window that opened it went away. Not for hub pages. Needs axidps 0.2.0-rc.37 or later; checktypeof axidps.window.close === "function". -
axidps.window.resize(w, h): set the size yourself. Callaxidps.window.autoSize(false)first, or the next body size change replaces it. -
axidps.window.tip(el, text): showtextas a tooltip when the mouse is overel. Adata-tip="..."attribute on any element does the same.
Needs the textures permission. Restyles the game's own icons: recolours them, outlines them,
puts a ring behind them, scales or fades them. axidps finds the icons in the game's textures and
does the drawing; your plugin only says how each one should look.
-
axidps.textures.targets: the icons a rule can name:commander.red,commander.orange,commander.yellow,commander.green,commander.cyan,commander.blue,commander.purple,commander.magenta,commander.white,squad.commander,squad.lieutenant,mentor,marker.arrow,marker.circle,marker.heart,marker.square,marker.star,marker.spiral,marker.triangle,marker.cross,selection.orange,selection.blue,selection.green,selection.red,target,target.personal,target.combined,target.attack,target.attack-selected. One target covers every version of that icon (on the world, the cat-shaped commander tag, the minimap). -
axidps.textures.set(rules): replace your plugin's rules (at most 64). Rules stay while your plugin is enabled, so set them again whenever your settings load or change. -
axidps.textures.clear(): remove your plugin's rules.
A rule: every field but target is optional, and values outside their range are clamped.
| Field | Values | Default | |
|---|---|---|---|
target |
a name from targets
|
The icon. | |
mode |
keep, oklab, blend, luminance, solid
|
keep |
How the icon's colours become color. oklab keeps its shading around the new colour's lightness; blend keeps its lightness and takes the new colour's hue; luminance multiplies its brightness by the colour; solid fills it flat. keep leaves the colours alone. |
color |
"#rrggbb", "#rgb", "#rrggbbaa" or [r, g, b]
|
white | The new colour. |
brightness |
0 to 3 | 1 | Multiplies the result. |
contrast |
-0.3 to 0.3 | 0 |
oklab only: flattens or deepens the shading. |
keepExtremes |
0 to 1 | 0.8 |
oklab only: how much of the icon's own highlights and shadows survive. |
normalize |
true, false | true |
oklab only: lifts the darkest shading a little. |
outline |
{style, width, color, outer, softness, minimap} or absent |
none | Drawn under the icon. style: round, diamond (pointed corners) or double (the colour inside, outer beyond). width: pixels of a 128 px icon, 0 to 16 (default 4). outer: a colour, or "auto" (black or white, whichever stands out). softness: 0.5 to 8, higher is a harder edge (default 3). minimap: the width on minimap icons, pixels of a 32 px icon, 0 to 4 (default 1). |
ring |
{radius, thickness, color, outline} or absent |
none | A ring behind the icon. radius and thickness are fractions of half the icon's width (defaults 0.45 and 0.08). outline: a colour, "auto", or absent for none. Not drawn on minimap icons. |
scale |
0.5 to 3 | 1 | Size about the centre (not on minimap icons). Past what fits in the icon's own texture, axidps draws it bigger on screen (not the squad list's commander and lieutenant badges). Older axidps versions stop at 2. |
offsetY |
-0.5 to 0.5 | 0 | Moves the icon down by this fraction of its height. |
opacity |
0 to 1 | 1 | 0 hides the icon. |
axidps.textures.set([
{target: "commander.red", mode: "oklab", color: "#d55e00",
outline: {style: "round", width: 6, color: "#ffffff"}},
{target: "marker.star", ring: {color: "#000000", outline: "auto"}},
]);When two plugins style the same icon, the one whose id sorts last wins. axidps leaves icons alone while the Commander Tag Accessibility addon is loaded, since it restyles the same icons. The list of icon textures matches the one that addon uses, with thanks.
Markers drawn over the game world, like the game's own commander tag. Needs the world
permission. set(markers) replaces all of this plugin's markers (at most 64), clear()
removes them; they stay while the plugin is enabled, whether its window is open or not.
axidps.world.set([
{at: "commander", shape: "diamond", color: "#e69f00", size: 22, label: "Tag"},
{at: {account: ":Jo.5678"}, shape: "ring", color: "#56b4e9"},
{at: [-380.0, 19.5, 1010.0], shape: "square", color: "#009e73", label: "Rally",
maxDistance: 300},
]);| Field | Meaning |
|---|---|
at |
Where: "self" (over you), "commander" (over your squad's commander), {account} (over that squad mate), or [x, y, z], a point in metres on MumbleLink's axes (see The position feed). "commander" and {account} need squad as well; a squad mate too far away to be seen has no marker until they are near. |
offset |
[x, y, z] metres added to at. Default [0, 2.4, 0] (above the head) for players, [0, 0, 0] for a point. |
shape |
"circle" (default), "ring", "square" or "diamond" (axidps.world.shapes). |
color |
#rrggbb, default white. |
size |
The shape's size in pixels, 6–64 (default 20). It stays that size at any distance. |
label |
Text under the shape, at most 24 characters. |
labelColor |
#rrggbb, default white. |
maxDistance |
Not drawn farther than this from the camera (metres). 0, the default, is no limit. |
fadeNear |
Fades out closer than this to the camera (metres), so a marker over you doesn't cover the screen. 0 (default) never fades. |
axidps draws the markers itself, in the game's frame, with the game's camera, so they stay put
as you turn. They draw under the overlay's windows and over everything in the world (nothing
hides them behind walls), and not while the world map is open. A plugin with world alone
never learns where anyone is: it names the commander or an account, and axidps finds them.
Needs an axidps with axidps.world: check typeof axidps.world === "object".
The same helpers the built-in windows use:
-
axidps.fmt(n): a short number:1,234,12.3k,456k,1.23M,12.3M. -
axidps.clock(ms):m:ss. -
axidps.esc(s):sescaped for HTML. -
axidps.profColor(prof): the colour for a profession id (axidps.PROFis the list, index 1–9: Guardian, Warrior, Engineer, Ranger, Thief, Elementalist, Mesmer, Necromancer, Revenant). -
axidps.specIcon(spec): the URL of a specialization's icon for a player'sspec(like"Firebrand"), the icons the built-in tables show:<img src="${axidps.specIcon(p.spec)}">.""for no spec. -
axidps.fightStatus(feed):{text, live}for the title bar status, like the built-in windows: "in combat 1:23" (live), "last fight 1:23", "out of combat", "cleared" or "waiting for core". -
axidps.emptyText(feed): what an empty window says for this feed, like "No fight yet.". -
axidps.api:1. -
axidps.events: the event types this axidps sends toon(any other type is ignored). Events added within api 1 are checked here, for example(axidps.events || []).includes("squad"); an axidps older than this list has none of the later ones.
See The log. Errors (console.error, uncaught errors, unhandled rejections) also
count toward the developer mode error count.
The fight event's value. axidps core writes it at most twice a second while something
changes, and the page passes it on.
| Field | Meaning |
|---|---|
v |
The feed's format version, 1. |
t |
When it was written (Unix time, ms). |
state |
"idle" (no fight yet), "fight" (in combat) or "last" (the last fight, ended). |
cleared |
true after the player used Clear fight in the hub; players is then empty until the next fight. |
fight |
{duration_ms, map}: the fight's length so far and the map id (0 when idle). |
players |
Your squad's rows, highest damage first (below). |
timeline |
{bucket_ms, out, in}: the squad's damage dealt (out) and taken (in) per second (bucket_ms is 1000), or null when idle. |
healing |
{out, in}: your healing given by target and received by source, largest first. Each entry is {name, prof, elite, me, healing, barrier}. null when idle. |
detail |
The breakdown of the player open in the built-in Details window, or null when it is closed: {account, name, prof, spec, bucket_ms, out, in, skills_out, skills_in, states, out_condi, heal_full, heal_out, heal_in, heals, heals_in, heal_targets, heal_sources, strip_series, cleanse_series, strips, cleanses, casts, skill, boon}. out/in are that player's damage dealt and taken per second, out_condi the condition part of out; skills_out/skills_in list up to 60 skills each as {id, name, damage, hits, condi} (condi: a condition), largest first, with any of min, max (the smallest and largest hit), crit, glance, block, evade, interrupt, absorb, miss (strikes by result) and barrier (damage that hit barrier) that are above zero; states lists [ms into the fight, "down" | "dead" | "up"]. heal_out/heal_in are healing plus barrier given and received per second; heals/heals_in list skills as {id, name, healing, barrier, hits}, heal_targets/heal_sources players as {name, account, prof, healing, barrier}; for anyone but you and players sharing their heals (heal_full false) these hold only what passed between them and you. strips/cleanses list the boons stripped and conditions cleansed from others as {id, name, count} (removals, not stacks), and strip_series/cleanse_series count them per second. casts lists the player's cast starts as [ms into the fight, skill id], oldest first; skill is the skill selected in the Details window as {id, out, heal} (its damage dealt and healing given per second), or null; when the selection is a squad boon, boon is {id, up}: the player's uptime of it per second in milliseconds (stack-milliseconds for Might and Stability), else null. |
relay |
Who shares over the relay, or null when core runs without it: {state, peers}. state is your own connection: "connected", "reconnecting" (connecting, or retrying after a lost connection), "idle" (sharing is on but you are not in a squad or party) or "off" (the setting is off). peers lists, by account as {account, fresh}, every other squad member connected to the relay in your group, as the relay reports it (with a relay that does not report it, the members whose relayed data reached you, forgotten after 10 minutes of silence). In a group axidps stays connected between fights, so the list shows everyone running it with sharing on, fighting or not. fresh is true when data came from them in the last 5 seconds (sharing now), false when they are online but sending nothing. A new group starts the list again. |
Each player row:
| Field | Meaning |
|---|---|
name, account
|
Character and account name. |
prof, elite, spec
|
Profession id (1–9), elite specialization id, and its name. |
group |
Subgroup (0 if none). |
me |
true for you. |
damage, power, condi
|
Damage dealt: total, strike, condition. |
dps |
Damage per second. |
downs, kills
|
Enemies downed and killed. |
down_contrib |
Down contribution: damage that led to enemy downs. |
deaths, downed
|
Times died and times downed. |
taken |
Damage taken. |
strips, cleanses, cleanses_self
|
Boons stripped from enemies; conditions cleansed from squad mates; conditions cleansed from oneself. Each counts one per removal, however many stacks it took, as Elite Insights and axilog do; a pet's removals are not its master's. |
strips_npc, cleanses_npc
|
The strips and cleanses the player's pets and minions made, counted the same way and credited to the master apart from strips and cleanses (the arcdps meter's "from npcs"). |
cc |
Crowd control the player landed on others (stuns, knockdowns, pulls, fears and the like), one per hit. |
breakbar |
Defiance bar (breakbar) damage the player did, with one decimal. |
healing, barrier, hps
|
Healing and barrier given, and both per second. |
healing_in, barrier_in
|
Healing and barrier received. |
heal_full |
true if the healing numbers are complete (you, and players sharing their heals). Otherwise they only count what passed between that player and you. |
boons |
Boon uptime and generation: {"<boon id>": [up, self, group, squad]}, in milliseconds since the fight started (stack-milliseconds for Might and Stability). group and squad are per target: the time the player kept the boon up on subgroup mates (or squad mates), averaged over them. Only boons with a nonzero value appear; the field is left out when there are none. The values can go down a little. See Boons. |
The squad event's value: who is in your squad or party. Only plugins whose manifest names
squad get it, and it is never part of the fight feed. axidps core writes it with the live
feed, at most twice a second and only when it changes, between fights too.
{
"members": [
{"name": "Rin Ashfall", "account": ":Rin.1234", "prof": 1, "elite": 62, "spec": "Firebrand",
"group": 1, "me": false, "commander": true, "here": true, "state": "up"}
],
"commander": ":Rin.1234",
"fight": {"active": false}
}| Field | Meaning |
|---|---|
members |
One row per squad or party member axidps has seen on this map, you included, sorted by group, then name. |
commander |
The account of the squad member wearing a commander tag, or null. |
fight |
{active}: whether a fight is running. |
truncated |
true when there were more than 100 rows and the rest were left out. Absent otherwise. |
Each row:
| Field | Meaning |
|---|---|
name, account
|
Character and account name (either can be "" for a moment after a player arrives). |
prof, elite, spec
|
Profession id (1–9), elite specialization id, and its name, as in the live feed. |
group |
Subgroup (1–15). In a party, everyone is group 1. |
me |
true for you. |
commander |
true if the player wears a commander tag. |
here |
true if the player is near you now. A member who went out of range keeps a row with here: false until they come back or you change maps. |
state |
"up", "down" or "dead". |
Squad members you haven't been near on this map aren't listed yet. Rows never carry a position:
where your squad is comes with position (see The position feed).
The combat event's value: combat events as they happen, a batch at a time, about twice a
second. Only plugins whose manifest names combat get it. axidps core keeps the feed only while
such a plugin runs, so the first batch comes a few seconds after the plugin loads.
{
"events": [
{"seq": 41, "t": 812345, "type": "strike", "src": 1, "dst": 20, "skill": 9168,
"value": 2140, "result": "crit"},
{"seq": 42, "t": 812351, "type": "buff", "src": 4, "dst": 1, "skill": 740, "duration": 5000}
],
"agents": {
"1": {"kind": "squad", "name": "Rin Ashfall", "account": ":Rin.1234", "prof": 1,
"elite": 62, "spec": "Firebrand", "group": 1, "me": true},
"4": {"kind": "squad", "name": "Jo", "account": ":Jo.5678", "prof": 4, "elite": 55,
"spec": "Soulbeast", "group": 1, "me": false},
"20": {"kind": "player", "team": 5, "prof": 2, "elite": 18, "spec": "Berserker"}
},
"skills": {"9168": "Zealot's Defense", "740": "Might"},
"missed": 0
}| Field | Meaning |
|---|---|
events |
The new events, oldest first. |
agents |
Every agent the events name, by id: {kind: "squad", name, account, prof, elite, spec, group, me} for your squad or party, {kind: "player", team, prof, elite, spec} for other players (no name or account), {kind: "npc", species, name}, {kind: "gadget", name} or {kind: "unknown"}. A pet, minion or clone also has master, its owner's id, and the owner is listed too. |
skills |
Skill and buff names by id, for the ids the events name ("" if not known). |
missed |
How many events were lost before this batch (core keeps 1.5 s of them, at most 4000; a stalled page can fall behind). Usually 0. |
Each event has seq (numbers every event in order, starting again at 1 when axidps core
restarts), t (core time in ms: only differences mean anything), type, src and dst
(agent ids; 0 = none), and by type (condi and heal also have relayed: true when a squad
mate sent them over the relay):
type |
Fields | |
|---|---|---|
strike |
skill, value, result
|
A direct hit. result is "normal", "crit", "glance", "block", "evade", "interrupt", "absorb", "miss" (no damage for the last five), "kill", "down" (the hit that killed or downed dst), "breakbar" (value is defiance bar damage in tenths), "cc" (crowd control landed) or "other". |
condi |
skill, value, barrier
|
A condition damage tick: skill is the condition's id, value the damage, barrier the part barrier took. |
heal |
skill, value, barrier
|
Healing plus barrier given; barrier is the barrier part. |
buff |
skill, duration
|
A boon, condition or other buff applied to dst: duration in ms, null for an endless one. |
buff_end |
skill |
Every stack of skill removed from dst; src is who removed it (0 = it ran out). |
cast |
skill |
src started casting skill (at dst, or 0). |
state |
state |
src is now "up", "down" or "dead" (dst is 0). |
What the feed carries:
- Every event involving your squad or party, as source or target: you, your squad mates, and their pets, minions and clones. Events between NPCs (a boss casting, adds healing each other) are in too.
- Never an event between two players outside your squad, or between such a player and an NPC. Two enemy players fighting each other are invisible here.
-
condiandhealcome only for what the game reports to you: your own condition damage and healing, given and taken, and what squad mates sharing over the relay send. Strikes, buffs, casts and states come for everyone near you. - No positions, ever.
The position event's value: where you are and where the camera looks, from the game's
MumbleLink. It comes up to 20 times a second while either changes, and not at all while you
stand still with the camera at rest. With squad as well, it also carries your squad mates' and
the squad markers' positions, which change about twice a second.
{
"map": 38,
"avatar": {"pos": [-412.31, 21.07, 993.6], "front": [0.71, 0, 0.71]},
"camera": {"pos": [-416.9, 24.3, 988.1], "front": [0.62, -0.31, 0.72], "fov": 1.222},
"map_open": false,
"squad": [{"account": ":Jo.5678", "me": false, "pos": [-398.5, 20.9, 1002.13]}],
"markers": [{"slot": 0, "pos": [-380.0, 19.5, 1010.0]}]
}| Field | Meaning |
|---|---|
map |
The map id. |
avatar |
{pos, front}: your character's position and the unit vector it faces. |
camera |
{pos, front, fov}: the camera's position, the unit vector it looks along, and the vertical field of view in radians. |
map_open |
true while the world map is open. |
squad |
With squad only: {account, me, pos} for each squad or party member near enough for the game to show (you included, me: true). |
markers |
With squad only: the squad's ground markers that are placed, {slot, pos}, slot 0–7 in the game's order. |
Positions are in metres on MumbleLink's axes: x east, y up, z north, the same numbers
MumbleLink gives other addons. For a top-down map, plot x against z.
No position of anyone outside your squad or party is ever in this feed, or anywhere else in the plugin API.
With the logs permission, on("logs") gets the logs axidps core wrote this session, newest
first (at most 20), each time a new one is written:
[{"name": "20261128-213045.zevtc", "size": 482113, "end": 1795901445, "duration_ms": 94000,
"map": 38}]| Field | Meaning |
|---|---|
name |
The file name (the log's folder isn't given). |
size |
Its size in bytes. |
end |
When the fight ended (Unix time, s). |
duration_ms |
How long the fight was. |
map |
The map id (0 if not known). |
axidps.logs.fetch(name) resolves to the file's bytes as an ArrayBuffer (a zipped EVTC
log), for example to upload it to a log site named in your network:
let lastUploaded = "";
axidps.on("logs", async logs => {
const newest = logs[0];
if (!newest || newest.name === lastUploaded) return;
const bytes = await axidps.logs.fetch(newest.name);
const body = new FormData();
body.append("file", new Blob([bytes]), newest.name);
await fetch("https://dps.report/uploadContent?json=1", {method: "POST", body});
lastUploaded = newest.name;
});Only logs in the current list can be fetched: nothing else on disk is reachable, and a log
written before axidps started isn't listed. The first list comes with the plugin's first
logs event, so a plugin that loads mid-session sees the logs already written.
The players event's value: who is around you, by team and specialization, and who fought this
fight. Only plugins whose manifest names enemies get it, and it is never part of the fight
feed. axidps core writes it with the live feed, at most twice a second and only when it
changes, also between fights, since players arrive and leave then.
{
"you": {"team": 2},
"teams": [{"team": 2, "colour": "blue", "name": "Blue"},
{"team": 5, "colour": "red", "name": "Red"}],
"players": [
{"team": 5, "prof": "Guardian", "spec": "Firebrand", "squad": false, "self": false,
"here": true, "fought": true}
],
"fight": {"active": true}
}| Field | Meaning |
|---|---|
you |
{team}: your team id, or null before it is known. |
teams |
One entry per team among the rows, plus yours: {team, colour, name}. colour is "red", "blue", "green" or null (no colour, for example outside WvW); name is "Red", "Blue" or "Green", else "Team N". |
players |
One row per player in range now or who fought this fight, you included. Pets, minions, clones and NPCs are never rows. Sorted by team, then spec, then squad. |
fight |
{active}: whether a fight is running. Between fights, fought shows the last fight and resets when the next one starts. |
truncated |
true when there were more than 400 rows and the rest were left out. Absent otherwise. |
Each row has seven fields:
| Field | Meaning |
|---|---|
team |
The player's team id, or null if not known. |
prof |
Profession name, or null if not known. |
spec |
Elite specialization name, or the profession name when there is none; null if not known. |
squad |
true if the player is in your squad. |
self |
true for you. |
here |
true if the player is in range now. A player who fought and then left range keeps a row with here: false until the next fight starts. |
fought |
true if, this fight, the player (or their pet, minion or clone) hit a player on another team for damage, or applied a condition to one. |
Rows are anonymous: they carry no character or account names, no ids, no positions, and nothing
that tells one player from another between updates. Their order says nothing about when a player
arrived. A map change empties teams and players until the new map's players arrive.
The SDK sets the player's theme on your page as CSS variables and keeps them current. Use them
and your window matches every theme (midnight glass terminal ember verdant frost contrast).
Colours (the look event's tokens, set as --<name>):
| Variable | Use |
|---|---|
--bg, --bar
|
Window and title bar background. |
--raise, --raise-hi
|
Raised surfaces (rows, cards), and their hover. |
--btn, --btn-hi
|
Buttons, and their hover. |
--line, --line-hi
|
Borders and dividers, and a stronger one. |
--text, --title, --dim, --faint
|
Body text, headings, secondary and faint text. |
--accent, --accent-hi, --accent-line, --accent-soft
|
The accent colour, a lighter one, an accent border, and an accent tint. |
--good, --bad
|
Good and bad numbers. |
--tip |
Tooltip background. |
The player's opacity setting is already applied to --bg, --bar, --raise and --raise-hi.
Your page's own background is transparent: the window around it draws the background.
Shape and type (the look event's style):
| Variable | Use |
|---|---|
--font |
The font stack. IBM Plex Sans, Fira Code and Lato are included. |
--fs |
Font size, with the player's text size applied. |
--r, --rs
|
Window and control corner radius. |
--bw |
Border width. |
--rh, --bh
|
Table row height and title bar height, for the text size and compact mode. |
--text-scale |
The text size as a factor (1 is Normal). Multiply your own fixed sizes by it: font-size: calc(16px * var(--text-scale)). |
The SDK also adds the class compact to <body> in compact mode and caps for themes with
uppercase titles and headers. Compact mode is spacing only: it makes --rh and --bh smaller
but leaves the text at the player's text size, so use it for padding, not font sizes.
The look event's other fields: theme (the theme id), style.bar ("fill", "flat" or
"line"), style.rows ("fill" or "line", how meter rows draw their bars), style.caps,
opacity (0.5–1), compact (bool), rows (the most table rows the player wants shown,
1–50) and textScale (the Text size setting as a factor: 0.8, 0.9, 1, 1.15, 1.3 or
1.5, for Smallest, Small, Normal, Large, Larger and Largest). style.fs, style.rh and
style.bh stay the theme's own values; the CSS variables above have the text size and compact
mode applied.
A page in the hub's Options (the frame event's page) keeps the hub's text size: its
--text-scale is 1 and --fs is the theme's, though textScale still reports the setting.
The SDK's base styles make the page transparent, set the font, turn off text selection, and make
<body> inline-block and as wide as its content, so the window fits it.
The SDK does all of this for you; it is here for reference. Frame and page talk with
postMessage. Every message is an object {axidps: 1, type, ...}. The page knows which frame a
message came from by its sender alone, so a frame can only speak for itself.
Frame to page:
type |
Fields | |
|---|---|---|
hello |
The SDK has loaded (sent once per page load). | |
resize |
w, h
|
The page's size in px. |
title |
text |
Title bar text (at most 80 characters). |
status |
text, live
|
Status text (at most 80 characters) and whether it is live. |
settings |
value |
Save this object as the window's settings (at most 16 KB as JSON). |
log |
level, msg
|
"warn" or "error", and the message. |
pong |
n |
The answer to ping. |
textures |
rules |
This plugin's icon rules (at most 64; only with the textures permission). |
world |
markers |
This plugin's world markers (at most 64; only with the world permission). |
Page to frame:
type |
Fields | |
|---|---|---|
ready |
plugin, window, api, permissions
|
The answer to hello. |
settings |
value |
The window's settings. |
look |
theme, tokens, style, opacity, compact, rows, textScale
|
The theme and display settings. |
edit |
on |
Arrange mode on or off. |
fight |
feed |
The live feed (only with the fight permission). |
players |
players |
The players feed (only with the enemies permission). |
squad |
squad |
The squad feed (only with the squad permission). |
combat |
batch |
New combat events (only with the combat permission). |
logs |
logs |
The saved logs (only with the logs permission). |
position |
position |
Your position and camera, and your squad's with squad (only with the position permission). |
ping |
n |
Sent every 2 s; answer with pong. |
After hello the page sends ready, settings, look, edit, then fight, players and squad (each only with its permission). The page drops
any message that isn't one of these with fields of the right types.
api is the major version of everything in this guide. Within version 1, calls, events,
message types and fields are only ever added, never removed or changed. The overlay serves
/_sdk/axidps.js itself, so your plugin always runs with the SDK that matches the player's
axidps. A plugin for a later api is listed as "needs a newer axidps" instead of loading.
So a plugin can run on an axidps older than a feature it uses: check before relying on one.
Events are listed in axidps.events; calls are checked with typeof, like
typeof axidps.window.close === "function". A permission whose API an older axidps lacks is
still granted there, it just gives nothing.