{
  "id": "auto-combat-ai",
  "title": "Auto Combat AI",
  "manifest": "https://r2.foundryvtt.com/packages-public/auto-combat-ai/module.json",
  "protected": true,
  "version": "1.0.0",
  "compatibility": {
    "minimum": "13",
    "verified": "14",
    "maximum": "14"
  },
  "authors": [
    {
      "name": "LenexTL",
      "email": "twitchlenex@gmail.com",
      "discord": "lenex_ats",
      "flags": {}
    }
  ],
  "esmodules": [
    "scripts/auto-combat-ai.js"
  ],
  "flags": {
    "canUpload": true
  },
  "description": "<p>Tired of manually controlling every NPC during combat? Auto Combat AI handles your NPCs for you. Picking targets, rolling for attacks, moving around the scene, and ending their turn. All without lifting a finger.</p><p>Every token gets its own settings, so you can fully customize each individual NPC to behave exactly how you want them to, whilst focusing on the important ones and controlling them yourself.</p><hr /><h2><strong>Socials:</strong></h2><p><a href=\"https://www.patreon.com/c/LenexTL\" target=\"_blank\" rel=\"nofollow noopener\"><strong>Patreon</strong></a></p><p><a href=\"https://discord.gg/7g2j6Zzuhd\" target=\"_blank\" rel=\"nofollow noopener\"><strong>Discord</strong></a></p><hr /><h2><strong>Features:</strong></h2><ul><li><p><strong>Fully Automated NPCs:</strong> targeting, movement, attacking, and ending turns, hands-free</p></li><li><p><strong>Per-Token Setup:</strong> every token configured independently (enable AI for one, disable for another)</p></li><li><p><strong>Smart Pathfinding:</strong> native A* movement that respects every wall type</p></li><li><p><strong>Line of Sight:</strong> moves around walls and only fires when it has a clear shot</p></li><li><p><strong>Target Priority:</strong> nearest, lowest HP, lowest AC, most damaged %, or random</p></li><li><p><strong>Detection Range:</strong> won't aggro the whole map, ignores distant targets</p></li><li><p><strong>Movement Styles:</strong> Close In, Hold Position, Hold Range, or Flee</p></li><li><p><strong>Self-Preservation:</strong> flees when badly wounded, towards an Ally or away from enemies</p></li><li><p><strong>Only Acts if Provoked:</strong> guards and neutrals that don't start the fight</p></li><li><p><strong>Condition Aware:</strong> respects stun/paralyzed/restrained/etc</p></li><li><p><strong>Multiattack:</strong> sequence an NPCs attacks to match its statblock</p></li><li><p><strong>Spellcasting:</strong> cantrips &amp; leveled spells, upcasting consumes the right slot</p></li><li><p><strong>Situational Spellcasting:</strong> picks the right spell for the targets distance</p></li><li><p><strong>Smart AOE Placement:</strong> aims area spells for the most enemies and fewest allies hit</p></li><li><p><strong>Intelligence Levels:</strong> how carefully it spares allies with area spells</p></li><li><p><strong>Elevation:</strong> NPCs will not attack elevated creatures if they can't reach it (flying, climbing, etc.)</p></li><li><p><strong>Flanking:</strong> NPCs will try and flank an enemy if possible (only gives advantage if Midi-QOL Flanking is enabled)</p></li><li><p><strong>Self &amp; Ally Healing:</strong> NPC's heals themselves &amp; run to a wounded ally, via spells or potions</p></li><li><strong>NPC vs NPC: </strong>token disposition decides whose an ally, and whose an enemy, so NPCs can fight each other</li><li><p><strong>Frustration Meter:</strong> stops chasing a target it can't hit / reach and moves onto another target</p></li><li><p><strong>Presets:</strong> one-click personalities &amp; settings you can fine tune</p></li><li><p><strong>Ask-First &amp; Confirm Casts:</strong> approve (or swap) each action before it happens</p></li><li><p><strong>Difficulty Dials:</strong> action delay, AOE cooldown, multiattack cooldown</p></li><li><p><strong>Debug Mode:</strong> log every NPC decision and action to the console</p></li><li><p><strong>Requires Midi-QOL:</strong> built on it and fully compatible</p></li></ul><h2>How to set it up</h2><p>Simply select a token, and on the right hand side (under Token Controls) click the Robot icon. From there, customize the settings however you want and the AI will do just that.</p><p>Almost all features are optional and can be enabled or disabled to meet your needs.</p><p>If you run into any issues, please join our official discord and submit a ticket there, and we will try and help you as fast as possible.</p><h2>Disclaimer</h2><p>Auto Combat AI is 100% code-derived tactical automation. It does NOT use external LLMs (ChatGPT, Claude, Gemini, etc.), or cloud-based networks. Every decision the AI makes is handled entirely by localized logic trees running natively inside your FoundryVTT client.</p><p>Spells that have multiple missiles (Magic Missile, Scorching Rays, etc.) are sadly not supported / fully functional with this module due to how Midi-QOL handles them. You can still use them, but they will require you to manually enter how many missiles should hit one target.</p><p>I would also highly recommend properly testing your NPCs AI before a combat scenario in your session to ensure it acts exactly how you want it to behave, and nothing goes wrong during combat.</p>",
  "styles": [
    {
      "src": "styles/auto-combat-ai.css"
    }
  ],
  "relationships": {
    "requires": [
      {
        "id": "midi-qol",
        "type": "module",
        "compatibility": {}
      }
    ]
  }
}