ACRs
Example builds
The four builds in the template, and what each one shows.
The template comes with four builds in acrs/, ported from the Rust ACR plugin under the same file names. Each one shows a different part of the framework; read them next to this page.
lua-plugin-template.zip
The builds are in
my-plugin/acrs/.Power Mechanist
acrs/power_mechanist.lua, engineer, direct engine. Rifle with a grenade kit, and the mech.
- A tree with one group per weapon: each group has a
whenthat checks which skills are on the bar, so the tree plays the rifle or the kit, whichever is out. - Getting in and out of the kit is a node with several
when_anyconditions: any one of them is reason enough. - The mech's orders are
Kennelnodes in a group of their own, and the build overridesrotationto run that group before the rotation.
local mech_2 = Kennel(Kennel.SKILL_1, MECH_F2):skill_range():skill_radius()
local return_to_me = Kennel(Kennel.RETURN)
:insta_cast(true)
:when(function() return not util.has_buff(MECHANICAL_GENIUS_1) end)
self.mech = NodeGroup()
:push(11, return_to_me:enabled(settings, "return_to_me"))
:push(8, mech_2)
function PowerMechanist:rotation(target)
local engine = self:engine()
self.mech:execute(engine, target)
self.root:execute(engine, target)
endInferno Evoker
acrs/condition_evoker.lua, elementalist, direct engine with its own executor. Scepter and focus, building skill charge and spending it on Ignite.
- State between ticks: an opener group and a main group, switched by
state.did_opener, whichhandle_daemonkeeps up to date every tick. - Timers:
util.Timerholds back the charge skills while Ignite is due. - A profession resource:
util.energy("evoker_skill_charge"). - Its own executor:
self.executor = acr.engines.direct:with_cd(70)sends orders at most every 70 ms.
function ConditionEvoker:handle_daemon()
local state = self.state
if util.on_bar(CONFLAGRATION) then
state.ignite_timer = util.started_timer(2600)
state.did_opener = true
end
if util.not_in_combat() then
state.did_opener = false
end
endCondition Virtuoso
acrs/condition_virtuoso.lua, mesmer, queued engine. Dagger/sword and dagger/focus; the bladesongs wait for enough blades.
- Weapon swaps: one group per weapon set, each with a
WeaponSwap()node that swaps once that set's big skill is on cooldown.idle_groupswaps to dagger/sword out of combat, ready for the next fight. - Cast timing:
:last_trigger_of_type(0)counts dagger 2 and 3 as done at their last trigger of type 0 instead of the end of the cast, so the next skill goes out sooner. - Facing:
:pre_execute(util.face_target)turns towards the target first. - Boss checks:
target_is_invulnuses acr.encounters, so the build holds off on Matthias' shield and the Largos and Sabir barriers.
function ConditionVirtuoso:target_is_invuln()
return encounters.matthias_stacks() > 5 or encounters.largos_cc_phase() or encounters.sabir_cc_phase()
endHeal Chronomancer
acrs/heal_chrono.lua, mesmer, direct engine. The biggest build: a support that heals and keeps alacrity up.
- Wells where they help most:
:ground_targeted(Ground.BEST_BOON)for boons,Ground.BEST_HEALfor heals. - Overriding the runner's choices: it always takes the CC branch on break bars and falls back to the rotation when no CC is ready; it keeps healing while the target is invulnerable, and with nothing selected.
- Lots of settings: a toggle per skill, plus a number setting (
clone) thathandle_daemonkeeps in range.
function HealChrono:cc_skills_available() return true end
function HealChrono:cc_rotation(target)
local engine = self:engine()
if self.cc_group:can_execute(engine, target) then
self.cc_group:execute(engine, target)
else
self.root:execute(engine, target)
end
end
function HealChrono:handle_target_invuln(target)
self.root:execute(self:engine(), target)
end
function HealChrono:handle_no_target()
self.no_target:execute(self:engine(), nil)
end