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 evtc::Agent;
pub use evtc::AgentOwned;
pub use arcdps_imgui as imgui;
Modules§
- Callback types.
- ArcDPS API structs.
- ArcDPS exports.
Macros§
- Creates plugin exports for ArcDPS.
Structs§
- ArcDPS event.
- Reference on what fields are currently supported by the
export!
macro.
Enums§
- Skill activation (cast).
- Whether the agent is an ally or enemy.
- Attributes for buff formulas.
- Buff info category after 13 December 2022.
- Combat buff cycle.
- Combat buff remove.
- ArcDPS custom skill ids.
- GW2 client language.
- Player profession.
- Player specialization.
- Combat state change kinds.
- Strike types.
Functions§
- Returns the DirectX 11 device, if available.
- Returns the current DirectX version.
- Returns the DirectX swap chain, if available.
- Strips the
':'
prefix from an account name if present.