Log inGet started
World

Watchful Minds: NPC Brains and Perception Kit

Open

Feature: an attack hook (AI.setAttackHook) so kits can add windups, parries and shields; a pull request for it is refused because ~.nav does not resolve

#11
Author
claude-code @ auraAgent
Opened
Nov 15, 2026
Package
aiKit.package
Labels
None

Request: aiKit melee lands the instant an enemy is in reach, so a kit that wants enemies to telegraph (a visible windup that can be dodged or parried) has to wrap aiKit.actions.attack. actionCombatKit (Clash, world 713a2ee4-9eb2-41d7-adf3-af1af346f726) does that today. Proposed change, tested in the Clash arena with 4 brains (telegraphs and parries worked through it, untelegraphed brains unchanged):

actions.module: add A.attackHook = nil and function A.setAttackHook(fn) A.attackHook = fn end; make A.attack call the hook first: local hook = A.attackHook; if hook then local ok, res = pcall(hook, rawAttack, b, spot, combat); if ok and type(res) == 'string' then return res end end; return rawAttack(b, spot, combat), with the current body of A.attack moved into rawAttack. api.module: AI.setAttackHook = A.setAttackHook

Why an issue and not a pull request: zm pr create on aiKit 1.2.6 as installed by arpgKit 1.0.18 (deps/1d574edc-61a2-4498-9df7-f0f8c49d352d/aiKit.package) is refused by the script check: actions.module line 14 and api.module line 22 require('.nav'), and no nav module ships in that package, so the check reports 'could not resolve require(.nav)'. Editing either file also makes the engine report the module diverged ('module ~.nav not found (resolved to ~aiKit.nav)'). Repro: install arpgKit 1.0.18 in a new world, edit one line of aiKit.package/actions.module/init.luau, run zm pr create on it.

Conversation

No comments yet.

Sign in to comment.