Crate arcdps

Source
Expand description

Bindings for ArcDPS plugins.

§Usage

Plugins export information for ArcDPS via the export! macro. To see which fields are supported by it, have a look at SupportedFields.

use std::error::Error;
use arcdps::{Agent, Event, StateChange};

arcdps::export! {
    name: "Example Plugin",
    sig: 0x12345678, // change this to a random number
    init,
    combat: custom_combat_name,
}

fn init() -> Result<(), String> {
    // may return an error to indicate load failure
    Ok(())
}

fn custom_combat_name(
    event: Option<&Event>,
    src: Option<&Agent>,
    dst: Option<&Agent>,
    skill_name: Option<&str>,
    id: u64,
    revision: u64,
) {
    if let Some(event) = event {
        if let StateChange::EnterCombat = event.get_statechange() {
            // source agent has entered combat
        }
    }
}

§Unofficial Extras

Unofficial Extras support is hidden behind the extras feature flag.

use arcdps::extras::{UserInfoIter, UserRole};

arcdps::export! {
    name: "Example Plugin",
    sig: 123,
    extras_squad_update,
}

fn extras_squad_update(users: UserInfoIter) {
    for user in users {
        if let UserRole::SquadLeader | UserRole::Lieutenant = user.role {
            // user can place markers
        }
    }
}

Re-exports§

pub use arcdps_imgui as imgui;

Modules§

callbacks
Callback types.
evtc
ArcDPS API structs.
exports
ArcDPS exports.
extras
Unofficial Extras support.
log
Logging via the log crate.

Macros§

export
Creates plugin exports for ArcDPS.

Structs§

Agent
Represents an agent in a realtime combat event.
AgentOwned
Agent with an owned String name.
Event
ArcDPS event.
SupportedFields
Reference on what fields are currently supported by the export! macro.

Enums§

Activation
Skill activation (cast).
Affinity
Whether the agent is an ally or enemy.
Attribute
Attributes for buff formulas.
BuffCategory
Buff info category after 13 December 2022.
BuffCycle
Combat buff cycle.
BuffRemove
Combat buff remove.
CustomSkill
ArcDPS custom skill ids.
Language
GW2 client language.
Profession
Player profession.
Specialization
Player specialization.
StateChange
Combat state change kinds.
Strike
Strike types.

Functions§

d3d11_device
Returns the DirectX 11 device, if available.
d3d_version
Returns the current DirectX version.
dxgi_swap_chain
Returns the DirectX swap chain, if available.
strip_account_prefix
Strips the ':' prefix from an account name if present.